Gorgon Game Engine
SizelessDrawable Class Referenceabstract

A drawable object that does not have a size and requires a region to draw. More...

Public Member Functions

virtual ~SizelessDrawable ()
 

Protected Member Functions

virtual Geometry::Size calculatesize (const Geometry::Size &area) const =0
 This function should return the size of the object when it is requested to be drawn in the given area. More...
 
virtual Geometry::Size calculatesize (const SizeController &controller, const Geometry::Size &s) const =0
 This function should return the size of the object when it is requested to be drawn in the given area. More...
 
virtual void drawin (TextureTarget &target, const Geometry::Rectanglef &r, RGBAf color) const =0
 This function should draw this drawable inside the given rectangle. More...
 
virtual void drawin (TextureTarget &target, const SizeController &controller, const Geometry::Rectanglef &r, RGBAf color) const =0
 This function should draw this drawable inside the given rectangle according to the given controller. More...
 

Detailed Description

A drawable object that does not have a size and requires a region to draw.

Constructor & Destructor Documentation

◆ ~SizelessDrawable()

virtual ~SizelessDrawable ( )
virtual

Member Function Documentation

◆ calculatesize() [1/2]

virtual Geometry::Size calculatesize ( const Geometry::Size area) const
protectedpure virtual

This function should return the size of the object when it is requested to be drawn in the given area.

If size contains is a negative value, this function should try to return native size of the object. If no such size exists, a logical size should be returned.

◆ calculatesize() [2/2]

virtual Geometry::Size calculatesize ( const SizeController controller,
const Geometry::Size s 
) const
protectedpure virtual

This function should return the size of the object when it is requested to be drawn in the given area.

This variant should use the given size controller. If the object already has a controller, given controller should be given priority. If h parameter is a negative value, this function should try to return native size of the object. If no such size exists, a logical size should be returned.

◆ drawin() [1/2]

virtual void drawin ( TextureTarget target,
const Geometry::Rectanglef r,
RGBAf  color 
) const
protectedpure virtual

This function should draw this drawable inside the given rectangle.

◆ drawin() [2/2]

virtual void drawin ( TextureTarget target,
const SizeController controller,
const Geometry::Rectanglef r,
RGBAf  color 
) const
protectedpure virtual

This function should draw this drawable inside the given rectangle according to the given controller.

If this object already have a size controller, this given controller should be given priority.


The documentation for this class was generated from the following file: