| 2.1.Image22 Methods: |
| 2.1.1.CreateImage |
| Creates an image that has the specified dimensions and background color.
|
| Syntax: |
| object.CreateImage( Width, Height, Color)
|
| The CreateImage method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| Width |
Required. A numeric expression that specifies a width of the image. |
| Height |
Required. A numeric expression that specifies a height of the image. |
| Color |
Required. An OLECOLOR RGB value that specifies the background color.
You can also specify a color by using any integer that represents a valid color or
by using string constants defined on file IMG22.CFG which is supplied with a program. |
|
| Example: |
| CreateImage(200,150,"lightgreen");
|
| 2.1.2.LoadFromFile |
| Creates an image from a specified file.
|
| Syntax: |
| object.LoadFromFile( ImageFile )
|
| The LoadFromFile method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| ImageFile |
Required. A string expression that specifies the image source file |
|
| 2.1.3.CreateImageFromWindow |
| Creates an image object and copies to the image a specified window picture. This function captures a specified window to a new image object.
|
| Syntax: |
| object.CreateImageFromWindow( WindowTitle, WindowClass, WindowModul )
|
| The CreateImageFromWindow method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| WindowTitle |
Optional. A string expression that specifies the window title. |
| WindowClass |
Optional. A string expression that specifies the window class name. |
| WindowModul |
Optional. A string expression that specifies the modul name associated with window (application name). |
|
| 2.1.4.SaveToFile |
| Saves final image to the specified file |
| Syntax: |
| object.SaveToFile( ImageFile )
|
| The SaveToFile method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| ImageFile |
Required. A string that contains the name of the file to which to save image. |
|
| 2.1.5.SetFont |
| Specifies the font to be used in DrawText method |
| Syntax: |
| object.SetFont( Effects, Size, Typeface )
|
| The SetFont method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| Effects |
Required. A numeric expression evaluates an font effect, can be any combination of properties:
Font Bold = 1;
Font Italic = 2;
Font Underline = 4;
Font Strikeout = 8
|
| Size |
Required. A numeric expression that specifies an font size |
| Typeface |
Required. A string expression that specifies a font name |
|
| 2.1.6.SetResolution |
| Specifies the resolution |
| Syntax: |
| object.SetResolution( nHorz, nVert ) |
| The SetResolution method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| nHorz |
Required. A numeric expression that specifies the horizontal resolution, in dots per inch |
| nVert |
Required. A numeric expression that specifies the vertical resolution, in dots per inch |
|
| 2.1.7.Resize |
| Resizes the image to the specified width and height |
| Syntax: |
| object.Resize(newWidth, newHeight) |
| The Resize method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| newWidth |
Required. The new width of the image |
| newHeight |
The new height of the image |
|
| 2.1.8.DrawText |
| Draws text on the specified coordinates |
| Syntax: |
| object.DrawText(Text, PosX, PosY); |
| The DrawText method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| Text |
Required. A string expression that specifies the text to display |
| PosX |
Required. A numeric expressions that specifies x location on the surface to draw text |
| PosY |
Required. A numeric expressions that specifies y location on the surface to draw text |
|
| 2.1.9.DrawLine |
| Draws a line on the surface |
| Syntax: |
| object.DrawLine(FromX, FromY, ToX, ToY) |
| The DrawLine method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| FromX, FromY |
Required. Numeric expressions that specifies the first point coordinates |
| ToX, ToY |
Required. Numeric expressions that specifies the second point coordinates |
|
| 2.1.10.DrawEllipse |
| Draws an ellipse in the specified bounding rectangle |
| Syntax: |
| object.DrawEllipse( PosX, PosY, Width, Height); |
| The DrawEllipse method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| PosX, PosY |
Required. Numeric expressions that specifies coordinates of top-left corner of rectangle in which to draw the ellipse |
| Width, Height |
Required. Numeric expressions that specifies width and height of the rectangle in which to draw the ellipse |
|
| 2.1.11.DrawRectangle |
| Draws a rectangle using the specified coordinates |
| Syntax: |
| object.DrawRectangle( PosX, PosY, Width, Height) |
| The DrawRectangle method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| PosX, PosY |
Required. Numeric expressions that specifies coordinates of top-left corner of rectangle |
| Width, Height |
Required. Numeric expressions that specifies width and height of the rectangle |
|
| 2.1.12.DrawEdge |
| Draws edges of a rectangle of the specified type and style |
| Syntax: |
| object.DrawEdge( PosX, PosY, Width, Height, EdgeType, BordeType) |
| The DrawEdge method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| PosX, PosY |
Required. Numeric expressions that specifies coordinates of top-left corner of rectangle |
| Width, Height |
Required. Numeric expressions that specifies width and height of the rectangle |
| EdgeType |
Required. Numeric values. Specifies the type of edge to draw.
Use any of next values:
5 - Raised edge;
6 - Etched edge;
9 - Bump edge;
10 - Sunken edge; |
| BordeType |
Required. Numeric values. Specifies the type border.
Use any combination of next values:
1 - Left border;
2 - Top border;
4 - Right border;
8 - Bottom border;
16 - Diagonal border; |
|
| 2.1.13.DrawIcon |
| Draws an icon associated with specified file extension |
| Syntax: |
| object.DrawIcon( FileExt, PosX, PosY, bSmall ) |
| The DrawIcon method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| FileExt |
Required. A string expression containing the file extention |
| PosX, PosY |
Required. Numeric.The coordinates of top-left corner of the icon |
| bSmall |
Required. A numeric expression, can be 0 - for large icon, 1 - for small icon. |
|
| 2.1.14.DrawExtractedIcon |
| Extracts an indexed icon found in a file and draws the icon on specified coordinates |
| Syntax: |
| object.DrawExtractedIcon( FilePath, PosX, PosY, nIcon, bSmall ) |
| The DrawExtractedIcon method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| FilePath |
Required. A string expression specifies the full path and file name of the file that contains the icon. |
| PosX, PosY |
Required. Numeric.The coordinates of top-left corner of the icon |
| nIcon |
Required. A numeric expression specifies the index of the icon |
| bSmall |
Required. A numeric expression, can be 0 - for large icon, 1 - for small icon |
|
| 2.1.15.DrawImage |
| Draws an image in the specified location and size |
| Syntax: |
| object.DrawImage ( ImageFile, PosX, PosY, Width, Height ) |
| The DrawImage method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
| ImageFile |
Required. A string expression specifies the full path and file name of the file that contains the image |
| PosX, PosY |
Required. Numeric.The coordinates of top-left corner of image. |
| Width, Height |
Numeric.The width and height of the image. |
|
| 2.1.16.Clear |
| Clears the surface of the image object |
| Syntax: |
| object.Clear()
|
| The Clear method
syntax has these parts:
|
| Part |
Description |
| object |
Required. An object expression that evaluates to the Image22 object |
|