Jump to content

Picture class: Difference between revisions

From LabVIEW Wiki
Started page
 
mNo edit summary
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 191: Line 191:


== 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

Revision as of 22:22, 1 September 2019

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 Short Name (English) Description R/W RTE
6339805 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
6339804 DefVal Gets or sets the default value of the picture control. R/W X
6339801 DrawAreaSize Size of the draw area in terms of width and height in pixels.
Elements:
Name Description
Width Width of the draw area in pixels.
Height Height of the draw area in pixels.
R/W X
6339802 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
633980C HorizScroll Shows or hides the horizontal scroll bar for the picture control. R/W X
6339803 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.

Elements:
Name Description
Mouse Position The vertical and horizontal coordinates that define the position of the mouse in the picture control.
  • X—The X coordinate of the mouse in the picture control.
  • Y—The Y coordinate of the mouse in the picture control.
Mouse Modifiers Cluster of Booleans that indicate whether various actions occur while the mouse is in the picture control.
  • Button Down—Indicates whether the user clicks the left mouse button while the mouse is in the picture control.
  • Shift Mod—Indicates whether the user presses the <Shift> key while the mouse is in the picture control.
  • Menu Mod—Indicates whether the user presses the platform-independent menu key while the mouse is in the picture control. (Windows) The menu key is the <Ctrl> key. (Mac OS X) The menu key is the <Command> key.
  • Option Mod—(Windows) Indicates whether the user presses the <Ctrl> key while the mouse is in the picture control. (Mac OS X) Indicates whether the user presses the <Option> key while the mouse is in the picture control.
R X
6339806 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.

Elements:
Name Description
Left Horizontal coordinate of the point in the picture you want to display in the upper left corner of the picture control or indicator.
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
6339807 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
6339808 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
6339800 Value Value of the picture control. R/W X
633980B 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
633980D VertScroll Shows or hides the vertical scroll bar for the picture control. R/W X
6339809 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

Methods

Show/Hide Picture Methods Table

Legend
RTEAvailable in the Run-Time Engine
Basic Development Environment
VI Scripting
Private
Deprecated
Picture Methods Table
Method ID Short Name (English) Description RTE
6339400 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

Events

No Events for this class.

History

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

See Also