NCL Home > Documentation > HLUs > Classes

GraphicStyle class

The GraphicStyle class provides grouped attributes for drawing primitives.

Synopsis

Header file:		ncarg/hlu/GraphicStyle.h
Class name:		graphicStyleClass
Class pointer:		NhlgraphicStyleClass
Fortran class function:	NHLFGRAPHICSTYLECLASS
Superclass:		Style
Composite classes:	<None>

Resources

Local resources

|===============================================================|
|		GraphicStyle Resource Set			|
|===============================================================|
| NAME				TYPE			ACCESS	|
|	CLASS				DEFAULT			|
|===============================================================|
| gsClipOn                      NhlTBoolean             RCSG    |
|       GsClipOn                        True                    |
|---------------------------------------------------------------|
| gsLineDashPattern             NhlTDashIndex           RCSG    |
|       LineDashPattern                 0                       |
|---------------------------------------------------------------|
| gsLineDashSegLenF             NhlTFloat               RCSG    |
|       LineDashSegLenF                 0.15                    |
|---------------------------------------------------------------|
| gsLineColor                   NhlTColorIndex          RCSG    |
|       LineColor                       "Foreground"            |
|---------------------------------------------------------------|
| gsLineThicknessF              NhlTFloat               RCSG    |
|       LineThicknessF                  1.0                     |
|---------------------------------------------------------------|
| gsLineLabelString             NhlTString              RCSG    |
|       LineLabelString                 <dynamic>               |
|---------------------------------------------------------------|
| gsLineLabelFont               NhlTFont                RCSG    |
|       Font                            "pwritx"                |
|---------------------------------------------------------------|
| gsLineLabelFontColor          NhlTColorIndex          RCSG    |
|       FontColor                       "Foreground"            |
|---------------------------------------------------------------|
| gsLineLabelFontHeightF        NhlTFloat               RCSG    |
|       FontHeightF                     0.0125                  |
|---------------------------------------------------------------|
| gsLineLabelFontAspectF        NhlTFloat               RCSG    |
|       FontAspectF                     1.3125                  |
|---------------------------------------------------------------|
| gsLineLabelFontThicknessF     NhlTFloat               RCSG    |
|       FontThicknessF                  1.0                     |
|---------------------------------------------------------------|
| gsLineLabelFontQuality        NhlTFontQuality         RCSG    |
|       FontQuality                     "High"                  |
|---------------------------------------------------------------|
| gsLineLabelConstantSpacingF   NhlTFloat               RCSG    |
|       TextConstantSpacingF            0.0                     |
|---------------------------------------------------------------|
| gsLineLabelFuncCode           NhlTCharacter           RCSG    |
|       TextFuncCode                    :                       |
|---------------------------------------------------------------|
| gsFillIndex                   NhlTFillIndex           RCSG    |
|       FillIndex                       0                       |
|---------------------------------------------------------------|
| gsFillColor                   NhlTColorIndex          RCSG    |
|       FillColor                       "Foreground"            |
|---------------------------------------------------------------|
| gsFillBackgroundColor         NhlTColorIndex          RCSG    |
|       FillBackgroundColor             "Transparent"           |
|---------------------------------------------------------------|
| gsFillDotSizeF                NhlTFloat               RCSG    |
|       DotSizeF                        0.0                     |
|---------------------------------------------------------------|
| gsFillScaleF                  NhlTFloat               RCSG    |
|       FillScaleF                      1.0                     |
|---------------------------------------------------------------|
| gsFillLineThicknessF          NhlTFloat               RCSG    |
|       FillLineThicknessF              1.0                     |
|---------------------------------------------------------------|
| gsEdgesOn                     NhlTBoolean             RCSG    |
|       EdgesOn                         False                   |
|---------------------------------------------------------------|
| gsEdgeDashPattern             NhlTDashIndex           RCSG    |
|       EdgeDashPattern                 0                       |
|---------------------------------------------------------------|
| gsEdgeThicknessF              NhlTFloat               RCSG    |
|       EdgeThicknessF                  1.0                     |
|---------------------------------------------------------------|
| gsEdgeDashSegLenF             NhlTFloat               RCSG    |
|       EdgeDashSegLenF                 .15                     |
|---------------------------------------------------------------|
| gsEdgeColor                   NhlTColorIndex          RCSG    |
|       EdgeColor                       "Foreground"            |
|---------------------------------------------------------------|
| gsMarkerIndex                 NhlTMarkerIndex         RCSG    |
|       MarkerIndex                     "asterisk"              |
|---------------------------------------------------------------|
| gsMarkerColor                 NhlTColorIndex          RCSG    |
|       MarkerColor                     "Foreground"            |
|---------------------------------------------------------------|
| gsMarkerSizeF                 NhlTFloat               RCSG    |
|       MarkerSizeF                     0.007                   |
|---------------------------------------------------------------|
| gsMarkerThicknessF            NhlTFloat               RCSG    |
|       MarkerThicknessF                1.0                     |
|---------------------------------------------------------------|
| gsTextAngleF                  NhlTFloat               RCSG    |
|       TextAngleF                      0.0                     |
|---------------------------------------------------------------|
| gsFont                        NhlTFont                RCSG    |
|       Font                            "pwritx"                |
|---------------------------------------------------------------|
| gsTextJustification           NhlTJustification       RCSG    |
|       TextJustification               "CenterCenter"          |
|---------------------------------------------------------------|
| gsFontQuality                 NhlTFontQuality         RCSG    |
|       FontQuality                     "High"                  |
|---------------------------------------------------------------|
| gsFontColor                   NhlTColorIndex          RCSG    |
|       FontColor                       "Foreground"            |
|---------------------------------------------------------------|
| gsFontHeightF                 NhlTFloat               RCSG    |
|       FontHeightF                     0.015                   |
|---------------------------------------------------------------|
| gsFontAspectF                 NhlTFloat               RCSG    |
|       FontAspectF                     1.3125                  |
|---------------------------------------------------------------|
| gsFontThicknessF              NhlTFloat               RCSG    |
|       FontThicknessF                  1.0                     |
|---------------------------------------------------------------|
| gsTextConstantSpacingF        NhlTFloat               RCSG    |
|       TextConstantSpacingF            0.0                     |
|---------------------------------------------------------------|
| gsTextDirection                   NhlTTextDirection       RCSG    |
|       TextDirection                   "Across"                |
|---------------------------------------------------------------|
| gsTextFuncCode                NhlTCharacter           RCSG    |
|       TextFuncCode                    :                       |
+---------------------------------------------------------------+

