Jump to content

Picture class: Difference between revisions

From LabVIEW Wiki
Started page
 
m Removed VI Server Category from page
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{VIServerClass|name=Picture|id=15|scope=basic|class_0=Generic|class_1=GObject|class_2=Control|class_3=Picture}}
{{VIServerClass|15}}


{{stub}}
{{stub}}
Line 7: Line 7:
{{TOCright}}
{{TOCright}}


==Properties==
<!--Edit Properties, Methods, or Events in the appropriate table in one on the VI Server Templates-->
<span class="mw-customtoggle-propertiestable">Show/Hide Picture Properties Table</span>
{{VIServerClassTables|15}}
<div class="mw-collapsible" id="mw-customcollapsible-propertiestable">
{{VIServerLegend|showrw=TRUE|showrte=TRUE}}
{| class="wikitable sortable"
|+ Picture Properties Table
! Property ID
! Short Name (English)
! Description
! R/W
! RTE
|- style="background-color:#CCFFFF;"
|6339805
| [[Picture class/Cursor property|Cursor]]
|Gets or sets the cursor you want to use when you move the mouse over a picture control.
 
This property sets the cursor for all picture controls of that type, including picture controls in other VIs. For example, if you use this property to set the cursor for a 2D picture control, LabVIEW uses that cursor setting for all 2D picture controls as long as LabVIEW is running.
 
After you use this property, consider resetting the value of the property to 0 when the VI stops running. Resetting the value of the property allows you to maintain the default cursor setting for picture controls in other VIs.
|R/W
|X
|- style="background-color:#CCFFFF;"
|6339804
| [[Picture class/DefVal property|DefVal]]
|Gets or sets the default value of the picture control.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6339801
| [[Picture class/DrawAreaSize property|DrawAreaSize]]
|Size of the draw area in terms of width and height in pixels.
 
{| class="wikitable"
|+ scope="col" style="text-align:left;"|Elements:
! scope="col" style="text-align:left;"| Name
! scope="col" style="text-align:left;"| Description
|- style="vertical-align:top;"
! scope="row" style="text-align:left;"|Width
|Width of the draw area in pixels.
|- style="vertical-align:top;"
! scope="row" style="text-align:left;"|Height
|Height of the draw area in pixels.
|}
|R/W
|X
|- style="background-color:#FFFFCC;"
|6339802
| [[Picture class/EraseFirst property|EraseFirst]]
|Indicates whether to erase picture before drawing: 0-Do not erase, 1-Erase once now, 2-Always erase.
 
This property is similar to the Erase First item on the shortcut menu of a 2D picture control.
|R/W
|X
|- style="background-color:#FFFFCC;"
|633980C
| [[Picture class/HorizScroll property|HorizScroll]]
|Shows or hides the horizontal scroll bar for the picture control.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6339803
| [[Picture class/Mouse property|Mouse]]
|Mouse information specified as a cluster of (Mouse Position, Mouse Modifiers). Mouse Position is a cluster of (Vertical, Horizontal) coordinates. Mouse Modifiers is a cluster of (Mouse button pressed?, Shift key down?, Menu key down?, and Option key down?).
 
Mouse position is relative to the picture control origin.
 
{| class="wikitable"
|+ scope="col" style="text-align:left;"|Elements:
! scope="col" style="text-align:left;"| Name
! scope="col" style="text-align:left;"| Description
|- style="vertical-align:top;"
! scope="row" style="text-align:left;"|Mouse Position
|The vertical and horizontal coordinates that define the position of the mouse in the picture control.
*X&#8212;The X coordinate of the mouse in the picture control.
*Y&#8212;The Y coordinate of the mouse in the picture control.
|- style="vertical-align:top;"
! scope="row" style="text-align:left;"|Mouse Modifiers
|Cluster of Booleans that indicate whether various actions occur while the mouse is in the picture control.
*Button Down&#8212;Indicates whether the user clicks the left mouse button while the mouse is in the picture control.
*Shift Mod&#8212;Indicates whether the user presses the &#60;Shift&#62; key while the mouse is in the picture control.
*Menu Mod&#8212;Indicates whether the user presses the platform-independent menu key while the mouse is in the picture control. (Windows) The menu key is the &#60;Ctrl&#62; key. (Mac OS X) The menu key is the &#60;Command&#62; key.
*Option Mod&#8212;(Windows) Indicates whether the user presses the  &#60;Ctrl&#62; key while the mouse is in the picture control. (Mac OS X) Indicates whether the user presses the  &#60;Option&#62; key while the mouse is in the picture control.
|}
|R
|X
|- style="background-color:#FFFFCC;"
|6339806
| [[Picture class/Origin property|Origin]]
|Horizontal and vertical coordinates of the point in the picture you want to display in the upper left corner of the picture control or indicator.
 
Increasing the horizontal coordinate shifts the picture to the left, and increasing the vertical coordinate shifts the picture to the top.
 
You can use this property to display a different portion of a picture in the picture control or indicator. For example, if you wire 100 and 100 to this property, LabVIEW draws the upper left corner of the picture 100 pixels above and 100 pixels to the left of the upper left corner of the control or indicator.
 
If you change the origin and LabVIEW draws part of the picture outside the draw area of the picture control or indicator, you can use the Horizontal Scrollbar Visible and Vertical Scrollbar Visible properties to display scroll bars for the picture control or indicator. As you move the scroll bars of the picture control or indicator, the origin of the picture in the control or indicator changes, and the coordinates returned by this property change.
 
{| class="wikitable"
|+ scope="col" style="text-align:left;"|Elements:
! scope="col" style="text-align:left;"| Name
! scope="col" style="text-align:left;"| Description
|- style="vertical-align:top;"
! scope="row" style="text-align:left;"|Left
|Horizontal coordinate of the point in the picture you want to display in the upper left corner of the picture control or indicator.
|- style="vertical-align:top;"
! scope="row" style="text-align:left;"|Top
|Vertical coordinate of the point in the picture you want to display in the upper left corner of the picture control or indicator.
|}
|R/W
|X
|- style="background-color:#FFFFCC;"
|6339807
| [[Picture class/Left property|Left]]
|Horizontal coordinate of the point in the picture you want to display in the upper left corner of the picture control or indicator.
 
This property is an element of the Origin property.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6339808
| [[Picture class/Top property|Top]]
|Vertical coordinate of the point in the picture you want to display in the upper left corner of the picture control or indicator.
 
This property is an element of the Origin property.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6339800
| [[Picture class/Value property|Value]]
|Value of the picture control.
|R/W
|X
|- style="background-color:#FFFFCC;"
|633980B
| [[Picture class/Val(Sgnl) property|Val(Sgnl)]]
|Sets the value of the control and generates a Value Change event.
 
This property updates the value of an object similar to the Value property. However, Value (Signaling) also causes LabVIEW to generate an event as if the user had interactively changed the value of the object. National Instruments recommends you use this property only when you rely on LabVIEW generating an event in response to the programmatic value change.
|W
|X
|- style="background-color:#FFFFCC;"
|633980D
| [[Picture class/VertScroll property|VertScroll]]
|Shows or hides the vertical scroll bar for the picture control.
|R/W
|X
|- style="background-color:#FFFFCC;"
|6339809
| [[Picture class/ZoomFactor property|ZoomFactor]]
|Factor by which to scale the image in a picture control or indicator.
 
For example, to decrease the size of the image to 50% of its original size, wire a value of 0.5 to this property. To increase the size of the image to 200% of its original size, wire a value of 2 to this property.
 
The value you wire to this property must be greater than or equal to 0.
 
If you change the zoom factor and LabVIEW draws part of the image outside the draw area of the picture control or indicator, you can use the  Horizontal Scrollbar Visible and Vertical Scrollbar Visible properties to display scroll bars for the picture control or indicator.
|R/W
|X
|}
</div>
 
