Lomse library. API documentation  0.30.0
GmoObj Class Reference

#include <lomse_gm_basic.h>

Inheritance diagram for GmoObj:
GmoBox GmoShape GmoBoxDocPage GmoBoxDocPageContent GmoBoxDocument GmoBoxScorePage GmoBoxSystem GmoCompositeShape GmoSimpleShape GmoShapeStaff

Detailed Description

Abstract class from which all graphical objects derive. All graphical objects have a bounding box and a position, and know how to draw themselves.

Public Member Functions

Size and position
LUnits get_width ()
 
LUnits get_height ()
 
LUnits get_left () const
 
LUnits get_top () const
 
LUnits get_right () const
 
LUnits get_bottom () const
 
bool bounds_contains_point (UPoint &p)
 
URect get_bounds ()
 
UPoint get_origin ()
 
USize get_size ()
 

Member Function Documentation

◆ bounds_contains_point()

bool GmoObj::bounds_contains_point ( UPoint &  p)

Returns true if the point is inside this object bounding box rectangle.

Parameters
pThe point to be tested, in logical units.

◆ get_bottom()

LUnits GmoObj::get_bottom ( ) const
inline

Returns the y coordinate for the bottom border of the bounding box. The returned value is in logical units, relative to top left corner of GmoDocPage containing this object.

◆ get_bounds()

URect GmoObj::get_bounds ( )

Returns the bounding box rectangle, in logical units. Origin (top left corner) is relative to top left corner of GmoDocPage containing this object.

◆ get_height()

LUnits GmoObj::get_height ( )
inline

Returns the height of the bounding box, in logical units.

◆ get_left()

LUnits GmoObj::get_left ( ) const
inline

Returns the x coordinate for the left border of the bounding box. The returned value is in logical units, relative to top left corner of GmoDocPage containing this object.

◆ get_origin()

UPoint GmoObj::get_origin ( )
inline

Returns the top left corner of the bounding box rectangle. The point is in logical units relative to top left corner of GmoDocPage containing this object.

◆ get_right()

LUnits GmoObj::get_right ( ) const
inline

Returns the x coordinate for the right border of the bounding box. The returned value is in logical units, relative to top left corner of GmoDocPage containing this object.

◆ get_size()

USize GmoObj::get_size ( )
inline

Returns the width and heigh of the bounding box rectangle (in logical units).

◆ get_top()

LUnits GmoObj::get_top ( ) const
inline

Returns the y coordinate for the top border of the bounding box. The returned value is in logical units, relative to top left corner of GmoDocPage containing this object.

◆ get_width()

LUnits GmoObj::get_width ( )
inline

Returns the width of the bounding box, in logical units.