SoView2DLegend¶
-
InventorModule
¶ genre View2DExtended
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoView2D
definition view2d.def see also SoView2D
,SoView2DAnnotation
,SoView2DContour
inherits from SoView2DExtension
keywords Contour
,Annotation
Purpose¶
The module SoView2DLegend
displays a legend of values, lines styles and colors.
This module is meant to be used in conjunction with the SoView2DContour
module, but can also be used to display other, similar information.
Details¶
The field Legend String
is the interface to fill the legend with information. It expects a list (separated by white spaces) of items.
An item must have the form:
$(item rr gg bb line_width line_stipple <user_text>)
Where:
rr = red channel (0..255)
gg = green channel (0..255)
bb = blue channel (0..255)
line_width = in screen pixel
line_stipple = OpenGL stipple pattern (0..65535)
<user_text> = some string that is displayed (this could be a
threshold value, as in the example network)
Parameter Fields¶
Field Index¶
Alignment : Enum |
cursorShape : Enum |
maskValid : Bool |
alt : Enum |
Draw box : Bool |
needsValidVoxel : Bool |
Box Color : Color |
drawingOn : Bool |
renderOnSlab : Bool |
button1 : Enum |
editingOn : Bool |
selectionTolerance : Float |
button2 : Enum |
fixZOn : Bool |
setEventHandled : Bool |
button3 : Enum |
Font Size : Enum |
shift : Enum |
clipToSlice : Bool |
ignoreHandledEvents : Bool |
Show : Bool |
color : Color |
interactionProviderID : String |
Text shadow : Bool |
control : Enum |
Legend Format : Enum |
wantsAllEvents : Bool |
createNewMode : Bool |
Legend String : String |
wantsKeyEvents : Bool |
createNewModeRequest : Trigger |
Margin : Float |
wantsMouseWheelEvents : Bool |
Visible Fields¶
Show¶
-
name:
showLegend
, type:
Bool
, default:
TRUE
¶ If checked, the legend is displayed. The
Legend String
must be non-empty.
Text shadow¶
-
name:
textShadow
, type:
Bool
, default:
TRUE
¶ If checked, a shadow is rendered behind the text.
Legend String¶
-
name:
legendString
, type:
String
¶ Sets a list of items of the form
$(item rr gg bb line_width line_stipple <user_text>)
.
Font Size¶
-
name:
legendFontSize
, type:
Enum
, default:
AUTO_SIZE_LEGEND
¶ Defines the font size of the legend.
Values:
Title | Name | Description |
---|---|---|
Auto Size Legend | AUTO_SIZE_LEGEND | The font size is automatically chosen on base of the viewer’s size. |
Small Legend | SMALL_LEGEND | A small font size. |
Medium Legend | MEDIUM_LEGEND | A medium font size. |
Large Legend | LARGE_LEGEND | A large font size. |
Alignment¶
-
name:
legendAlignment
, type:
Enum
, default:
LEGEND_BOTTOM
¶ Defines where the legend is displayed in the viewer.
Values:
Title | Name |
---|---|
Top | LEGEND_TOP |
Bottom | LEGEND_BOTTOM |
Left | LEGEND_LEFT |
Right | LEGEND_RIGHT |
Legend Format¶
-
name:
legendFormat
, type:
Enum
, default:
TEXT_LINE
¶ Defines the format of the legend entries.
Values:
Title | Name | Description |
---|---|---|
Text Line | TEXT_LINE | Text first, line sample second. |
Line Text | LINE_TEXT | Line sample first, text second. |
Margin¶
-
name:
margin
, type:
Float
, default:
0
, minimum:
0
, maximum:
100
¶ Sets a margin value in pixel.