Template:ImageAndPaint

From Vectorworks Developer
Revision as of 20:17, 10 July 2014 by Maziar (talk | contribs) (Created page with "<code lang="pas"> PROCEDURE Example; VAR hImage : HANDLE; copyImage : HANDLE; paintHandle : HANDLE; importPt : POINT; BEGIN GetPt(importPt.x, importPt.y); hImage := Im...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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()