27 #ifndef _CEGUIImage_h_ 28 #define _CEGUIImage_h_ 30 #include "CEGUI/ChainedXMLHandler.h" 31 #include "CEGUI/String.h" 32 #include "CEGUI/ColourRect.h" 33 #include "CEGUI/Rect.h" 76 typedef AutoScaledMode return_type;
77 typedef return_type safe_method_return_type;
78 typedef AutoScaledMode pass_type;
79 typedef String string_return_type;
81 static const String& getDataTypeName()
83 static String type(
"AutoScaledMode");
88 static return_type fromString(
const String& str)
90 if (str ==
"vertical")
94 else if (str ==
"horizontal")
98 else if (str ==
"min")
102 else if (str ==
"max")
106 else if (str ==
"true" || str ==
"True")
116 static string_return_type toString(pass_type val)
138 else if (val == ASM_Both)
144 assert(
false &&
"Invalid auto scaled mode");
158 class CEGUIEXPORT Image :
165 virtual const String& getName()
const = 0;
167 virtual const Sizef& getRenderedSize()
const = 0;
168 virtual const Vector2f& getRenderedOffset()
const = 0;
171 const Rectf& dest_area,
172 const Rectf* clip_area,
175 virtual void notifyDisplaySizeChanged(
const Sizef& size) = 0;
180 const Rectf* clip_area = 0)
const 183 render(buffer,
Rectf(position, getRenderedSize()), clip_area, colours);
188 const Rectf* clip_area,
191 render(buffer,
Rectf(position, getRenderedSize()), clip_area, colours);
197 const Rectf* clip_area = 0)
const 200 render(buffer,
Rectf(position, size), clip_area, colours);
206 const Rectf* clip_area,
209 render(buffer,
Rectf(position, size), clip_area, colours);
220 static void computeScalingFactors(AutoScaledMode mode,
221 const Sizef& display_size,
222 const Sizef& native_display_size,
228 void elementStartLocal(
const String& element,
230 void elementEndLocal(
const String& element);
235 #endif // end of guard _CEGUIImage_h_ Definition: cegui/include/CEGUI/Image.h:60
Definition: cegui/include/CEGUI/MemoryAllocatedObject.h:109
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
Abstract class defining the interface for objects that buffer geometry for later rendering.
Definition: cegui/include/CEGUI/GeometryBuffer.h:42
Definition: cegui/include/CEGUI/Image.h:47
Class that holds details of colours for the four corners of a rectangle.
Definition: cegui/include/CEGUI/ColourRect.h:43
Definition: cegui/include/CEGUI/Image.h:52
AutoScaledMode
Definition: cegui/include/CEGUI/Image.h:39
Class representing a block of attributes associated with an XML element.
Definition: cegui/include/CEGUI/XMLAttributes.h:46
Definition: cegui/include/CEGUI/Image.h:56
Helper class used to convert various data types to and from the format expected in Property strings...
Definition: cegui/include/CEGUI/ForwardRefs.h:84
No auto scaling takes place.
Definition: cegui/include/CEGUI/Image.h:42
Definition: cegui/include/CEGUI/Image.h:68
Abstract XMLHandler based class.
Definition: cegui/include/CEGUI/ChainedXMLHandler.h:36
Class encapsulating operations on a Rectangle.
Definition: cegui/include/CEGUI/ForwardRefs.h:89
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62