21 #include "Dimension.h" 26 if(unit == PERCENTAGE)
27 return room*percentage/100.0f;
28 if(unit == PERCENTAGE_PLUS_PIXELS)
29 return room*percentage/100.0f + (float)pixels;
35 dim.percentage = percentage;
47 dim.percentage = percentage;
float getSize(float room)
static Dimension fromPixels(int pixels)
static Dimension fromPercentagePlusPixels(float percentage, int pixels)
static Dimension fromPercentage(float percentage)