MPLABĀ® Harmony Graphics Suite  GFX v3.13.0
Legato API Documentation
legato_widget_arc.h File Reference

Arc widget definitions and functions. More...

Include dependency graph for legato_widget_arc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  leArcWidget
 This struct represents a arc widget. More...
 

Macros

#define THIS_TYPE   struct leWidget
 

Typedefs

typedef struct leArcWidget leArcWidget
 This struct represents a arc widget. More...
 

Functions

leArcWidgetleArcWidget_New (void)
 Create widget. More...
 
void leArcWidget_Constructor (leArcWidget *wgt)
 Initialize widget. More...
 
virtual uint32_t getRadius (const leArcWidget *_this)
 Get radius of an arc. More...
 
virtual leResult setRadius (leArcWidget *_this, uint32_t rad)
 Set radius of an arc. More...
 
virtual int32_t getStartAngle (const leArcWidget *_this)
 Get start angle of the arc. More...
 
virtual leResult setStartAngle (leArcWidget *_this, int32_t angle)
 Set start angle of an arc. More...
 
virtual uint32_t getThickness (const leArcWidget *_this)
 Get thickness of an arc. More...
 
virtual leResult setThickness (leArcWidget *_this, uint32_t thickness)
 Set thickness of an arc. More...
 
virtual int32_t getCenterAngle (const leArcWidget *_this)
 Get thickness of an arc. More...
 
virtual leResult setCenterAngle (THIS_TYPE *_this, int32_t angle)
 Set center angle of an arc. More...
 
virtual leBool getRoundEdge (const THIS_TYPE *_this)
 Get rounded edge setting. More...
 
virtual leResult setRoundEdge (THIS_TYPE *_this, leBool round)
 Set draw rounded edges. More...
 

Detailed Description

Arc widget definitions and functions.

This module implements arc drawing widget functions.

Typedef Documentation

◆ leArcWidget

typedef struct leArcWidget leArcWidget

This struct represents a arc widget.

A arc widget draws a arc of the specified origin and radius inside the widget bounds. All coordinates are expressed in local widget space. The color of the arc is determined by the widget scheme's 'foreground' color.

Function Documentation

◆ getCenterAngle()

virtual int32_t getCenterAngle ( const leArcWidget _this)
virtual

Get thickness of an arc.

Gets the arc thickness of _this.

leArcWidget* _this;
uint32_t thickness = _this->fn->getThickness(_this);
Parameters
_thisis the widget pointer to query.
Returns
thickness of arc.

◆ getRadius()

virtual uint32_t getRadius ( const leArcWidget _this)
virtual

Get radius of an arc.

Gets the radius of _this.

leArcWidget* _this;
uint32_t arc = _this->fn->getRadius(_this);
Parameters
_thisis the widget to operate on.
Returns
the arc radius

◆ getRoundEdge()

virtual leBool getRoundEdge ( const THIS_TYPE *  _this)
virtual

Get rounded edge setting.

Gets the arc rounded edge setting of _this.

leArcWidget* _this;
leBool round = _this->fn->getRoundEdge(_this);
Parameters
_thisis the widget pointer to query.
Returns
LE_TRUE if round edge is set, otherwise LE_FALSE.

◆ getStartAngle()

virtual int32_t getStartAngle ( const leArcWidget _this)
virtual

Get start angle of the arc.

Gets the start angle of _this.

leArcWidget* _this;
uint32_t startAngle = _this->fn->getStartAngle(_this);
Parameters
_thisis the widget pointer to query.
Returns
the start angle value

◆ getThickness()

virtual uint32_t getThickness ( const leArcWidget _this)
virtual

Get thickness of an arc.

Gets the thickness of _this.

leArcWidget* _this;
uint32_t thickness = _this->fn->getThickness(_this);
Parameters
_thisis the widget pointer to query.
Returns
thickness of arc.

◆ leArcWidget_Constructor()

void leArcWidget_Constructor ( leArcWidget wgt)

Initialize widget.

Initializes the leArcWidget wgt.

Parameters
wgtis the widget to initialize
Returns
void.

◆ leArcWidget_New()

leArcWidget* leArcWidget_New ( void  )

Create widget.

Creates a new leArcWidget and allocates memory for the widget through the current active context. Application is responsible for managing the widget pointer until the widget is added to a widget tree.

Remarks
use leWidget_Delete() to free this pointer.
Returns
a widget object pointer.

◆ setCenterAngle()

virtual leResult setCenterAngle ( THIS_TYPE *  _this,
int32_t  angle 
)
virtual

Set center angle of an arc.

Sets the arc center angle for _this to ang.

leArcWidget* _this;
leResult res = _this->fn->setCenterAngle(_this, ang);
Parameters
_thisis the widget pointer to modify.
anglethe center angle value
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.

◆ setRadius()

virtual leResult setRadius ( leArcWidget _this,
uint32_t  rad 
)
virtual

Set radius of an arc.

Sets the arc radius for _this to rad.

leArcWidget* _this;
leResult res = _this->fn->setRadius(_this, rad);
Parameters
_thisis the widget pointer to modify.
radthe arc radius
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.

◆ setRoundEdge()

virtual leResult setRoundEdge ( THIS_TYPE *  _this,
leBool  round 
)
virtual

Set draw rounded edges.

Sets arc draw rounded edges flag for _this to round.

leArcWidget* _this;
leResult res = _this->fn->setRoundEdge(_this, round);
Parameters
_thisis the widget pointer to modify.
roundthe rounded edge value
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.

◆ setStartAngle()

virtual leResult setStartAngle ( leArcWidget _this,
int32_t  angle 
)
virtual

Set start angle of an arc.

Sets the start angle for _this to angle.

leArcWidget* _this;
int32_t angle;
leResult res = _this->fn->setStartAngle(_this, angle);
Parameters
_thisis the widget pointer to modify.
anglethe starting angle value
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.

◆ setThickness()

virtual leResult setThickness ( leArcWidget _this,
uint32_t  thickness 
)
virtual

Set thickness of an arc.

Sets the arc thickness for _this to thickness.

leArcWidget* _this;
leResult res = _this->fn->setThickness(_this, thickness);
Parameters
_thisis the widget pointer to modify.
thicknessthe arc thickness
Returns
LE_SUCCESS if set, otherwise LE_FAILURE.