==Methods==
<span class="mw-customtoggle-methodstable">Show/Hide Picture Methods Table</span>
<div class="mw-collapsible" id="mw-customcollapsible-methodstable">
{{VIServerLegend|showrte=TRUE}}
{| class="wikitable sortable"
|+ Picture Methods Table
! Method ID
! Short Name (English)
! Description
! RTE
|- style="background-color:#FFFFCC;"
|6339400
| [[Picture class/Export Image method|Export Image]]
|Exports an image of a picture control to the clipboard or disk.
 
This method is similar to the Export Simplified Image option on the shortcut menu of a picture control.
|X
|}
</div>
 
==Events==
''No Events for this class.''


== History ==
== History ==
{{ambox|text=History information is needed.  What changes have occured over previous versions?}}
{{ambox|text=History information is needed.  What changes have occurred over previous versions?}}
{| class="wikitable"
{| class="wikitable"
! Version
! Version
Line 205: Line 25:
*[[VI Scripting]]
*[[VI Scripting]]


[[Category:VI Server]]
 
[[Category:VI Server Class]]
[[Category:VI Server Class]]
[[Category:VI Scripting]]

Latest revision as of 02:00, 8 May 2020

VI Server Class Information
Return to VI Server Class Hierarchy
Class Name Picture class
Class ID 15
Scope Basic Development Environment
Class Inheritance
Class Children

This class has no children.


The Picture class is a class in the VI Server Class Hierarchy, (see also VI Server).

Properties

Show/Hide Picture Properties Table

Legend
R/WReadable/Writable Permissions
RTEAvailable in the Run-Time Engine
Basic Development Environment
VI Scripting
Private
Deprecated
Picture Properties Table
Property ID Long Name (English) Description R/W RTE
6339800ValueValue of the picture control.Read/WriteYes
6339801Draw Area SizeSize of the draw area in terms of width and height in pixels.Read/WriteYes
6339802Erase FirstIndicates whether to erase picture before drawing: 0-Do not erase, 1-Erase once now, 2-Always erase.Read/WriteYes
6339803MouseMouse information specified as a cluster of (Mouse Position, Mouse Modifiers). Mouse Position is a cluster of (Vertical, Horizontal) coordinates. Mouse Modifiers is a cluster of (Mouse button pressed?, Shift key down?, Menu key down?, and Option key down?).Read OnlyYes (Read Only)
6339804Default ValueGets or sets the default value of the picture control.Read/WriteYes (Read Only)
6339805CursorGets or sets the cursor you want to use when you move the mouse over a picture control.Read/WriteYes
6339806OriginHorizontal and vertical coordinates of the point in the picture you want to display in the upper left corner of the picture control or indicator.Read/WriteYes
6339807Origin:LeftHorizontal coordinate of the point in the picture you want to display in the upper left corner of the picture control or indicator.Read/WriteYes
6339808Origin:TopVertical coordinate of the point in the picture you want to display in the upper left corner of the picture control or indicator.Read/WriteYes
6339809Zoom FactorFactor by which to scale the image in a picture control or indicator.Read/WriteYes
633980AScrollbars VisibleRead/WriteYes
633980BValue (Signaling)Sets the value of the control and generates a Value Change event.Write OnlyYes
633980CHorizontal Scrollbar VisibleShows or hides the horizontal scroll bar for the picture control.Read/WriteYes
633980DVertical Scrollbar VisibleShows or hides the vertical scroll bar for the picture control.Read/WriteYes

Methods

Show/Hide Picture Properties Table

Legend
RTEAvailable in the Run-Time Engine
Basic Development Environment
VI Scripting
Private
Deprecated
Picture Methods Table
Method ID Long Name (English) Description RTE
6339400Export ImageExports an image of a picture control to the clipboard or disk.Yes (Read/Write)

Events

This class has no events or it inherits events from its parent: Control Class.


History

Version Change(s)
LabVIEW 2018 More info to come.

See Also