#include <GraphicObject.h>

Public Member Functions | |
| virtual GraphicObjectType | getGraphicObjectType () const =0 |
| virtual void | setName (const std::string &name)=0 |
| virtual GraphicLayer * | getLayer () const =0 |
| virtual CgmObject * | convertToCgm ()=0 |
| virtual const BitMask * | getPixels ()=0 |
| virtual bool | setBoundingBox (LocationType llCorner, LocationType urCorner)=0 |
| virtual LocationType | getLlCorner () const =0 |
| virtual LocationType | getUrCorner () const =0 |
| virtual bool | setRotation (double dAngle)=0 |
| virtual double | getRotation () const =0 |
| virtual bool | setLineState (bool bLine)=0 |
| virtual bool | getLineState (bool *pSuccess=NULL) const =0 |
| virtual bool | setLineColor (ColorType lineColor)=0 |
| virtual ColorType | getLineColor () const =0 |
| virtual bool | setLineWidth (double dWidth)=0 |
| virtual double | getLineWidth () const =0 |
| virtual bool | setLineStyle (LineStyle eLine)=0 |
| virtual LineStyle | getLineStyle () const =0 |
| virtual bool | setLineScaled (bool scaled)=0 |
| virtual bool | getLineScaled () const =0 |
| virtual bool | setArcRegion (ArcRegion eRegion)=0 |
| virtual ArcRegion | getArcRegion () const =0 |
| virtual bool | setAngles (double dStart, double dStop)=0 |
| virtual bool | setStartAngle (double dStart)=0 |
| virtual bool | setStopAngle (double dStop)=0 |
| virtual double | getStartAngle () const =0 |
| virtual double | getStopAngle () const =0 |
| virtual bool | setFillState (bool bFill)=0 |
| virtual bool | getFillState (bool *pSuccess=NULL) const =0 |
| virtual bool | setFillColor (ColorType fillColor)=0 |
| virtual ColorType | getFillColor () const =0 |
| virtual bool | setFillStyle (FillStyle eFill)=0 |
| virtual FillStyle | getFillStyle () const =0 |
| virtual bool | setHatchStyle (SymbolType eHatch)=0 |
| virtual SymbolType | getHatchStyle () const =0 |
| virtual bool | setApex (double dApex)=0 |
| virtual double | getApex () const =0 |
| virtual bool | setText (const std::string &objectText)=0 |
| virtual std::string | getText () const =0 |
| virtual bool | setFont (const Font *pTextFont)=0 |
| virtual const Font * | getFont () const =0 |
| virtual bool | setTextColor (ColorType textColor)=0 |
| virtual ColorType | getTextColor () const =0 |
| virtual bool | setTextAlignment (int iAlignment)=0 |
| virtual int | getTextAlignment () const =0 |
| virtual bool | setScale (double dScale)=0 |
| virtual double | getScale () const =0 |
| virtual bool | setUnitSystem (UnitSystem units)=0 |
| virtual UnitSystem | getUnitSystem () const =0 |
| virtual bool | setImageFile (const char *pFilename)=0 |
| virtual bool | setObjectImage (const unsigned int *pData, int width, int height, ColorType transparent=ColorType())=0 |
| virtual const unsigned int * | getObjectImage (int &width, int &height, ColorType &transparent) const =0 |
| virtual double | getAlpha () const =0 |
| virtual bool | setAlpha (double alpha)=0 |
| virtual bool | setObjectView (View *pView)=0 |
| virtual View * | getObjectView () const =0 |
| virtual bool | addVertices (const std::vector< LocationType > &vertices)=0 |
| virtual bool | addGeoVertices (const std::vector< LocationType > &geoVertices)=0 |
| virtual bool | newPath ()=0 |
| virtual bool | isVisible () const =0 |
| virtual bool | setPixelSymbol (SymbolType symbol)=0 |
| virtual SymbolType | getPixelSymbol () const =0 |
| virtual bool | setSymbolName (const std::string &symbolName)=0 |
| virtual const std::string & | getSymbolName () const =0 |
| virtual bool | setSymbolSize (unsigned int symbolSize)=0 |
| virtual unsigned int | getSymbolSize () const =0 |
| virtual bool | setDrawMode (ModeType mode)=0 |
| virtual ModeType | getDrawMode () const =0 |
Protected Member Functions | |
| virtual | ~GraphicObject () |
Graphic layers are comprised of graphic objects. The GraphicObject class provides access to set the display properties of each object. Not all methods apply to all object types.
This subclass of Subject will notify upon the following conditions:
Definition at line 44 of file GraphicObject.h.
| virtual GraphicObject::~GraphicObject | ( | ) | [protected, virtual] |
This should be destroyed by calling GraphicLayer::removeObject.
Definition at line 814 of file GraphicObject.h.
| virtual GraphicObjectType GraphicObject::getGraphicObjectType | ( | ) | const [pure virtual] |
Returns the type of the object.
| virtual void GraphicObject::setName | ( | const std::string & | name | ) | [pure virtual] |
Sets the name of the object.
| name | The new name for the graphic object. |
| virtual GraphicLayer* GraphicObject::getLayer | ( | ) | const [pure virtual] |
Gets the GraphicLayer displaying this GraphicObject.
NULL is returned if no GraphicLayer is displaying this GraphicObject. | virtual CgmObject* GraphicObject::convertToCgm | ( | ) | [pure virtual] |
Converts the object to a CGM object containing CGM metadata.
NULL is returned if an error occurs or if the object cannot be converted. | virtual const BitMask* GraphicObject::getPixels | ( | ) | [pure virtual] |
Returns a bit mask containing selected pixels representing the object's position.
The bit mask represents those pixels that define the object's location, with rotation taken into account.
| virtual bool GraphicObject::setBoundingBox | ( | LocationType | llCorner, | |
| LocationType | urCorner | |||
| ) | [pure virtual] |
Sets the object bounding box location.
| llCorner | The new lower left corner position for the object in pixel coordinates. | |
| urCorner | The new upper right corner position for the object in pixel coordinates. |
true if the value was set successfully, otherwise false. It will return false if an error occurs. | virtual LocationType GraphicObject::getLlCorner | ( | ) | const [pure virtual] |
Returns the lower left corner position of the object's bounding box.
| virtual LocationType GraphicObject::getUrCorner | ( | ) | const [pure virtual] |
Returns the upper right corner position of the object's bounding box.
| virtual bool GraphicObject::setRotation | ( | double | dAngle | ) | [pure virtual] |
Sets the object rotation value.
The rotation value indicates the amount in degrees counterclockwise that the object is rotated.
| dAngle | The new rotation angle. Valid values range from 0 to 360. Values outside this range are automatically adjusted to fall within the range. |
true if the value was set successfully, otherwise false. It will return false if an error occurs. | virtual double GraphicObject::getRotation | ( | ) | const [pure virtual] |
Returns the object rotation value.
| virtual bool GraphicObject::setLineState | ( | bool | bLine | ) | [pure virtual] |
Sets the line state for an object.
| bLine | Provide true if the object should be displayed, or false if the object line should not be displayed. This pertains primarily to filled objects where line state indicates whether the object border is visible. |
true if the value was set successfully, otherwise false. It will return false if an error occurs. | virtual bool GraphicObject::getLineState | ( | bool * | pSuccess = NULL |
) | const [pure virtual] |
Returns the line state of a filled object.
| pSuccess | A valid bool pointer will be populated with the success of the method. pSuccess is populated with false if an error occurs. |
true if the object line is displayed, otherwise false. This pertains primarily to filled objects where line state indicates whether the object border is visible. | virtual bool GraphicObject::setLineColor | ( | ColorType | lineColor | ) | [pure virtual] |
Sets the line color for an object.
| lineColor | The new line color. |
true if the value was set successfully, otherwise false. It will return false if an error occurs. | virtual ColorType GraphicObject::getLineColor | ( | ) | const [pure virtual] |
Returns the line color of an object.
| virtual bool GraphicObject::setLineWidth | ( | double | dWidth | ) | [pure virtual] |
Sets the line width for an object.
| dWidth | The line width. |
true if the value was set successfully, otherwise false. It will return false if an error occurs. | virtual double GraphicObject::getLineWidth | ( | ) | const [pure virtual] |
Returns the line width of an object.
| virtual bool GraphicObject::setLineStyle | ( | LineStyle | eLine | ) | [pure virtual] |
Sets the line style for an object.
| eLine | The line style. |
true if the value was set successfully, otherwise false. It will return false if an error occurs. | virtual LineStyle GraphicObject::getLineStyle | ( | ) | const [pure virtual] |
Returns the line style of an object.
| virtual bool GraphicObject::setLineScaled | ( | bool | scaled | ) | [pure virtual] |
Set the whether the lines should be scaled with the zoom level.
| scaled | Provide true if the line widths should be scaled, false otherwise. |
true if the operation succeeded, false otherwise. | virtual bool GraphicObject::getLineScaled | ( | ) | const [pure virtual] |
Get the whether the lines should be scaled with the zoom level.
true if the line widths should be scaled, false otherwise. | virtual bool GraphicObject::setArcRegion | ( | ArcRegion | eRegion | ) | [pure virtual] |
Sets the arc region for an arc object.
| eRegion | The new region type. |
true if the region was set successfully, otherwise false. It will return false if the object is not an arc object. | virtual ArcRegion GraphicObject::getArcRegion | ( | ) | const [pure virtual] |
Returns the arc region of an arc object.
| virtual bool GraphicObject::setAngles | ( | double | dStart, | |
| double | dStop | |||
| ) | [pure virtual] |
Sets both the start and stop angles for an arc object.
An arc object is composed of a portion of an elliptical arc. The ellipse is divided into 360 sections, and the start and stop angles represent the location on the ellipse where the arc is defined.
| dStart | The start angle. Values are automatically adjusted to be between 0 and 360. | |
| dStop | The stop angle. Values are automatically adjusted to be between 0 and 360. |
true if the value was set successfully, otherwise false. It will return false if the object is not an arc object. | virtual bool GraphicObject::setStartAngle | ( | double | dStart | ) | [pure virtual] |
Sets the start angle for an arc object.
| dStart | The start angle. Values are automatically adjusted to be between 0 and 360. |
true if the value was set successfully, otherwise false. It will return false if the object is not an arc object.| virtual bool GraphicObject::setStopAngle | ( | double | dStop | ) | [pure virtual] |
Sets the stop angle for an arc object.
| dStop | The stop angle. Values are automatically adjusted to be between 0 and 360. |
true if the value was set successfully, otherwise false. It will return false if the object is not an arc object.| virtual double GraphicObject::getStartAngle | ( | ) | const [pure virtual] |
Returns the start angle of an arc object.
| virtual double GraphicObject::getStopAngle | ( | ) | const [pure virtual] |
Returns the stop angle of an arc object.
| virtual bool GraphicObject::setFillState | ( | bool | bFill | ) | [pure virtual] |
Sets the fill state for a filled object.
This method is similar to setFillStyle() method, but simply specifies whether the object have any fill or should be empty.
| bFill | Provide true if the object should be filled, or false if the object should have an empty fill. Passing in true fills the object according to it fill style. |
true if the value was set successfully, otherwise false. It will return false if the object is not a filled object.| virtual bool GraphicObject::getFillState | ( | bool * | pSuccess = NULL |
) | const [pure virtual] |
Returns the fill state of a filled object.
This method is similar to getFillStyle() method, but simply returns whether the object has any fill or is empty.
| pSuccess | A valid bool pointer will be populated with the success of the method. pSuccess will be populated with false if the object is not a filled object. |
true if the object is filled, or false if the object fill is empty.| virtual bool GraphicObject::setFillColor | ( | ColorType | fillColor | ) | [pure virtual] |
Sets the background fill color for a filled object.
| fillColor | The new fill color. |
true if the value was set successfully, otherwise false. It will return false if the object is not a filled object. | virtual ColorType GraphicObject::getFillColor | ( | ) | const [pure virtual] |
Returns the background fill color of a filled object.
| virtual bool GraphicObject::setFillStyle | ( | FillStyle | eFill | ) | [pure virtual] |
Sets the fill style for a filled object.
| eFill | The fill style. |
true if the value was set successfully, otherwise false. It will return false if the object is not a filled object. | virtual FillStyle GraphicObject::getFillStyle | ( | ) | const [pure virtual] |
Returns the fill style of a filled object.
| virtual bool GraphicObject::setHatchStyle | ( | SymbolType | eHatch | ) | [pure virtual] |
Sets the hatch style for a filled object.
The hatch style corresponds with the hatch fill style. If the fill style is not set to hatch, setting the hatch style will still succeed, but the effect will not be seen in the object until the fill style is set to hatch.
| eHatch | The hatch style. |
true if the value was set successfully, otherwise false. It will return false if the object is not a filled object. | virtual SymbolType GraphicObject::getHatchStyle | ( | ) | const [pure virtual] |
Returns the hatch style of a filled object.
| virtual bool GraphicObject::setApex | ( | double | dApex | ) | [pure virtual] |
Sets the apex value for a triangle object.
A triangle object always has at least one size bordering on its bounding box. The apex value specifies the position of the third point along the opposite side of the bounding box.
| dApex | The apex value. Valid values range from 0.0 to 1.0. |
true if the value was set successfully, otherwise false. It will return false if the object is not a triangle object. | virtual double GraphicObject::getApex | ( | ) | const [pure virtual] |
Returns the apex value of a triangle object.
| virtual bool GraphicObject::setText | ( | const std::string & | objectText | ) | [pure virtual] |
Sets the text for a text object.
| objectText | The text string. |
true if the value was set successfully, otherwise false. It will return false if the object is not a text object. | virtual std::string GraphicObject::getText | ( | ) | const [pure virtual] |
Returns the text of a text object.
| virtual bool GraphicObject::setFont | ( | const Font * | pTextFont | ) | [pure virtual] |
Sets the font for object text.
| pTextFont | The new object text font. This method does nothing if NULL is passed in. |
true if the font was set successfully on the object. Returns false if this object does not support text fonts. | virtual const Font* GraphicObject::getFont | ( | ) | const [pure virtual] |
Returns the current object text font.
NULL is returned if the object does not support text fonts. | virtual bool GraphicObject::setTextColor | ( | ColorType | textColor | ) | [pure virtual] |
Sets the text color for a text object.
| textColor | The new text color. |
true if the value was set successfully, otherwise false. It will return false if the object is not a text object. | virtual ColorType GraphicObject::getTextColor | ( | ) | const [pure virtual] |
Returns the text color of a text object.
| virtual bool GraphicObject::setTextAlignment | ( | int | iAlignment | ) | [pure virtual] |
Sets the alignment for text within a text object.
| iAlignment | The new text alignment. Valid values are defined to be the same values as the Qt::AlignmentFlags enumeration. |
true if the value was set successfully, otherwise false. It will return false if the object is not a text object. | virtual int GraphicObject::getTextAlignment | ( | ) | const [pure virtual] |
Returns the text alignment in a text object.
| virtual bool GraphicObject::setScale | ( | double | dScale | ) | [pure virtual] |
Sets the scale value for arrow, image and text objects.
Arrow, image, and text objects have a default scale value of 1.0. The for any other value, the size of the object displayed in the view is multiplied by the scale value.
| dScale | The new scale value. |
true if the value was set successfully, otherwise false. It will return false if the object is not one of the valid objects. | virtual double GraphicObject::getScale | ( | ) | const [pure virtual] |
Returns the scale value of arrow, image and text objects.
| virtual bool GraphicObject::setUnitSystem | ( | UnitSystem | units | ) | [pure virtual] |
Sets the unit system for a graphic object.
| units | The system of units to use. |
true if the value was set successfully, otherwise false. | virtual UnitSystem GraphicObject::getUnitSystem | ( | ) | const [pure virtual] |
Returns the unit system of a graphic object.
| virtual bool GraphicObject::setImageFile | ( | const char * | pFilename | ) | [pure virtual] |
Sets the image for a file image object from a file.
| pFilename | The name of the file containing the image to display in the object. Cannot be NULL. |
true if the image was set successfully from the file, otherwise false. It will return false if the object is not a file image object.| virtual bool GraphicObject::setObjectImage | ( | const unsigned int * | pData, | |
| int | width, | |||
| int | height, | |||
| ColorType | transparent = ColorType() | |||
| ) | [pure virtual] |
Sets the image for an image object.
| pData | A pointer to the image data. Cannot be NULL. | |
| width | The width of the image. | |
| height | The height of the image. | |
| transparent | Identifies the color of pixels that should be displayed transparently. An invalid color indicated that there are no transparent pixels. This value is separate from the object's alpha value. |
true if the image was set successfully, otherwise false. It will return false if the object is not an image object.| virtual const unsigned int* GraphicObject::getObjectImage | ( | int & | width, | |
| int & | height, | |||
| ColorType & | transparent | |||
| ) | const [pure virtual] |
Returns the image of an image object.
| width | Populated with the width of the image. | |
| height | Populated with the height of the image. | |
| transparent | Populated with color that is used to identify transparent pixels. |
NULL is returned if an error occurs. | virtual double GraphicObject::getAlpha | ( | ) | const [pure virtual] |
Returns the alpha value of an image object.
| virtual bool GraphicObject::setAlpha | ( | double | alpha | ) | [pure virtual] |
Sets the alpha value for an image object.
The alpha value defines the transparency level for the image. An image can be converted into a watermark with a relatively low alpha value.
| alpha | The new alpha value. Valid values range from 0 to 255, with 0 being transparent and 255 being opaque. |
true if the value was set successfully, otherwise false. It will return false if the object is not an image object. | virtual bool GraphicObject::setObjectView | ( | View * | pView | ) | [pure virtual] |
Sets the displayed view in a view object.
This method only sets the displayed view into a view object. This method does not cause the view to actually be drawn on the screen. As a result, any programmatic manipulation of how the view is displayed (panning, zooming, etc.) should not be done until the view displaying this object has been repainted.
| pView | A pointer to the view to display in the view object. NULL is a valid input, where the view object displays a message indicating that no view is available. |
true if the value was set successfully, otherwise false. It will return false if the object is not a view object.| virtual View* GraphicObject::getObjectView | ( | ) | const [pure virtual] |
Returns the view displayed in a view object.
NULL is returned if the object is not a view object. | virtual bool GraphicObject::addVertices | ( | const std::vector< LocationType > & | vertices | ) | [pure virtual] |
Adds vertices to a polyline or polygon object.
| vertices | The vertices to add to the object. |
true if the vertices have been successfully added. | virtual bool GraphicObject::addGeoVertices | ( | const std::vector< LocationType > & | geoVertices | ) | [pure virtual] |
Adds geographic vertices to a polyline or polygon object.
| geoVertices | The lat/long vertices to add to the object. |
true if the vertices have been successfully added. | virtual bool GraphicObject::newPath | ( | ) | [pure virtual] |
Adds a new path to a Polyline or Polygon graphic.
This method allows a single Polyline or Polygon to contain multiple discontinuous paths. For a Polygon, this allows a doughnut shape. The vertices added between calls to newPath() make a single path.
true if a new path was successfully added, false otherwise. This method will fail if no vertices have been added since the last call to newPath(). | virtual bool GraphicObject::isVisible | ( | ) | const [pure virtual] |
Determine whether the object is a visible shape.
This method determines whether the object is a shape, like RECTANGLE_OBJECT or a tool, like MOVE_OBJECT.
true if the object is a visible shape, false if it is a non-visible tool. | virtual bool GraphicObject::setPixelSymbol | ( | SymbolType | symbol | ) | [pure virtual] |
Set the symbol to draw for each pixel when drawing individual pixels.
| symbol | The new symbol. |
| virtual SymbolType GraphicObject::getPixelSymbol | ( | ) | const [pure virtual] |
Get the pixel drawn for individual pixels.
| virtual bool GraphicObject::setSymbolName | ( | const std::string & | symbolName | ) | [pure virtual] |
Set the name of the symbol to be drawn at the points of a MultipointObject.
| symbolName | The name of the symbol to draw |
true if the operation succeeded, false otherwise. | virtual const std::string& GraphicObject::getSymbolName | ( | ) | const [pure virtual] |
Get the name of the symbol to be drawn at the points of a MultipointObject.
| virtual bool GraphicObject::setSymbolSize | ( | unsigned int | symbolSize | ) | [pure virtual] |
Set the size of the symbol to be drawn at the points of a MultipointObject.
| symbolSize | The size of the symbol to draw. This is in screen pixels. |
true if the operation succeeded, false otherwise. | virtual unsigned int GraphicObject::getSymbolSize | ( | ) | const [pure virtual] |
Get the size of the symbol to be drawn at the points of a MultipointObject.
| virtual bool GraphicObject::setDrawMode | ( | ModeType | mode | ) | [pure virtual] |
Set the draw mode when composing bitmasks with this object.
| mode | The new draw mode. |
| virtual ModeType GraphicObject::getDrawMode | ( | ) | const [pure virtual] |
Get the draw mode for composing bitmasks with this object.