|
|
|
|
|
- Example 1: Copying an image
- Example 2: Zoom on an image
Example 1: Copying an image // Declare the variables ResCopy is boolean CopyMode is int  // Retrieve the copy mode SWITCH LIST_ListMode CASE 1: CopyMode = copyBlackness CASE 2: CopyMode = copyDstInvert CASE 3: CopyMode = copyMergeCopy CASE 4: CopyMode = copyNotSrcCopy CASE 5: CopyMode = copyNotSrcErase CASE 6: CopyMode = copySrcAnd CASE 7: CopyMode = copySrcCopy CASE 8: CopyMode = copySrcErase CASE 9: CopyMode = copySrcInvert CASE 10: CopyMode = copySrcPaint CASE 11: CopyMode = copyWhiteness CASE 12: CopyMode = copyMergePaint CASE 13: CopyMode = copyPatCopy CASE 14: CopyMode = copyPatInvert CASE 15: CopyMode = copyPatPaint END  // Copy the content of the Image control ResCopy = dCopyImage(IMG_SourceImage, IMG_DestinationImage, CopyMode)  // Error? IF ResCopy = True THEN Info("The copy was performed") ELSE Info("The copy was not performed") END
Example 2: Zoom on an image The following code is used to reduce by 50% an image displayed in an Image control (IMG_SourceImage) whose coordinates are (0,0), (150,200). The reduced-size image is copied into a second Image control (IMG_DestinationImage). // Declare the variables ResCopy is boolean  // Reduce the size of the selected image ResCopy = dCopyImage(IMG_SourceImage, IMG_DestinationImage,... copySrcCopy, 0, 0, 150, 200, 0, 0, 75, 100)  // Error? IF ResCopy = True THEN Info("The reduce operation was performed") ELSE Info("The reduce operation was not performed") END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|