From 61bfb22f27f5216f989c023a5e39fad7e356d2d6 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Fri, 3 Aug 2012 23:23:13 +0200 Subject: Basic font rendering - added basic font rendering - minor refactoring & fixes --- src/math/intsize.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'src/math/intsize.h') diff --git a/src/math/intsize.h b/src/math/intsize.h index f4b2431..d53de85 100644 --- a/src/math/intsize.h +++ b/src/math/intsize.h @@ -20,6 +20,9 @@ #pragma once +#include "math/intpoint.h" + + // Math module namespace namespace Math { @@ -31,9 +34,9 @@ namespace Math struct IntSize { //! Width - int w; + long w; //! Height - int h; + long h; //! Constructs a zero size: (0,0) inline IntSize() @@ -42,7 +45,7 @@ struct IntSize } //! Constructs a size from given dimensions: (w,h) - inline explicit IntSize(int w, int h) + inline explicit IntSize(long w, long h) { this->w = w; this->h = h; @@ -53,6 +56,12 @@ struct IntSize { w = h = 0; } + + //! Converts Point to Size + inline static Math::IntSize FromIntPoint(Math::IntPoint p) + { + return Math::IntSize(p.x, p.y); + } }; // struct Size -- cgit v1.2.3-1-g7c22