GraphicObject.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2007 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef GRAPHICOBJECT_H
00011 #define GRAPHICOBJECT_H
00012 
00013 #include "ColorType.h"
00014 #include "LocationType.h"
00015 #include "Serializable.h"
00016 #include "SessionItem.h"
00017 #include "Subject.h"
00018 #include "TypesFile.h"
00019 
00020 #include <string>
00021 #include <vector>
00022 
00023 class BitMask;
00024 class CgmObject;
00025 class Font;
00026 class GraphicLayer;
00027 class View;
00028 
00029 /**
00030  *  Provides access to display properties for graphic objects.
00031  *
00032  *  Graphic layers are comprised of graphic objects.  The
00033  *  GraphicObject class provides access to set the display
00034  *  properties of each object.  Not all methods apply to all object
00035  *  types.
00036  *
00037  *  This subclass of Subject will notify upon the following conditions:
00038  *  - The Subject::signalModified() notification is sent when any property of
00039  *    the object is modified.
00040  *  - All notifications documented in Subject.
00041  *
00042  *  @see     GraphicLayer, GraphicObjectType
00043  */
00044 class GraphicObject : public SessionItem, public Subject, public Serializable
00045 {
00046 public:
00047    /**
00048     *  Returns the type of the object.
00049     *
00050     *  @return  The object type.
00051     */
00052    virtual GraphicObjectType getGraphicObjectType() const = 0;
00053 
00054    /**
00055     *  Sets the name of the object.
00056     *
00057     *  @param   name
00058     *           The new name for the graphic object.
00059     */
00060    virtual void setName(const std::string& name) = 0;
00061 
00062    /**
00063     *  Gets the GraphicLayer displaying this GraphicObject.
00064     * 
00065     *  @return  The GraphicLayer displaying this GraphicObject. \c NULL is
00066     *           returned if no GraphicLayer is displaying this GraphicObject.
00067     */
00068    virtual GraphicLayer* getLayer() const = 0;
00069 
00070    /**
00071     *  Converts the object to a CGM object containing CGM metadata.
00072     *
00073     *  @return  A pointer to the CGM object.  \c NULL is returned if an
00074     *           error occurs or if the object cannot be converted.
00075     */
00076    virtual CgmObject* convertToCgm() = 0;
00077 
00078    /**
00079     *  Returns a bit mask containing selected pixels representing the
00080     *  object's position.
00081     *
00082     *  The bit mask represents those pixels that define the object's
00083     *  location, with rotation taken into account.
00084     *
00085     *  @return  A pointer to a BitMask object.
00086     */
00087    virtual const BitMask* getPixels() = 0;
00088 
00089    /**
00090     *  Sets the object bounding box location.
00091     *
00092     *  @param   llCorner
00093     *           The new lower left corner position for the object in pixel
00094     *           coordinates.
00095     *  @param   urCorner
00096     *           The new upper right corner position for the object in pixel
00097     *           coordinates.
00098     *
00099     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00100     *           It will return \c false if an error occurs.
00101     */
00102    virtual bool setBoundingBox(LocationType llCorner, LocationType urCorner) = 0;
00103 
00104    /**
00105     *  Returns the lower left corner position of the object's bounding box.
00106     *
00107     *  @return  The lower left corner position in pixel coordinates.
00108     */
00109    virtual LocationType getLlCorner() const = 0;
00110 
00111    /**
00112     *  Returns the upper right corner position of the object's bounding box.
00113     *
00114     *  @return  The upper right corner position in pixel coordinates.
00115     */
00116    virtual LocationType getUrCorner() const = 0;
00117 
00118    /**
00119     *  Sets the object rotation value.
00120     *
00121     *  The rotation value indicates the amount in degrees counterclockwise
00122     *  that the object is rotated.
00123     *
00124     *  @param   dAngle
00125     *           The new rotation angle.  Valid values range from 0 to 360.
00126     *           Values outside this range are automatically adjusted to fall
00127     *           within the range.
00128     *
00129     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00130     *           It will return \c false if an error occurs.
00131     */
00132    virtual bool setRotation(double dAngle) = 0;
00133 
00134    /**
00135     *  Returns the object rotation value
00136     *
00137     *  @return  The object rotation value.  Valid values range from 0 to 360.
00138     */
00139    virtual double getRotation() const = 0;
00140 
00141    // Line
00142 
00143    /**
00144     *  Sets the line state for an object.
00145     *
00146     *  @param   bLine
00147     *           Provide \c true if the object should be displayed, or \c false if the object
00148     *           line should not be displayed.  This pertains primarily to
00149     *           filled objects where line state indicates whether the object
00150     *           border is visible.
00151     *
00152     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00153     *           It will return \c false if an error occurs.
00154     */
00155    virtual bool setLineState(bool bLine) = 0;
00156 
00157    /**
00158     *  Returns the line state of a filled object.
00159     *
00160     *  @param   pSuccess
00161     *           A valid bool pointer will be populated with the success of the
00162     *           method.  \em pSuccess is populated with \c false if an error occurs.
00163     *
00164     *  @return  Returns \c true if the object line is displayed, otherwise \c false.  This pertains
00165     *           primarily to filled objects where line state indicates whether
00166     *           the object border is visible.
00167     */
00168    virtual bool getLineState(bool* pSuccess = NULL) const = 0;
00169 
00170    /**
00171     *  Sets the line color for an object.
00172     *
00173     *  @param   lineColor
00174     *           The new line color.
00175     *
00176     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00177     *           It will return \c false if an error occurs.
00178     */
00179    virtual bool setLineColor(ColorType lineColor) = 0;
00180 
00181    /**
00182     *  Returns the line color of an object.
00183     *
00184     *  @return  The line color.  An invalid color is returned if an
00185     *           error occurs.
00186     *
00187     *  @see     ColorType::isValid()
00188     */
00189    virtual ColorType getLineColor() const = 0;
00190 
00191    /**
00192     *  Sets the line width for an object.
00193     *
00194     *  @param   dWidth
00195     *           The line width.
00196     *
00197     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00198     *           It will return \c false if an error occurs.
00199     */
00200    virtual bool setLineWidth(double dWidth) = 0;
00201 
00202    /**
00203     *  Returns the line width of an object.
00204     *
00205     *  @return  The line width.  An invalid value of -1 is returned if
00206     *           an error occurs.
00207     */
00208    virtual double getLineWidth() const = 0;
00209 
00210    /**
00211     *  Sets the line style for an object.
00212     *
00213     *  @param   eLine
00214     *           The line style.
00215     *
00216     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00217     *           It will return \c false if an error occurs.
00218     */
00219    virtual bool setLineStyle(LineStyle eLine) = 0;
00220 
00221    /**
00222     *  Returns the line style of an object.
00223     *
00224     *  @return  The line style.  An invalid value of -1 is returned if
00225     *           an error occurs.
00226     */
00227    virtual LineStyle getLineStyle() const = 0;
00228 
00229    /**
00230     * Set the whether the lines should be scaled with the zoom level.
00231     *
00232     * @param scaled
00233     *        Provide \c true if the line widths should be scaled, \c false otherwise.
00234     *
00235     * @return Returns \c true if the operation succeeded, \c false otherwise.
00236     */
00237    virtual bool setLineScaled(bool scaled) = 0;
00238 
00239    /**
00240     * Get the whether the lines should be scaled with the zoom level.
00241     *
00242     * @return Returns \c true if the line widths should be scaled, \c false otherwise.
00243     */
00244    virtual bool getLineScaled() const = 0;
00245 
00246    // Arc
00247 
00248    /**
00249     *  Sets the arc region for an arc object.
00250     *
00251     *  @param   eRegion
00252     *           The new region type.
00253     *
00254     *  @return  Returns \c true if the region was set successfully, otherwise \c false.
00255     *           It will return \c false if the object is not an arc object.
00256     */
00257    virtual bool setArcRegion(ArcRegion eRegion) = 0;
00258 
00259    /**
00260     *  Returns the arc region of an arc object.
00261     *
00262     *  @return  The region type.  An invalid value of -1 is returned if the
00263     *           object is not an arc object.
00264     */
00265    virtual ArcRegion getArcRegion() const = 0;
00266 
00267    /**
00268     *  Sets both the start and stop angles for an arc object.
00269     *
00270     *  An arc object is composed of a portion of an elliptical arc.  The
00271     *  ellipse is divided into 360 sections, and the start and stop angles
00272     *  represent the location on the ellipse where the arc is defined.
00273     *
00274     *  @param   dStart
00275     *           The start angle.  Values are automatically adjusted to be
00276     *           between 0 and 360.
00277     *  @param   dStop
00278     *           The stop angle.  Values are automatically adjusted to be
00279     *           between 0 and 360.
00280     *
00281     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00282     *           It will return \c false if the object is not an arc object.
00283     */
00284    virtual bool setAngles(double dStart, double dStop) = 0;
00285 
00286    /**
00287     *  Sets the start angle for an arc object.
00288     *
00289     *  @param   dStart
00290     *           The start angle.  Values are automatically adjusted to be
00291     *           between 0 and 360.
00292     *
00293     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00294     *           It will return \c false if the object is not an arc object.
00295     *
00296     *  @see     setAngles()
00297     */
00298    virtual bool setStartAngle(double dStart) = 0;
00299 
00300    /**
00301     *  Sets the stop angle for an arc object.
00302     *
00303     *  @param   dStop
00304     *           The stop angle.  Values are automatically adjusted to be
00305     *           between 0 and 360.
00306     *
00307     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00308     *           It will return \c false if the object is not an arc object.
00309     *
00310     *  @see     setAngles()
00311     */
00312    virtual bool setStopAngle(double dStop) = 0;
00313 
00314    /**
00315     *  Returns the start angle of an arc object.
00316     *
00317     *  @return  The start angle.  An invalid value of -1 is returned if
00318     *           the object is not an arc object.
00319     *
00320     *  @see     setStartAngle()
00321     */
00322    virtual double getStartAngle() const = 0;
00323 
00324    /**
00325     *  Returns the stop angle of an arc object.
00326     *
00327     *  @return  The stop angle.  An invalid value of -1 is returned if
00328     *           the object is not an arc object.
00329     *
00330     *  @see     setStopAngle()
00331     */
00332    virtual double getStopAngle() const = 0;
00333 
00334    // Filled object
00335 
00336    /**
00337     *  Sets the fill state for a filled object.
00338     *
00339     *  This method is similar to setFillStyle() method, but simply specifies
00340     *  whether the object have any fill or should be empty.
00341     *
00342     *  @param   bFill
00343     *           Provide \c true if the object should be filled, or \c false if the object
00344     *           should have an empty fill.  Passing in \c true fills the object
00345     *           according to it fill style.
00346     *
00347     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00348     *           It will return \c false if the object is not a filled object.
00349     *
00350     *  @see     setFillStyle()
00351     */
00352    virtual bool setFillState(bool bFill) = 0;
00353 
00354    /**
00355     *  Returns the fill state of a filled object.
00356     *
00357     *  This method is similar to getFillStyle() method, but simply returns
00358     *  whether the object has any fill or is empty.
00359     *
00360     *  @param   pSuccess
00361     *           A valid bool pointer will be populated with the success of the
00362     *           method.  \em pSuccess will be populated with \c false if the object is not a filled object.
00363     *
00364     *  @return  Returns \c true if the object is filled, or \c false if the object fill is empty.
00365     *
00366     *  @see     getFillStyle()
00367     */
00368    virtual bool getFillState(bool* pSuccess = NULL) const = 0;
00369 
00370    /**
00371     *  Sets the background fill color for a filled object.
00372     *
00373     *  @param   fillColor
00374     *           The new fill color.
00375     *
00376     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00377     *           It will return \c false if the object is not a filled object.
00378     */
00379    virtual bool setFillColor(ColorType fillColor) = 0;
00380 
00381    /**
00382     *  Returns the background fill color of a filled object.
00383     *
00384     *  @return  The fill color.  An invalid color is returned if the object
00385     *           is not a filled object.
00386     *
00387     *  @see     ColorType::isValid()
00388     */
00389    virtual ColorType getFillColor() const = 0;
00390 
00391    /**
00392     *  Sets the fill style for a filled object.
00393     *
00394     *  @param   eFill
00395     *           The fill style.
00396     *
00397     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00398     *           It will return \c false if the object is not a filled object.
00399     */
00400    virtual bool setFillStyle(FillStyle eFill) = 0;
00401 
00402    /**
00403     *  Returns the fill style of a filled object.
00404     *
00405     *  @return  The fill style.  An invalid value of -1 is returned if
00406     *           the object is not a filled object.
00407     */
00408    virtual FillStyle getFillStyle() const = 0;
00409 
00410    /**
00411     *  Sets the hatch style for a filled object.
00412     *
00413     *  The hatch style corresponds with the hatch fill style.  If the 
00414     *  fill style is not set to hatch, setting the hatch style will
00415     *  still succeed, but the effect will not be seen in the object
00416     *  until the fill style is set to hatch.
00417     *
00418     *  @param   eHatch
00419     *           The hatch style.
00420     *
00421     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00422     *           It will return \c false if the object is not a filled object.
00423     */
00424    virtual bool setHatchStyle(SymbolType eHatch) = 0;
00425 
00426    /**
00427     *  Returns the hatch style of a filled object.
00428     *
00429     *  @return  The hatch style.  An invalid value of -1 is returned if
00430     *           the object is not a filled object.
00431     */
00432    virtual SymbolType getHatchStyle() const = 0;
00433 
00434    // Triangle
00435 
00436    /**
00437     *  Sets the apex value for a triangle object.
00438     *
00439     *  A triangle object always has at least one size bordering on its
00440     *  bounding box.  The apex value specifies the position of the third
00441     *  point along the opposite side of the bounding box.
00442     *
00443     *  @param   dApex
00444     *           The apex value.  Valid values range from 0.0 to 1.0.
00445     *
00446     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00447     *           It will return \c false if the object is not a triangle object.
00448     */
00449    virtual bool setApex(double dApex) = 0;
00450 
00451    /**
00452     *  Returns the apex value of a triangle object.
00453     *
00454     *  @return  The apex value.  An invalid value of -1 is returned if
00455     *           the object is not a triangle object.
00456     */
00457    virtual double getApex() const = 0;
00458 
00459    // Text
00460 
00461    /**
00462     *  Sets the text for a text object.
00463     *
00464     *  @param   objectText
00465     *           The text string.
00466     *
00467     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00468     *           It will return \c false if the object is not a text object.
00469     */
00470    virtual bool setText(const std::string& objectText) = 0;
00471 
00472    /**
00473     *  Returns the text of a text object.
00474     *
00475     *  @return  The text string.  An empty string is returned if the object is not a
00476     *           text object.
00477     */
00478    virtual std::string getText() const = 0;
00479 
00480    /**
00481     *  Sets the font for object text.
00482     *
00483     *  @param   pTextFont
00484     *           The new object text font.  This method does nothing if \c NULL
00485     *           is passed in.
00486     *
00487     *  @return  Returns \c true if the font was set successfully on the object.
00488     *           Returns \c false if this object does not support text fonts.
00489     */
00490    virtual bool setFont(const Font* pTextFont) = 0;
00491 
00492    /**
00493     *  Returns the current object text font.
00494     *
00495     *  @return  The current object text font.  \c NULL is returned if the
00496     *           object does not support text fonts.
00497     */
00498    virtual const Font* getFont() const = 0;
00499 
00500    /**
00501     *  Sets the text color for a text object.
00502     *
00503     *  @param   textColor
00504     *           The new text color.
00505     *
00506     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00507     *           It will return \c false if the object is not a text object.
00508     */
00509    virtual bool setTextColor(ColorType textColor) = 0;
00510 
00511    /**
00512     *  Returns the text color of a text object.
00513     *
00514     *  @return  The text color.  An invalid color is returned if the object
00515     *           is not a text object.
00516     *
00517     *  @see     ColorType::isValid()
00518     */
00519    virtual ColorType getTextColor() const = 0;
00520 
00521    /**
00522     *  Sets the alignment for text within a text object.
00523     *
00524     *  @param   iAlignment
00525     *           The new text alignment.  Valid values are defined to be
00526     *           the same values as the Qt::AlignmentFlags enumeration.
00527     *
00528     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00529     *           It will return \c false if the object is not a text object.
00530     */
00531    virtual bool setTextAlignment(int iAlignment) = 0;
00532 
00533    /**
00534     *  Returns the text alignment in a text object.
00535     *
00536     *  @return  The text alignment.  The returned value is the same as the
00537     *           valid Qt::AlignmentFlags enumeration values.
00538     */
00539    virtual int getTextAlignment() const = 0;
00540 
00541    // Scale
00542 
00543    /**
00544     *  Sets the scale value for arrow, image and text objects.
00545     *
00546     *  Arrow, image, and text objects have a default scale value of 1.0.  The
00547     *  for any other value, the size of the object displayed in the view is
00548     *  multiplied by the scale value.
00549     *
00550     *  @param   dScale
00551     *           The new scale value.
00552     *
00553     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00554     *           It will return \c false if the object is not one of the valid objects.
00555     */
00556    virtual bool setScale(double dScale) = 0;
00557 
00558    /**
00559     *  Returns the scale value of arrow, image and text objects.
00560     *
00561     *  @return  The scale value.  An invalid value of -1 is returned if the
00562     *           object is not one of the valid objects.
00563     */
00564    virtual double getScale() const = 0;
00565 
00566    // Scale bar
00567 
00568    /**
00569     *  Sets the unit system for a graphic object.
00570     *
00571     *  @param   units
00572     *           The system of units to use.
00573     *
00574     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00575     */
00576    virtual bool setUnitSystem(UnitSystem units) = 0;
00577 
00578    /**
00579     *  Returns the unit system of a graphic object.
00580     *
00581     *  @return  The units.
00582     */
00583    virtual UnitSystem getUnitSystem() const = 0;
00584 
00585    // Image
00586 
00587    /**
00588     *  Sets the image for a file image object from a file.
00589     *
00590     *  @param   pFilename
00591     *           The name of the file containing the image to display in the
00592     *           object.  Cannot be \c NULL.
00593     *
00594     *  @return  Returns \c true if the image was set successfully from the file, otherwise
00595     *           \c false.
00596     *           It will return \c false if the object is not a file image object.
00597     *
00598     *  @see     setObjectImage(), setAlpha()
00599     */
00600    virtual bool setImageFile(const char *pFilename) = 0;
00601 
00602    /**
00603     *  Sets the image for an image object.
00604     *
00605     *  @param   pData
00606     *           A pointer to the image data.  Cannot be \c NULL.
00607     *  @param   width
00608     *           The width of the image.
00609     *  @param   height
00610     *           The height of the image.
00611     *  @param   transparent
00612     *           Identifies the color of pixels that should be displayed
00613     *           transparently.  An invalid color indicated that there are no
00614     *           transparent pixels.  This value is separate from the object's
00615     *           alpha value.
00616     *
00617     *  @return  Returns \c true if the image was set successfully, otherwise \c false.
00618     *           It will return \c false if the object is not an image object.
00619     *
00620     *  @see     setImageFile(), setAlpha()
00621     */
00622    virtual bool setObjectImage(const unsigned int* pData, int width, int height,
00623       ColorType transparent = ColorType()) = 0;
00624 
00625    /**
00626     *  Returns the image of an image object.
00627     *
00628     *  @param   width
00629     *           Populated with the width of the image.
00630     *  @param   height
00631     *           Populated with the height of the image.
00632     *  @param   transparent
00633     *           Populated with color that is used to identify transparent
00634     *           pixels.
00635     *
00636     *  @return  A pointer to the image data.  \c NULL is returned if an
00637     *           error occurs.
00638     */
00639    virtual const unsigned int* getObjectImage(int &width, int &height, ColorType &transparent) const = 0;
00640 
00641    /**
00642     *  Returns the alpha value of an image object.
00643     *
00644     *  @return  The alpha value.  An invalid value of -1 is returned if the
00645     *           object is not an image object.
00646     */
00647    virtual double getAlpha() const = 0;
00648 
00649    /**
00650     *  Sets the alpha value for an image object.
00651     *
00652     *  The alpha value defines the transparency level for the image.  An
00653     *  image can be converted into a watermark with a relatively low
00654     *  alpha value.
00655     *
00656     *  @param   alpha
00657     *           The new alpha value.  Valid values range from 0
00658     *           to 255, with 0 being transparent and 255 being opaque.
00659     *
00660     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00661     *           It will return \c false if the object is not an image object.
00662     */
00663    virtual bool setAlpha(double alpha) = 0;
00664 
00665    // View
00666 
00667    /**
00668     *  Sets the displayed view in a view object.
00669     *
00670     *  This method only sets the displayed view into a view object.
00671     *  This method does <b>not</b> cause the view to actually be drawn on the screen.
00672     *  As a result, any programmatic manipulation of how the view is displayed (panning, zooming, etc.)
00673     *  should not be done until the view displaying this object has been repainted.
00674     *
00675     *  @param   pView
00676     *           A pointer to the view to display in the view object.  \c NULL
00677     *           is a valid input, where the view object displays a message
00678     *           indicating that no view is available.
00679     *
00680     *  @return  Returns \c true if the value was set successfully, otherwise \c false.
00681     *           It will return \c false if the object is not a view object.
00682     *
00683     *  @notify  This method will notify ViewObject::signalViewCreated() with
00684     *           any<View*> and/or ViewObject::signalViewDeleted() with
00685     *           any<View*> if the view is successfully set in the object.
00686     */
00687    virtual bool setObjectView(View* pView) = 0;
00688 
00689    /**
00690     *  Returns the view displayed in a view object.
00691     *
00692     *  @return  A pointer to the view displayed in the view object.  \c NULL is
00693     *           returned if the object is not a view object.
00694     */
00695    virtual View* getObjectView() const = 0;
00696 
00697    /**
00698     *  Adds vertices to a polyline or polygon object.
00699     *
00700     *  @param   vertices
00701     *           The vertices to add to the object.
00702     *
00703     *  @return  Returns \c true if the vertices have been successfully added.
00704     */
00705    virtual bool addVertices(const std::vector<LocationType>& vertices) = 0;
00706 
00707    /**
00708     *  Adds geographic vertices to a polyline or polygon object.
00709     *
00710     *  @param   geoVertices
00711     *           The lat/long vertices to add to the object.
00712     *
00713     *  @return  Returns \c true if the vertices have been successfully added.
00714     */
00715    virtual bool addGeoVertices(const std::vector<LocationType>& geoVertices) = 0;
00716 
00717    /**
00718     * Adds a new path to a Polyline or Polygon graphic.
00719     *
00720     * This method allows a single Polyline or Polygon to contain
00721     * multiple discontinuous paths.  For a Polygon, this allows
00722     * a doughnut shape.  The vertices added between calls to
00723     * newPath() make a single path.
00724     *
00725     * @return Returns \c true if a new path was successfully added, \c false
00726     *         otherwise.  This method will fail if no vertices
00727     *         have been added since the last call to newPath().
00728     */
00729    virtual bool newPath() = 0;
00730 
00731    /**
00732     * Determine whether the object is a visible shape.
00733     *
00734     * This method determines whether the object is a shape, 
00735     * like RECTANGLE_OBJECT or a tool, like MOVE_OBJECT.
00736     *
00737     * @return Returns \c true if the object is a visible shape, \c false if
00738     *         it is a non-visible tool.
00739     */
00740    virtual bool isVisible() const = 0;
00741 
00742    /**
00743     * Set the symbol to draw for each pixel when drawing individual pixels.
00744     *
00745     * @param symbol
00746     *        The new symbol.
00747     */
00748    virtual bool setPixelSymbol(SymbolType symbol) = 0;
00749 
00750    /**
00751     * Get the pixel drawn for individual pixels.
00752     *
00753     * @return The symbol drawn.
00754     */
00755    virtual SymbolType getPixelSymbol() const = 0;
00756 
00757    /**
00758     * Set the name of the symbol to be drawn at the points of
00759     * a MultipointObject.
00760     *
00761     * @param symbolName
00762     *        The name of the symbol to draw
00763     *
00764     * @return Returns \c true if the operation succeeded, \c false otherwise.
00765     */
00766    virtual bool setSymbolName(const std::string &symbolName) = 0;
00767 
00768    /**
00769     * Get the name of the symbol to be drawn at the points of
00770     * a MultipointObject.
00771     *
00772     * @returns The name of the symbol to draw
00773     */
00774    virtual const std::string &getSymbolName() const = 0;
00775 
00776    /**
00777     * Set the size of the symbol to be drawn at the points of
00778     * a MultipointObject.
00779     *
00780     * @param symbolSize
00781     *        The size of the symbol to draw.  This is in screen pixels.
00782     *
00783     * @return Returns \c true if the operation succeeded, \c false otherwise.
00784     */
00785    virtual bool setSymbolSize(unsigned int symbolSize) = 0;
00786 
00787    /**
00788     * Get the size of the symbol to be drawn at the points of
00789     * a MultipointObject.
00790     *
00791     * @return The size of the symbol to draw.  This is in screen pixels.
00792     */
00793    virtual unsigned int getSymbolSize() const = 0;
00794 
00795    /**
00796     * Set the draw mode when composing bitmasks with this object.
00797     *
00798     * @param mode
00799     *        The new draw mode.
00800     */
00801    virtual bool setDrawMode(ModeType mode) = 0;
00802 
00803    /**
00804     * Get the draw mode for composing bitmasks with this object.
00805     *
00806     * @return The draw mode.
00807     */
00808    virtual ModeType getDrawMode() const = 0;
00809 
00810 protected:
00811    /**
00812     * This should be destroyed by calling GraphicLayer::removeObject.
00813     */
00814    virtual ~GraphicObject() {}
00815 };
00816 
00817 #endif

Software Development Kit - Opticks 4.9.0 Build 16218