The GraphicStyle class provides grouped attributes for drawing primitives.
Header file: ncarg/hlu/GraphicStyle.h Class name: graphicStyleClass Class pointer: NhlgraphicStyleClass Fortran class function: NHLFGRAPHICSTYLECLASS Superclass: Style Composite classes: <None>
|===============================================================| | 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" | |---------------------------------------------------------------| | 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 : | +---------------------------------------------------------------+
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.
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?