DSCircle.h

Classes

DSCircle -- Circle implementation;extends DSEllipse, adding general circle functions (full description)

class DSCircle : public DSEllipse

Interface

Public Members
DSCircle()
DSCircle(const Float& xPos, const Float& yPos, const Float& radius, const Bool& hasHandles, const Bool& drawHandles)
DSCircle(const DSCircle& other)
virtual ~DSCircle()
virtual void rotate(const Float& angle)
virtual void setCenter(const Float& xPos, const Float& yPos)
virtual Bool inObject(const Float& dX, const Float& dY)
virtual void changePoint(const Vector<Float>& newPos)
virtual void changePoint(const Vector<Float>& newPos, const Int nPoint)
virtual void setRadius(const Float& radius)
virtual void setMajorAxis(const Float& major)
virtual void setMinorAxis(const Float& minor)
virtual Bool setOptions(const Record& settings)
virtual Record getOptions()
Private Members
virtual void setDefaultOptions()

Description

Prerequisite

Etymology

DSCircle is a method of managing the drawing of a circle onto a PixelCanvas.

Synopsis

DSCircle simply extends from DSEllipse, and adds some general circle functionality. It basically replaces the set major and set minor axis functions with a setRadius function. Almost all of the functionality is contained in DSEllipse.

There are generally two ways to make DisplayShape(s); To create them in "one hit" by providing arguments to the constructor, or by using the default constructor and then the "setOptions" method. A simple interface for all classes inheriting from the DisplayShape class is provided by DisplayShapeInterface.

Motivation

To enable display of circles onto a pixel canvas.

Example


 

Member Description

DSCircle()
DSCircle(const Float& xPos, const Float& yPos, const Float& radius, const Bool& hasHandles, const Bool& drawHandles)
DSCircle(const DSCircle& other)
virtual ~DSCircle()

Constructors and destructors.

virtual void rotate(const Float& angle)
virtual void setCenter(const Float& xPos, const Float& yPos)
virtual Bool inObject(const Float& dX, const Float& dY)
virtual void changePoint(const Vector<Float>& newPos)
virtual void changePoint(const Vector<Float>& newPos, const Int nPoint)

General DisplayShape functionality

virtual void setRadius(const Float& radius)
virtual void setMajorAxis(const Float& major)
virtual void setMinorAxis(const Float& minor)

Circle specific functionality

virtual Bool setOptions(const Record& settings)
virtual Record getOptions()

Get and set options

virtual void setDefaultOptions()

Function to set defaults when default constructor called