Composite resources

The GraphicStyle object class has no composite class objects.

Superclass resources

The superclasses of the GraphicStyle class do not define any resources.


Description

The GraphicStyle class defines a set of resources for specifying the attributes of line, fill, marker, and text drawing primitives. Currently, GraphicStyle objects are used to control the appearance of graphics primitives drawn using the following immediate mode drawing functions: In the future, use of GraphicStyle and related classes may become more prevalent throughout the HLU library. Note that at present the GraphicStyle text attribute resources have no function.

All the immediate mode drawing functions take an instance of the GraphicStyle class as an argument. You have several options for specifying this argument. You may create a graphicstyle just as you would any other HLU object, set its resources as desired, and then use its id in the argument list to any of these functions.

As an alternative, you may specify the argument using the default graphicstyle that each workstation creates automatically when it is initialized. The easiest way to do this is simply to use NhlNULLOBJID (0) as the argument. This value is recognized by the workstation as a shorthand signal telling it to use its default graphicstyle.

On the other hand, you may retrieve the actual id of the workstation's default graphicstyle by getting the value of the read-only Workstation resource wkDefGraphicStyleId. Once you have retrieved this id, you may set the resources of the default graphicstyle just as if you had created it yourself.

Note that setting GraphicStyle class resources in a resource file affects the Workstation default graphicstyle the same as it affects graphicstyles you create on your own.


Support functions

The GraphicStyle object does not define any support functions, but inherits all the support functions available to its superclass.

Status


See also