VS:CreatePaintFromImage

From Vectorworks Developer
Revision as of 10:25, 12 August 2013 by Root (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix


Description

Creates a paint node from an image resource.
FUNCTION CreatePaintFromImage(
image  :HANDLE) : HANDLE;
def vs.CreatePaintFromImage(image):
    return HANDLE

Parameters

image HANDLE Handle to the image resource from which a paint node is to be created.

Return Value

Returns the handle to the newly created paint node.

Example

PROCEDURE Example;
VAR
	hImage  : HANDLE;
	copyImage : HANDLE;
	paintHandle : HANDLE;
	importPt  : POINT;
BEGIN
	GetPt(importPt.x, importPt.y);
	hImage := ImportImageFile('D:\\Lenna.png', importPt.x, importPt.y );
	paintHandle := CreatePaintFromImage(hImage);
	copyImage := CreateImageFromPaint(paintHandle, 'Copy Image');
END;
RUN(Example);

Python

def Example():	
	hImage = vs.ImportImageFile('D:\\Lenna.png', 10, 10 )
	paintHandle = vs.CreatePaintFromImage(hImage)
	copyImage = vs.CreateImageFromPaint(paintHandle , 'Copy Image')

Example()

Version

Availability: from VectorWorks10.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox