geCircle

From GriffinEngine
Jump to: navigation, search

Class for drawing a 2D circle or a circle section.

Usage

Inheritance

Base classes


Reference

Fields

Note: All coordinates are in pixels, relative to top-left corner of the window. All angles are in degrees.

  • double x; // x coordinate (px)
  • double y; // y coordinate (px)
  • double r; // rotation (degrees) - around axis point
  • double s; // scale - around axis point
  • double w; // width (px)
  • double h; // height (px)
  • double alignX; // horizontal alignment offset - use Align() to set these
  • double alignY; // vertical alignment offset
  • double axisX; // horizontal axis offset - use SetAxis() to set these
  • double axisY; // vertical axis offset
  • bool active; // indicates whether object should be active/visible
  • color color1; // inside (center) color of the circle
  • color color2; // outside (edge) color of the circle
  • double sectorStart; // sector start (0...1 range)
  • double sectorSize; // sector size (0...1 range). Leave this at 1.0 to draw a fill circle.
  • UINT divisions; // number of divisions on the circle; more = smoother appearance, less = better performance

Constructors

  • geCircle( double _x=0, double _y=0, double _w=0, double _h=0, UINT divisions=32, double _sectorSize=1 );
  • geCircle( const geCircle& original ); // copy constructor

Methods

  • virtual void Align( int alignment = GE_ALIGN_TL, double _alignX = 0, double _alignY = 0 );
  • virtual void SetAxis( int axis = GE_ALIGN_CENTER, double _axisX = 0, double _axisY = 0 );