Copyright Notices

©Copyright LEAD Technologies, Inc. 1991-2004. ALL RIGHTS RESERVED

Portions of the PCDLIB32.DLL, PCDLIB.DLL, LFFPX7.DLL, LFKODAK.DLL, EKFPIXJPEG140.DLL, PDC_SDK.DLL, PROFIRE.DLL, DC120V154_32.DLL, LFDCR14N.DLL, DCSPROBACK.DLL, DCSPRO3SLR.DLL, LFDCS14N.DLL, and LFKDC14N.DLL files contain material that is ©Copyright Eastman Kodak Company, 1996-2001. This software is based in part on the work of the Independent JPEG Group.

Portions of the LFCRW14N.DLL, LTCMP14.DLL, CDSDK.reg, CDSDK.dll, CDRAPCLS.dll, czs_ui.dll, deimg.dll, deImg010.dll, deImg110.dll, deImg153.dll, deimg301.dll, deimg401.dll, deImg404.dll, deimg602.dll, Deimg603.dll, DeImgd60.dll, pscAdimg.dll, pscCllct.dll, pscCStUI.dll, pscDcd.dll, pscDevUI.dll, pscDvlp.dll, Pscl2STI.dll, pscll.dll, pscParse.dll, pscSetup.dll, psdkdll.dll, psdkReg.dll, psParse.dll. file contain material that is © Canon, Inc. 2002

Portions of the LFFPX7.DLL and LFKODAK.DLL files contain material that is ©Copyright Hewlett Packard, 1996.

Portions of the OCR/ICR/OMR Features and the help file for the OCR/ICR/OMR Features are ©Copyright Scansoft, Inc. 1995-2003. ALL RIGHTS RESERVED

Portions of the Barcode Modules contain material that is ©Copyright Axtel Inc., 1999.

Portions of the LEADTOOLS PDF Plug in and the LEADTOOLS Vector Imaging Pro are ©Copyright 1996, 2000 Artifex Software Inc. All rights reserved.

File filters for decoding MrSID ® and DjVu ® formats are provided under a license from Lizardtech, Inc.

The "FlashPix" format uses Microsoft's OLE structured storage.

Portions of the DICOM help files in Medical Imaging product line are reprinted with permission from the National Electrical Manufacturers Association ©Copyright 1998 by the National Electrical Manufacturers Association. All rights including translation into other languages, reserved under the Universal Copyright Convention, the Berne Convention or the Protection of Literacy and Artistic Works, and the International and Pan American Copyright Conventions.

Portions of LEADTOOLS Data Security Add On contain software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/), including cryptographic software written by Eric Young (eay@cryptsoft.com) and by Tim Hudson (tjh@cryptsoft.com). Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. Copyright Tim Hudson 1995-1998 (tjh@cryptsoft.com) All rights reserved.

Portions of LEADTOOLS Data Security Add On contain software based on the MD5 Message Digest Algorithm developed by RSA Data Security, Inc.. Copyright (c) 1991-92 RSA Data Security, Inc. All Rights Reserved.

Portions hereof licensed under US patent 5,327,254 and foreign counterparts.

Trademarks

LEAD® and LEADTOOLS® are registered trademarks of LEAD Technologies, Inc.
Microsoft, Windows, Windows NT, Visual Basic, Visual FoxPro, and Microsoft Access are either trademarks or registered trademarks of the Microsoft Corporation.
OS/2® is a registered trademark of International Business Machines Corporation.

TextBridge®OCR is a registered trademark of Scansoft, Inc.

ISIS® is a registered trademark of Pixel Translations, Inc.

ScanAhead™ is a trademark of Pixel Translations, Inc.

FlashPix™ is a trademark of Eastman Kodak Company.

All other brand or product names used in this online help are trademarks of their respective holders.

Address and Contact Information

LEAD Technologies, Inc.
Suite 400,
1201 Greenwood Cliff,
Charlotte, NC 28204

(704) 332-5532
FAX: (704) 372-8161
E-mail: support@leadtools.com
Technical support: (704) 372-9681 or support@leadtools.com
CompuServe: 71333,2237 or GO LEADTECH
Home page: http://www.leadtools.com


Topic Selection

LEAD Technologies, Inc. Suite 400, 1201 Greenwood Cliff, Charlotte, NC 28204 Sales@Leadtools.com www.leadtools.com	(704) 332-5532 FAX: (704) 372-8161 Tech Support: (704) 372-9681 CompuServe: 71333,2237 or GO LEADTECH
LEADTOOLS is ideal for developers involved in still frame, multimedia, document, medical, and vector imaging projects, including Internet/Intranet applications.  Independent of the specific application requirement – scanning, file format support/conversion, compression, image processing, annotation, database support, multimedia, etc. – LEADTOOLS provides the most comprehensive, robust, flexible, and powerful imaging solution available.

	Click this button to start a new WinHelp session to review the License Agreements governing your use of the software.
	Click this button to start a new WinHelp session to review the full line of LEADTOOLS Products.
	Click this button to start a new WinHelp session to review the full line of LEADTOOLS Image Categories.


Technical Support

As a registered user, free technical support is available. You must register your software to receive any technical support. Technical support is available 9 a.m. through 6 p.m. Eastern Standard Time. If you are calling by phone, please be at your computer. You can also contact us through the following methods:

Phone:	(704) 372-9681
E-mail:	support@leadtools.com
FAX:	(704) 372-8161
CompuServe ID:	71333,2237 or GO LEADTECH
Online Support / FAQs:	http://www.leadtools.com (click on Customers Only)
Home page:	http://www.leadtools.com
FTP:	ftp.leadtools.com
You can also contact LEAD by mail at:

LEAD Technologies, Inc.
Attn: Technical Support
Suite 400,
1201 Greenwood Cliff,
Charlotte, NC 28204

Before calling technical support, please look in the online documentation and the example programs for an answer to your question.


Raster Pro/Document/Medical Features

Raster Pro:

LEADTOOLS Raster Imaging Pro provides some imaging capabilities that are not available in the LEADTOOLS Raster Imaging product.  In order to access these features, you must unlock support for L_SUPPORT_LTPRO, using UnlockSupport.  To unlock these features, call UnlockSupport(L_SUPPORT_LTPRO, L_KEY_LTPRO). L_KEY_LTPRO can be found in ltkey.h.

If you are a licensed user of LEADTOOLS Raster Imaging, and would like to access Raster Imaging Pro features, you must contact Tech Support for information on obtaining a license and the unlock key for calling UnlockSupport.

Document/Medical:

LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite are the most comprehensive imaging toolkits on the market.  No other toolkit provides as many imaging features for color, gray-scale and black & white images in one development package, and for one price.  These toolkits comprise LEAD's best code and are designed for the programmer who is looking for the fastest performance, and/or the most extensive color, document, and medical imaging capabilities available.

These toolkits contain powerful annotation capabilities and optimized document image processing filters, and high performance compression, decompression and viewing of JPEG, LEAD CMP, and CCITT G3/G4. The annotation capabilities enable the programmer to add text, highlights, sticky notes, audio, ellipses, buttons, lines, arrows, rectangles, polygons, redaction (blackout), hotspots, freehand scribble, pointers, bitmap and text stamps, to black & white and color images.  Programmers working with document imaging will also find special processing filters such as despeckle, deskew, favor black, and scale to gray to enhance their black and white 1 bit images.  Additionally, you can achieve faster rotation in 90-degree increments by applying a rotated view perspective to the bitmap. These LEADTOOLS toolkits offer the fastest software-only JPEG decoder available.

LEADTOOLS Document Imaging

The LEADTOOLS Document Imaging toolkit contains all the features available in the LEADTOOLS Raster Imaging Pro. In addition, it contains the following capabilities:

 Special functions for Document (bitonal) images. The LEADTOOLS functions for bitonal images are especially useful for working with images from black-and-white scanners or FAX machines. These functions let you do things such as automatically straighten (deskew) an image, remove spots (despeckle), or clarify a scaled display (using scale-to-gray and favor-black features).

 Annotation. LEADTOOLS supports annotation of images by letting you overlay images with text, lines, shapes, arrows, buttons, highlights, hot spots, sticky notes, stamps, buttons, and sounds.

 Fast rotation. LEADTOOLS achieves fast rotation in 90-degree increments by applying a rotated view perspective to the bitmap.

 ISIS support. LEADTOOLS supports ISIS interfaces for driving scanning devices.

 Faster compression and decompression. The Document/Medical editions work faster when loading and saving LEAD CMP, JPEG, and CCITT Group 3 and Group 4 images. The LEADTOOLS functions for loading and saving are the same in all products. The only difference is in performance.

 1-bit Image Clean-up. The Document toolkits include support for removing dots, blobs, holes, inverted text, lines, borders, bumps and nicks from 1-bit images.

 Region Clean-up. [Document/Medical] Remove all the holes from a region.

 Embedded Messages. The Document toolkits include support for embedding messages in lossless image formats like bmp, tiff, lossless jpeg, etc. The message is embedded without any visible changes to the image, and does not appreciably increase the size of the image. The message is password-protected.

 12 and 16 bit grayscale images. [Document/Medical] Load, process, display, window level and save 12 and 16 bit grayscale images (including support for 16-bit grayscale TIFF).

 48 and 64 bit color images. [Document/Medical] Load, process, display, and save 48 and 64 bit color images.

LEADTOOLS Document Imaging Suite

The LEADTOOLS Document Imaging Suite toolkit contains all the capabilities of LEADTOOLS Document Imaging, and includes the features listed below. Please note that the OCR features are included in this toolkit, however they can also be purchased as a plug-in for the LEADTOOLS Document Imaging toolkit. Also, JBIG support is provided in this toolkit, however a JBIG Module may be added on to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite.

 OCR features. [Document/Medical] LEAD offers OCR features that use Scansoft Textbridge technology. Support for these features is included in the LEADTOOLS Document Imaging Suite, and can be added, via plug-in to the LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite toolkits. The OCR features allow you to perform optical character recognition and turn images into documents. Features include preset confidence and accuracy levels for controlling how sensitive the engine is to unrecognized text, artificial intelligence for improving recognition on documents of the same type, and built-in and user-defined lexicons for limiting the type of text to recognize within a particular zone. LEADTOOLS provides the ability to verify or correct text during, and (using LEAD's unique OCR editor) after recognition. LEAD's OCR editor ties the text being edited directly to the image, providing a visual reference to the original bitmap data. The OCR engine can perform Automatic area segmentation creating multi-layered zones, recognizing areas such as tables, rules, images and text. Or, you can manually designate up to 250 such zones. The OCR features support different fonts, sizes (5 to 72 point) and styles. Fax, dot matrix and halftones can be preprocessed to improve recognition results. The OCR Engine supports major European and Scandinavian languages (Danish, Dutch, Finnish, French, German, Italian, Norwegian, Portuguese, Russian, Spanish, and Swedish) as well as English. Support for dialects such as US. English, French Canadian, Latin American Spanish, Swiss German, and Brazilian Portuguese is also provided.

Recognized text can be exported to more than 40 different formats, including MS Word, MS Excel, Dbase andWordPerfect. The LEADTOOLS OCR features contain superior OCR processing speeds, for use in form recognition and processing applications.

 LEAD's JBIG filter. [Document/Medical] LEAD includes support for this filter in the LEADTOOLS Document Imaging Suite toolkit. Support for this filter can be added to LEADTOOLS Document Imaging, LEADTOOLS Medical Imaging or LEADTOOLS Medical Imaging Suite by purchasing the JBIG Module. JBIG defines a method for lossless compression encoding of a bi-level image (two-color image). This method can also be used for coding grayscale and color images. LEADTOOLS completely supports all three types of images, giving you the ability to make full use of this powerful compression technology.  LEADTOOLS also supports the progressive capability of JBIG, allowing you to store and send multiple representations of images at different resolutions without any extra storage overhead.

LEADTOOLS Medical Imaging

LEADTOOLS Medical Imaging contains all the capabilities of LEADTOOLS Document Imaging.  It also includes general medical imaging technologies (1-16,24,32 bit color, 1-16 bit grayscale and window leveling of 12 and 16-bit grayscale images) and support for the DICOM file format.

 DICOM file support. [Medical] LEADTOOLS Medical Imaging provides COMPLETE support for the DICOM 3.0 specification, including all standard IOD classes and modalities (CR, CT, MR, NM, US, RF, SC, VL, etc.) and complete DICOM Basic Directory support.

 Window leveling. [Medical] Detect and set LowBit and HighBit for image data, display images with automatic LUT intensity expansion, or set LUT entries and ranges with specific values and gradients. Display images through the LUT without changing the data, or process the image data using the LUT. Linearize the number of pixels locally in a bitmap, based on the specified color space in order to bring out the detail in dark areas of an image, and smooth the edges between blocks.

 Medical Imaging Processing. [Medical] LEADTOOLS Medical Imaging provides image processing functionality designed specifically to allow you to examine and improve the quality of medical images.

LEADTOOLS Medical Imaging Suite

LEADTOOLS Medical Imaging Suite contains all the capabilities of LEADTOOLS Medical Imaging. In addition, it supports the following:

 DICOM Communication support. [Medical Suite] LEADTOOLS provides COMPLETE support for DICOM Communications, including all Service Classes (Verification, Storage, Query/Retrieve, Patient Management, etc), and contains high-level communications functions simplifying the creation of DICOM client/server applications.

(Document/Medical) is used in the documentation to designate the features that are available in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. Those features that are available only in the Medical toolkits are indicated in the documentation by (Medical). Features available only in the LEADTOOLS Medical Imaging Suite toolkit are indicated in the documentation by (Medical Suite).

(Internet only) is used in the documentation to designate the features that are available only in the LEADTOOLS Internet toolkit.

For more information, refer to Document/Medical Edition Support and Licensing Requirements.

	Click this button to start a new WinHelp session to review the full line of LEADTOOLS Products.


LEADTOOLS Reference Manuals

LEADTOOLS provides reference manuals that contain the same information as the online help. You can print the manuals from PDF files that are included with the toolkit.

To print the PDF files, you must use the Adobe Acrobat Reader.  The installation CD-Rom includes a version of the Acrobat Reader for WIN32.  It is located in the \Acrobat directory.  Or you can download a copy of the Acrobat Reader from the Adobe web site (http://www.adobe.com). Note that different versions of the Acrobat Reader are available for different operating systems, but they all can read the same PDF files.


Syntax

This is the internal syntax of the property, method, or event. The external syntax depends on the development system you are using. Refer to the code example for your system, or for general information, refer to the following:

Visual Basic Syntax

Visual C++ 4.0 Syntax


Files To Be Included With Your Application

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation.  The following subdirectory for the DigitalPaint features is created:

REDIST\	Redistributable DigitalPaint features files.
Note:	The DigitalPaint features are provided for evaluation purposes only. You may not copy or redistribute any of the following files without obtaining the proper license.  In some cases, the license is included with your initial purchase of LEADTOOLS.  In other cases, you must obtain a license from a third party or enter into a royalty agreement with LEAD to obtain the proper license.  For these special licensing situations, see the notes below accompanying the specific file.
Note:	The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS Internet features functions on a WIN32 system. (\REDIST\ subdirectory contains copies of these files.)
Please note that LTKRN, LTDIS, LTEFX, LTIMG, and LTFIL are required for ALL OCX applications. For more information on LTKRN, LTDIS, LTEFX, LTIMG, LTFIL or any other files for the Main Control Module, refer to Files To Be Included With Your Application.

Redistributables:	Explanation:	If you are using a standard release, the files to use are:	If you are using an evaluation release, the files to use are:
LTPNT	LEAD DigitalPaint Control and support DLL. Also requires the LTPDG DLL. If automation is used, the LTAUT DLL is required. If a container is used, the LTCON DLL is required. For more information on LTAUT and LTCON, refer to Files To Be Included With Your Application in the Automation API help file.	DLL: LTPNT14N.DLL  OCX: LTPNT14N.OCX	DLL: LTPNT14E.DLL  OCX: LTPNT14E.OCX


System Files Updated

The LEADTOOLS installation procedure adds the DLL files and all of the required driver files to your WINDOWS\SYSTEM directory. For a list of these files, refer to Files To Be Included With Your Application.

In addition, the installation procedure, as noted in the remainder of this topic, updates Windows system files that are required by the LEADTOOLS example programs.

The LEADTOOLS WIN32 installation procedure adds the following Windows files to your WINDOWS\SYSTEM directory. If your system has an earlier version of any of these files, the installation procedure overwrites it with the newer version.

COMDLG32.OCX
CTL3D32.DLL
MFC40.DLL
MFC42.DLL
MSVCRT20.DLL
MSVCRT40.DLL
MSVCRT.DLL
OC30.DLL
OLE32.DLL
OLEAUT32.DLL
OLEPRO32.DLL
STDOLE2.TLB
VB40032.DLL
VEN2232.OLB


Tutorial for Visual C++ 5.0 Programmers

The following topics provide brief and simple examples to help you learn how to use the LEADTOOLS Low-Level DigitalPaint ActiveX and LEADTOOLS DigitalPaint Automation ActiveX.

Implementing Automated Mode Painting

Miscellaneous Examples


Implementing Automated Mode Painting (Visual C++)

Take the following steps to start a project and to add some code that implements Automated Mode Painting:

1.	Start a new project as follows:
	Run Microsoft Visual C++ 5.0, select the File >New menu option, and do the following:
	a.	Click the Projects tab.
	b.	Select MFC AppWizard (exe) as the project type
	c.	In the Project name text box, specify pnttut.
	d.	In the Location text box, specify the path of the project.
	e.	Click the OK button.
2.	In the Step 1 dialog box, do the following:
	a.	Select Dialog based.
	b.	Click the Next button.
3.	In the Step 2 of 4 dialog box, do the following:
	a.	Ensure that About Box is selected.
	b.	Ensure that 3D Controls is selected.
	c.	Select ActiveX Controls
	d.	Click the Next button.
4.	In the Step 3 of 4 dialog box, do the following:
	a.	For comments, ensure that Yes, Please is selected.
	b.	For how to use the MFC library, select As a statically linked library.
	c.	Click the Next button.
5.	In the Step 4 of 4 dialog box, just click Finish.
6.	Read New Project Information, and click OK. (The AppWizard creates the project files and opens the project.)
7.	Add a LEAD control to the main window as follows:
	a.	In the Project Workspace, click the ResourceView tab.
	b.	Double-click the pnttut resources folder to open it.
	c.	Double-click the Dialog folder to open it.
	d.	Double-click IDD_PNTTUT_DIALOG to design the form.
	e.	Select the TODO... text control; then press the Delete key to delete it.
	f.	From the main menu, select Project > Add to project > Components and Controls. (The Component Gallery appears.)
	g.	Click the Registered ActiveX Contols.
	h.	Double-click the LEAD Main Control (14) icon. (The Confirm Classes dialog box appears.)
	i.	Ensure that CLead, CAnnMenu, CAnnToolbar, COleFont, and CPicture are checked.
	j.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD Main control appears in the Controls toolbar.)
	k.	Click the LEAD Main control icon; then size and position the control as you want it to appear at run time.
	l.	Use the right mouse button to edit the properties of the new LEAD Main control.
	m.	Change the ID to IDC_LEAD1.
8.	Add a LEAD DigitalPaint control to the main window as follows:
	a.	In the Project Workspace, click the ResourceView tab.
	b.	Double-click the pnttut resources folder to open it.
	c.	Double-click the Dialog folder to open it.
	d.	Double-click IDD_PNTTUT_DIALOG to design the form.
	e.	From the main menu, select Project > Add to project > Components and Controls. (The Component Gallery appears.)
	f.	Click the Registered ActiveX Contols.
	g.	Double-click the LEAD DigitalPaint Control (14) icon. (The Confirm Classes dialog box appears.)
	h.	Ensure that CLEADPaint, CLTShape, CLTText, CLTPaintContainer, CLTBrush, CLTRegion, CLTFill, and CLTFont are checked.
	i.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD DigitalPaint control appears in the Controls toolbar.)
	j.	Click the LEAD DigitalPaint control icon; then place it on the dialog.  The size and position does not matter, as the control is invisible at runtime.
	k.	Use the right mouse button to edit the properties of the new LEAD DigitalPaint control.
	l.	Change the ID to IDC_LEADPAINT1.
9.	Add a LEAD ToolBar control to the main window as follows:
	a.	In the Project Workspace, click the ResourceView tab.
	b.	Double-click the pnttut resources folder to open it.
	c.	Double-click the Dialog folder to open it.
	d.	Double-click IDD_PNTTUT_DIALOG to design the form.
	e.	From the main menu, select Project > Add to project > Components and Controls. (The Component Gallery appears.)
	f.	Click the Registered ActiveX Contols.
	g.	Double-click the LEAD ToolBar Control (14) icon. (The Confirm Classes dialog box appears.)
	h.	Ensure that CLEADToolBar, CLTToolBarButton, and CPicture are checked.
	i.	Click OK to complete the selection; then click Close to close the Component Gallery. (The LEAD ToolBar control appears in the Controls toolbar.)
	j.	Click the LEAD ToolBar control icon; then place it on the dialog.  The size and position does not matter, as the control is invisible at runtime.
	k.	Use the right mouse button to edit the properties of the new LEAD ToolBar control.
	l.	Change the ID to IDC_LEADTOOLBAR1.
10.	Add a command button to your form and name it as follows:
	ID	Caption
	IDC_LOADLEAD	Load Image
11.	Press Ctrl-F4 to close all windows back to the Project Workspace.
12.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:
	a.	Click the Message Maps tab.
	b.	In the Class Name combo box, select CPnttutDlg.
	c.	In the Object IDs list box, select IDC_LOADLEAD.
	d.	In the Messages list box, select BN_CLICKED.
	e.	Click the Add function button. Choose OK for the default function name (OnLoadlead).
	f.	Click the Edit Code button and enter the following code: (you will have to change to file name to an existing image file name on your computer)
   //change the path to a file on your system
   m_LEAD1.Load("v:\\images\\babe.cmp", 0, 1, 1);

   //Create the Toolbar
   m_LEADToolBar1.CreateToolbar ((long)this->m_hWnd, "DigitalPaint", TOOLBAR_PAINT);
   m_LEADToolBar1.SetRowCount (1);
   m_LEADToolBar1.SetVisible (TRUE);

   //enable automation
   m_LEADPaint1.SetPaintUserMode(PAINT_USERMODE_AUTO);
   //setup toolbar
   LPDISPATCH pToolbar=NULL;
   pToolbar = (LPDISPATCH)m_LEADToolBar1.GetControlUnknown ();
   m_LEADPaint1.SetToolbarControl(pToolbar);

   //Create an automation container
   m_LEADPaint1.CreateAutoContainer ((long)m_LEAD1.m_hWnd, (long)m_LEAD1.GetBitmap());
   //enable the container
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetActive();
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetEnabled (TRUE);

   //set the container limit
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitLeft (0);
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitTop (0);
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitWidth ((long)m_LEAD1.GetBitmapWidth());
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitHeight ((long)m_LEAD1.GetBitmapHeight ());

13.	Do the following to add m_LEAD1 to the CPnttutDlg class and link the variable to the LEAD Main control using dynamic data exchange:
	a.	Press Ctrl-W. (The MFC ClassWizard dialog box appears.)
	b.	Click the Member Variables tab.
	c.	In the Class Name box, select CPnttutDlg.
	d.	In the Control IDs list, select IDC_LEAD1.
	e.	Click the Add Variable... button.
	f.	Specify m_LEAD1 as the variable name, and Control as the category.
	g.	Click OK to close the dialog box, and click OK to close the MFC ClassWizard.
14.	Do the following to add m_LEADPaint1 to the CPnttutDlg class and link the variable to the LEAD DigitalPaint control using dynamic data exchange:
	a.	Press Ctrl-W. (The MFC ClassWizard dialog box appears.)
	b.	Click the Member Variables tab.
	c.	In the Class Name box, select CPnttutDlg.
	d.	In the Control IDs list, select IDC_LEADPAINT1.
	e.	Click the Add Variable... button.
	f.	Specify m_LEADPaint1 as the variable name, and Control as the category.
	g.	Click OK to close the dialog box, and click OK to close the MFC ClassWizard.
15.	Do the following to add m_LEADToolBar1 to the CPnttutDlg class and link the variable to the LEAD ToolBar control using dynamic data exchange:
	a.	Press Ctrl-W. (The MFC ClassWizard dialog box appears.)
	b.	Click the Member Variables tab.
	c.	In the Class Name box, select CPnttutDlg.
	d.	In the Control IDs list, select IDC_LEADTOOLBAR1.
	e.	Click the Add Variable... button.
	f.	Specify m_LEADToolBar1 as the variable name, and Control as the category.
	g.	Click OK to close the dialog box, and click OK to close the MFC ClassWizard.
16.	Edit pnttutDlg.cpp and place the following at the top of the file, after #include "pnttutDlg.h" (NOTE: you will have to change the path to where the include files are installed on your system ex. \LEAD\include):
#include "d:\lead14\dist\include\ltpntocx.h"
#include "d:\lead14\dist\include\lttlbocx.h"
#include "ltpaintcontainer.h"
#include "lttoolbarbutton.h"

17.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:
	a.	Click the Message Maps tab.
	b.	In the Class Name combo box, select CPnttutDlg.
	c.	In the Object IDs list box, select IDC_LEAD1.
	d.	In the Messages list box, select Scroll.
	e.	Click the Add function button. Choose OK for the default function name (OnScrollLead1).
	f.	Click the Edit Code button and enter the following code:

   if(m_LEAD1.GetBitmap() != 0)
      UpdateXForm ();

18.	Add a command button to your form and name it as follows:
	ID	Caption
	IDC_ZOOMIN	ZoomIn
19.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:
	a.	Click the Message Maps tab.
	b.	In the Class Name combo box, select CPnttutDlg.
	c.	In the Object IDs list box, select IDC_ZOOMIN.
	d.	In the Messages list box, select BN_CLICKED.
	e.	Click the Add function button. Choose OK for the default function name (OnZoomin).
	f.	Click the Edit Code button and enter the following code:
   //zoom image and update container's Scalars
   m_LEAD1.SetPaintZoomFactor (200);
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetScalarNumX (m_LEAD1.GetPaintZoomFactor() / 100);
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetScalarNumY (m_LEAD1.GetPaintZoomFactor() / 100);
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetScalarDenX (1);
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetScalarDenY (1);

   //now, update container's XForm
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetOffsetX ((long)-m_LEAD1.GetDstLeft ());
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetOffsetY ((long)-m_LEAD1.GetDstTop ());

20.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:
	a.	Click the Message Maps tab.
	b.	In the Class Name combo box, select CPnttutDlg.
	c.	In the Object IDs list box, select IDC_LEADPAINT1.
	d.	In the Messages list box, select PaintContainer.
	e.	Click the Add function button. Choose OK for the default function name (OnPaintContainerLeadpaint1).
	f.	Click the Edit Code button and enter the following code:
   float Zoom;
   //this will check the automation action.
   //if it was Zoom, then it will update the Main control
   //and then update the XForm
   if(nEventType == PAINT_CONTAINER_EVENT_DRAW)
   {
      if(nObjectType == PAINT_CONTAINER_OBJECT_TYPE_POINT)
      {
         if(m_LEADToolBar1.GetButton(BUTTON_ID_TOOL_PAINT_ZOOM).GetChecked())
         {
            if((nState == PAINT_CONTAINER_STATE_END) && (nStatus == 0))
            {
               Zoom = (float)(m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).GetScalarNumX()
                       / m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).GetScalarDenX());
               Zoom = Zoom * 100;
               if(m_LEAD1.GetPaintZoomFactor() != Zoom)
               {
                  m_LEAD1.SetPaintZoomFactor(Zoom);
                  UpdateXForm();
               }
            }
         }
      }
   }

21.	Edit pnttutDlg.h and add the following after the constructor:
   void UpdateXForm(void);

22.	Edit pnttutDlg.cpp and add the following at the end of the file:
void CPnttutDlg::UpdateXForm(void)
{
   if(m_LEAD1.GetBitmap() != 0)
   {
      if(m_LEADPaint1.GetPaintUserMode() == PAINT_USERMODE_AUTO)
      {
         if(m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd))
         {
            //set the container limit
            m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitLeft(0);
            m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitTop(0);
            m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitWidth((long)m_LEAD1.GetBitmapWidth());
            m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetLimitHeight((long)m_LEAD1.GetBitmapHeight());
            //set the container offset
            m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetOffsetX((long)-m_LEAD1.GetDstLeft());
            m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).SetOffsetY((long)-m_LEAD1.GetDstTop());
         }
      }
   }
}

23.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:
	a.	Click the Message Maps tab.
	b.	In the Class Name combo box, select CPnttutDlg.
	c.	In the Object IDs list box, select IDC_LEAD1.
	d.	In the Messages list box, select Resize.
	e.	Click the Add function button. Choose OK for the default function name (OnResizeLead1).
	f.	Click the Edit Code button and enter the following code:
   if(::IsWindow(m_LEAD1.m_hWnd))
{
      if(m_LEAD1.GetBitmap() != 0)
         UpdateXForm();
}

24.	Press Ctrl-W to go to the MFC Class Wizard; then do the following:
	a.	Click the Message Maps tab.
	b.	In the Class Name combo box, select CPnttutDlg.
	c.	In the Object IDs list box, select CPnttutDlg.
	d.	In the Messages list box, select WM_DESTROY.
	e.	Click the Add function button.
	f.	Click the Edit Code button and change the body of the function to the following:
   m_LEADPaint1.SetToolbarControl(NULL);
   m_LEADPaint1.DeleteAutoContainer((long)m_LEAD1.m_hWnd);
   CDialog::OnDestroy();

25.	On the main menu, select Build > Build pnttut.exe to build the project.
26.	On the main menu, select Build > Execute pnttut.exe to run the project.


Miscellaneous Examples (Visual C++)

AutoContainer.UpdateBitmap example for Visual C++

AutoCopy example for Visual C++

AutoCut example for Visual C++

AutoRender example for Visual C++

BackColor example for Visual C++

BitmapColor example for Visual C++

Brush example for Visual C++

Brush.TouchBitmap example for Visual C++

CanRedo example for Visual C++

CanUndo example for Visual C++

ClipboardReady example for Visual C++

EnableMethodErrors example for Visual C++

Fill example for Visual C++

Fill.BackgroundTileBitmap example for Visual C++

Fill.Border example for Visual C++

Fill.ColorReplace example for Visual C++

Fill.Surface example for Visual C++

Fill.Texture example for Visual C++

IsSupportLocked example for Visual C++

OffsetClipRgn example for Visual C++

Region.Border example for Visual C++

Region.Color example for Visual C++

Region.Ellipse example for Visual C++

Region.LowerTolerance example for Visual C++

Region.Polygon example for Visual C++

Region.Rect example for Visual C++

Region.RoundRect example for Visual C++

Region.Surface example for Visual C++

SetMetrics example for Visual C++

Shape example for Visual C++

Shape.BorderTileBitmap example for Visual C++

Shape.BackgroundStyle example for Visual C++

Shape.DrawPolyBezier example for Visual C++

Shape.DrawPolygon example for Visual C++

Shape.Texture example for Visual C++

Text example for Visual C++

UndoLevel example for Visual C++

UnlockSupport example for Visual C++

UpdateXForm example for Visual C++


AutoContainer.UpdateBitmap example for Visual C++

   //change the bitmap
   m_LEAD1.Rotate (4500, 0, RGB(255, 0, 0));
   //update the Automation container
   m_LEADPaint1.GetAutoContainer((long)m_LEAD1.m_hWnd).UpdateBitmap ((long)m_LEAD1.GetBitmap());


AutoCopy example for Visual C++

   //copy selection to clipboard
   m_LEADPaint1.AutoCopy(0);


AutoCut example for Visual C++

   //cut selection to clipboard
   m_LEADPaint1.AutoCut(0);


AutoRender example for Visual C++

   //print the image
   m_LEADPaint1.AutoRender(0);


BackColor example for Visual C++

   m_LEADPaint1.SetBackColor(RGB(255, 0, 0));
   m_LEADPaint1.AutoSelect(PAINT_AUTOMATION_SELTYPE_ALL, 0);
   m_LEADPaint1.AutoDelete(0);


BitmapColor example for Visual C++

void CMfcpaint2Dlg::OnMouseMoveLeadctrl1(short Button, short Shift, long x, long y)
{
   BYTE Red;
   BYTE Green;
   BYTE Blue;
   OLE_COLOR color;
   COLORREF cr;
   CString cs;

   if(m_LEAD1.GetBitmap() != 0)
   {
      m_LEADPaint1.PickColor(x, y);
      color = m_LEADPaint1.GetBitmapColor ();
      cr = color;
      Red = GetRValue(cr);
      Green = GetGValue(cr);
      Blue = GetBValue(cr);
      cs.Format("PickColor Bitmap - (%d,%d,%d)", Red ,Green, Blue);
      SetWindowText(cs);
   }
}


Brush example for Visual C++

   //set some initial values
   m_LEADPaint1.SetDlgTitle("Brush Options");
   m_LEADPaint1.SetDlgFlags (PAINT_DLG_BRUSH_SHOWALL);
   m_LEADPaint1.SetDlgTouchContentsType (BRUSH_TOUCH_CONTENTS_COLOR);
   m_LEADPaint1.SetDlgTouchColor (RGB(0,255,0));
   m_LEADPaint1.SetDlgTouchImageCount (2);
   m_LEADPaint1.SetDlgTouchImage (0, "d:\\lead14\\dist\\images\\ulay1.bmp");
   m_LEADPaint1.SetDlgTouchImage(1, "d:\\lead14\\dist\\images\\ulay2.bmp");
   m_LEADPaint1.SetDlgTouchImageIndex (0);
   m_LEADPaint1.SetDlgDiameter (15);
   m_LEADPaint1.SetDlgHardnessValue(5);
   m_LEADPaint1.SetDlgSpacing(7);
   m_LEADPaint1.SetDlgDensity(50);
   m_LEADPaint1.SetDlgOpacity(25);
   m_LEADPaint1.SetDlgFadeOut(25);
   m_LEADPaint1.SetDlgPaperTextureCount(3);
   m_LEADPaint1.SetDlgPaperTexture(0, "d:\\temp\\texture1.bmp");
   m_LEADPaint1.SetDlgPaperTexture(1, "d:\\temp\\texture2.bmp");
   m_LEADPaint1.SetDlgPaperTexture(2, "d:\\temp\\texture3.bmp");
   m_LEADPaint1.SetDlgPaperTextureIndex (2);
    m_LEADPaint1.SetDlgTouchTransparentColor(RGB(0,0,0));

   //show the dialog
   m_LEADPaint1.ShowBrushDlg ((long)this->m_hWnd);

   //copy the results and use them
   m_LEADPaint1.GetBrush().SetTouchContentsType(m_LEADPaint1.GetDlgTouchContentsType());
   if(m_LEADPaint1.GetBrush().GetTouchContentsType() == BRUSH_TOUCH_CONTENTS_COLOR)
      m_LEADPaint1.GetBrush().SetTouchColor(m_LEADPaint1.GetDlgTouchColor());
   else
   {
      m_LEAD2.Load (m_LEADPaint1.GetDlgTouchImage(m_LEADPaint1.GetDlgTouchImageIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetBrush().SetTouchBitmap(m_LEAD2.GetBitmapBitmap());
      m_LEAD2.SetBitmap(0);
   }
   m_LEADPaint1.GetBrush().SetDiameter(m_LEADPaint1.GetDlgDiameter());
   m_LEADPaint1.GetBrush().SetHardnessValue(m_LEADPaint1.GetDlgHardnessValue());
   m_LEADPaint1.GetBrush().SetSpacing(m_LEADPaint1.GetDlgSpacing());
   m_LEADPaint1.GetBrush().SetDensity(m_LEADPaint1.GetDlgDensity());
   m_LEADPaint1.GetBrush().SetOpacity(m_LEADPaint1.GetDlgOpacity());
   m_LEADPaint1.GetBrush().SetFadeOutRate(m_LEADPaint1.GetDlgFadeOut());
   if(m_LEADPaint1.GetDlgPaperTextureIndex() > -1)
   {
      m_LEAD2.Load(m_LEADPaint1.GetDlgPaperTexture(m_LEADPaint1.GetDlgPaperTextureIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetBrush().SetTexture (m_LEAD2.GetBitmap());
      m_LEAD2.SetBitmap(0);
   }

   //Paint using the Brush
   m_LEADPaint1.GetBrush().MoveTo (0, 0);
   m_LEADPaint1.GetBrush().LineTo (200, 200);


Brush.TouchBitmap example for Visual C++

   //modify Brush properties
   m_LEADPaint1.GetBrush().SetTouchBitmap(m_LEAD2.GetBitmap());
   m_LEADPaint1.GetBrush().SetTouchTransparentColor (RGB(0, 0, 0));
   m_LEADPaint1.GetBrush().SetTouchContentsType (BRUSH_TOUCH_CONTENTS_IMAGE);


CanUndo example for Visual C++

   if(m_LEADPaint1.CanUndo())
      m_LEADPaint1.Undo(0);


CanRedo example for Visual C++

   if(m_LEADPaint1.CanRedo())
      m_LEADPaint1.Redo(0);


ClipboardReady example for Visual C++

   if(m_LEADPaint1.ClipboardReady())
      m_LEADPaint1.AutoPaste(0);


EnableMethodErrors example for Visual C++

   m_LEADPaint1.SetEnableMethodErrors(FALSE);


Fill example for Visual C++

   //set some initial values
   m_LEADPaint1.SetDlgTitle ("Fill Options");
   m_LEADPaint1.SetDlgFlags (PAINT_DLG_FILL_SHOWALL);
   m_LEADPaint1.SerDlgFillStyle (FILL_FILLSTYLE_GRADIENT);
   m_LEADPaint1.SetDlgSolidFillColor (RGB(0,0,0));
   m_LEADPaint1.SetDlgBackgroundTileBitmapCount (3);
   m_LEADPaint1.SetDlgBackgroundTileBitmap (0, "d:\\lead14\\dist\\images\\ulay1.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmap(1, "d:\\lead14\\dist\\images\\ulay2.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmap(2, "d:\\lead14\\dist\\images\\ulay3.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmapIndex (1);
   m_LEADPaint1.SetDlgFillGradientStyle (FILL_GRADIENTSTYLE_ANGLE_TO_LB);
   m_LEADPaint1.SetDlgGradientStartColor (RGB(255,0,255));
   m_LEADPaint1.SetDlgGradientEndColor (RGB(0,255,0));
   m_LEADPaint1.SetDlgGradientSteps (220);
   m_LEADPaint1.SetDlgUpperTolerance (RGB(20, 20, 20));
   m_LEADPaint1.SetDlgLowerTolerance (RGB(0, 0, 0));
   m_LEADPaint1.SetDlgOpacity (0);
   m_LEADPaint1.SetDlgPaperTextureCount (3);
   m_LEADPaint1.SetDlgPaperTexture (0, "d:\\temp\\texture1.bmp");
   m_LEADPaint1.SetDlgPaperTexture(1, "d:\\temp\\texture2.bmp");
   m_LEADPaint1.SetDlgPaperTexture(2, "d:\\temp\\texture3.bmp");
   m_LEADPaint1.SetDlgPaperTextureIndex (2);

   //show the dialog
   m_LEADPaint1.ShowFillDlg ((long)this->m_hWnd);

   //copy the results and use them
   m_LEADPaint1.GetFill().SetStyle (m_LEADPaint1.GetDlgFillStyle());
   m_LEADPaint1.GetFill().SetSolidFillColor (m_LEADPaint1.GetDlgSolidFillColor());
   if(m_LEADPaint1.GetFill().GetStyle() == FILL_FILLSTYLE_PATTERN)
   {
      m_LEAD2.Load (m_LEADPaint1.GetDlgBackgroundTileBitmap(m_LEADPaint1.GetDlgBackgroundTileBitmapIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetFill().SetBackgroundTileBitmap (m_LEAD2.GetBitmap());
      m_LEAD2.SetBitmap(0);
   }
   m_LEADPaint1.GetFill().SetGradientStyle (m_LEADPaint1.GetDlgFillGradientStyle());
   m_LEADPaint1.GetFill().SetGradientStartColor (m_LEADPaint1.GetDlgGradientStartColor());
   m_LEADPaint1.GetFill().SetGradientEndColor (m_LEADPaint1.GetDlgGradientEndColor());
   m_LEADPaint1.GetFill().SetGradientSteps (m_LEADPaint1.GetDlgGradientSteps());
   m_LEADPaint1.GetFill().SetUpperTolerance (m_LEADPaint1.GetDlgUpperTolerance ());
   m_LEADPaint1.GetFill().SetLowerTolerance (m_LEADPaint1.GetDlgLowerTolerance ());
   m_LEADPaint1.GetFill().SetOpacity (m_LEADPaint1.GetDlgOpacity ());
   if(m_LEADPaint1.GetDlgPaperTextureIndex() > -1)
   {
      m_LEAD2.Load(m_LEADPaint1.GetDlgPaperTexture(m_LEADPaint1.GetDlgPaperTextureIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetFill().SetTexture (m_LEAD2.GetBitmap());
      m_LEAD2.SetBitmap(0);
   }
   else
      m_LEADPaint1.GetFill().SetTexture(0);


Fill.BackgroundTileBitmap example for Visual C++

   //modify Fill properties
   m_LEADPaint1.GetFill().SetBackgroundTileBitmap(m_LEAD2.GetBitmap ());
   m_LEADPaint1.GetFill().SetStyle (FILL_FILLSTYLE_PATTERN);


Fill.Border example for Visual C++

void CMfcpaint2Dlg::OnMouseDownLeadctrl1(short Button, short Shift, long x, long y)
{
   m_LEADPaint1.GetFill().Border (x, y, RGB(0, 0, 0));
}


Fill.ColorReplace example for Visual C++

   m_LEADPaint1.GetFill().ColorReplace (RGB(0, 0, 0));


Fill.Surface example for Visual C++

void CMfcpaint2Dlg::OnMouseDownLeadctrl1 (short Button, short Shift, long x, long y)
{
   m_LEADPaint1.GetFill().Surface (x, y);
}


Fill.Texture example for Visual C++

   //modify Fill properties
   m_LEADPaint1.GetFill().SetTexture(m_LEAD2.GetBitmap ());
   m_LEADPaint1.GetFill().SetStyle (FILL_FILLSTYLE_SOLID);


IsSupportLocked example for Visual C++

   BOOL bRet;
   bRet = m_LEADPaint1.IsSupportLocked(L_SUPPORT_DIGITALPAINT);


OffsetClipRgn example for Visual C++

   m_LEADPaint1.OffsetClipRgn(-5, -5);
   m_LEADPaint2.SethRgn (m_LEADPaint1.GetClipRgn());


Region.Border example for Visual C++

   m_LEADPaint1.GetRegion().Border(12, 31, RGB(0, 0, 255)); //some random values
   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());


Region.Color example for Visual C++

   m_LEADPaint1.GetRegion().Color(RGB(0,0,0));
   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());


Region.Ellipse example for Visual C++

   m_LEADPaint1.GetRegion().Ellipse(10, 10, 50, 50);
   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());


Region.LowerTolerance example for Visual C++

   //set some initial values
   m_LEADPaint1.SetDlgTitle ("Region Options");
   m_LEADPaint1.SetDlgFlags (PAINT_DLG_REGION_SHOWALL);
   m_LEADPaint1.SetDlgLowerTolerance (RGB(0,0,0));
   m_LEADPaint1.SetDlgUpperTolerance (RGB(20, 20, 20));
   m_LEADPaint1.SetDlgRoundRectEllipseWidth (20);
   m_LEADPaint1.SetDlgRoundRectEllipseHeight (20);

   //show the dialog
   m_LEADPaint1.ShowRegionDlg ((long)this->m_hWnd);

   //copy the results and use them
   m_LEADPaint1.GetRegion().SetUpperTolerance (m_LEADPaint1.GetDlgUpperTolerance());
   m_LEADPaint1.GetRegion().SetLowerTolerance (m_LEADPaint1.GetDlgLowerTolerance());
   m_LEADPaint1.GetRegion().SetRoundRectEllipseWidth (m_LEADPaint1.GetDlgRoundRectEllipseWidth());
   m_LEADPaint1.GetRegion().SetRoundRectEllipseHeight (m_LEADPaint1.GetDlgRoundRectEllipseHeight());

   m_LEADPaint1.GetRegion().RoundRect (10, 10, 100, 100);

   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());
   m_LEADPaint1.GetShape().Rect (0, 0, 500, 500);


Region.Polygon example for Visual C++

   m_LEADPaint1.SetPolygonCount (5);

   m_LEADPaint1.SetPolygonX (0, 3 * 10);
   m_LEADPaint1.SetPolygonX(1, 5 * 10);
   m_LEADPaint1.SetPolygonX(2, 0 * 10);
   m_LEADPaint1.SetPolygonX(3, 6 * 10);
   m_LEADPaint1.SetPolygonX(4, 2 * 10);

   m_LEADPaint1.SetPolygonY (0, 0 * 10);
   m_LEADPaint1.SetPolygonY(1, 7 * 10);
   m_LEADPaint1.SetPolygonY(2, 3 * 10);
   m_LEADPaint1.SetPolygonY(3, 3 * 10);
   m_LEADPaint1.SetPolygonY(4, 7 * 10);

   m_LEADPaint1.GetRegion().Polygon(0);
   //scale region by 1/2
   m_LEADPaint1.GetRegion().ScaleRgn (50, 50,
                                     PAINT_ALIGN_HCENTER |
                                     PAINT_ALIGN_VCENTER);
   m_LEADPaint1.GetRegion().TranslateRgn (5, 5);

   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());


Region.Rect example for Visual C++

   m_LEADPaint1.GetRegion().Rect(10, 10, 25, 25);
   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());


Region.RoundRect example for Visual C++

   m_LEADPaint1.GetRegion().RoundRect(10, 10, 50, 50);
   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());


Region.Surface example for Visual C++

   m_LEADPaint1.GetRegion().Surface(134, 38); //some random values
   m_LEADPaint1.SetClipRgn (m_LEADPaint1.GetRegion().GethRgn ());


SetMetrics example for Visual C++

   m_LEAD1.Load("o:\\images\\new\\annak.jpg", 0, 1, 1);
   m_LEADPaint1.SetMetrics((long)m_LEAD1.m_hWnd, m_LEAD1.GetBitmap ());


Shape example for Visual C++

   //set some initial values
   m_LEADPaint1.SetDlgTitle ("Shape Options");
   m_LEADPaint1.SetDlgFlags (PAINT_DLG_SHAPE_SHOWALL);
   m_LEADPaint1.SetDlgShapeBackgroundStyle (SHAPE_BACKSTYLE_GRADIENT);
   m_LEADPaint1.SetDlgBackgroundColor (RGB(0,0,0));
   m_LEADPaint1.SetDlgBackgroundTileBitmapCount (3);
   m_LEADPaint1.SetDlgBackgroundTileBitmap (0, "d:\\lead14\\dist\\images\\ulay1.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmap(1, "d:\\lead14\\dist\\images\\ulay2.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmap(2, "d:\\lead14\\dist\\images\\ulay3.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmapIndex (1);
   m_LEADPaint1.SetDlgBorderStyle (SHAPE_BORDERSTYLE_SOLID);
   m_LEADPaint1.SetDlgBorderWidth (1);
   m_LEADPaint1.SetDlgShapeBorderBrushStyle (SHAPE_BORDERBRUSHSTYLE_COLOR);
   m_LEADPaint1.SetDlgBorderColor (RGB(0,0,255));
   m_LEADPaint1.SetDlgBorderTileBitmapCount (2);
   m_LEADPaint1.SetDlgBorderTileBitmap (0, "d:\\lead14\\dist\\images\\ulay4.bmp");
   m_LEADPaint1.SetDlgBorderTileBitmap(1, "d:\\lead14\\dist\\images\\ulay5.bmp");
   m_LEADPaint1.SetDlgBorderTileBitmapIndex (1);
   m_LEADPaint1.SetDlgShapeGradientStyle (SHAPE_GRADIENTSTYLE_ANGLE_TO_LB);
   m_LEADPaint1.SetDlgGradientStartColor (RGB(255,0,255));
   m_LEADPaint1.SetDlgGradientEndColor (RGB(0,255,0));
   m_LEADPaint1.SetDlgGradientSteps (200);
   m_LEADPaint1.SetDlgBorderEndCap (SHAPE_BORDERENDCAP_FLAT);
   m_LEADPaint1.SetDlgPaperTextureCount (3);
   m_LEADPaint1.SetDlgPaperTexture (0, "d:\\temp\\texture1.bmp");
   m_LEADPaint1.SetDlgPaperTexture(1, "d:\\temp\\texture2.bmp");
   m_LEADPaint1.SetDlgPaperTexture(2, "d:\\temp\\texture3.bmp");
   m_LEADPaint1.SetDlgPaperTextureIndex (2);

   //show the dialog
   m_LEADPaint1.SetShowShapeDlg ((long)this->m_hWnd);

   //copy the results and use them
   m_LEADPaint1.GetShape().SetBackgroundStyle (m_LEADPaint1.GetDlgShapeBackgroundStyle());
   m_LEADPaint1.GetShape().SetBackgroundColor (m_LEADPaint1.GetDlgBackgroundColor());
    if(m_LEADPaint1.GetShape().GetBackgroundStyle() == SHAPE_BACKSTYLE_TILEDIMAGE)
    {
       m_LEAD2.Load(m_LEADPaint1.GetDlgBackgroundTileBitmap(m_LEADPaint1.GetDlgBackgroundTileBitmapIndex()),
                   0, 1, 1);
       m_LEADPaint1.GetShape().SetBackgroundTileBitmap (m_LEAD2.GetBitmap());
       m_LEAD2.SetBitmap (0);
    }
   m_LEADPaint1.GetShape().SetBorderStyle (m_LEADPaint1.GetDlgBorderStyle());
   m_LEADPaint1.GetShape().SetBorderWidth (m_LEADPaint1.GetDlgBorderWidth());
   m_LEADPaint1.GetShape().SetBorderBrushStyle (m_LEADPaint1.GetDlgShapeBorderBrushStyle());
   m_LEADPaint1.GetShape().SetBorderColor (m_LEADPaint1.GetDlgBorderColor());
   if(m_LEADPaint1.GetShape().GetBorderStyle() == SHAPE_BACKSTYLE_TILEDIMAGE)
   {
      m_LEAD2.Load(m_LEADPaint1.GetDlgBorderTileBitmap(m_LEADPaint1.GetDlgBorderTileBitmapIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetShape().SetBorderTileBitmap (m_LEAD2.GetBitmap());
      m_LEAD2.SetBitmap(0);
   }
   m_LEADPaint1.GetShape().SetGradientStyle (m_LEADPaint1.GetDlgShapeGradientStyle());
   m_LEADPaint1.GetShape().SetGradientStartColor (m_LEADPaint1.GetDlgGradientStartColor());
   m_LEADPaint1.GetShape().SetGradientEndColor (m_LEADPaint1.GetDlgGradientEndColor());
   m_LEADPaint1.GetShape().SetGradientSteps (m_LEADPaint1.GetDlgGradientSteps());
   m_LEADPaint1.GetShape().SetBorderEndCap (m_LEADPaint1.GetDlgBorderEndCap ());
   m_LEADPaint1.GetShape().SetRoundRectEllipseWidth (m_LEADPaint1.GetDlgRoundRectEllipseWidth ());
   m_LEADPaint1.GetShape().SetRoundRectEllipseHeight (m_LEADPaint1.GetDlgRoundRectEllipseHeight ());
   m_LEADPaint1.GetShape().SetOpacity (m_LEADPaint1.GetDlgOpacity ());
   if(m_LEADPaint1.GetDlgPaperTextureIndex() > -1)
   {
      m_LEAD2.Load(m_LEADPaint1.GetDlgPaperTexture(m_LEADPaint1.GetDlgPaperTextureIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetShape().SetTexture (m_LEAD2.GetBitmap());
      m_LEAD2.SetBitmap(0);
   }

   //Draw a Line
   m_LEADPaint1.GetShape().DrawLine (0, 0, 150, 150);
   //Draw a Rect
   m_LEADPaint1.GetShape().DrawRect (10, 10, 100, 100);
   //Draw a RoundRect
   m_LEADPaint1.GetShape().DrawRoundRect (20, 20, 100, 100);
   //Draw an Ellipse
   m_LEADPaint1.GetShape().DrawEllipse (30, 30, 100, 100);


Shape.BackgroundStyle example for Visual C++

   //modify Shape properties
   m_LEADPaint1.GetShape().SetBackgroundStyle(SHAPE_BACKSTYLE_TILEDIMAGE);
   m_LEADPaint1.GetBitmap ().SetBackgroundTileBitmap (m_LEAD2.GetBitmap());


Shape.BorderTileBitmap example for Visual C++

   //modify Shape properties
   m_LEADPaint1.GetShape().SetBorderTileBitmap(m_LEAD2.GetBitmap ());


Shape.DrawPolyBezier example for Visual C++

   m_LEADPaint1.SetPolygonCount (4);

   m_LEADPaint1.SetPolygonX (0, 3 * 10);
   m_LEADPaint1.SetPolygonX(1, 5 * 10);
   m_LEADPaint1.SetPolygonX(2, 2 * 10);
   m_LEADPaint1.SetPolygonX(3, 0 * 10);

   m_LEADPaint1.SetPolygonY (0, 0 * 10);
   m_LEADPaint1.SetPolygonY(1, 7 * 10);
   m_LEADPaint1.SetPolygonY(2, 7 * 10);
   m_LEADPaint1.SetPolygonY(3, 3 * 10);

   m_LEADPaint1.GetShape().DrawPolyBezier();


Shape.DrawPolygon example for Visual C++

   m_LEADPaint1.SetPolygonCount (5);

   m_LEADPaint1.SetPolygonX (0, 3 * 10);
   m_LEADPaint1.SetPolygonX(1, 5 * 10);
   m_LEADPaint1.SetPolygonX(2, 0 * 10);
   m_LEADPaint1.SetPolygonX(3, 6 * 10);
   m_LEADPaint1.SetPolygonX(4, 2 * 10);

   m_LEADPaint1.SetPolygonY (0, 0 * 10);
   m_LEADPaint1.SetPolygonY(1, 7 * 10);
   m_LEADPaint1.SetPolygonY(2, 3 * 10);
   m_LEADPaint1.SetPolygonY(3, 3 * 10);
   m_LEADPaint1.SetPolygonY(4, 7 * 10);

   m_LEADPaint1.GetShape().DrawPolygon(0);


Shape.Texture example for Visual C++

   //modify Shape properties
   m_LEADPaint1.GetShape().SetTexture(m_LEAD2.GetBitmap ());


Text example for Visual C++

   //set some initial values
   m_LEADPaint1.SetDlgTitle ("Text Options");
   m_LEADPaint1.SetDlgFlags (PAINT_DLG_TEXT_SHOWALL);

   m_LEADPaint1.SetDlgTextString ("Testing");
   m_LEADPaint1.GetDlgTextFont().SetBold (TRUE);
   m_LEADPaint1.GetDlgTextFont().SetItalic (TRUE);
   m_LEADPaint1.GetDlgTextFont().SetName ("Bones");
   m_LEADPaint1.GetDlgTextFont().SetSize (18);

   m_LEADPaint1.SetDlgTextBorderBrushStyle (TEXT_BORDER_BRUSHSTYLE_COLOR);
   m_LEADPaint1.SetDlgBorderWidth (3);
   m_LEADPaint1.SetDlgBorderColor (RGB(0,255,0));
   m_LEADPaint1.SetDlgTextBackgroundStyle (TEXT_BACKSTYLE_OPAQUE);
   m_LEADPaint1.SetDlgBackgroundColor (RGB(255,0,0));

   m_LEADPaint1.SetDlgBackgroundTileBitmapCount (3);
   m_LEADPaint1.SetDlgBackgroundTileBitmap (0, "d:\\lead14\\dist\\images\\ulay1.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmap(1, "d:\\lead14\\dist\\images\\ulay2.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmap(2, "d:\\lead14\\dist\\images\\ulay3.bmp");
   m_LEADPaint1.SetDlgBackgroundTileBitmapIndex (1);

   m_LEADPaint1.SetDlgAlignment (PAINT_ALIGN_HCENTER | PAINT_ALIGN_VCENTER);
   m_LEADPaint1.SetDlgOpacity (0);

   m_LEADPaint1.SetDlgPaperTextureCount (3);
   m_LEADPaint1.SetDlgPaperTexture (0, "d:\\temp\\texture1.bmp");
   m_LEADPaint1.SetDlgPaperTexture(1, "d:\\temp\\texture2.bmp");
   m_LEADPaint1.SetDlgPaperTexture(2, "d:\\temp\\texture3.bmp");
   m_LEADPaint1.SetDlgPaperTextureIndex (2);

   m_LEADPaint1.SetDlgTransformRotate (0);
   m_LEADPaint1.SetDlgTransformScaleX (100);
   m_LEADPaint1.SetDlgTransformScaleY (100);

   //show the dialog
   m_LEADPaint1.ShowTextDlg ((long)this->m_hWnd);

   //copy the results and use them
   m_LEADPaint1.GetText().SetString (m_LEADPaint1.GetDlgTextString ());
   m_LEADPaint1.GetText().GetFont().SetBold(m_LEADPaint1.GetDlgTextFont().GetBold());
   m_LEADPaint1.GetText().GetFont().SetItalic(m_LEADPaint1.GetDlgTextFont().GetItalic());
   m_LEADPaint1.GetText().GetFont().SetName(m_LEADPaint1.GetDlgTextFont().GetName());
   m_LEADPaint1.GetText().GetFont().SetSize(m_LEADPaint1.GetDlgTextFont().GetSize());

   m_LEADPaint1.GetText().SetBorderBrushStyle (m_LEADPaint1.GetDlgTextBorderBrushStyle ());
   m_LEADPaint1.GetText().SetBorderWidth (m_LEADPaint1.GetDlgBorderWidth ());
   m_LEADPaint1.GetText().SetBorderColor (m_LEADPaint1.GetDlgBorderColor ());
   m_LEADPaint1.GetText().SetBackgroundStyle (m_LEADPaint1.GetDlgTextBackgroundStyle ());
   m_LEADPaint1.GetText().SetBackgroundColor (m_LEADPaint1.GetDlgBackgroundColor ());

   if(m_LEADPaint1.GetText().GetBackgroundStyle () == TEXT_BACKSTYLE_TILEDIMAGE)
   {
      m_LEAD2.Load(m_LEADPaint1.GetDlgBackgroundTileBitmap(m_LEADPaint1.GetDlgBackgroundTileBitmapIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetText().SetBackgroundTileBitmap (m_LEAD2.GetBitmap());
      m_LEAD2.SetBitmap (0);
   }
   m_LEADPaint1.GetText().SetAlignment (m_LEADPaint1.GetDlgAlignment());
   m_LEADPaint1.GetText().SetOpacity (m_LEADPaint1.GetDlgOpacity());
   if(m_LEADPaint1.GetDlgPaperTextureIndex() > -1)
   {
      m_LEAD2.Load(m_LEADPaint1.GetDlgPaperTexture(m_LEADPaint1.GetDlgPaperTextureIndex()),
                   0, 1, 1);
      m_LEADPaint1.GetText().SetTexture (m_LEAD2.GetBitmap());
      m_LEAD2.SetBitmap(0);
   }
   else
      m_LEADPaint1.GetText().SetTexture(0);

   m_LEADPaint1.GetText().Apply (10, 10, 300, 300);


UndoLevel example for Visual C++

   //set undo level
   m_LEADPaint1.SetUndoLevel(5);


UnlockSupport example for Visual C++

   m_LEADPaint1.UnlockSupport(L_SUPPORT_DIGITALPAINT, "testkey");


UpdateXForm example for Visual C++

void CMfcpaint2Dlg::OnResizeLeadctrl1()
{
   if(::IsWindow(m_LEAD1.m_hWnd))
   {
      if(m_LEAD1.GetBitmap () != 0)
      {
         m_LEADPaint1.SetMetrics((long)m_LEAD1.m_hWnd, m_LEAD1.GetBitmap());
         m_LEADPaint1.UpdateXForm((long)m_LEAD1.GetPaintZoomFactor (),
                                  (long)-m_LEAD1.GetDstLeft (),
                                  (long)-m_LEAD1.GetDstTop ());
      }
   }
}


Error Codes

The following are the errors that you can test for with an On Error statement.

Error	No.	Description
ERROR_NO_MEMORY	20001	Not enough memory available
ERROR_NO_BITMAP	20002	Invalid bitmap handle
ERROR_MEMORY_TOO_LOW	20003	Not enough memory available
ERROR_FILE_LSEEK	20004	Error seeking to position
ERROR_FILE_WRITE	20005	Error writing file
ERROR_FILE_GONE	20006	File not present - abort
ERROR_FILE_READ	20007	Error reading file
ERROR_INV_FILENAME	20008	Invalid filename specified
ERROR_FILE_FORMAT	20009	Invalid file format
ERROR_FILENOTFOUND	20010	File not found
ERROR_INV_RANGE	20011	Invalid width/height
ERROR_IMAGE_TYPE	20012	Image format recognized, but sub-type not supported
ERROR_INV_PARAMETER	20013	Invalid parameter passed
ERROR_FILE_OPEN	20014	Not able to open file
ERROR_UNKNOWN_COMP	20015	Unknown compression format
ERROR_FEATURE_NOT_SUPPORTED	20016	Feature not supported
ERROR_NOT_256_COLOR	20017	VGA card only supports 256 colors (8 bit)
ERROR_PRINTER	20018	Printer error
ERROR_CRC_CHECK	20019	Data CRC check error
ERROR_QFACTOR	20021	Invalid QFactor specified
ERROR_TARGAINSTALL	20022	TARGA not installed
ERROR_OUTPUTTYPE	20023	Invalid compression format
ERROR_XORIGIN	20024	X origin specified invalid
ERROR_YORIGIN	20025	Y origin specified invalid
ERROR_VIDEOTYPE	20026	Invalid video mode
ERROR_BITPERPIXEL	20027	Invalid bits/pixel
ERROR_WINDOWSIZE	20028	Invalid window size
ERROR_NORMAL_ABORT	20029	Escape key pressed
ERROR_NOT_INITIALIZED	20030	Internal error - call LEAD
ERROR_CU_BUSY	20030	Internal error - call LEAD
ERROR_INVALID_TABLE_TYPE	20032	Internal error - call LEAD
ERROR_UNEQUAL_TABLES	20033	Internal error - call LEAD
ERROR_INVALID_BUFFER	20034	Internal error - call LEAD
ERROR_MISSING_TILE_DATA	20035	Internal error - call LEAD
ERROR_INVALID_QVALUE	20036	Internal error - call LEAD
ERROR_INVALIDDATA	20037	Internal error - call LEAD
ERROR_INVALID_COMPRESSED_TYPE	20038	Internal error - call LEAD
ERROR_INVALID_COMPONENT_NUM	20039	Internal error - call LEAD
ERROR_INVALID_PIXEL_TYPE	20040	Internal error - call LEAD
ERROR_INVALID_PIXEL_SAMPLING	20041	Internal error - call LEAD
ERROR_INVALID_SOURCE_FILE	20042	Internal error - call LEAD
ERROR_INVALID_TARGET_FILE	20043	Internal error - call LEAD
ERROR_INVALID_IMAGE_DIMS	20044	Internal error - call LEAD
ERROR_INVALID_TILE_DIMS	20045	Internal error - call LEAD
ERROR_INVALID_PIX_BUFF_DIMS	20046	Internal error - call LEAD
ERROR_SEGMENT_OVERFLOW	20047	Internal error - call LEAD
ERROR_INVALID_SUBSAMPLING	20048	Internal error - call LEAD
ERROR_INVALID_Q_VIS_TABLE	20049	Internal error - call LEAD
ERROR_INVALID_DC_CODE_TABLE	20050	Internal error - call LEAD
ERROR_INVALID_AC_CODE_TABLE	20051	Internal error - call LEAD
ERROR_INSUFFICIENT_DATA	20052	Internal error - call LEAD
ERROR_MISSING_FUNC_POINTER	20053	Internal error - call LEAD
ERROR_TOO_MANY_DC_CODE_TABLES	20054	Internal error - call LEAD
ERROR_TOO_MANY_AC_CODE_TABLES	20055	Internal error - call LEAD
ERROR_INVALID_SUBIMAGE	20056	Internal error - call LEAD
ERROR_INVALID_ABORTION	20057	Internal error - call LEAD
ERROR_CU_NO_SUPPORT	20058	Internal error - call LEAD
ERROR_CU_FAILURE	20059	Internal error - call LEAD
ERROR_BAD_POINTER	20060	Internal error - call LEAD
ERROR_HEADER_DATA_FAILUR	20061	Internal error - call LEAD
ERROR_COMPRESSED_DATA_FAILURE	20062	Internal error - call LEAD
ERROR_FIXEDPAL_DATA	20063	Fixed palette data not found
ERROR_LOADFONT_DATA	20064	Fixed palette data not found
ERROR_NO_STAMP	20065	Stamp not found
ERROR_G3CODE_INVALID	20070	Invalid group 3 dat
ERROR_G3CODE_EOF	20071	Group3 code end of file
ERROR_G3CODE_EOL	20072	Group3 code end of code
ERROR_PREMATURE_EOF	20073	Premature EOF at scanline
ERROR_PREMATURE_EOL	20074	Premature end-of-line code
ERROR_UNCOMP_EOF	20075	Premature end-of-line code
ERROR_ACT_INCOMP	20076	Premature end-of-line code
ERROR_BAD_DECODE_STATE	20077	Premature end-of-line code
ERROR_VERSION_NUMBER	20078	Bad version number
ERROR_BAD_TAG	20140	Bad TIFF tag
ERROR_INVALID_STAMP_SIZE	20141	Stamp size is too big or invalid bits/pixel, etc
ERROR_BAD_STAMP	20142	Stamp is present but data is corrupted
ERROR_DOCUMENT_NOT_ENABLED	20143	Document capability is required to use this function
ERROR_IMAGE_EMPTY	20144	Image is empty
ERROR_NO_CHANGE	20145	The image hasn't changed
ERROR_FPXEXTENSIONS_LOCKED	20147	FPX Extensions is locked
ERROR_ANN_LOCKED	20148	The annotation object is locked
ERROR_EXCEPTION	20149	An unspecified exception occured - could be memory access violations
ERROR_DLG_CANCELED	20150	Common dialog was canceled by user
ERROR_DLG_FAILED	20151	An error occured during creation of the common dialog
ERROR_DXF_FILTER_MISSING	20309	The DXF filter is needed to use this function
ERROR_PAGE_NOT_FOUND	20310	Page not found
ERROR_DELETE_LAST_PAGE	20311	You cannot delete a page from a file containing only one page
ERROR_NO_HOTKEY	20312	There is no hotkey
ERROR_CANNOT_CREATE_HOTKEY_WINDOW	20313	Error creating the hotkey window
ERROR_MEDICAL_NOT_ENABLED	20314	Medical capability is required to use this function
ERROR_JBIG_NOT_ENABLED	20315	JBIG capability is required to use this function
ERROR_UNDO_STACK_EMPTY	20316	Undo stack is empty - too many undos
ERROR_NO_TOOLBAR	20317	ActiveX error - the toolbar window was not created
ERROR_MEDICAL_NET_NOT_ENABLED	20318	Medical Network capability is required to use this function
ERROR_JBIG_FILTER_MISSING	20319	The JBIG filter is needed to use this function
ERROR_BROWSE_FAILED	20350	Directory browsing failed
ERROR_NOTHING_TO_DO	20351	There is nothing to do!

// start PaintTools error codes

ERROR_PAINT_INTERNAL	20600	Internal error (Call LEAD)
ERROR_PAINT_INV_DATA	20601	Internal error (Call LEAD)
ERROR_PAINT_NO_RESOURCES	20602	Internal error (Call LEAD)
ERROR_PAINT_NOT_ENABLED	20603	DigitalPaint capability is required.
ERROR_CONTAINER_INV_HANDLE	20630	Invalid container handle.
ERROR_CONTAINER_INV_OPERATION	20631	Invalid container operation.
ERROR_CONTAINER_NO_RESOURCES	20632	Not enough container resources.
ERROR_TOOLBAR_NO_RESOURCES Not enough toolbar resources.	20660
ERROR_TOOLBAR_INV_STATE	20661	Invalid toolbar state.
ERROR_TOOLBAR_INV_HANDLE	20662	Invalid toolbar handle.
ERROR_AUTOMATION_INV_HANDLE	20690	Invalid automation handle.
ERROR_AUTOMATION_INV_STATE	20691	Invalid automation state.


Introduction

The LEADTOOLS DigitalPaint OCX provides a control that lets you incorporate Paint capabilities into your Windows applications.

The DigitalPaint tools provide the functions necessary to write a painting program or any painting related application.

The painting output can be painted to the control, a bitmap, or both. In addition, LEADTOOLS DigitalPaint provides the option of color restriction, using an optional restriction palette.

The painting tools consist of five groups that represent five different paint abilities. Each of these "groups" has group specific functions. These groups are:

 Paintbrush group.

 Shape group.

 Region group.

 Fill group.

 Text group.

Every group has its own features that will enable the user to manipulate the final results of that group.

Paintbrush group

The LEADTOOLS DigitalPaint paintbrush has most of the features found in any artistic painting program. The resulting paintbrush will be translated and scaled automatically for the control and/or the bitmap, using user-defined transformation settings.

Shape group

The LEADTOOLS DigitalPaint shape group removes some of the Windows API programming when drawing shapes. In addition, shapes may be painted with varying degrees of opacity, or with a paper texture, or with a gradient background, etc. The resulting shapes will be translated and scaled automatically for the control(device context) and/or the bitmap, using user-defined transformation settings.

This group has the ability to draw the following shapes:

Line, Rectangle, Rounded rectangle, Ellipse, Polygon, Polybezier.

Region group

The region group has the ability to create regions ranging from simple to very complex (many of them are not supported by Windows). The Digital Paint products also includes the ability to scale a region, which is not supported directly by Windows. The resulting regions will be translated and scaled automatically for the control (device context) and/or the bitmap, using user-defined transformation settings.

Region types that can be created by the toolkit:

Region creation using the following shapes:

Rectangle, Rounded rectangle, Ellipse and Polygon.

Region creation using the following fill methods

Surface, Border and Color Replacement.

Fill group

LEADTOOLS DigitalPaint gives the user the most complete area filling solutions in both the method of filling and the features of filling. The resulting filled area will be translated and scaled automatically for the control (device context) and/or the bitmap, using user-defined transformation settings.

Fill group filling methods

Surface, Border and Color replace.

Surface fill method

Fills an area, starting at a specified point and continuing in all directions, that contains a specified color. A tolerance range can also be set to accept colors very close in value to the specified color.

Border fill method

Fills an area, starting at a specified point and continuing in all directions until finding a specified color. A tolerance range can also be set to stop filling when colors very close in value to the specified color are found.

Color replace

Replaces every pixel using the current fill settings.

Text group

This group includes comprehensive text drawing features that can be found in any painting program. The resulting text will be translated and scaled automatically for the device context (DC) and/or the bitmap, using user-defined transformation settings.

The LEADTOOLS Digital Paint product does not copy data passed to a DigitalPaint function by the user, but uses the data directly. Therefore, the data supplied by the user must remain valid for as long as the data is needed. For example, if a palette handle is passed to a DigitalPaint function, the toolkit uses this handle to access the palette. The toolkit does NOT make a copy of the handle or the palette. Therefore, if the palette handle provided by the use is destroyed, the toolkit's palette handle is also destroyed and the toolkit will have an invalid palette handle.

The toolkit comes in WIN32 editions so that it can support development of software applications for any of the following environments:

Windows 4.x NT
Windows 95
Windows 98
Windows 2000


Programming with LEADTOOLS DigitalPaint

The following topics provide a systematic approach to understanding how to program with the LEADTOOLS Low-Level DigitalPaint OCX. and LEADTOOLS DigitalPaint Automation OCX.

General

Registering and Unregistering the DigitalPaint Control

Unlocking DigitalPaint Features

Low-Level DigitalPaint OCX

Setting DigitalPaint Properties

Setting General DigitalPaint Information

Setting a DigitalPaint Clipping Region

Painting with DigitalPaint

Processing Windows Messages

Using the DigitalPaint Common Dialogs

Automated DigitalPaint OCX

Introduction to Automation

Automation Container

The Automation Toolbar

Automation Printing

Editing Automation Containers

Handling Container Events

Undoing and Redoing Automation Operations

Working with Data within an Automation Container


Registering and Unregistering the DigitalPaint Control

Registering the DigitalPaint Control

Before DigitalPaint control can be used, it must be registered. If you would like to manually register the controls run REGSVR32.EXE.

found in the BIN directory and pass the name of the control or object (.OCX or .DLL) to register as a parameter.

EX.:

REGSVR32 LTPNT14N.DLL will register the LEADTOOLS DigitalPaint Library.

REGSVR32 LTPNT14N.OCX will register the LEADTOOLS DigitalPaint Control.

Unregistering DigitalPaint Control

To unregister DigitalPaint control, include the "/u" switch before the library name when running REGSVR32.EXE.

EX.:

REGSVR32 /u LTPNT14N.DLL will unregister the LEADTOOLS DigitalPaint Library.

REGSVR32 /u LTPNT14N.OCX will unregister the LEADTOOLS DigitalPaint Control.

Note:	The LEADTOOLS DigitalPaint control does not register without certain DLLs.  For a list of required DLLs, refer to Files To Be Included With Your Application.


Unlocking DigitalPaint Features

The LEADTOOLS DigitalPaint Features are included in the LEADTOOLS Digital Paint products. The DigitalPaint features are shipped with the LEADTOOLS products, however they are locked. To use the DigitalPaint functions, the UnlockSupport method must be called with the key found on the Unlock Certificate, included in your product packaging. (UnlockSupport (L_SUPPORT_DIGITALPAINT, "Unlock Certificate key") tells the package to unlock support for the DigitalPaint functions and passes the key for verification.

To determine whether the support is locked, call the IsSupportLocked method.


Setting DigitalPaint Properties

LEADTOOLS DigitalPaint provides several types of painting abilities, including:

 painting using a paintbrush

 painting shapes

 painting a region

 filling an area with paint

 painting text

Each of these is considered a paint "object" and each object has its own interface. These interfaces are accessed by the properties listed below:

Brush property

Shape property

Region property

Fill property

Text property

Each interface (property) consists of a number of properties and methods. The values set for the properties control the paint results. For example, these properties determine:

 whether the paintbrush contains color or an image.

 how quickly the paint in the paintbrush will fade, if at all.

 the shape of the region to paint.

 the color to use when filling an area.

 the text to paint.

 etc.

The methods actually paint the object described by the interface.

For more information about the properties and methods provided by each interface, refer to:

ILTBrush

ILTFill

ILTRegion

ILTShape

ILTText

The following is a simple example for setting the Brush interface/object properties:

    LEADPaint1.Brush.Diameter = 20
    LEADPaint1.Brush.Spacing = 5
    LEADPaint1.Brush.Opacity = 50
    LEADPaint1.Brush.FadeOutRate = 100


Setting General DigitalPaint Information

The LEADTOOLS Digital Paint products requires additional information, referred to here as DigitalPaint metrics. This information includes:

 a window handle, used internally.

 an optional handle to a LEAD bitmap. This bitmap will be used as a painting canvas.

These can be set using the SetMetrics method. This method must be called in order to establish a connection between the Digital Paint control and a window and/or a LEAD bitmap, before any painting can occur.

If the Main OCX hWnd property is passed to the SetMetrics method, any shapes, text, etc. will automatically be drawn to the control. Otherwise, the shapes, text, etc. will only be drawn on the bitmap passed to the SetMetrics method and the user will have to force a repaint to see the results.

In addition to the DigitalPaint metrics, other general DigitalPaint information should be set before beginning to paint. This information includes transformation information and device context (DC) boundary information.

When a painting canvas is scrolled or zoomed, the input coordinates and painting output must be transformed. The UpdateXForm method sets the necessary information for transforming input coordinates and painting output.

Call this method anytime scrolling or zooming occurs, or anytime the window size changes.

Once the general DigitalPaint information has been set, painting can begin. For more information on painting, refer to Painting with DigitalPaint.

LEADTOOLS also provides the EnableMethodErrors property, which can be set to true to enable the generation of system error events in addition to error return codes.


Painting with DigitalPaint

LEADTOOLS DigitalPaint provides support for a number of painting abilities. These include:

 painting using a paintbrush

 painting shapes

 painting a region

 filling an area with paint

 painting text

Several functions are provided for implementing each of these painting abilities. For more information about a specific painting ability, refer to the following:

Painting with a Brush

Painting a Shape

Creating a Region

Filling an Area

Painting Text


Painting with a Brush

LEADTOOLS DigitalPaint provides the following methods for painting with a brush:

MoveTo method

LineTo method

The MoveTo method paints a single brush touch using the current ILTBrush interface properties at the required position. The LineTo method paints a series of brush touches (a brush stroke) from the point set by the MoveTo method, to the position set by the LineTo method. If the MoveTo method is not called before calling the LineTo method, the LineTo method will use the default (0, 0) as the starting point for the line.

These methods will draw brush touches and strokes based on the current ILTBrush interface properties. These properties are:

Density property

Diameter property

FadeOutRate property

HardnessDistributionType property

HardnessValue property

Opacity property

Spacing property

Texture property

TouchBitmap property

TouchColor property

TouchContentsType property

TouchShape property

TouchTransparentColor property

Before painting a brush touch or a brush stroke, set the DigitalPaint metrics using the SetMetrics method.

Any transformation information should be set, using the UpdateXForm method before calling any brush or other painting method.


Painting a Shape

LEADTOOLS DigitalPaint provides the following methods for painting a shape:

DrawLine method

DrawRect method

DrawRoundRect method

DrawEllipse method

DrawPolygon method

DrawPolyBezier method

These methods will draw shapes based on the current ILTShape interface properties. These properties are:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

Before painting a shape, set the DigitalPaint metrics using the SetMetrics method.

Any transformation information should be set, using the UpdateXForm method before calling any painting method.

When painting a polygon, the PolygonCount property, PolygonX property and PolygonY property contain information about the polygon.


Creating a Region

LEADTOOLS DigitalPaint provides the following methods for creating regions:

Border method

Ellipse method

Polygon method

Rect method

RoundRect method

Surface method

Color method

These methods will create regions based on the current ILTRegion interface properties. These properties are:

hRgn property

LowerTolerance property

RoundRectEllipseHeight property

RoundRectEllipseWidth property

UpperTolerance property

Before creating a region, set the DigitalPaint metrics using the SetMetrics method.

Any transformation information should be set, using the UpdateXForm method before calling any painting method.

When creating a polygon region, the PolygonCount property, PolygonX property and PolygonY property contain information about the polygon.


Filling an Area

LEADTOOLS DigitalPaint provides the following methods for filling areas:

Border method

ColorReplace method

Surface method

These methods will create regions based on the current ILTFill interface properties. These properties are:

BackgroundTileBitmap property

GradientEndColor property

GradientStartColor property

GradientSteps property

GradientStyle property

LowerTolerance property

Opacity property

SolidFillColor property

Style property

Texture property

UpperTolerance property

The filling methods use different methods to fill an area. The Surface method fills an area, starting at a specified point and continuing in all directions, that contains a specified color, falling within some tolerance range. The upper and lower tolerances are set in the ILTFill Interface properties, listed above. The Border method fills an area, starting at a specified point and continuing in all directions, until it finds a specified color, falling within some tolerance range. The ColorReplace method will replace every pixel using the current ILTFill properties.

For selecting a color from a specific point, call the PickColor method. This method updates the BitmapColor property with the selected color.

Before filling an area, set the DigitalPaint metrics using the SetMetrics method.

Any transformation information should be set, using the UpdateXForm method before calling any painting method.


Painting Text

LEADTOOLS DigitalPaint provides the following method for painting text:

Apply method

These methods will paint text based on the current ILTText interface properties. These properties are:

Alignment property

BackgroundColor property

BackgroundStyle property

BackgroundTileBitmap property

BorderBrushStyle property

BorderColor property

BorderWidth property

Opacity property

String property

Texture property

TransformRotate property

TransformScaleX property

TransformScaleY property

The text string and font must be set before calling the Apply method. Otherwise, the method will return an error. Set the text string in the String property. To set the font information, refer to the following properties:

Bold property

Charset property

Italic property

Name property

Size property

Weight property

Before filling an area, set the DigitalPaint metrics using the SetMetrics method.

Any transformation information should be set, using the UpdateXForm method before calling any painting method.


Setting a DigitalPaint Clipping Region

Clipping is used by the LEADTOOLS Digital Paint products to limit the output to a user-defined region. This can be done using the SetClipRgn method. To get the last clipping region set, call GetClipRgn method. To offset a clipping region, call the OffsetClipRgn method.


Processing Windows Messages

Many external events such as resizing a window or scrolling a window can affect paint output. This may require changing the transformation information or setting a clipping region.

When a painting canvas (bitmap) is scrolled or zoomed, the input coordinates and painting output must be transformed. The UpdateXForm method sets the necessary information.

The following provide examples for handling certain Windows messages that can affect paint output:

Processing the WM_SIZE Message

Processing the Window Activation Messages

Processing Window Scrolling Messages


Processing the WM_SIZE Message

Whenever an external event that will affect the painting output occurs, the user must adjust the affected controlling factors.

When the size of the window changes, this means that the dimension of the DC (the window client area DC) used for painting is changed.  Call the UpdateXForm method to set the new transformation values.  When using a LEADTOOLS Main Control, call the UpdateXForm method in the Resize event.


Processing the Window Activation Messages

When working in an MDI environment, each window may have its own bitmap data or transformations. Therefore, the Digital Paint control data should be set to reflect the changes.

The following is an example for working in an MDI environment:

Private Sub Form_Activate()
    If (LEAD1.Bitmap<> 0) Then
        LEADPaint1.SetMetrics LEAD1.hwnd, LEAD1.Bitmap
        LEADPaint1.UpdateXForm LEAD1.PaintZoomFactor, -LEAD1.DstLeft, -LEAD1.DstTop
    End If
    fMainForm.UpdateMenuStatus
End Sub


Processing Window Scrolling Messages

When processing the scrolling message, the user should set the painting offsets to reflect the new coordinate translations. Call the UpdateXForm method to set the new transformation values.  When using a LEADTOOLS Main Control, call the UpdateXForm method in the Scroll event.


Using the DigitalPaint Common Dialogs

LEADTOOLS DigitalPaint provides a number of methods for displaying dialogs. The DigitalPaint Common Dialogs provide an easier way to enter or change painting settings. The methods for displaying the dialogs are:

DlgAlignment property

DlgBackgroundColor property

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBackgroundTileBitmapIndex property

DlgBorderColor property

DlgBorderEndCap property

DlgBorderStyle property

DlgBorderTileBitmap property

DlgBorderTileBitmapCount property

DlgBorderTileBitmapIndex property

DlgBorderWidth property

DlgDensity property

DlgDiameter property

DlgFadeOut property

DlgFillGradientStyle property

DlgFillStyle property

DlgFlags property

DlgGradientEndColor property

DlgGradientStartColor property

DlgGradientSteps property

DlgHardnessValue property

DlgLowerTolerance property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgRoundRectEllipseHeight property

DlgRoundRectEllipseWidth property

DlgShapeBackgroundStyle property

DlgShapeBorderBrushStyle property

DlgShapeGradientStyle property

DlgSolidFillColor property

DlgSpacing property

DlgTextBackgroundStyle property

DlgTextBorderBrushStyle property

DlgTextFont property

DlgTextString property

DlgTitle property

DlgTouchColor property

DlgTouchContentsType property

DlgTouchImage property

DlgTouchImageCount property

DlgTouchImageIndex property

DlgTouchTransparentColor property

DlgTransformRotate property

DlgTransformScaleX property

DlgTransformScaleY property

DlgUpperTolerance property

ShowBrushDlg method

ShowShapeDlg method

ShowRegionDlg method

ShowFillDlg method

ShowTextDlg method


Introduction to Automation

Using the DigitalPaint Automation mode will enable you to add DigitalPaint capabilities to an application. The Digital Paint products automation mode coordinates the low-level Digital Paint products capabilities, container features and LEAD toolbar capabilities. This facilitates the building of a DigitalPaint application and removes the need to understand all the low level functionality.

The Automation features can do the following:

Set the Undo/Redo level to virtually any value, as well as Undo or Redo automation operations.

Select All or None of the objects in the active automation container. In addition, the current selection can be cut, copied, pasted or deleted.

Print the resulting image.

The toolbar lets the user select the needed tool and draw, while the visual feedback needed to communicate between the drawing process and the user is handled automatically. Mouse cursors and the basic drawing algorithms for selected objects (Line, Ellipse, Polygon…etc.) are handled by automation. The DigitalPaint objects currently available in the toolkit are:

Brush

Shape

Region

Fill

Text

The user should have a good grasp of the following LEAD toolkits before effectively using the automated Digital Paint products:

Low-level Digital Paint products.

LEAD Toolbar.

Therefore, we strongly recommend that the user of the DigitalPaint Automation features carefully read the documentation of the modules mentioned above.


Automation Container

LEADTOOLS provides a DigitalPaint Container interface (ILTPaintContainer) for controlling automation container characteristics such as container boundaries, scaling factors, offsets and the enable/disable status of the container. This interface is accessed through the AutoContainer array property. For each window that you wish to associate Automated Mode Digital Painting with, you must create an AutoContainer using the CreateAutoContainer method.  Any painting/drawing performed using DigitalPaint automation will be "contained" within the DigitalPaint container.

To set the characteristics of the paint container, use the following properties:

Enabled property

LimitHeight property

LimitLeft property

LimitTop property

LimitWidth property

OffsetX property

OffsetY property

ScalarDenX property

ScalarDenY property

ScalarNumX property

ScalarNumY property

In addition to these properties, the ILTPaintContainer provides two methods. To set the paint container to the active paint automation container, call the SetActive method. If the bitmap associated with the paint automation container is altered, for example, by resizing, the container should be notified and updated by calling the UpdateBitmap method.When the paint automation container is no longer needed, it should be destroyed using the DeleteAutoContainer method.

DigitalPaint automation must first be turned on by setting the PaintUserMode property to PAINT_USERMODE_AUTO. At this point you can create the Toolbar using the LEADTOOLS Toolbar control and set the automation ToolbarControl property to the newly created toolbar. This associates the toolbar with the automation. Once automation has been turned on, the active container can be set using the SetActive method of the ILTPaintContainer interface. At this point the application should be ready to change automation characteristics, change automation container characteristics, or start drawing.

For examples that show how to start DigitalPaint automation, create a toolbar and activate the automation container, refer to the following tutorials:

Implementing Automated Mode Painting (Visual C++)

Implementing Automated Mode Painting (Visual Basic)


The Automation Toolbar

To add a toolbar to the DigitalPaint automation, a toolbar must first be created using the LEADTOOLS Toolbar control. Once the toolbar has been created, it becomes associated with the DigitalPaint automation by setting the ToolbarControl property to the newly created toolbar. For more information on creating a toolbar, refer to the LEADTOOLS Toolbar OCX Help File, Lttbocxn.hlp in the LEAD/HELP directory.

For an example that shows how to add a toolbar to DigitalPaint automation, refer to the following tutorials:

Implementing Automated Mode Painting (Visual C++)

Implementing Automated Mode Painting (Visual Basic)


Automation Printing

To print data in the automation container that is currently set as active, use the AutoRender method.


Editing Automation Containers

LEADTOOLS DigitalPaint Control Automation features provide several methods for editing automation containers. These methods act on the active automation container. For editing methods that involve the clipboard, use the following:

AutoCut method

AutoCopy method

AutoPaste method

To determine whether the clipboard contains valid paint automation data for pasting to the active paint automation container, call the ClipboardReady method.

The AutoDelete method deletes the current selection from the active paint automation container.


Handling Container Events

When the user uses the DigitalPaint Automation to perform DigitalPaint operations a PaintContainer event is fired. Depending on the action that generated the event, certain information is also passed to the PaintContainer event.

If an error occurred, the PaintContainer event will receive an error code in the nStatus parameter. If the PaintContainer event was fired by a drawing/painting event, information will be passed to the PaintContainer event in the nObjectType and nState parameters.

When DigitalPaint operations are performed in a container, a series of states occur during the process of the operation. The state may be the beginning of the operation, a continuation of the operation, the ending of the operation, or the abortion of the operation. The following are the states currently supported for processing:

PAINT_CONTAINER_STATE_ABORT

PAINT_CONTAINER_STATE_BEGIN

PAINT_CONTAINER_STATE_PROCESS

PAINT_CONTAINER_STATE_END

Also when an operation is performed, the PaintContainer event receives information about the type of operation being performed. Currently the LEADTOOLS DigitalPaint Control Automation features support the following container object types:

Container Object Value	Meaning
PAINT_CONTAINER_OBJECT_TYPE_NONE	No Operation/object
PAINT_CONTAINER_OBJECT_TYPE_POINT	A Point was drawn
PAINT_CONTAINER_OBJECT_TYPE_LINE	A Line was drawn
PAINT_CONTAINER_OBJECT_TYPE_SQUARE	A Square was drawn
PAINT_CONTAINER_OBJECT_TYPE_RECT	A Rectangle was drawn
PAINT_CONTAINER_OBJECT_TYPE_CIRCLE	A Circle was drawn
PAINT_CONTAINER_OBJECT_TYPE_ELLIPSE	An Ellipse was drawn
PAINT_CONTAINER_OBJECT_TYPE_POLYLINE	A PolyLine was drawn
PAINT_CONTAINER_OBJECT_TYPE_BEZIER	A Bezier Curve was drawn
PAINT_CONTAINER_OBJECT_TYPE_ARC	An Arc was drawn
PAINT_CONTAINER_OBJECT_TYPE_TEXT	Text was drawn


Undoing and Redoing Automation Operations

The LEADTOOLS DigitalPaint Control Automation features include the capability for undoing and redoing automation operations. The undo level determines the number of operations that can be undone in the automation container. For each undo that is performed, a redo operation can be performed.

LEADTOOLS provides a number of functions for handling the undo/redo capabilities.

The UndoLevel property contains the undo level for the automation container of the vector control. The default value is 5.

To determine whether the last automation operation performed can be undone or redone, use the CanUndo method and the CanRedo method respectively.

The Undo method undoes the last automation operation performed, while the Redo method redoes the last automation operation undone.

For an example that shows the general undo and redo capabilities, refer to the following examples:

CanUndo example for Visual C++

CanRedo example for Visual C++

CanUndo example for Visual Basic

CanRedo example for Visual Basic


Working with Data within an Automation Container

General

Data within the active automation container may be selected or unselected using the AutoSelect method.

To get or set the background color for the automated painting operations, set the BackColor property.


Alignment property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	PaintAlignStyle Alignment
Overview	Refer to Painting Text
Remarks

Gets or sets the text alignment type. Possible values are:

Horizontal Alignment:

PAINT_ALIGN_LEFT

PAINT_ALIGN_HCENTER

PAINT_ALIGN_RIGHT

Vertical Alignment:

PAINT_ALIGN_TOP

PAINT_ALIGN_VCENTER

PAINT_ALIGN_BOTTOM

A value from each category (horizontal and vertical) may be combined.

The default is PAINT_ALIGN_HCENTER combined with PAINT_ALIGN_VCENTER.

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


Apply method (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Apply (long nLeft, long nTop, long nWidth, long nHeight);
Overview	Refer to Drawing Text
Remarks

Writes a character string in the specified rectangle.

The text will be drawn using the current values of the ILTText interface properties. For more information on the ILTText interface properties, refer to:

Alignment property

BackgroundColor property

BackgroundStyle property

BackgroundTileBitmap property

BorderBrushStyle property

BorderColor property

BorderWidth property

Opacity property

String property

Texture property

TransformRotate property

TransformScaleX property

TransformScaleY property

The text string and font must be set before calling this method. Otherwise, the method will return an error. Set the text string in the String property. To set the font information, refer to the following properties:

Bold property

Charset property

Italic property

Name property

Size property

Weight property

Please note that if the ILTFont properties are not set prior to calling this method, the default values for the ILTFont properties will be used. For more information on the default values, refer to the specific ILTFont property.

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the text will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the text will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property
Topics:	Low-Level DigitalPaint: Painting Text


nLeft Parameter For Apply
nLeft

Specifies the x-coordinate of the top-left point of the rectangle.


nTop Parameter For Apply
nTop

Specifies the y-coordinate of the top-left point of the rectangle.


nWidth Parameter For Apply
nWidth

Specifies the width of the rectangle in which to paint the text.


nHeight Parameter For Apply
nHeight

Specifies the height of the rectangle in which to paint the text.


Return for Apply
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


AutoContainer property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ILTPaintContainer AutoContainer (long hWnd);
Overview	Refer to Automation Container
Remarks

(Read only) Gets the paint automation container associated with the specified window handle.

This property provides access to the paint container interface. For more information about the interface, refer to ILTPaintContainer.

See Also

Elements:	PaintUserMode property, CreateAutoContainer method, DeleteAutoContainer method
Topics:	DigitalPaint Automation: Containers


hWnd Parameter For AutoContainer
hWnd

Handle to a window. This property contains the paint automation container associated with the specified window handle.


AutoCopy method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short AutoCopy (long nFlags);
Overview	Refer to Editing Automation Containers
Remarks

Copies the selected objects in the active paint automation container to the Windows clipboard.

To paste paint automation data on the clipboard to the active paint automation container, call the AutoPaste method.

Paint automation data can be cut from the active paint automation container and placed on the clipboard using the AutoCut method.

See Also

Elements:	PaintUserMode property, ClipboardReady method, AutoCut method, AutoPaste method.
Topics:	DigitalPaint Automation: Editing a Container


nFlags Parameter For AutoCopy
nFlags

Reserved for future use.  Use 0.


Return for AutoCopy
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


AutoCut method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short AutoCut (long nFlags);
Overview	Refer to Editing Automation Containers
Remarks

Cuts the selected objects in the active paint automation container to the Windows clipboard.

To paste paint automation data on the clipboard to the active paint automation container, call the AutoPaste method.

To copy automation data from the active automation container, to the Windows clipboard, use the AutoCopy method.

Call the ClipboardReady method to determine whether valid data exists on the clipboard.

See Also

Elements:	PaintUserMode property, ClipboardReady method, AutoCopy method, AutoPaste method.
Topics:	DigitalPaint Automation: Editing a Container


nFlags Parameter For AutoCut
nFlags

Reserved for future use.  Use 0.


Return for AutoCut
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


AutoDelete method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short AutoDelete (long nFlags);
Overview	Refer to Editing Automation Containers
Remarks

Deletes the selected objects from the active paint automation container.

See Also

Elements:	PaintUserMode property, AutoCopy method, AutoCut method, AutoDelete method, AutoSelect method.
Topics:	DigitalPaint Automation: Editing a Container


nFlags Parameter For AutoDelete
nFlags

Reserved for future use.  Use 0.


Return for AutoDelete
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


AutoPaste method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short AutoPaste (long nFlags);
Overview	Refer to Editing Automation Containers
Remarks

Copies the valid paint automation data on the clipboard to the active paint automation container.

Call the ClipboardReady method to determine whether valid data exists on the clipboard.

To copy paint automation data from the active paint automation container to the clipboard, use the AutoCopy method. Paint automation data can be cut from the active paint automation container and placed on the clipboard using the AutoCut method.

See Also

Elements:	PaintUserMode property, ClipboardReady method, AutoCopy method, AutoCut method.
Topics:	DigitalPaint Automation: Editing a Container


nFlags Parameter For AutoPaste
nFlags

Reserved for future use.  Use 0.


Return for AutoPaste
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


AutoRender method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short AutoRender (long nFlags);
Overview	Refer to Automation Printing
Remarks

Prints the objects in the active paint automation container that are currently displayed on the screen.

See Also

Elements:	PaintUserMode property, AutoCopy method, AutoCut method, AutoDelete method, AutoSelect method.
Topics:	DigitalPaint Automation: Printing


nFlags Parameter For AutoRender
nFlags

Reserved for future use.  Use 0.


Return for AutoRender
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


AutoSelect method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short AutoSelect (PaintAutomationSelType Selection, long nFlags);
Overview	Refer to Working with Data within an Automation Container
Remarks

Selects or unselects all objects within the active paint automation container.

See Also

Elements:	PaintUserMode property, AutoCopy method, AutoCut method, AutoPaste method, AutoDelete method, AutoRender method.
Topics:	DigitalPaint Automation: Containers


Selection Parameter For AutoSelect
Selection

Integer value that indicates whether to select or unselect the items within the active paint automation container.  Possible values are:

Value	Meaning
PAINT_AUTOMATION_SELTYPE_NONE	Unselect the entire image.
PAINT_AUTOMATION_SELTYPE_ALL	Select the entire container.


nFlags Parameter For AutoSelect
nFlags

Reserved for future use.  Use 0.


Return for AutoSelect
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


BackColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR BackColor
Overview	Refer to Working with Data within an Automation Container
Remarks

(RuntimeOnly) Gets or sets the background color for automated painting operations.

See Also

Elements:	PaintUserMode property, UndoLevel property
Topics:	DigitalPaint Automation: Containers


BackgroundColor property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR BackgroundColor
Overview	Refer to Painting Text
Remarks

Gets or sets the OLE_COLOR value that specifies the color to use for filling the text background when the text BackgroundStyle property is TEXT_BACKSTYLE_OPAQUE.

The default is RGB (0, 0, 0).

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


BackgroundColor property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR BackgroundColor
Overview	Refer to Painting a Shape
Remarks

Gets or sets the COLORREF value that specifies the color to use for the shape's background color, when its BackgroundStyle property is SHAPE_BACKSTYLE_OPAQUE.

The default is RGB (255, 255, 255).

See Also

Elements:	BackgroundStyle property, BackgroundTileBitmap property, BorderEndCap property, BorderStyle property, BorderWidth property, BorderBrushStyle property, BorderColor property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BackgroundStyle property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	TextBackStyle BackgroundStyle
Overview	Refer to Painting Text
Remarks

Gets or sets the text background style. Possible values are:

Value	Meaning
TEXT_BACKSTYLE_TRANSPARENT	Transparent
TEXT_BACKSTYLE_OPAQUE	Opaque (Default)
TEXT_BACKSTYLE_TILEDIMAGE	Tiled Image
See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


BackgroundStyle property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeBackStyle BackgroundStyle
Overview	Refer to Painting a Shape
Remarks

Gets or sets the shape's background style. Possible values are:

Value	Meaning
SHAPE_BACKSTYLE_TRANSPARENT	Transparent
SHAPE_BACKSTYLE_OPAQUE	Opaque (Default)
SHAPE_BACKSTYLE_TILEDIMAGE	Tiled Image
SHAPE_BACKSTYLE_GRADIENT	Gradient
See Also

Elements:	BackgroundColor property, BackgroundTileBitmap property, BorderEndCap property, BorderStyle property, BorderWidth property, BorderBrushStyle property, BorderColor property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BackgroundTileBitmap property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long BackgroundTileBitmap
Overview	Refer to Painting a Shape
Remarks

Gets or sets the bitmap handle referencing the bitmap to be used for filling the shape's background, when the BackgroundStyle property is SHAPE_BACKSTYLE_TILEDIMAGE. The bitmap handle should still be valid after setting this property.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BorderEndCap property, BorderStyle property, BorderWidth property, BorderBrushStyle property, BorderColor property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BackgroundTileBitmap property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long BackgroundTileBitmap
Overview	Refer to Filling an Area
Remarks

Gets or sets the bitmap handle referencing the bitmap to be used for filling, when the ILTFill Style property is FILL_FILLSTYLE_TILEDIMAGE. The bitmap handle should still be valid after setting this property.

See Also

Elements:	Style property, SolidFillColor property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


BackgroundTileBitmap property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long BackgroundTileBitmap
Overview	Refer to Painting Text
Remarks

Gets or sets the bitmap handle referencing the bitmap used to fill the text background when the text BackgroundStyle property is TEXT_BACKSTYLE_TILEDIMAGE. The bitmap handle should still be valid after setting this property.

The default is 0.

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


BitmapColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR BitmapColor
Overview	Refer to Filling an Area
Remarks

(RuntimeOnly, ReadOnly) Gets the color returned by the PickColor Method.

See Also

Elements:	PickColor method
Topics:	Low-Level DigitalPaint: Miscellaneous


Bold property (ILTFont Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL Bold
Overview	Refer to Painting Text
Remarks

Gets or sets a value that indicates whether the font of the text is bold. Possible values are:

Value	Meaning
TRUE	The font of the text is bold.
FALSE	The font of the text is not bold. (Default)
See Also

Elements:	Charset property, Italic property, Name property, Size property, Weight property
Topics:	Low-Level DigitalPaint: Painting Text


Border method (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Border (long nX, long nY, OLE_COLOR clrBorder);
Overview	Refer to Filling an Area
Remarks

Fills an area starting at a specified point and continuing in all directions until finding the specified color.

The filling procedure will be carried out using the current values of the ILTFill interface. For more information on the ILTFill interface properties, refer to:

BackgroundTileBitmap property

GradientEndColor property

GradientStartColor property

GradientSteps property

GradientStyle property

LowerTolerance property

Opacity property

SolidFillColor property

Style property

Texture property

UpperTolerance property

The UpperTolerance and LowerTolerance properties can be set for the border color specified in clrBorder. For example, if the border color passed to this method has an RGB value of 40, 40 , 200, and the LowerTolerance and UpperTolerance properties are 10, 10, 10, and 5, 5, 5, respectively, then this method will recognize colors from 30, 30, 190 to 45, 45, 205 as the border color.

The images below show an example of the results of calling the Border method.

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


nX Parameter For Border
nX

Specifies the x-coordinate of the starting point used to fill the area.


nY Parameter For Border
nY

Specifies the y-coordinate of the starting point used to fill the area.


clrBorder Parameter For Border
clrBorder

The OLE_COLOR value that specifies the color to use as the filling boundary.


Return for Border
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Border method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Border (long nX, long nY, OLE_COLOR clrBorder);
Overview	Refer to Creating a Region
Remarks

Creates a region starting at a specified point and continuing in all directions until finding the specified color. This function will use the current region properties to create the region.

The region creation procedure will be carried out using the current values of the ILTRegion interface properties. For more information on the ILTRegion interface properties, refer to:

UpperTolerance property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

hRgn property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the region will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the polygonal region will be drawn on the specified bitmap, as well as the control.

This function will also use the current painting transformation information when creating the new region. To change or set the painting transformation information, call the UpdateXForm method.

The images below show the region created by setting the border color to red and clicking inside the red border.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


nX Parameter For Border
nX

Specifies the x-coordinate of the starting point used to create the region.


nY Parameter For Border
nY

Specifies the y-coordinate of the starting point used to create the region.


clrBorder Parameter For Border
clrBorder

OLE_COLOR value that specifies the color of the region boundaries.


Return for Border
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


BorderBrushStyle property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	TextBorderBrushStyle BorderBrushStyle
Overview	Refer to Painting Text
Remarks

Gets or sets the text border (outline) style. Possible values:

Value	Meaning
TEXT_BORDER_BRUSHSTYLE_TRANSPARENT	Transparent
TEXT_BORDER_BRUSHSTYLE_COLOR	Color (Default)
See Also

Elements:	BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


BorderBrushStyle property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeBorderBrushStyle BorderBrushStyle
Overview	Refer to Painting a Shape
Remarks

Gets or sets the brush style to be used to draw the shape's border. Possible values are:

Value	Meaning
SHAPE_BORDERBRUSHSTYLE_COLOR	Color (Default)
SHAPE_BORDERBRUSHSTYLE_PATTERN	Pattern
See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderEndCap property, BorderStyle property, BorderWidth property, BorderColor property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BorderColor property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR BorderColor
Overview	Refer to Painting Text
Remarks

Gets or sets the OLE_COLOR value that specifies the color to use to draw the text border (outline).

The default is RGB (0, 0, 0).

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


BorderColor property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR BorderColor
Overview	Refer to Painting a Shape
Remarks

Gets or sets the COLORREF value that specifies the color to be used to draw the shape's border.

The default is RGB (0, 0, 0).

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderEndCap property, BorderStyle property, BorderWidth property, BorderBrushStyle property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BorderEndCap property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short BorderEndCap
Overview	Refer to Painting a Shape
Remarks

Gets or sets a value that indicates how the ends of lines will be drawn. Possible values are:

Value	Meaning
SHAPE_BORDERENDCAP_ROUND	Round (Default)
SHAPE_BORDERENDCAP_SQUARE	Square
SHAPE_BORDERENDCAP_FLAT	Flat
See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BorderStyle property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeBorderStyle BorderStyle
Overview	Refer to Painting a Shape
Remarks

Gets or sets the shape's border style. Possible values are:

SHAPE_BORDERSTYLE_SOLID (Default)

SHAPE_BORDERSTYLE_DASH

SHAPE_BORDERSTYLE_DOT

SHAPE_BORDERSTYLE_DASHDOT

SHAPE_BORDERSTYLE_DASHDOTDOT

SHAPE_BORDERSTYLE_DASHDOTDOTDOT

SHAPE_BORDERSTYLE_DASH_GAP

SHAPE_BORDERSTYLE_DOT_GAP

SHAPE_BORDERSTYLE_DASHDOT_GAP

SHAPE_BORDERSTYLE_DASHDOTDOT_GAP

SHAPE_BORDERSTYLE_DASHDOTDOTDOT_GAP

SHAPE_BORDERSTYLE_TRANSPARENT

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderEndCap property, BorderWidth property, BorderBrushStyle property, BorderColor property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BorderTileBitmap property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long BorderTileBitmap
Overview	Refer to Painting a Shape
Remarks

Gets or sets the bitmap handle to be used to draw the shape's border. The bitmap handle, should still be valid after setting this property.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BorderWidth property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long BorderWidth
Overview	Refer to Painting a Shape
Remarks

Gets or sets the shape's border width. Valid values are between (1-100).

The default is 1.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderEndCap property, BorderStyle property, BorderBrushStyle property, BorderColor property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


BorderWidth property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long BorderWidth
Overview	Refer to Painting Text
Remarks

Gets or sets the width or the text border (outline), in pixels.

Valid values are (1-100). The default is 1.

See Also

Elements:	BorderBrushStyle property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


Brush property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ILTBrush Brush
Overview	Refer to Setting DigitalPaint Properties
Remarks

(RuntimeOnly, ReadOnly) Gets the current ILTBrush interface.

The values of the properties in the ILTBrush interface represent the current paintbrush.

See Also

Elements:	ShowBrushDlg method, Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchTransparentColor property, LineTo method, MoveTo method
Topics:	Low-Level DigitalPaint: Paint with a Brush


CanRedo method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL CanRedo (void);
Overview	Refer to Undoing and Redoing Automation Operations
Remarks

Determines whether the last automation operation undone in the active paint automation container can be redone.

To redo an automation operation, call the Redo method.

See Also

Elements:	PaintUserMode property, UndoLevel property, CanUndo method, Undo method, Redo method.
Topics:	DigitalPaint Automation: Undoing and Redoing Operations


Return for CanRedo
Return Value

Return	Meaning
TRUE	The last automation operation undone can be redone.
FALSE	There are no operations to be redone.


CanUndo method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL CanUndo (void);
Overview	Refer to Undoing and Redoing Automation Operations
Remarks

Determines whether the last automation operation in the active paint automation container can be undone.

The number of automation operations that can be undone is contained in the UndoLevel property.

To undo an automation operation, call the Undo method.

See Also

Elements:	PaintUserMode property, UndoLevel property, CanRedo method, Undo method, Redo method.
Topics:	DigitalPaint Automation: Undoing and Redoing Operations


Return for CanUndo
Return Value

Return	Meaning
TRUE	The last automation operation can be undone.
FALSE	The last automation operation can not be undone.


Charset property (ILTFont Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Charset
Overview	Refer to Painting Text
Remarks

Gets or sets the character set of the text. For more information about this property, consult LOGFONT in the Microsoft SDK documentation.

The default is ANSI_CHARSET.

See Also

Elements:	Bold property, Italic property, Name property, Size property, Weight property
Topics:	Low-Level DigitalPaint: Painting Text


ClipboardReady method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL ClipboardReady (void);
Overview	Refer to Editing Automation Containers
Remarks

Determines whether the Windows clipboard contains paint data that can be copied using the AutoPaste method.

To copy paint data to the clipboard, call the AutoCopy method.

To copy paint data to the active paint automation container, from the clipboard, call the AutoPaste method.

See Also

Elements:	PaintUserMode property, AutoCut method, AutoCopy method, AutoPaste method.
Topics:	DigitalPaint Automation: Editing a Container


Return for ClipboardReady
Return Value

Return	Meaning
TRUE	The clipboard has valid data for pasting.
FALSE	The clipboard does not contain valid data for pasting.


Color method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Color (OLE_COLOR clrColor);
Overview	Refer to Creating a Region
Remarks

Creates a region that contains the specified color.

The region creation procedure will be carried out using the current values of the ILTRegion interface properties. For more information on the ILTRegion interface properties, refer to:

UpperTolerance property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

hRgn property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the region will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the region will be drawn on the specified bitmap, as well as the control.

This function will also use the current painting transformation information when creating the new region. To change or set the painting transformation information, call the UpdateXForm method.

The images below show the region created by clicking inside the yellow area.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


clrColor Parameter For Color
clrColor

OLE_COLOR value that specifies the color to use to create the region.


Return for Color
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


ColorReplace method (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short ColorReplace (OLE_COLOR clrColor);
Overview	Refer to Filling an Area
Remarks

Replaces every pixel using the current ILTFill property values.

The filling procedure will be carried out using the current values of the ILTFill interface. For more information on the ILTFill interface properties, refer to:

BackgroundTileBitmap property

GradientEndColor property

GradientStartColor property

GradientSteps property

GradientStyle property

LowerTolerance property

Opacity property

SolidFillColor property

Style property

Texture property

UpperTolerance property

The UpperTolerance and LowerTolerance properties can be set for the color specified in clrColor. For example, if the color passed to this method has an RGB value of 40, 40 , 200, and the LowerTolerance and UpperTolerance properties are 10, 10, 10, and 5, 5, 5, respectively, then this method will replace colors from 30, 30, 190 to 45, 45, 205.

The images below show an example of the results of calling the ColorReplace method.

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method
Topics:	Low-Level DigitalPaint: Filling an Area


clrColor Parameter For ColorReplace
clrColor

The OLE_COLOR value that specifies the color to be replaced.


Return for ColorReplace
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


CreateAutoContainer method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short CreateAutoContainer (long hWnd, long Bitmap);
Overview	Refer to Automation Container
Remarks

Creates a new paint automation container, for automated painting on the specified window and bitmap.

See Also

Elements:	DeleteAutoContainer method, AutoContainer property, PaintUserMode property
Topics:	DigitalPaint Automation: Containers


hWnd Parameter For CreateAutoContainer
hWnd

Handle to the window to associate with the created paint automation container. This window will be updated with any painting operation that occurs within the paint automation container.


Bitmap Parameter For CreateAutoContainer
Bitmap

Handle to the bitmap to associate with the created paint automation container. This bitmap will be updated with any painting operation that occurs within the paint automation container.


Return for CreateAutoContainer
Return Value

Return	Meaning
0	The method was successful.
<>0	An error occurred. Refer to Error Codes.


DeleteAutoContainer method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DeleteAutoContainer (long hWnd);
Overview	Refer to Automation Container
Remarks

Deletes the paint automation container that is associated with the specified window.

See Also

Elements:	DeleteAutoContainer method, AutoContainer property, PaintUserMode property
Topics:	DigitalPaint Automation: Containers


hWnd Parameter For DeleteAutoContainer
hWnd

Handle to a window. The active paint automation container associated with the specified window will be deleted.


Return for DeleteAutoContainer
Return Value

Return	Meaning
0	The method was successful.
<>0	An error occurred. Refer to Error Codes.


Density property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Density
Overview	Refer to Painting with a Brush
Remarks

Gets or sets a value indicating the amount of paint the brush applies with each stroke. Increasing the density of the brush is comparable to increasing the number of bristles in the brush. With more bristles, more paint is applied in a stroke. Similarly, decreasing the density decreases the number of bristles in the brush. With fewer bristles, less paint is applied in a stroke. Valid values are 1 to 100 and represent a percentage. A value of 100% results in the surface being completely covered with paint. A value of 1% results in very little paint being applied to the surface.

The default is 100.

See Also

Elements:	Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


Diameter property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Diameter
Overview	Refer to Painting with a Brush
Remarks

Gets or sets the diameter of the brush in pixels.

Valid values are between 1 and 200. The default is 1.

See Also

Elements:	Density property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


DlgAlignment property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	PaintAlignStyle DlgAlignment
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the text alignment for the Text dialog.

The value present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default value. When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Text.Alignment property with the new value.

Possible values are:

Horizontal Alignment:

PAINT_ALIGN_LEFT

PAINT_ALIGN_HCENTER

PAINT_ALIGN_RIGHT

Vertical Alignment:

PAINT_ALIGN_TOP

PAINT_ALIGN_VCENTER

PAINT_ALIGN_BOTTOM

A value from each category (horizontal and vertical) may be combined.

The default is PAINT_ALIGN_HCENTER combined with PAINT_ALIGN_VCENTER.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Alignment property
Topics:	Low-Level DigitalPaint: Dialogs


DlgBackgroundColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgBackgroundColor
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape dialog or the Text dialog that represents the background color of the shape or the text.

The value present in this property when the ShowShapeDlg method or the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value RGB (255, 255, 255). When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.BackgroundColor property or the Text.BackgroundColor property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, BackgroundColor property (ILTShape Interface), BackgroundColor property (ILTText Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgBackgroundTileBitmap property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR DlgBackgroundTileBitmap (long nIndex);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

This property represents an array of strings contained in the background tile bitmap combo box in the Shape, Text, or Fill dialog. It can be used to get or set the string located at the specified location within the array.

The value(s) present in this property when the ShowShapeDlg method, the ShowFillDlg method or the ShowTextDlg method is called is(are) used to initialize the dialog. If this property contains no strings prior to calling the method, the dialog will have no strings listed in the background tile bitmap combo box. When the method returns, the DlgBackgroundTileBitmapIndex property is updated with the index of the highlighted string in the background tile bitmap combo box.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, ShowFillDlg method, Fill property, DlgBackgroundTileBitmapIndex property, DlgBackgroundTileBitmapCount property, BackgroundTileBitmap property (ILTShape Interface), BackgroundTileBitmap property (ILTFill Interface), BackgroundTileBitmap property (ILTText)
Topics:	Low-Level DigitalPaint: Dialogs


nIndex Parameter For DlgBackgroundTileBitmap
nIndex

The index of a specific string in the background tile bitmap combo box. The nIndex parameter can be from 0 to DlgBackgroundTileBitmapCount-1.


DlgBackgroundTileBitmapCount property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgBackgroundTileBitmapCount
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the number of items in the DlgBackgroundTileBitmap property for the Shape, Text or Fill dialogs.

Set this property to allocate the required number of entries for the DlgBackgroundTileBitmap property.

The strings contained in the DlgBackgroundTileBitmap property will be displayed in the background tile bitmap combo box in the Shape dialog, the Text dialog or the Fill dialog.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, ShowFillDlg method, Fill property, DlgBackgroundTileBitmap property, DlgBackgroundTileBitmap property
Topics:	Low-Level DigitalPaint: Dialogs


DlgBackgroundTileBitmapIndex property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgBackgroundTileBitmapIndex
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape, Text or Fill dialog that represents the index to the current background tile bitmap selected in the background tile bitmap combo box. This is a zero-based index.

The value present in this property when the ShowShapeDlg method, ShowTextDlg method or the ShowFillDlg method is called is used to initialize the dialog. When the method returns, this property is updated with the index of the selected item or string in the background tile bitmap combo box.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, ShowFillDlg method, Fill property, DlgBackgroundTileBitmap property
Topics:	Low-Level DigitalPaint: Dialogs


DlgBorderColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgBorderColor
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape or Text dialog that represents the border color of the shape or the text.

The value present in this property when the ShowShapeDlg method or the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value RGB (0, 0, 0). When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.BorderColor property or the Text.BorderColor property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, BorderColor property (ILTShape Interface), BorderColor property (ILTText Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgBorderEndCap property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeBorderEndCap DlgBorderEndCap
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape dialog that represents the type of border end cap, to use for the shape.

The value present in this property when the ShowShapeDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowShapeDlg method, the dialog will be initialized with the default value SHAPE_BORDERENDCAP_ROUND. When the ShowShapeDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.BorderEndCap property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, BorderEndCap property
Topics:	Low-Level DigitalPaint: Dialogs


DlgBorderStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeBorderStyle DlgBorderStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape dialog that represents the border style of the shape.

The value present in this property when the ShowShapeDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowShapeDlg method, the dialog will be initialized with the default value SHAPE_BORDERSTYLE_SOLID. When the ShowShapeDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.BorderStyle property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, BorderStyle property
Topics:	Low-Level DigitalPaint: Dialogs


DlgBorderTileBitmap property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR DlgBorderTileBitmap (long nIndex);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

This property represents an array of strings contained in the border tile bitmap combo box in the Shape dialog. It can be used to get or set the string located at the specified location within the array.

The value(s) present in this property when the ShowShapeDlg method is called is(are) used to initialize the dialog. If this property contains no strings prior to calling the ShowShapeDlg method, the dialog will have no strings in the border tile bitmap combo box. When the ShowShapeDlg method returns, the BorderTileBitmapIndex property is updated with the index of the highlighted string in the border tile bitmap combo box.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, DlgBorderTileBitmapIndex property, DlgBorderTileBitmapCount property, BorderTileBitmap property
Topics:	Low-Level DigitalPaint: Dialogs


nIndex Parameter For DlgBorderTileBitmap
nIndex

The index of a specific string in the border tile bitmap combo box. The nIndex parameter can be from 0 to DlgBorderTileBitmapCount-1.


DlgBorderTileBitmapCount property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgBorderTileBitmapCount
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the number of items in the DlgBorderTileBitmap property for the Shape Dialog.

Set this property to allocate the required number of entries for the DlgBorderTileBitmap property.

The strings contained in the DlgBorderTileBitmap property will be displayed in the border tile bitmap combo box in the Shape dialog.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, DlgBorderTileBitmap property, DlgBorderTileBitmap property
Topics:	Low-Level DigitalPaint: Dialogs


DlgBorderTileBitmapIndex property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgBorderTileBitmapIndex
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape dialog that represents the index to the current border tile bitmap selected in the border tile bitmap combo box. This is a zero-based index.

The value present in this property when the ShowShapeDlg method is called is used to initialize the dialog. When the ShowShapeDlg method returns, this property is updated with the index of the selected item or string in the border tile bitmap combo box.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, DlgBorderTileBitmap property
Topics:	Low-Level DigitalPaint: Dialogs


DlgBorderWidth property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DlgBorderWidth
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape or Text dialog that represents the border width of the shape or the text.

The value present in this property when the ShowShapeDlg method or the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value 1. When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.BorderWidth property or the Text.BorderWidth property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, BorderWidth property (ILTShape Interface), BorderWidth property (ILTText Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgDensity property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgDensity
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the density of the brush.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value 100. When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.Density property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, Density property
Topics:	Low-Level DigitalPaint: Dialogs


DlgDiameter property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DlgDiameter
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the diameter of the brush.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value 1. When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.Diameter property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, Diameter property
Topics:	Low-Level DigitalPaint: Dialogs


DlgFadeOut property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgFadeOut
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the rate at which the brush contents fade.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value 0. When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.FadeOutRate property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, FadeOutRate property
Topics:	Low-Level DigitalPaint: Dialogs


DlgFillGradientStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	FillGradientStyle DlgFillGradientStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Fill dialog that represents the gradient fill style.

The value present in this property when the ShowFillDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowFillDlg method, the dialog will be initialized with the default value FILL_GRADIENTSTYLE_LINE_L_TO_R. When the ShowFillDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Fill.GradientStyle property with the new value.

See Also

Elements:	DlgFlags property, ShowFillDlg method, Fill property, GradientStyle property (ILTFill Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgFillStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	PaintFillStyle DlgFillStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Fill dialog that represents the fill style.

The value present in this property when the ShowFillDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowFillDlg method, the dialog will be initialized with the default value FILL_FILLSTYLE_SOLID. When the ShowFillDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Fill.Style property with the new value.

See Also

Elements:	DlgFlags property, ShowFillDlg method, Fill property, Style property
Topics:	Low-Level DigitalPaint: Dialogs


DlgFlags property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgFlags
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the flags for the dialog box.

Possible values depend on the dialog box to be displayed:

Brush Dialog - ShowBrushDlg method:

Setting	Description
PAINT_DLG_BRUSH_SHOWALL	[0x00000001] show all options
PAINT_DLG_BRUSH_SHOWTOUCHCONTENT	[0x00000002] show the touch contents option
PAINT_DLG_BRUSH_SHOWTOUCHCOLOR	[0x00000004] show the touch color option
PAINT_DLG_BRUSH_SHOWTOUCHIMAGE	[0x00000008] show the touch image option
PAINT_DLG_BRUSH_SHOWDIAMETER	[0x00000010] show the diameter option
PAINT_DLG_BRUSH_SHOWHARDNESS	[0x00000020] show the hardness option
PAINT_DLG_BRUSH_SHOWSPACING	[0x00000040] show the spacing option
PAINT_DLG_BRUSH_SHOWOPACITY	[0x00000080] show the opacity option
PAINT_DLG_BRUSH_SHOWDENSITY	[0x00000100] show the density option
PAINT_DLG_BRUSH_SHOWFADEOUTRATE	[0x00000200] show the fadeout rate option
PAINT_DLG_BRUSH_SHOWTEXTURE	[0x00000400] show the texture option
PAINT_DLG_BRUSH_SHOWDEFAULT	[0x00000800] show the Default option
PAINT_DLG_BRUSH_INITUSEDEFAULT	[0x00001000] use the initial default values for the dialog.
Fill Dialog - ShowFillDlg method:

Setting	Description
PAINT_DLG_FILL_SHOWALL	[0x00000001] show all options.
PAINT_DLG_FILL_SHOWSTYLE	[0x00000002] show the style option.
PAINT_DLG_FILL_SHOWSOLIDFILLCOLOR	[0x00000004] show the solid fill color option.
PAINT_DLG_FILL_SHOWBKGRNDTILE	[0x00000008] show the background tile option.
PAINT_DLG_FILL_SHOWGRADIENTSTYLE	[0x00000010] show the gradient style option.
PAINT_DLG_FILL_SHOWGRADIENTDIRECTION	[0x00000020] show the gradient direction option.
PAINT_DLG_FILL_SHOWGRADIENTPREVIEW	[0x00000040] show the gradient preview option.
PAINT_DLG_FILL_SHOWGRADIENTSTARTCOLOR	[0x00000080] show the gradient start color option.
PAINT_DLG_FILL_SHOWGRADIENTENDCOLOR	[0x00000100] show the gradient end color option.
PAINT_DLG_FILL_SHOWGRADIENTSTEPS	[0x00000200] show the gradient steps option.
PAINT_DLG_FILL_SHOWLOWERTOLERANCE	[0x00000400] show the lower tolerance option.
PAINT_DLG_FILL_SHOWUPPERTOLERANCE	[0x00000800] show the upper tolerance option.
PAINT_DLG_FILL_SHOWOPACITY	[0x00001000] show the opacity option.
PAINT_DLG_FILL_SHOWTEXTURE	[0x00002000] show the paper texture option.
PAINT_DLG_FILL_SHOWDEFAULT	[0x00004000] show the default option.
PAINT_DLG_FILL_INITUSEDEFAULT	[0x00008000] use the initial default values for the dialog.
Region Dialog - ShowRegionDlg method:

Setting	Description
PAINT_DLG_REGION_SHOWALL	[0x00000001] show all options.
PAINT_DLG_REGION_SHOWLOWERTOLERANCE	[0x00000002] show the lower tolerance option.
PAINT_DLG_REGION_SHOWUPPERTOLERANCE	[0x00000004] show the upper tolerance option.
PAINT_DLG_REGION_SHOWELLIPSEWIDTH	[0x00000008] show the ellipse width option.
PAINT_DLG_REGION_SHOWELLIPSEHEIGHT	[0x00000010] show the ellipse height option.
PAINT_DLG_REGION_SHOWDEFAULT	[0x00000020] show the default option.
PAINT_DLG_REGION_INITUSEDEFAULT	[0x00000040] use the initial default values for the dialog.
Shape Dialog - ShowShapeDlg method:

Setting	Description
PAINT_DLG_SHAPE_SHOWALL	[0x00000001] show all options
PAINT_DLG_SHAPE_SHOWBKGRNDSTYLE	[0x00000002] show the background style option
PAINT_DLG_SHAPE_SHOWBKOPAQUECOLOR	[0x00000004] show the opaque color option.
PAINT_DLG_SHAPE_SHOWGRADIENTSTYLE	[0x00000008] show the gradient style option
PAINT_DLG_SHAPE_SHOWGRADIENTDIRECTION	[0x00000010] show the gradient direction option
PAINT_DLG_SHAPE_SHOWGRADIENTSTARTCOLOR	[0x00000020] show the gradient start color option
PAINT_DLG_SHAPE_SHOWGRADIENTENDCOLOR	[0x00000040] show the gradient end color option
PAINT_DLG_SHAPE_SHOWGRADIENTPREVIEW	[0x00000080] show the gradient preview option
PAINT_DLG_SHAPE_SHOWGRADIENTSTEPS	[0x00000100] show the gradient steps option
PAINT_DLG_SHAPE_SHOWBKGRNDTILE	[0x00000200] show the background tile option
PAINT_DLG_SHAPE_SHOWOPACITY	[0x00000400] show the opacity option.
PAINT_DLG_SHAPE_SHOWBORDERSTYLE	[0x00000800] show the border style option.
PAINT_DLG_SHAPE_SHOWBORDERWIDTH	[0x00001000] show the border width option.
PAINT_DLG_SHAPE_SHOWBORDERBRUSHSTYLE	[0x00002000] show the border brush style option.
PAINT_DLG_SHAPE_SHOWBORDERCOLOR	[0x00004000] show the border color option
PAINT_DLG_SHAPE_SHOWBORDERPATTERN	[0x00008000] show the border pattern option
PAINT_DLG_SHAPE_SHOWENDCAP	[0x00010000] show the end cap option
PAINT_DLG_SHAPE_SHOWELLIPSEWIDTH	[0x00020000] show the ellipse width option
PAINT_DLG_SHAPE_SHOWELLIPSEHEIGHT	[0x00040000] show the ellipse height option
PAINT_DLG_SHAPE_SHOWTEXTURE	[0x00080000] show the paper texture option
PAINT_DLG_SHAPE_SHOWDEFAULT	[0x00100000] show the default option
PAINT_DLG_SHAPE_INITUSEDEFAULT	[0x00200000] use the initial default values for the dialog.
Text Dialog - ShowTextDlg method:

Setting	Description
PAINT_DLG_TEXT_SHOWALL	[0x00000001] show all options.
PAINT_DLG_TEXT_SHOWTEXT	[0x00000002] show the text option.
PAINT_DLG_TEXT_SHOWBKGRNDSTYLE	[0x00000004] show the background style option.
PAINT_DLG_TEXT_SHOWBKGRNDOPAQUECOLOR	[0x00000008] show the background opaque color option
PAINT_DLG_TEXT_SHOWBKGRNDTILE	[0x00000010] show the background tile option.
PAINT_DLG_TEXT_SHOWBORDERSTYLE	[0x00000020] show the border style option.
PAINT_DLG_TEXT_SHOWBORDERWIDTH	[0x00000040] show the border width option.
PAINT_DLG_TEXT_SHOWBORDERCOLOR	[0x00000080] show the border color option.
PAINT_DLG_TEXT_SHOWHORZALIGNMENT	[0x00000100] show the horizontal alignment option.
PAINT_DLG_TEXT_SHOWVERTALIGNMENT	[0x00000200] show the vertical alignment option.
PAINT_DLG_TEXT_SHOWROTATE	[0x00000400] show the rotate option.
PAINT_DLG_TEXT_SHOWSCALE	[0x00000800] show the scale option.
PAINT_DLG_TEXT_SHOWTRUETYPEFONT	[0x00001000] show the True type font option.
PAINT_DLG_TEXT_SHOWOPACITY	[0x00002000] show the opacity option.
PAINT_DLG_TEXT_SHOWTEXTURE	[0x00004000] show the paper texture option.
PAINT_DLG_TEXT_SHOWDEFAULT	[0x00008000] show the default option.
PAINT_DLG_TEXT_INITUSEDEFAULT	[0x00010000] use the initial default values for the dialog.
See Also

Elements:	DlgTitle property, ShowBrushDlg method, ShowShapeDlg method, ShowRegionDlg method, ShowFillDlg method, ShowTextDlg method
Topics:	Low-Level DigitalPaint: Dialogs


DlgGradientEndColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgGradientEndColor
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape or Fill dialog that represents the gradient end color of the shape or the fill.

The value present in this property when the ShowShapeDlg method or the ShowFillDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value RGB (0, 0, 255). When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.GradientEndColor property or the Fill.GradientEndColor property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, GradientEndColor property (ILTShape Interface), GradientEndColor property (ILTFill Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgGradientStartColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgGradientStartColor
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape or Fill dialog that represents the gradient start color of the shape or the fill.

The value present in this property when the ShowShapeDlg method or the ShowFillDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value RGB (255, 0, 0). When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.GradientStartColor property or the Fill.GradientStartColor property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, GradientStartColor property (ILTShape Interface), GradientStartColor property (ILTFill Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgGradientSteps property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DlgGradientSteps
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape or Fill dialog that represents the number of gradient steps for the shape or the fill.

The value present in this property when the ShowShapeDlg method or the ShowFillDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value 255. When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.GradientSteps property or the Fill.GradientSteps property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, GradientSteps property (ILTShape Interface), GradientSteps property (ILTFill Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgHardnessValue property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgHardnessValue
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the hardness of the brush.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value 1. When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.HardnessValue property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, HardnessValue property
Topics:	Low-Level DigitalPaint: Dialogs


DlgLowerTolerance property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgLowerTolerance
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Fill or Region dialog that represents the lower tolerance of a color used for filling an area or creating a region.

The value present in this property when the ShowFillDlg method or the ShowRegionDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value RGB (0, 0, 0). When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Region.LowerTolerance property or the Fill.LowerTolerance property with the new value.

See Also

Elements:	DlgFlags property, ShowRegionDlg method, Region property, ShowFillDlg method, Fill property, UpperTolerance property (ILTFill Interface), UpperTolerance property (ILTRegion Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgOpacity property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgOpacity
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog, the Shape dialog, the Text dialog or the Fill dialog that represents the opacity of the brush, shape, text of fill color.

The value present in this property when the ShowBrushDlg method, ShowShapeDlg method, ShowTextDlg method or the ShowFillDlg method is called is used to initialize the dialog. If this property is not set prior to calling one of the methods listed above, the dialog will be initialized with the default value 0. When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.Opacity property, the Shape.Opacity property, the Text.Opacity property or the Fill.Opacity property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, Opacity property (ILTBrush Interface), Opacity property (ILTShape Interface), Opacity property (ILTText Interface), Opacity property (ILTFill Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgPaperTexture property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR DlgPaperTexture (long nIndex);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

This property represents an array of strings contained in the paper texture combo box in the Brush dialog, the Shape dialog, the Text dialog or the Fill dialog. It can be used to get or set the string located at the specified location within the array.

The value(s) present in this property when the ShowBrushDlg method, ShowShapeDlg method, ShowTextDlg method or the ShowFillDlg method is called is(are) used to initialize the dialog. If this property contains no strings prior to calling the method, the dialog will have no strings listed in the paper texture combo box. When the method returns, the PaperTouchImageIndex property is updated with the index of the highlighted item or string in the paper texture combo box. The PaperTouchImageIndex property can then be used along with the DlgPaperTexture property to update the Texture property (ILTBrush Interface), Texture property (ILTShape Interface), Texture property (ILTText Interface) or Texture property (ILTFill Interface) with the selected paper texture image.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, DlgPaperTextureIndex property, DlgPaperTextureCount property, Texture property (ILTBrush Interface), Texture property (ILTShape Interface), Texture property (ILTText Interface), Texture property (ILTFill Interface)
Topics:	Low-Level DigitalPaint: Dialogs


nIndex Parameter For DlgPaperTexture
nIndex

The index of a specific string in the paper texture combo box. The nIndex parameter can be from 0 to DlgPaperTextureCount-1.


DlgPaperTextureCount property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgPaperTextureCount
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the number of items in the DlgPaperTexture property for the Brush dialog, the Shape dialog, the Text dialog or the Fill dialog.

Set this property to allocate the required number of entries for the DlgPaperTexture property.

The strings contained in the DlgPaperTexture property will be displayed in the paper texture combo box in the Brush dialog, the Shape dialog, the Text dialog or the Fill dialog.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, DlgPaperTextureIndex property, DlgPaperTexture property.
Topics:	Low-Level DigitalPaint: Dialogs


DlgPaperTextureIndex property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgPaperTextureIndex
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog, the Shape dialog, the Text dialog or the Fill dialog, that represents the index to the current paper texture image selected in the paper texture combo box. This is a zero-based index.

The value present in this property when the ShowBrushDlg method, ShowShapeDlg method, ShowTextDlg method or the ShowFillDlg method is called, is used to initialize the dialog. When the method returns, this property is updated with the index of the selected item or string in the paper texture combo box.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, DlgPaperTexture property
Topics:	Low-Level DigitalPaint: Dialogs


DlgRoundRectEllipseHeight property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgRoundRectEllipseHeight
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape or Region dialog that represents the height of the ellipse to use when creating a rounded rectangle shape or region.

The value present in this property when the ShowShapeDlg method or the ShowRegionDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value 15. When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.RoundRectEllipseHeight property or the Region.RoundRectEllipseHeight property with the new value.

See Also

Elements:	DlgFlags property, ShowRegionDlg method, Region property, ShowShapeDlg method, Shape property, RoundRectEllipseWidth property (ILTShape Interface), RoundRectEllipseWidth property (ILTRegion Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgRoundRectEllipseWidth property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgRoundRectEllipseWidth
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape or Region dialog that represents the width of the ellipse to use when creating a rounded rectangle shape or region.

The value present in this property when the ShowShapeDlg method or the ShowRegionDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowShapeDlg method or the ShowRegionDlg method, the dialog will be initialized with the default value 15. When the ShowShapeDlg method or ShowRegionDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.RoundRectEllipseWidth property or the Region.RoundRectEllipseWidth property with the new value.

See Also

Elements:	DlgFlags property, ShowRegionDlg method, Region property, ShowShapeDlg method, Shape property, RoundRectEllipseWidth property (ILTShape Interface), RoundRectEllipseWidth property (ILTRegion Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgShapeBackgroundStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeBackStyle DlgShapeBackgroundStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape dialog that represents the background style of the shape.

The value present in this property when the ShowShapeDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowShapeDlg method, the dialog will be initialized with the default value SHAPE_BACKSTYLE_OPAQUE. When the ShowShapeDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.BackgroundStyle property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, BackgroundStyle property
Topics:	Low-Level DigitalPaint: Dialogs


DlgShapeBorderBrushStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeBorderBrushStyle DlgShapeBorderBrushStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape dialog that represents the border brush style of the shape.

The value present in this property when the ShowShapeDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowShapeDlg method, the dialog will be initialized with the default value SHAPE_BORDERBRUSHSTYLE_COLOR. When the ShowShapeDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.BorderBrushStyle property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, BorderBrushStyle property (ILTShape Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgShapeGradientStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeGradientStyle DlgShapeGradientStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Shape dialog that represents the gradient style of the shape.

The value present in this property when the ShowShapeDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowShapeDlg method, the dialog will be initialized with the default value SHAPE_GRADIENT_STYLE_LINE_L_TO_R. When the ShowShapeDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Shape.GradientStyle property with the new value.

See Also

Elements:	DlgFlags property, ShowShapeDlg method, Shape property, GradientStyle property
Topics:	Low-Level DigitalPaint: Dialogs


DlgSolidFillColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgSolidFillColor
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Fill dialog that represents the solid fill color.

The value present in this property when the ShowFillDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowFillDlg method, the dialog will be initialized with the default value RGB (255, 255, 255). When the ShowFillDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Fill.SolidFillColor property with the new value.

See Also

Elements:	DlgFlags property, ShowFillDlg method, Fill property, SolidFillColor property
Topics:	Low-Level DigitalPaint: Dialogs


DlgSpacing property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgSpacing
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the spacing of the brush.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value 1. When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.Spacing property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, Spacing property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTextBackgroundStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	TextBackStyle DlgTextBackgroundStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Text dialog that represents background style for the text.

The value present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default value TEXT_BACKSTYLE_OPAQUE. When the ShowTextDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Text.BackgroundStyle property with the new value.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Text property, BackgroundStyle property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTextBorderBrushStyle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	TextBorderBrushStyle DlgTextBorderBrushStyle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Text dialog that represents the border brush style of the text.

The value present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default value TEXT_BORDER_BRUSHSTYLE_COLOR. When the ShowTextDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Text.BorderBrushStyle property with the new value.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Text property, BorderBrushStyle property (ILTText Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DlgTextFont property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ILTFont DlgTextFont
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value(s) in the Text dialog that represents the font to use when painting text.

The value(s) present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default ILTFont property values. When the ShowTextDlg method returns, this property is updated with the value(s) entered through the dialog.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Text property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTextString property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR DlgTextString
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Text dialog that represents the text to paint.

The value present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default value "LEADTOOLS!". When the ShowTextDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Text.String property with the new value.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Text property, String property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTitle property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR DlgTitle
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the string containing the dialog box caption text.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, ShowFillDlg method, ShowRegionDlg method, ShowShapeDlg method, ShowTextDlg method
Topics:	Low-Level DigitalPaint: Dialogs


DlgTouchColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgTouchColor
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the color of the paintbrush.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value RGB (0, 0, 0). When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.TouchColor property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTouchContentsType property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BrushTouchContentsType DlgTouchContentsType
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the contents of the paintbrush.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value BRUSH_TOUCH_CONTENTS_COLOR. When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.TouchContentsType property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, TouchContentsType property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTouchImage property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR DlgTouchImage (long nIndex);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

This property represents an array of strings contained in the touch image combo box in the Brush dialog. It can be used to get or set the string located at the specified location within the array.

The value(s) present in this property when the ShowBrushDlg method is called is(are) used to initialize the dialog. If this property contains no strings prior to calling the ShowBrushDlg method, the dialog will have no strings listed in the touch image combo box. When the ShowBrushDlg method returns, the DlgTouchImageIndex property is updated with the index of the highlighted item or string in the touch image combo box.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, DlgTouchImageIndex property, DlgTouchImageCount property
Topics:	Low-Level DigitalPaint: Dialogs


nIndex Parameter For DlgTouchImage
nIndex

The index of a specific string in the touch image combo box. nIndex can be from 0 to DlgTouchImageCount-1.


DlgTouchImageCount property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgTouchImageCount
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the number of items in the DlgTouchImage property for the Brush Dialog.

Set this property to allocate the required number of entries for the DlgTouchImage property.

The strings contained in the DlgTouchImage property will be displayed in the touch image combo box in the Brush dialog.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, DlgTouchImageIndex property, DlgTouchImage property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTouchImageIndex property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgTouchImageIndex
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the index to the current image selected in the touch image combo box. This is a zero-based index.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. When the ShowBrushDlg method returns, this property is updated with the index of the selected item or string in the touch image combo box.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, DlgTouchImage property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTouchTransparentColor property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL (OLE_COLOR)? DlgTouchTransparentColor
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Brush dialog that represents the transparent color of the paintbrush.

The value present in this property when the ShowBrushDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowBrushDlg method, the dialog will be initialized with the default value. When the ShowBrushDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Brush.TouchTransparentColor property with the new value.

See Also

Elements:	DlgFlags property, ShowBrushDlg method, Brush property, TouchTransparetnColor property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTransformRotate property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgTransformRotate
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Text dialog that represents degree of rotation for the text.

The value present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default value 0. When the ShowTextDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Text.TransformRotate property with the new value.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Text property, TransformRotate property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTransformScaleX property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgTransformScaleX
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Text dialog that represents the horizontal scaling factor for the text.

The value present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default value 100. When the ShowTextDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Text.TransformScaleX property with the new value.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Text property, TransformScaleX property, TransformScaleY property
Topics:	Low-Level DigitalPaint: Dialogs


DlgTransformScaleY property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long DlgTransformScaleY
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Text dialog that represents the vertical scaling factor for the text.

The value present in this property when the ShowTextDlg method is called is used to initialize the dialog. If this property is not set prior to calling the ShowTextDlg method, the dialog will be initialized with the default value 100. When the ShowTextDlg method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Text.TransformScaleY property with the new value.

See Also

Elements:	DlgFlags property, ShowTextDlg method, Text property, TransformScaleY property, TransformScaleX property
Topics:	Low-Level DigitalPaint: Dialogs


DlgUpperTolerance property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR DlgUpperTolerance
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Gets or sets the value in the Fill dialog or the Region dialog that represents the upper tolerance of a color used for filling an area or creating a region.

The value present in this property when the ShowFillDlg method or the ShowRegionDlg method is called is used to initialize the dialog. If this property is not set prior to calling the method, the dialog will be initialized with the default value RGB (0, 0, 0). When the method returns, this property is updated with the value entered through the dialog. This property can then be used to update the Region.UpperTolerance property or the Fill.UpperTolerance property with the new value.

See Also

Elements:	DlgFlags property, ShowRegionDlg method, Region property, ShowFillDlg method, Fill property, UpperTolerance property (ILTFill Interface), UpperTolerance property (ILTRegion Interface)
Topics:	Low-Level DigitalPaint: Dialogs


DrawEllipse method (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DrawEllipse (long nLeft, long nTop, long nWidth, long nHeight);
Overview	Refer to Painting a Shape
Remarks

Draws an ellipse using the specified points.

The ellipse will be drawn using the current values of the ILTShape interface properties. For more information on the ILTShape interface properties, refer to:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the ellipse will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the ellipse will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


nLeft Parameter For DrawEllipse
nLeft

Specifies the x-coordinate of the top-left point.


nTop Parameter For DrawEllipse
nTop

Specifies the y-coordinate of the top-left point.


nWidth Parameter For DrawEllipse
nWidth

Specifies the width of the ellipse, in pixels.


nHeight Parameter For DrawEllipse
nHeight

Specifies the height of the ellipse, in pixels.


Return for DrawEllipse
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


DrawLine method (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DrawLine (long nStartX, L_INT nStartY, long nEndX, long nEndY);
Overview	Refer to Painting a Shape
Remarks

Draws a line between the specified points.

The line will be drawn using the current values of the ILTShape interface properties. For more information on the ILTShape interface properties, refer to:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the line will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the line will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


nStartX Parameter For DrawLine
nStartX

Specifies the x-coordinate of the start position.


nStartY Parameter For DrawLine
nStartY

Specifies the y-coordinate of the start position.


nEndX Parameter For DrawLine
nEndX

Specifies the x-coordinate of the end position.


nEndY Parameter For DrawLine
nEndY

Specifies the y-coordinate of the end position.


Return for DrawLine
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


DrawPolyBezier method (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DrawPolyBezier (void);
Overview	Refer to Painting a Shape
Remarks

Draws a polybezier using the specified points.

The Bézier curve(s) will be drawn using the current values of the ILTShape interface properties. For more information on the ILTShape interface properties, refer to:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the Bezier curve(s) will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the Bézier curve(s) will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


Return for DrawPolyBezier
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


DrawPolygon method (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DrawPolygon (short nFillMode);
Overview	Refer to Painting a Shape
Remarks

Draws a polygon using the specified points.

The polygon is closed automatically by drawing a line from the last vertex to the first.

The polygon will be drawn using the current values of the ILTShape interface properties. For more information on the ILTShape interface properties, refer to:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the polygon will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the polygon will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


nFillMode Parameter For DrawPolygon
nFillMode

nFillMode is reserved for future use, pass 0


Return for DrawPolygon
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


DrawRect method (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DrawRect (long nLeft, long nTop, long nWidth, long nHeight);
Overview	Refer to Painting a Shape
Remarks

Draws a rectangle using the specified points.

The rectangle will be drawn using the current values of the ILTShape interface properties. For more information on the ILTShape interface properties, refer to:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the rectangle will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the rectangle will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


nLeft Parameter For DrawRect
nLeft

Specifies the x-coordinate of the top-left point of the rectangle.


nTop Parameter For DrawRect
nTop

Specifies the y-coordinate of the top-left point of the rectangle.


nWidth Parameter For DrawRect
nWidth

Specifies the width of the rectangle, in pixels.


nHeight Parameter For DrawRect
nHeight

Specifies the height of the rectangle, in pixels.


Return for DrawRect
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


DrawRoundRect method (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short DrawRoundRect (long nLeft, long nTop, long nWidth, long nHeight);
Overview	Refer to Painting a Shape
Remarks

Draws a rounded rectangle using the specified points.

The rounded rectangle will be drawn using the current values of the ILTShape interface properties. For more information on the ILTShape interface properties, refer to:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the rounded rectangle will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the rounded rectangle will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


nLeft Parameter For DrawRoundRect
nLeft

Specifies the x-coordinate of the top-left point.


nTop Parameter For DrawRoundRect
nTop

Specifies the y-coordinate of the top-left point.


nWidth Parameter For DrawRoundRect
nWidth

Specifies the width of the rectangle, in pixels.


nHeight Parameter For DrawRoundRect
nHeight

Specifies the height of the rectangle, in pixels.


Return for DrawRoundRect
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Ellipse method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Ellipse (long nLeft, long nTop, long nWidth, long nHeight);
Overview	Refer to Creating a Region
Remarks

Creates an elliptical region using the specified points.

The region creation procedure will be carried out using the current values of the ILTRegion interface properties. For more information on the ILTRegion interface properties, refer to:

UpperTolerance property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

hRgn property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the elliptical region will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the elliptical region will be drawn on the specified bitmap, as well as the control.

This function will also use the current painting transformation information when creating the new region. To change or set the painting transformation information, call the UpdateXForm method.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


nLeft Parameter For Ellipse
nLeft

Specifies the x-coordinate of the top-left point.


nTop Parameter For Ellipse
nTop

Specifies the y-coordinate of the top-left point.


nWidth Parameter For Ellipse
nWidth

Specifies the width of the ellipse, in pixels.


nHeight Parameter For Ellipse
nHeight

Specifies the height of the eliipse, in pixels.


Return for Ellipse
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Enabled property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL Enabled
Overview	Refer to Automation Container
Remarks

Boolean value that indicates whether to enable or disable the container. In order to edit objects within the paint container, this property must be TRUE. Possible values are:

Value	Meaning
TRUE	Enable the container.
FALSE	Disable the container.
See Also

Elements:	ScalarNumX property, ScalarNumX property, ScalarDenX property, LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property
Topics:	DigitalPaint Automation: Containers


EnableMethodErrors property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL EnableMethodErrors
Overview	Refer to Setting General DigitalPaint Information.
Remarks

(Persistent property, available at design time) Specifies whether LEADTOOLS generates system error events (in addition to error return codes).

Setting	Description
TRUE	Generate system error events.
FALSE	Do not generate system error events.
See Also

Elements:	UnlockSupport method, IsSupportLocked method
Topics:	Low-Level DigitalPaint: Support


FadeOutRate property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long FadeOutRate
Overview	Refer to Painting with a Brush
Remarks

Gets or sets a value indicating the rate at which the brush contents will fade (become more transparent). Valid values are between (0-10000). 0 means no fade-out will occur. Other values (1-10000) will increase the transparency of the brush contents every Spacing property pixels, until total fade-out is reached.

The default is 0.

See Also

Elements:	Density property, Diameter property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


Fill property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ILTFill Fill
Overview	Refer to Setting DigitalPaint Properties
Remarks

(RuntimeOnly, ReadOnly) Gets the current ILTFill interface.

The values of the properties in the ILTFill interface represent the current settings for performing a flood fill.

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


GetClipRgn method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long GetClipRgn (void);
Overview	Refer to Setting a DigitalPaint Clipping Region
Remarks

Gets the current clipping region, set using the SetClipRgn method.

The interface obtained from the Region property can be used to create clipping regions.

See Also

Elements:	SetMetrics method, hRgn property, TranslateRgn method, ScaleRgn method, Region property, GetClipRgn method, OffsetClipRgn method
Topics:	Low-Level DigitalPaint: Regions


Return for GetClipRgn
Return Value

Return	Meaning
0	No region.
<>0	Windows region handle.


GradientEndColor property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR GradientEndColor
Overview	Refer to Painting a Shape
Remarks

Gets or sets the COLORREF value that specifies the color to use as the ending color for the background gradient fill.

The default is RGB (0, 0, 255).

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


GradientEndColor property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR GradientEndColor
Overview	Refer to Filling an Area
Remarks

Gets or sets the OLE_COLOR value that specifies the color to use as the ending color for the gradient fill.

The default is RGB (0, 0, 255).

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


GradientStartColor property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR GradientStartColor
Overview	Refer to Painting a Shape
Remarks

Gets or sets the OLE_COLOR value that specifies the color to use as the starting color for the background gradient fill.

The default is RGB (255, 0, 0).

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


GradientStartColor property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR GradientStartColor
Overview	Refer to Filling an Area
Remarks

Gets or sets the OLE_COLOR value that specifies the color to use as the starting color for the gradient fill.

The default is RGB (255, 0, 0).

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


GradientSteps property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short GradientSteps
Overview	Refer to Filling an Area
Remarks

Gets or sets the number of gradient fill steps.

Valid values are (2-255).

The default is 255.

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


GradientSteps property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short GradientSteps
Overview	Refer to Painting a Shape
Remarks

Gets or sets the number of gradient color steps.

Valid values are between 2 and 255. The default is 255.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


GradientStyle property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	FillGradientStyle GradientStyle
Overview	Refer to Filling an Area
Remarks

Gets or sets the background gradient fill style. Possible values are:

FILL_GRADIENTSTYLE_NONE

FILL_GRADIENTSTYLE_LINE_L_TO_R(Default)

FILL_GRADIENTSTYLE_LINE_R_TO_L

FILL_GRADIENTSTYLE_LINE_T_TO_B

FILL_GRADIENTSTYLE_LINE_B_TO_T

FILL_GRADIENTSTYLE_LINE_LT_TO_RB

FILL_GRADIENTSTYLE_LINE_LB_TO_RT

FILL_GRADIENTSTYLE_LINE_RT_TO_LB

FILL_GRADIENTSTYLE_LINE_RB_TO_LT

FILL_GRADIENTSTYLE_LINE2_L_AND_R_TO_C

FILL_GRADIENTSTYLE_LINE2_C_TO_L_AND_R

FILL_GRADIENTSTYLE_LINE2_T_AND_B_TO_C

FILL_GRADIENTSTYLE_LINE2_C_TO_T_AND_B

FILL_GRADIENTSTYLE_LINE2_LT_AND_RB_TO_C

FILL_GRADIENTSTYLE_LINE2_C_TO_LT_AND_RB

FILL_GRADIENTSTYLE_LINE2_RT_AND_LB_TO_C

FILL_GRADIENTSTYLE_LINE2_C_TO_RT_AND_LB

FILL_GRADIENTSTYLE_ANGLE_TO_LT

FILL_GRADIENTSTYLE_ANGLE_TO_LB

FILL_GRADIENTSTYLE_ANGLE_TO_RT

FILL_GRADIENTSTYLE_ANGLE_TO_RB

FILL_GRADIENTSTYLE_ANGLE_FROM_LT

FILL_GRADIENTSTYLE_ANGLE_FROM_LB

FILL_GRADIENTSTYLE_ANGLE_FROM_RT

FILL_GRADIENTSTYLE_ANGLE_FROM_RB

FILL_GRADIENTSTYLE_RECTANGLE_TO_C

FILL_GRADIENTSTYLE_RECTANGLE_FROM_C

FILL_GRADIENTSTYLE_ELLIPSE_TO_C

FILL_GRADIENTSTYLE_ELLIPSE_FROM_C

FILL_GRADIENTSTYLE_CONE_FROM_L

FILL_GRADIENTSTYLE_CONE_FROM_R

FILL_GRADIENTSTYLE_CONE_FROM_T

FILL_GRADIENTSTYLE_CONE_FROM_B

FILL_GRADIENTSTYLE_CONE_FROM_LT

FILL_GRADIENTSTYLE_CONE_FROM_LB

FILL_GRADIENTSTYLE_CONE_FROM_RT

FILL_GRADIENTSTYLE_CONE_FROM_RB

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


GradientStyle property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ShapeGradientStyle GradientStyle
Overview	Refer to Painting a Shape
Remarks

Gets or sets the shape's background gradient type when the BackgroundStyle property is SHAPE_BACKSTYLE_GRADIENT. Possible values are:

SHAPE_GRADIENT_STYLE_NONE

SHAPE_GRADIENT_STYLE_LINE_L_TO_R(Default)

SHAPE_GRADIENT_STYLE_LINE_R_TO_L

SHAPE_GRADIENT_STYLE_LINE_T_TO_B

SHAPE_GRADIENT_STYLE_LINE_B_TO_T

SHAPE_GRADIENT_STYLE_LINE_LT_TO_RB

SHAPE_GRADIENT_STYLE_LINE_LB_TO_RT

SHAPE_GRADIENT_STYLE_LINE_RT_TO_LB

SHAPE_GRADIENT_STYLE_LINE_RB_TO_LT

SHAPE_GRADIENT_STYLE_LINE2_L_AND_R_TO_C

SHAPE_GRADIENT_STYLE_LINE2_C_TO_L_AND_R

SHAPE_GRADIENT_STYLE_LINE2_T_AND_B_TO_C

SHAPE_GRADIENT_STYLE_LINE2_C_TO_T_AND_B

SHAPE_GRADIENT_STYLE_LINE2_LT_AND_RB_TO_C

SHAPE_GRADIENT_STYLE_LINE2_C_TO_LT_AND_RB

SHAPE_GRADIENT_STYLE_LINE2_RT_AND_LB_TO_C

SHAPE_GRADIENT_STYLE_LINE2_C_TO_RT_AND_LB

SHAPE_GRADIENT_STYLE_ANGLE_TO_LT

SHAPE_GRADIENT_STYLE_ANGLE_TO_LB

SHAPE_GRADIENT_STYLE_ANGLE_TO_RT

SHAPE_GRADIENT_STYLE_ANGLE_TO_RB

SHAPE_GRADIENT_STYLE_ANGLE_FROM_LT

SHAPE_GRADIENT_STYLE_ANGLE_FROM_LB

SHAPE_GRADIENT_STYLE_ANGLE_FROM_RT

SHAPE_GRADIENT_STYLE_ANGLE_FROM_RB

SHAPE_GRADIENT_STYLE_RECTANGLE_TO_C

SHAPE_GRADIENT_STYLE_RECTANGLE_FROM_C

SHAPE_GRADIENT_STYLE_ELLIPSE_TO_C

SHAPE_GRADIENT_STYLE_ELLIPSE_FROM_C

SHAPE_GRADIENT_STYLE_CONE_FROM_L

SHAPE_GRADIENT_STYLE_CONE_FROM_R

SHAPE_GRADIENT_STYLE_CONE_FROM_T

SHAPE_GRADIENT_STYLE_CONE_FROM_B

SHAPE_GRADIENT_STYLE_CONE_FROM_LT

SHAPE_GRADIENT_STYLE_CONE_FROM_LB

SHAPE_GRADIENT_STYLE_CONE_FROM_RT

SHAPE_GRADIENT_STYLE_CONE_FROM_RB

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


HardnessDistributionType property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	HardnessDistributionType HardnessDistributionType
Overview	Refer to Painting with a Brush
Remarks

Gets or sets a value that indicates how the color will be distributed throughout the brush cross-section. Possible values are:

Value	Meaning
BRUSH_HD_TYPE_0	0
See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


HardnessValue property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long HardnessValue
Overview	Refer to Painting with a Brush
Remarks

Gets or sets a value indicating the hardness of the brush. Valid values are 1 to 100. The larger the value, the harder the brush.

The default is 1.

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


hRgn property (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long hRgn
Overview	Refer to Creating a Region
Remarks

This property is updated with a handle to a region created using one of the following methods:

Border method

Color method

Ellipse method

Polygon method

Rect method

RoundRect method

Surface method

See Also

Elements:	LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


IsSupportLocked method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL IsSupportLocked (short iType);
Overview	Refer to Refer to Unlocking DigitalPaint Features.
Remarks

Indicates whether support is locked for an optional feature, such as LEADTOOLS Document/Medical capabilities.

For information about LEADTOOLS Document/Medical capabilities, contact LEAD.

To unlock a feature, use the UnlockSupport method.

See Also

Elements:	UnlockSupport method, EnableMethodErrors property
Topics:	Low-Level DigitalPaint: Support


iType Parameter For IsSupportLocked
iType

The optional feature to check.

Value	Meaning
L_SUPPORT_BARCODES_1D	Support for reading and writing Linear bar codes. This is available in the LEADTOOLS 1D Module.
L_SUPPORT_BARCODES_PDF_READ	Support for reading PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (read).
L_SUPPORT_BARCODES_PDF_WRITE	Support for writing PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (write).
L_SUPPORT_BARCODES_DATAMATRIX_READ	Support for reading Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (read).
L_SUPPORT_BARCODES_DATAMATRIX_WRITE	Support for writing Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (write).
L_SUPPORT_BITONAL	Support for Scale to Gray and Favor Black processing.
L_SUPPORT_CMW	Support for the CMW file format, which uses Wavelet CMP compression.
L_SUPPORT_DICOM	DICOM file format support, but not the DICOM Communication support.
L_SUPPORT_DOCUMENT	LEADTOOLS Document features . A LEADTOOLS Document license is required
L_SUPPORT_EXTGRAY	Support for 12 bit grayscale, 16-bit grayscale, 48-bit color and 64-bit color image creation and manipulation.
L_SUPPORT_ICR	Support for the ICR Module within the OCR engine. This supports the recognition of handwritten text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_J2K	Unlocks support for JPEG2000 images. The support needs to be unlocked to read and write both types of JPEG 2000 images (JPEG 2000 stream and JP2 files).
L_SUPPORT_LTPRO	Support for advanced image processing functions only available in the Raster Pro and above toolkits.
L_SUPPORT_MEDICAL	Support for the capabilities unlocked by L_SUPPORT_DICOM and L_SUPPORT_EXTGRAY, plus all Medical features.
L_SUPPORT_MEDICAL_NET	Support for everything unlocked by L_SUPPORT_MEDICAL, plus support for the unsecure DICOM Network Communication for Message Exchange.
L_SUPPORT_OCR	Support for the OCR features. (Document/Medical).
L_SUPPORT_OCR_ASIAN	Support for the OCR engine to recognize Asian text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_OCR_PDF_OUTPUT	Support for saving OCR results as a PDF file. This license is in addition to the cost of the OCR Plugin or Document Imaging Suite.
L_SUPPORT_OMR	Support for the OMR Module within the OCR engine. This supports the recognition of check boxes. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_PDF	Support for the PDF, PS and EPS file formats. Available only in the LEADTOOLS PDF Plug in. If this support is locked, the PDF, PS and EPS files will not be loaded or saved.
L_SUPPORT_PDF_SAVE	Support for saving raster images as a PDF file. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_VECTOR	Support for the Vector Features and Vector file formats. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selection.


Return for IsSupportLocked
Return Value

Return	Meaning
TRUE	The optional feature is locked.
FALSE	The optional feature is available in your toolkit.


Italic property (ILTFont Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	VARIANT_BOOL Italic
Overview	Refer to Painting Text
Remarks

Gets or sets a value that indicates whether the font is italicized. Possible values are:

Value	Meaning
TRUE	The font is italicized.
FALSE	The font is not italicized. (Default)
See Also

Elements:	Bold property, Charset property, Name property, Size property, Weight property
Topics:	Low-Level DigitalPaint: Painting Text


LimitHeight property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long LimitHeight
Overview	Refer to Automation Container
Remarks

Gets or sets the height of the of the paint container. Default value is 0. This value is in pixels.

See Also

Elements:	LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property, ScalarDenX property, ScalarDenY property, ScalarNumX property, ScalarNumY property, Enabled property
Topics:	DigitalPaint Automation: Containers


LimitLeft property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long LimitLeft
Overview	Refer to Automation Container
Remarks

Gets or sets the x-coordinate of the top-left point of the paint container. Default value is 0. This value is in pixels.

See Also

Elements:	LimitTop property, LimitWidth property, LimitHeight property, OffsetX property, OffsetY property, ScalarDenX property, ScalarDenY property, ScalarNumX property, ScalarNumY property, Enabled property
Topics:	DigitalPaint Automation: Containers


LimitTop property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long LimitTop
Overview	Refer to Automation Container
Remarks

Gets or sets the y-coordinate of the top-left point of the paint container. Default value is 0. This value is in pixels.

See Also

Elements:	LimitLeft property, LimitWidth property, LimitHeight property, OffsetX property, OffsetY property, ScalarDenX property, ScalarDenY property, ScalarNumX property, ScalarNumY property, Enabled property
Topics:	DigitalPaint Automation: Containers


LimitWidth property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long LimitWidth
Overview	Refer to Automation Container
Remarks

Gets or sets the width of the paint container. Default value is 0. This value is in pixels.

See Also

Elements:	LimitTop property, LimitLeft property, LimitHeight property, OffsetX property, OffsetY property, ScalarDenX property, ScalarDenY property, ScalarNumX property, ScalarNumY property, Enabled property
Topics:	DigitalPaint Automation: Containers


LineTo method (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short LineTo (long nX, long nY);
Overview	Refer to Painting with a Brush
Remarks

Draws a paintbrush stroke from the current position to the specified point.

The current position, which serves as the starting point for this method, is set using the MoveTo method. If MoveTo is not been called before LineTo, the default starting point is (0, 0).

The paintbrush stroke will be drawn using the current values of the ILTBrush interface properties. For more information on the ILTBrush interface properties, refer to:

Density property,

Diameter property,

FadeOutRate property,

HardnessDistributionType property

HardnessValue property

Opacity property

Spacing property

Texture property

TouchBitmap property

TouchColor property

TouchContentsType property

TouchShape property

TouchTransparentColor property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the line will automatically be painted on the control.

If a bitmap has been set using the SetMetrics method, the paintbrush touch will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, MoveTo method, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


nX Parameter For LineTo
nX

Specifies the x-coordinate of the new position.


nY Parameter For LineTo
nY

Specifies the y-coordinate of the new position.


Return for LineTo
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


LowerTolerance property (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR LowerTolerance
Overview	Refer to Creating a Region
Remarks

Gets or sets an OLE_COLOR value that contains the amount of lower variance allowed from the selected color. Valid values are between 0 and 255. The values of R, G and B will be used to check the tolerance.

The default is RBG (0, 0, 0).

See Also

Elements:	hRgn property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


LowerTolerance property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR LowerTolerance
Overview	Refer to Filling an Area
Remarks

Gets or sets the OLE_COLOR value that contains the amount of lower variance allowed from the selected color. Valid values are between 0 and 255.

The default is RGB (0, 0, 0).

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


MoveTo method (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short MoveTo (long nX, long nY);
Overview	Refer to Painting with a Brush
Remarks

Updates the current position of the paintbrush and paints a single brush touch.

The paintbrush touch will be drawn using the current values of the ILTBrush interface properties. For more information on the ILTBrush interface properties, refer to:

Density property,

Diameter property,

FadeOutRate property,

HardnessDistributionType property

HardnessValue property

Opacity property

Spacing property

Texture property

TouchBitmap property

TouchColor property

TouchContentsType property

TouchShape property

TouchTransparentColor property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the paintbrush touch will automatically be painted on the control.

If a bitmap has been set using the SetMetrics method, the paintbrush touch will be drawn on the specified bitmap, as well as the control.

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, LineTo method, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


nX Parameter For MoveTo
nX

Specifies the x-coordinate of the new position.


nY Parameter For MoveTo
nY

Specifies the y-coordinate of the new position.


Return for MoveTo
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Name property (ILTFont Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR Name
Overview	Refer to Painting Text
Remarks

Gets or sets the string that contains font name of the text. For more information about this property, consult LOGFONT in the Microsoft SDK documentation.

The default is "Times New Roman".

See Also

Elements:	Bold property, Charset property, Italic property, Size property, Weight property
Topics:	Low-Level DigitalPaint: Painting Text


OffsetClipRgn method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short OffsetClipRgn (long nX, long nY);
Overview	Refer to Setting a DigitalPaint Clipping Region
Remarks

Offsets the clipping region for clipping the output.

The interface obtained from the Region property can be used to create clipping regions.

See Also

Elements:	SetMetrics method, hRgn property, TranslateRgn method, ScaleRgn method, Region property, SetClipRgn method, GetClipRgn method
Topics:	Low-Level DigitalPaint: Regions


nX Parameter For OffsetClipRgn
nX

The offset in the horizontal direction.


nY Parameter For OffsetClipRgn
nY

The offset in the vertical direction.


Return for OffsetClipRgn
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


OffsetX property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long OffsetX
Overview	Refer to Automation Container
Remarks

Gets or sets the x-coordinate offset for the paint container. Default value is 0.

The user should set the offset every time the window that owns the container is scrolled.  When assigning an external representation to the container, every point (Xa, Ya) in the external representation is transformed by the container to the point (Xc, Yc) by using the following steps:

1.  Add offsets:

Xb = Xa + OffsetX

Yb = Ya + OffsetY

2.  Multiply by scalars:

Xc = (Xb * ScalarNumX) / ScalarDenX

Yc = (Yb * ScalarNumY) / ScalarDenY

The default offset values are OffsetX=0 and OffsetY=0.

See Also

Elements:	OffsetY property, ScalarNumY property, ScalarNumX property, ScalarDenY property, LimitTop property, LimitWidth property, Limitleft property
Topics:	DigitalPaint Automation: Containers


OffsetY property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long OffsetY
Overview	Refer to Automation Container
Remarks

Gets or sets the y-coordinate offset for the paint container. Default value is 0.

The user should set the offset every time the window that owns the container is scrolled.  When assigning an external representation to the container, every point (Xa, Ya) in the external representation is transformed by the container to the point (Xc, Yc) by using the following steps:

1.  Add offsets:

Xb = Xa + OffsetX

Yb = Ya + OffsetY

2.  Multiply by scalars:

Xc = (Xb * ScalarNumX) / ScalarDenX

Yc = (Yb * ScalarNumY) / ScalarDenY

The default offset values are OffsetX=0 and OffsetY=0.

See Also

Elements:	OffsetX property, ScalarNumY property, ScalarNumX property, ScalarDenY property, LimitTop property, LimitWidth property, Limitleft property
Topics:	DigitalPaint Automation: Containers


Opacity property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Opacity
Overview	Refer to Painting with a Brush
Remarks

Gets or sets a value indicating the transparency of the brush touch when combined with the painting canvas. Valid values are between (0-255). A color or an image with an opacity of 255 is transparent. A color or an image with an opacity of 0 is completely opaque (solid).

The default is 0.

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


Opacity property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Opacity
Overview	Refer to Painting a Shape
Remarks

Gets or sets the transparency of the shape when combined with the painting canvas.

Valid values are between (0-255). The default is 0.

A color or an image with opacity of 255 is transparent.

A color or an image with opacity of 0 is completely opaque (solid).

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


Opacity property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Opacity
Overview	Refer to Filling an Area
Remarks

Gets or sets a value indicating the transparency of the fill when combined with the painting canvas. Valid values are 0 to 255. A color or an image with an opacity of 255 is transparent. A color or an image with an opacity of 0 is completely opaque (solid).

The default is 0.

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


Opacity property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Opacity
Overview	Refer to Painting Text
Remarks

Gets or sets a value that indicates the transparency of the text when combined with the painting canvas. Valid values are 0 to 255. A color or an image with nOpacity of 255 is transparent. A color or an image with nOpacity of 0 is completely opaque (solid).

The default is 0.

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


PaintContainer event (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	void PaintContainer (long hWndContainer, short nEventType, short nObjectType, short nState, short nStatus);
Overview	Refer to Handling Container Events
Remarks

Occurs whenever the user uses the paint automation to paint on the window or bitmap.

See Also

Elements:	PaintUserMode property, AutoContainer property.
Topics:	DigitalPaint Automation: Containers


hWndContainer Parameter For PaintContainer
hWndContainer

The handle of the window associated with the container that generated the event. The active paint automation container for this window can be obtained from the AutoContainer property.


nEventType Parameter For PaintContainer
nEventType

The type of event. Possible values are:

Value	Meaning
PAINT_CONTAINER_EVENT_ERROR	An error has occurred.
PAINT_CONTAINER_EVENT_DRAW	An object is being drawn.
If nEventType is PAINT _CONTAINER_EVENT_ERROR, then the nStatus parameter will contain the error code. Otherwise, nStatus contains 0.

If nEventType is PAINT _CONTAINER_EVENT_DRAW, then the nObjectType parameter contains the type of object being drawn and nState will contain the drawing state. Otherwise, nObjectType and nState will both be 0.


nObjectType Parameter For PaintContainer
nObjectType

Type of object being drawn. This parameter is valid only if nEventType is PAINT_CONTAINER_EVENT_DRAW. Possible values are:

Value	Meaning
PAINT_CONTAINER_OBJECT_TYPE_POINT	Point object
PAINT_CONTAINER_OBJECT_TYPE_LINE	Line object
PAINT_CONTAINER_OBJECT_TYPE_SQUARE	Square object
PAINT_CONTAINER_OBJECT_TYPE_RECT	Rectangle object
PAINT_CONTAINER_OBJECT_TYPE_CIRCLE	Circle object
PAINT_CONTAINER_OBJECT_TYPE_ELLIPSE	Ellipse object
PAINT_CONTAINER_OBJECT_TYPE_POLYLINE	Polyline object
PAINT_CONTAINER_OBJECT_TYPE_BEZIER	Bezier object
PAINT_CONTAINER_OBJECT_TYPE_ARC	Arc object
PAINT_CONTAINER_OBJECT_TYPE_TEXT	Text object
Please note that certain Paint Container Objects handle the drawing of more than one type of paint object. For example, the PAINT_CONTAINER_OBJECT_TYPE_ARC will also handle the drawing of pie objects and chord objects.


nState Parameter For PaintContainer
nState

The current drawing state. This parameter is only valid if nEventType is PAINT_CONTAINER_EVENT_DRAW. Possible values are:

Value	Meaning
PAINT_CONTAINER_STATE_BEGIN	The paint container has just started drawing the object.
PAINT_CONTAINER_STATE_PROCESS	The paint container is continuing to draw the object.
PAINT_CONTAINER_STATE_END	The paint container has finished drawing the object.
PAINT_CONTAINER_STATE_ABORT	The paint container aborted the drawing process.


nStatus Parameter For PaintContainer
nStatus

Status of an error event.  When nEventType is PAINT_CONTAINER_EVENT_ERROR, this parameter contains the error code.  Otherwise, this parameter contains 0.


PaintUserMode property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	PaintUserModeConstants PaintUserMode
Overview	Refer to Automation Container
Remarks

Enables or disables paint automation.  Possible Values are:

Value	Meaning
PAINT_USERMODE_MANUAL	Disables paint automation
PAINT_USERMODE_AUTO	Enables paint automation
See Also

Elements:	CreateAutoContainer method, DeleteAutoContainer method, AutoContainer property.
Topics:	DigitalPaint Automation: Containers


PickColor method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short PickColor (long X, long Y);
Overview	Refer to Filling an Area
Remarks

Gets the color at the specified X,Y location.

Calling this will fill the BitmapColor property.

See Also

Elements:	BitmapColor property
Topics:	Low-Level DigitalPaint: Miscellaneous


X Parameter For PickColor
X

X coordinate of a point. The BitmapColor property will be updated with the color at this point.


Y Parameter For PickColor
Y

Y coordinate of a point. The BitmapColor property will be updated with the color at this point.


Return for PickColor
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Polygon method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Polygon (short nFillMode);
Overview	Refer to Creating a Region
Remarks

Creates a polygonal region using the current ILTRegion interface properties and the points described in the PolygonX and PolygonY properties.

The region creation procedure will be carried out using the current values of the ILTRegion interface properties. For more information on the ILTRegion interface properties, refer to:

UpperTolerance property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

hRgn property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the polygonal region will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the polygonal region will be drawn on the specified bitmap, as well as the control.

This function will also use the current painting transformation information when creating the new region. To change or set the painting transformation information, call the UpdateXForm method.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


nFillMode Parameter For Polygon
nFillMode

nFillMode is reserved for future use, pass 0.


Return for Polygon
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


PolygonCount property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long PolygonCount
Overview	Refer to Painting a Shape
Remarks

(RuntimeOnly) Gets or sets the number of items in the PolygonX and PolygonY array properties.

Set this property to allocate enough items in the array for a polygon.

See Also

Elements:	PolygonX property, PolygonY property, Region property, Shape property
Topics:	Low-Level DigitalPaint: Painting Shapes
	Low-Level DigitalPaint: Regions
	Creating a Region


PolygonX property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long PolygonX (long nIndex);
Overview	Refer to Painting a Shape
Remarks

(RuntimeOnly) Gets or sets the X value at the specified index in the array.

The polygon array is used when creating a polygon shape or region.

See Also

Elements:	PolygonCount property, PolygonY property, Region property, Shape property
Topics:	Low-Level DigitalPaint: Painting Shapes
	Low-Level DigitalPaint: Regions
	Creating a Region


nIndex Parameter For PolygonX
nIndex

The index into the ordered array of points.


PolygonY property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long PolygonY (long nIndex);
Overview	Refer to Painting a Shape
Remarks

(RuntimeOnly) Gets or sets the Y value at the specified index in the array.

The polygon array is used when creating a polygon shape or region.

See Also

Elements:	PolygonCount property, PolygonY property, Region property, Shape property
Topics:	Low-Level DigitalPaint: Painting Shapes
	Low-Level DigitalPaint: Regions
	Creating a Region


nIndex Parameter For PolygonY
nIndex

The index into the ordered array of points.


Rect method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Rect (long nLeft, long nTop, long nWidth, long nHeight);
Overview	Refer to Creating a Region
Remarks

Creates a rectangular region using the specified points.

The region creation procedure will be carried out using the current values of the ILTRegion interface properties. For more information on the ILTRegion interface properties, refer to:

UpperTolerance property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

hRgn property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the rectangle region will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the rectangular region will be drawn on the specified bitmap, as well as the control.

This function will also use the current painting transformation information when creating the new region. To change or set the painting transformation information, call the UpdateXForm method.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


nLeft Parameter For Rect
nLeft

Specifies the x-coordinate of the top-left point.


nTop Parameter For Rect
nTop

Specifies the y-coordinate of the top-left point.


nWidth Parameter For Rect
nWidth

Specifies the width of the rectangle, in pixels.


nHeight Parameter For Rect
nHeight

Specifies the height of the rectangle, in pixels.


Return for Rect
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Redo method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Redo (long nFlags);
Overview	Refer to Undoing and Redoing Automation Operations
Remarks

Repeats that last automation operation performed in the active paint automation container.

This method can be called for each process "undone" in the active paint automation container by calling the Undo method. For example, if the Undo method has been called three times, to undo three processes, then calling the Redo method can redo those three processes. The first call to the Redo method will redo the first process; the second call will redo the second process and the third call will redo the third process.

See Also

Elements:	PaintUserMode property, UndoLevel property, CanRedo method, Undo method, CanUndo method.
Topics:	DigitalPaint Automation: Undoing and Redoing Operations


nFlags Parameter For Redo
nFlags

Reserved for future use. Use 0.


Return for Redo
Return Value

Return	Meaning
0	The method was successful.
<>0	An error occurred. Refer to Error Codes.


Region property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ILTRegion Region
Overview	Refer to Setting DigitalPaint Properties
Remarks

(RuntimeOnly, ReadOnly) Gets the current ILTRegion interface.

The values of the properties in the ILTRegion interface represent the current paint region. The values in the Region property can be used to create a clipping region.

See Also

Elements:	UpperTolerance property, hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


RoundRect method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short RoundRect (long nLeft, long nTop, long nWidth, long nHeight);
Overview	Refer to Creating a Region
Remarks

Creates a rounded rectangle region using the specified points.

The region creation procedure will be carried out using the current values of the ILTRegion interface properties. For more information on the ILTRegion interface properties, refer to:

UpperTolerance property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

hRgn property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the rounded rectangle region will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the rectangular region will be drawn on the specified bitmap, as well as the control.

This function will also use the current painting transformation information when creating the new region. To change or set the painting transformation information, call the UpdateXForm method.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


nLeft Parameter For RoundRect
nLeft

Specifies the x-coordinate of the top-left point.


nTop Parameter For RoundRect
nTop

Specifies the y-coordinate of the top-left point.


nWidth Parameter For RoundRect
nWidth

Specifies the width of the rectangle, in pixels.


nHeight Parameter For RoundRect
nHeight

Specifies the height of the rectangle, in pixels.


Return for RoundRect
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


RoundRectEllipseHeight property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long RoundRectEllipseHeight
Overview	Refer to Painting a Shape
Remarks

Gets or sets a value indicating the height, in pixels, of the ellipse used to create a rounded rectangle. Valid values are 0 to 500.

The default is 15.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


RoundRectEllipseHeight property (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long RoundRectEllipseHeight
Overview	Refer to Creating a Region
Remarks

Sets the height, in pixels, of the ellipse used to create a round rectangle region. Valid values are 0 to 500.

The default is 15.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


RoundRectEllipseWidth property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long RoundRectEllipseWidth
Overview	Refer to Painting a Shape
Remarks

Gets or sets a value indicating the width, in pixels, of the ellipse used to create a rounded rectangle. Valid values are 0 to 500.

The default is 15.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


RoundRectEllipseWidth property (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long RoundRectEllipseWidth
Overview	Refer to Creating a Region
Remarks

Sets the width, in pixels, of the ellipse used to create a round rectangle region. Valid values are 0 to 500.

The default is 15.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


ScalarDenX property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	double ScalarDenX
Overview	Refer to Automation Container
Remarks

Gets or sets the denominator of the scaling factors for the x-coordinates. This value will be used to adjust x-coordinates.

When assigning an external representation to the container, every point (Xa, Ya) in the external representation is transformed by the container to the point (Xc, Yc) by using the following steps:

1.  Add offsets:

Xb = Xa + OffsetX

Yb = Ya + OffsetY

2.  Multiply by scalars:

Xc = (Xb * ScalarNumX) / ScalarDenX

Yc = (Yb * ScalarNumY) / ScalarDenY

The default offset values are OffsetX=0 and OffsetY=0.

The default scalar values are:

ScalarNumX = 1

ScalarNumY = 1

ScalarDenX = 1

ScalarDenY = 1

See Also

Elements:	ScalarNumY property, ScalarNumX property, ScalarDenY property, LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property, Enabled property
Topics:	DigitalPaint Automation: Containers


ScalarDenY property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	double ScalarDenY
Overview	Refer to Automation Container
Remarks

Gets or sets the denominator of the scaling factors for the y-coordinates. This value will be used to adjust y-coordinates.

When assigning an external representation to the container, every point (Xa, Ya) in the external representation is transformed by the container to the point (Xc, Yc) by using the following steps:

1.  Add offsets:

Xb = Xa + OffsetX

Yb = Ya + OffsetY

2.  Multiply by scalars:

Xc = (Xb * ScalarNumX) / ScalarDenX

Yc = (Yb * ScalarNumY) / ScalarDenY

The default offset values are OffsetX=0 and OffsetY=0.

The default scalar values are:

ScalarNumX = 1

ScalarNumY = 1

ScalarDenX = 1

ScalarDenY = 1

See Also

Elements:	ScalarNumX property, ScalarNumX property, ScalarDenX property, LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property, Enabled property
Topics:	DigitalPaint Automation: Containers


ScalarNumX property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	double ScalarNumX
Overview	Refer to Automation Container
Remarks

Gets or sets the numerator of the scaling factors for the x-coordinate. This value will be used to adjust x-coordinates.

When assigning an external representation to the container, every point (Xa, Ya) in the external representation is transformed by the container to the point (Xc, Yc) by using the following steps:

1.  Add offsets:

Xb = Xa + OffsetX

Yb = Ya + OffsetY

2.  Multiply by scalars:

Xc = (Xb * ScalarNumX) / ScalarDenX

Yc = (Yb * ScalarNumY) / ScalarDenY

The default offset values are OffsetX=0 and OffsetY=0.

The default scalar values are:

ScalarNumX = 1

ScalarNumY = 1

ScalarDenX = 1

ScalarDenY = 1

See Also

Elements:	ScalarNumY property, ScalarDenX property, ScalarDenY property, LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property, Enabled property
Topics:	DigitalPaint Automation: Containers


ScalarNumY property (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	double ScalarNumY
Overview	Refer to Automation Container
Remarks

Gets or sets the numerator of the scaling factors for the y-coordinates. This value will be used to adjust y-coordinates.

When assigning an external representation to the container, every point (Xa, Ya) in the external representation is transformed by the container to the point (Xc, Yc) by using the following steps:

1.  Add offsets:

Xb = Xa + OffsetX

Yb = Ya + OffsetY

2.  Multiply by scalars:

Xc = (Xb * ScalarNumX) / ScalarDenX

Yc = (Yb * ScalarNumY) / ScalarDenY

The default offset values are OffsetX=0 and OffsetY=0.

The default scalar values are:

ScalarNumX = 1

ScalarNumY = 1

ScalarDenX = 1

ScalarDenY = 1

See Also

Elements:	ScalarNumX property, ScalarDenX property, ScalarDenY property, LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property, Enabled property
Topics:	DigitalPaint Automation: Containers


ScaleRgn method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short ScaleRgn (long nHorz, long nVert, PaintAlignStyle Alignment);
Overview	Refer to Creating a Region
Remarks

Scales a region.

The user is responsible for deleting the resulted region.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


nHorz Parameter For ScaleRgn
nHorz

Horizontal scale factor. Valid values are between 1 and 10000. For example

Value	Meaning
100	The same dimensions.
110	1.1 times the original dimensions
120	1.2 times the original dimensions.
10000	100 times larger than the original dimensions.
99	0.99 times the original dimensions.
98	0.98 times the original dimensions.
1	0.01 times the original dimensions.


nVert Parameter For ScaleRgn
nVert

Vertical scale factor. Valid values are between 1 and 10000. For example

Value	Meaning
100	The same dimensions.
110	1.1 times the original dimensions
120	1.2 times the original dimensions.
10000	100 times larger than the original dimensions.
99	0.99 times the original dimensions.
98	0.98 times the original dimensions.
1	0.01 times the original dimensions.


Alignment Parameter For ScaleRgn
Alignment

A value that determines how the scaled region will be aligned with respect to the original region.


Return for ScaleRgn
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


SetActive method (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short SetActive ();
Overview	Refer to Automation Container
Remarks

Sets this container as the active paint container.

See Also

Elements:	UpdateBitmap method, ScalarNumY property, ScalarNumX property, ScalarDenY property, LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property, Enabled property
Topics:	DigitalPaint Automation: Containers


Return for SetActive
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


SetClipRgn method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short SetClipRgn (long hRgn);
Overview	Refer to Setting a DigitalPaint Clipping Region
Remarks

Sets the current clipping region for the output.

The interface obtained from the Region property can be used to create clipping regions.

The toolkit will use the region as it is, without doing any transformations.

See Also

Elements:	SetMetrics method, hRgn property, TranslateRgn method, ScaleRgn method, Region property, SetClipRgn method, OffsetClipRgn method
Topics:	Low-Level DigitalPaint: Regions


hRgn Parameter For SetClipRgn
hRgn

Windows region handle for the clipping region.


Return for SetClipRgn
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


SetMetrics method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short SetMetrics (long hWnd, long Bitmap);
Overview	Refer to Setting the General DigitalPaint Information
Remarks

Sets general painting information for the toolkit. This method attaches the DigitalPaint Control to a Main Control. It should be called anytime the bitmap changes or the size of the Main Control changes.

If this method is called with hWnd set to the window handle of the Main OCX Control, then the results of any painting operations will automatically be visible in the control. Otherwise, the user must force a repaint to see the results.

If a valid bitmap handle is passed to this method, painting will be done to the specified bitmap.

See Also

Elements:	UpdateXForm method
Topics:	Low-Level DigitalPaint: Miscellaneous


hWnd Parameter For SetMetrics
hWnd

Window handle of the Main Control.


Bitmap Parameter For SetMetrics
Bitmap

Handle to the bitmap on which painting will occur.


Return for SetMetrics
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Shape property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ILTShape Shape
Overview	Refer to Setting DigitalPaint Properties
Remarks

(RuntimeOnly, ReadOnly) Gets the current ILTShape interface.

The values of the properties in the ILTShape interface represent the current paint shape.

See Also

Elements:	BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, BorderEndCap property, BorderStyle property, BorderWidth property, BorderBrushStyle property, BorderColor property, BorderTileBitmap property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property, Texture property
Topics:	Low-Level DigitalPaint: Painting Shapes


ShowBrushDlg method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short ShowBrushDlg (long hWnd);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Brings up the paintbrush properties dialog box.

The values entered through this dialog will update the following properties:

DlgDensity property

DlgDiameter property

DlgFadeOut property

DlgHardnessValue property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgSpacing property

DlgTouchColor property

DlgTouchContentsType property

DlgTouchImage property

DlgTouchImageCount property

DlgTouchImageIndex property

When this method returns, these updated properties can be used to update the ILTBrush interface properties of the Brush property.

See Also

Elements:	Brush property, DlgTitle property, DlgFlags property, ShowShapeDlg method, ShowRegionDlg method, ShowFillDlg method, ShowTextDlg method, DlgTouchContentsType property, DlgTouchColor property, DlgFadeOut property, DlgOpacity property, DlgDensity property, DlgSpacing property, DlgHardnessValue property, DlgDiameter property, DlgTouchImageIndex property, DlgTouchImage property, DlgTouchImageCount property, DlgPaperTextureIndex property, DlgPaperTexture property, DlgPaperTextureCount property
Topics:	Low-Level DigitalPaint: Dialogs


hWnd Parameter For ShowBrushDlg
hWnd

Handle to the parent of the dialog box.


Return for ShowBrushDlg
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


ShowFillDlg method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short ShowFillDlg (long hWnd);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Brings up the fill properties dialog box.

The values entered through this dialog will update the following properties:

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBackgroundTileBitmapIndex property

DlgFillGradientStyle property

DlgFillStyle property

DlgGradientEndColor property

DlgGradientStartColor property

DlgGradientSteps property

DlgLowerTolerance property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgRoundRectEllipseHeight property

DlgRoundRectEllipseWidth property

DlgShapeGradientStyle property

DlgSolidFillColor property

DlgUpperTolerance property

The values entered through this dialog can be used to update the ILTFill interface properties of the Fill property.

See Also

Elements:	Fill property, DlgTitle property, DlgFlags property, ShowBrushDlg method, ShowShapeDlg method, ShowRegionDlg method, ShowTextDlg method, DlgUpperTolerance property, DlgLowerTolerance property, DlgFillStyle property, DlgSolidFillColor property, DlgFillGradientStyle property
Topics:	Low-Level DigitalPaint: Dialogs


hWnd Parameter For ShowFillDlg
hWnd

Handle to the parent of the dialog box.


Return for ShowFillDlg
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


ShowRegionDlg method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short ShowRegionDlg (long hWnd);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Brings up the region properties dialog box.

The values entered through this dialog will update the following properties:

DlgLowerTolerance property

DlgRoundRectEllipseHeight property

DlgRoundRectEllipseWidth property

DlgUpperTolerance property

The values entered through this dialog can be used to update the ILTRegion interface properties of the Region property.

See Also

Elements:	Region property, DlgTitle property, DlgFlags property, ShowBrushDlg method, ShowShapeDlg method, ShowFillDlg method, ShowTextDlg method, DlgRoundRectEllipseWidth property, DlgRoundRectEllipseHeight property, DlgUpperTolerance property, DlgLowerTolerance property
Topics:	Low-Level DigitalPaint: Dialogs


hWnd Parameter For ShowRegionDlg
hWnd

Handle to the parent of the dialog box.


Return for ShowRegionDlg
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


ShowShapeDlg method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short ShowShapeDlg (long hWnd);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Brings up the shape properties dialog box.

The values entered through this dialog will update the following properties:

DlgBackgroundColor property

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBackgroundTileBitmapIndex property

DlgBorderColor property

DlgBorderEndCap property

DlgBorderStyle property

DlgBorderTileBitmap property

DlgBorderTileBitmapCount property

DlgBorderTileBitmapIndex property

DlgBorderWidth property

DlgGradientEndColor property

DlgGradientStartColor property

DlgGradientSteps property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureIndex property

DlgRoundRectEllipseHeight property

DlgRoundRectEllipseWidth property

DlgShapeBackgroundStyle property

DlgShapeBorderBrushStyle property

DlgShapeGradientStyle property

The values entered through this dialog can be used to update the ILTShape interface properties of the Shape property.

See Also

Elements:	Shape property, DlgTitle property, DlgFlags property, ShowBrushDlg method, ShowRegionDlg method, ShowFillDlg method, ShowTextDlg method, DlgShapeBackgroundStyle property, DlgBackgroundColor property, DlgBackgroundTileBitmap property, DlgBackgroundTileBitmapCount property, DlgBackgroundTileBitmapIndex property, DlgBorderStyle property, DlgBorderWidth property, DlgShapeBorderBrushStyle property, DlgBorderColor property, DlgBorderTileBitmap property, DlgBorderTileBitmapCount property, DlgBorderTileBitmapIndex property, DlgShapeGradientStyle property, DlgGradientStartColor property, DlgGradientEndColor property, DlgGradientSteps property, DlgBorderEndCap property
Topics:	Low-Level DigitalPaint: Dialogs


hWnd Parameter For ShowShapeDlg
hWnd

Handle to the parent of the dialog box.


Return for ShowShapeDlg
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


ShowTextDlg method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short ShowTextDlg (long hWnd);
Overview	Refer to Using the DigitalPaint Common Dialogs
Remarks

Brings up the text properties dialog box.

The values entered through this dialog will update the following properties:

DlgAlignment property

DlgBackgroundColor property

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBackgroundTileBitmapIndex property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgTextBackgroundStyle property

DlgTextBorderBrushStyle property

DlgTextString property

DlgTransformRotate property

DlgTransformScaleX property

DlgTransformScaleY property

The values entered through this dialog can be used to update the ILTText properties of the Text property.

See Also

Elements:	Text property, DlgTitle property, DlgFlags property, ShowBrushDlg method, ShowShapeDlg method, ShowRegionDlg method, ShowFillDlg method, DlgTextString property, DlgTextFont property, DlgTextBorderBrushStyle property, DlgTextBackgroundStyle property, DlgTransformRotate property, DlgTransformScaleX property, DlgTransformScaleY property
Topics:	Low-Level DigitalPaint: Dialogs


hWnd Parameter For ShowTextDlg
hWnd

Handle to the parent of the dialog box.


Return for ShowTextDlg
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Size property (ILTFont Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Size
Overview	Refer to Painting Text
Remarks

Gets or sets the font size of the text. This value is in points. For more information about this property, consult your SDK documentation.

See Also

Elements:	Bold property, Charset property, Italic property, Name property, Weight property
Topics:	Low-Level DigitalPaint: Painting Text


SolidFillColor property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR SolidFillColor
Overview	Refer to Filling an Area
Remarks

Gets or sets the COLORREF value that specifies the color to use when the fill Style property is FILL_FILLSTYLE_SOLID.

The default is RGB (255, 255, 255).

See Also

Elements:	Style property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


Spacing property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Spacing
Overview	Refer to Painting with a Brush
Remarks

Gets or sets a value indicating the spacing of the discrete drops of the paintbrush, or how frequently the brush tip touches the painting surface during a stroke. When the spacing is 30, this means that the brush tip will touch the painting surface once every 30 pixels. Valid values are between (1-1000).

The default is 1.

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


String property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BSTR String
Overview	Refer to Painting Text
Remarks

Gets or sets the text string to be painted.

The default is "LEADTOOLS".

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


Style property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	PaintFillStyle Style
Overview	Refer to Filling an Area
Remarks

Gets or sets the fill style. Possible values are:

Value	Meaning
FILL_FILLSTYLE_SOLID	Solid (Default)
FILL_FILLSTYLE_GRADIENT	Gradient
FILL_FILLSTYLE_TILEDIMAGE	Pattern
See Also

Elements:	SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


Surface method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Surface (long nX, long nY);
Overview	Refer to Creating a Region
Remarks

Creates a region, starting at a specified point and continuing in all directions, that contains a specific color.

The region creation procedure will be carried out using the current values of the ILTRegion interface properties. For more information on the ILTRegion interface properties, refer to:

UpperTolerance property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

hRgn property

If the SetMetrics method is called with hWnd set to the window handle of the Main OCX Control, then the region will automatically be painted on the control. Otherwise, the user will have to force a repaint.

If a bitmap has been set using the SetMetrics method, the polygonal region will be drawn on the specified bitmap, as well as the control.

This function will also use the current painting transformation information when creating the new region. To change or set the painting transformation information, call the UpdateXForm method.

The images below show the region created by clicking in the red area.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


nX Parameter For Surface
nX

Specifies the x-coordinate of the starting point used to create the region. The color located at this point will specify the surface color.


nY Parameter For Surface
nY

Specifies the y-coordinate of the starting point used to create the region. The color located at this point will specify the surface color.


Return for Surface
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Surface method (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Surface (long nX, long nY);
Overview	Refer to Filling an Area
Remarks

Fills an area, starting at a specified point and continuing in all directions, that contains a specific color and some tolerance.

The filling procedure will be carried out using the current values of the ILTFill interface. For more information on the ILTFill interface properties, refer to:

BackgroundTileBitmap property

GradientEndColor property

GradientStartColor property

GradientSteps property

GradientStyle property

LowerTolerance property

Opacity property

SolidFillColor property

Style property

Texture property

UpperTolerance property

The UpperTolerance and LowerTolerance properties can be set for the color of the pixel specified in nX and nY. For example, if the pixel at nX, nY has an RGB value of 40, 40 , 200, and the LowerTolerance and UpperTolerance properties are 10, 10, 10, and 5, 5, 5, respectively, then this method will recognize colors from 30, 30, 190 to 45, 45, 205 as part of the surface to fill.

The images below show an example of the results of calling the Surface method.

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Texture property, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


nX Parameter For Surface
nX

Specifies the x-coordinate of the starting point used to fill the surface.


nY Parameter For Surface
nY

Specifies the y-coordinate of the starting point used to fill the surface.


Return for Surface
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Text property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	ILTText Text
Overview	Refer to Setting DigitalPaint Properties
Remarks

(RuntimeOnly, ReadOnly) Gets the current ILTText interface.

The values of the properties in the ILTText interface represent the current settings for painting text.

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


Texture property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Texture
Overview	Refer to Painting with a Brush
Remarks

Gets or sets the bitmap handle that references the bitmap used to simulate paper texture. This makes it appears as if the painting is done on paper having that texture. The bitmap handle should still be valid after setting this property.

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


Texture property (ILTShape Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Texture
Overview	Refer to Painting a Shape
Remarks

Gets or sets the bitmap handle referencing the bitmap used to This makes it appear as if the painting is done on paper having that texture. The bitmap handle should still be valid after setting this property.

See Also

Elements:	BackgroundColor property, BackgroundStyle property, BackgroundTileBitmap property, BorderColor property, BorderEndCap property, BorderStyle property, BorderTileBitmap property, BorderWidth property, BorderBrushStyle property, DrawEllipse method, DrawLine method, DrawPolyBezier method, DrawPolygon method, DrawRect method, DrawRoundRect method, GradientEndColor property, GradientStartColor property, GradientSteps property, GradientStyle property, Opacity property, RoundRectEllipseHeight property, RoundRectEllipseWidth property
Topics:	Low-Level DigitalPaint: Painting Shapes


Texture property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Texture
Overview	Refer to Filling an Area
Remarks

Gets or sets the bitmap handle referencing the bitmap that will simulate paper texture. This gives the appearance of painting on paper having that texture. The BITMAPHANDLE pointer, should still be valid after setting this property.

The default is 0.

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, UpperTolerance property, LowerTolerance property, Opacity property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


Texture property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Texture
Overview	Refer to Painting Text
Remarks

Gets or sets the bitmap handle referencing the bitmap that will simulate paper texture. Using a paper texture gives the appearance of painting on paper having that texture. The bitmap handle should still be valid after setting this property.

The default is 0.

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, String property, TransformRotate property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


ToolbarControl property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	LPDISPATCH ToolbarControl
Overview	Refer to The Automation Toolbar
Remarks

Gets or sets the associated LEADTOOLS Toolbar Control.

For more information about the LEADTOOLS Toolbar Control, refer to the Lttbdlln.hlp help file in the LEAD\Help directory.

See Also

Elements:	PaintUserMode property
Topics:	DigitalPaint Automation: Toolbar


TouchBitmap property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long TouchBitmap
Overview	Refer to Painting with a Brush
Remarks

Gets or sets the bitmap handle that references the bitmap that contains the paintbrush image when the TouchContentsType property is BRUSH_TOUCH_CONTENTS_IMAGE. The bitmap handle should still be valid after setting this property.

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchTransparentColor property, TouchContentsType property, TouchShape property, TouchColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


TouchColor property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR TouchColor
Overview	Refer to Painting with a Brush
Remarks

Gets or sets the COLORREF value that specifies the color to use for the paintbrush when the TouchContentsType property is BRUSH_TOUCH_CONTENTS_COLOR.

The default is RGB (0, 0, 0).

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


TouchContentsType property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BrushTouchContentsType TouchContentsType
Overview	Refer to Painting with a Brush
Remarks

Represents the contents of the paintbrush. Possible values are:

Value	Meaning
BRUSH_TOUCH_CONTENTS_COLOR	Color (Default)
BRUSH_TOUCH_CONTENTS_IMAGE	Image
See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchContentsType property, TouchShape property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


TouchShape property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	BrushTouchShape TouchShape
Overview	Refer to Painting with a Brush
Remarks

Controls the shape of the cross-section (tip) of the brush Possible values are:

Value	Meaning
BRUSH_TOUCH_SHAPE_CIRCLE	Circle
See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchColor property, TouchContentsType property, TouchTransparentColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


TouchTransparentColor property (ILTBrush Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR TouchTransparentColor
Overview	Refer to Painting with a Brush
Remarks

Gets or sets the OLE_COLOR value that specifies the transparent color of the paintbrush image.

The default is RGB (255, 255, 255).

See Also

Elements:	Density property, Diameter property, FadeOutRate property, HardnessDistributionType property, HardnessValue property, Opacity property, Spacing property, Texture property, TouchBitmap property, TouchContentsType property, TouchShape property, TouchColor property
Topics:	Low-Level DigitalPaint: Paint with a Brush


TransformRotate property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long TransformRotate
Overview	Refer to Painting Text
Remarks

Gets or sets the rotation angle for the text. The angle is in degrees, counter-clockwise.

The default is 0.

See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformScaleX property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


TransformScaleX property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long TransformScaleX
Overview	Refer to Painting Text
Remarks

Gets or sets the scaling factor value of the text in the horizontal direction. For example:

Value	Meaning
100	means the same dimensions. (Default)
110	means 1.1 times the original dimensions.
120	means 1.2 times the original dimensions.
10000	means 100 times larger than the original dimensions.
99	means 0.99 times the original dimensions.
98	means 0.98 times the original dimensions.
1	means 0.01 times the original dimensions.
See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleY property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


TransformScaleY property (ILTText Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long TransformScaleY
Overview	Refer to Painting Text
Remarks

Gets or sets the scaling factor value of the text in the vertical direction. For example:

Value	Meaning
100	means the same dimensions. (Default)
110	means 1.1 times the original dimensions.
120	means 1.2 times the original dimensions.
10000	means 100 times larger than the original dimensions.
99	means 0.99 times the original dimensions.
98	means 0.98 times the original dimensions.
1	means 0.01 times the original dimensions.
See Also

Elements:	BorderBrushStyle property, BorderWidth property, BorderColor property, BackgroundStyle property, BackgroundColor property, BackgroundTileBitmap property, Alignment property, Opacity property, Texture property, String property, TransformRotate property, TransformScaleX property, Apply method
Topics:	Low-Level DigitalPaint: Painting Text


TranslateRgn method (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short TranslateRgn (long nX, long nY);
Overview	Refer to Creating a Region
Remarks

Translate (offsets) a region.

The values for nX and nY will be used "as is". No transformation will be performed on these values.

The user is responsible for deleting the resulting region.

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, UpperTolerance property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method
Topics:	Low-Level DigitalPaint: Regions


nX Parameter For TranslateRgn
nX

X-coordinate of the offset.


nY Parameter For TranslateRgn
nY

Y-coordinate of the offset.


Return for TranslateRgn
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


Undo method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short Undo (long nFlags);
Overview	Refer to Undoing and Redoing Automation Operations
Remarks

Undoes the last automation operation performed in the active paint automation container.

The number of automation operations that can be undone is contained in the UndoLevel property.

To determine whether an automation operation can be undone, call the CanUndo method.

The Undo method must be called at least once in order to perform a "redo" using the Redo method.

See Also

Elements:	PaintUserMode property, UndoLevel property, CanRedo method, CanUndo method, Redo method.
Topics:	DigitalPaint Automation: Undoing and Redoing Operations


nFlags Parameter For Undo
nFlags

Reserved for future use.  Use 0.


Return for Undo
Return Value

Return	Meaning
0	The method was successful.
<>0	An error occurred. Refer to Error Codes.


UndoLevel property (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long UndoLevel
Overview	Refer to Undoing and Redoing Automation Operations
Remarks

(RuntimeOnly) Gets or sets the undo level for the paint automation container.

The undo level determines the number of automation operations that can be done within a paint automation container.

The default value is 5.

The value set in this property applies to each container created for a single control.

See Also

Elements:	PaintUserMode property, BackColor property
Topics:	DigitalPaint Automation: Undoing and Redoing Operations


UnlockSupport method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short UnlockSupport (short iType, BSTR pszKey);
Overview	Refer to Unlocking DigitalPaint Features.
Remarks

Unlocks support for an optional feature, such as LEADTOOLS Document/Medical capabilities.

For information about LEADTOOLS Document/Medical capabilities, contact LEAD.

Note:	UnlockSupport can be replaced by entering the appropriate keys in LTOCX14.LIC. Edit the LTOCX14.LIC file and append at the end of a line, and on the same line, one or more pairs in the form |L_SUPPORT_xxx=key. The keys that can be specified are:
L_SUPPORT_BARCODES_1D
L_SUPPORT_BARCODES_PDF_READ
L_SUPPORT_BARCODES_PDF_WRITE
L_SUPPORT_BARCODES_DATAMATRIX_READ
L_SUPPORT_BARCODES_DATAMATRIX_WRITE
L_SUPPORT_BITONAL
L_SUPPORT_CMW
L_SUPPORT_DICOM
L_SUPPORT_DOCUMENT
L_SUPPORT_EXTGRAY
L_SUPPORT_J2K
L_SUPPORT_MEDICAL
L_SUPPORT_MEDICAL_NET
L_SUPPORT_OCR
L_SUPPORT_VECTOR
L_SUPPORT_LTPRO

For example, if you wanted to unlock DOCUMENT and OCR support, you would include the following at the end of a line:

|L_SUPPORT_DOCUMENT=dockey|L_SUPPORT_OCR=ocrkey

See Also

Elements:	EnableMethodErrors method, IsSupportLocked method
Topics:	Low-Level DigitalPaint: Support


iType Parameter For UnlockSupport
iType

The optional feature to unlock.

Value	Meaning
L_SUPPORT_BARCODES_1D	Support for reading and writing Linear bar codes. This is available in the LEADTOOLS 1D Module.
L_SUPPORT_BARCODES_PDF_READ	Support for reading PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (read).
L_SUPPORT_BARCODES_PDF_WRITE	Support for writing PDF bar codes. This is available in the LEADTOOLS 2D PDF Module (write).
L_SUPPORT_BARCODES_DATAMATRIX_READ	Support for reading Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (read).
L_SUPPORT_BARCODES_DATAMATRIX_WRITE	Support for writing Data Matrix bar codes. This is available in the LEADTOOLS 2D Data Matrix Module (write).
L_SUPPORT_BITONAL	Support for Scale to Gray and Favor Black processing.
L_SUPPORT_CMW	Support for the CMW file format, which uses Wavelet CMP compression.
L_SUPPORT_DICOM	DICOM file format support, but not the DICOM Communication support.
L_SUPPORT_DOCUMENT	LEADTOOLS Document features . A LEADTOOLS Document license is required
L_SUPPORT_EXTGRAY	Support for 12 bit grayscale, 16-bit grayscale, 48-bit color and 64-bit color image creation and manipulation.
L_SUPPORT_ICR	Support for the ICR Module within the OCR engine. This supports the recognition of handwritten text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_J2K	Unlocks support for JPEG2000 images. The support needs to be unlocked to read and write both types of JPEG 2000 images (JPEG 2000 stream and JP2 files).
L_SUPPORT_LTPRO	Support for advanced image processing functions only available in the Raster Pro and above toolkits.
L_SUPPORT_MEDICAL	Support for the capabilities unlocked by L_SUPPORT_DICOM and L_SUPPORT_EXTGRAY, plus all Medical features.
L_SUPPORT_MEDICAL_NET	Support for everything unlocked by L_SUPPORT_MEDICAL, plus support for the unsecure DICOM Network Communication for Message Exchange.
L_SUPPORT_OCR	Support for the OCR features. (Document/Medical).
L_SUPPORT_OCR_ASIAN	Support for the OCR engine to recognize Asian text. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_OCR_PDF_OUTPUT	Support for saving OCR results as a PDF file. This license is in addition to the cost of the OCR Plugin or Document Imaging Suite.
L_SUPPORT_OMR	Support for the OMR Module within the OCR engine. This supports the recognition of check boxes. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_PDF	Support for the PDF, PS and EPS file formats. Available only in the LEADTOOLS PDF Plug in. If this support is locked, the PDF, PS and EPS files will not be loaded or saved.
L_SUPPORT_PDF_SAVE	Support for saving raster images as a PDF file. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.
L_SUPPORT_VECTOR	Support for the Vector Features and Vector file formats. Available only in selected LEADTOOLS products. For a list of products, refer to Topic Selection.


pszKey Parameter For UnlockSupport
pszKey

The key to unlock the feature.


Return for UnlockSupport
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


UpdateBitmap method (ILTPaintContainer Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short UpdateBitmap(long Bitmap);
Overview	Refer to Automation Container
Remarks

This method notifies the paint container object that the associated bitmap has been changed (flipped, resized, color resolution changed, etc.), and updates the paint container. This is most important if the size of the bitmap or the bits per pixel of the bitmap has changed.

See Also

Elements:	SetActive method, ScalarNumY property, ScalarNumX property, ScalarDenY property, LimitTop property, LimitWidth property, Limitleft property, OffsetX property, OffsetY property, Enabled property
Topics:	DigitalPaint Automation: Containers


Bitmap Parameter For UpdateBitmap
Bitmap

Handle to the bitmap, associated with the paint container, which has been changed. The paint container will be updated based on the bitmap referenced by this handle.


Return for UpdateBitmap
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


UpdateXForm method (DigitalPaint Control)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	short UpdateXForm (long nZoom, long nXOffset, long nYOffset);
Overview	Refer to Setting the General DigitalPaint Information
Remarks

Sets the transformation information for the control.

The toolkit will transform all input and output coordinates, using the values set by this method, unless otherwise stated.

This method should be called anytime the bitmap is scrolled, zoomed, or the window size changed.

See Also

Elements:	SetMetrics method
Topics:	Low-Level DigitalPaint: Miscellaneous


nZoom Parameter For UpdateXForm
nZoom

The zooming factor that will be used by the toolkit to scale the user input. Valid values are between 1 and 10000. A value of 100 means the size remains the same. A value of 110 means 1.1 times the original dimensions; a value of 120 means 1.2 times the original dimensions and a value of 10000 means 100 times the original dimensions. Values below 100 decrease the original dimensions. A value of 99 means 0.99 times the original dimensions; a value of 98 means 0.98 times the original dimensions, on down to a value of 1, which means 0.01 times the original dimensions.


nXOffset Parameter For UpdateXForm
nXOffset

X offset of the display. The amount scrolled.


nYOffset Parameter For UpdateXForm
nYOffset

Y offset of the display. The amount scrolled.


Return for UpdateXForm
Return Value

Return	Meaning
0	The function was successful.
<>0	An error occurred. Refer to Error Codes.


UpperTolerance property (ILTRegion Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR UpperTolerance
Overview	Refer to Creating a Region
Remarks

Gets or sets an OLE_COLOR value that contains the amount of upper variance allowed from the selected color. Valid values are between 0 and 255. The values of R, G and B will be used to check the tolerance.

The default is RBG (0, 0, 0).

See Also

Elements:	hRgn property, LowerTolerance property, RoundRectEllipseWidth property, RoundRectEllipseHeight property, Border method, Color method, Ellipse method, Polygon method, Rect method, RoundRect method, ScaleRgn method, Surface method, TranslateRgn method
Topics:	Low-Level DigitalPaint: Regions


UpperTolerance property (ILTFill Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	OLE_COLOR UpperTolerance
Overview	Refer to Filling an Area
Remarks

Gets or sets the OLE_COLOR value that contains the amount of upper variance allowed from the selected color. Valid values are between 0 and 255.

The default is RGB (0, 0, 0).

See Also

Elements:	Style property, SolidFillColor property, BackgroundTileBitmap property, GradientStyle property, GradientStartColor property, GradientEndColor property, GradientSteps property, LowerTolerance property, Opacity property, Texture property, Surface method, Border method, ColorReplace method
Topics:	Low-Level DigitalPaint: Filling an Area


Weight property (ILTFont Interface)

Visual Basic Example	Visual C++ 5.0 Example
Syntax	long Weight
Overview	Refer to Painting Text
Remarks

Gets or sets the font weight (thickness) of the text. For more information about this property, consult your SDK documentation.

The default is FW_NORMAL.

See Also

Elements:	Bold property, Charset property, Italic property, Name property, Size property
Topics:	Low-Level DigitalPaint: Painting Text


DigitalPaint Properties, methods, and events

Low-Level Painting

Low-Level DigitalPaint: Dialogs

Low-Level DigitalPaint: Filling an Area

Low-Level DigitalPaint: Paint with a Brush

Low-Level DigitalPaint: Regions

Low-Level DigitalPaint: Painting Shapes

Low-Level DigitalPaint: Painting Text

Low-Level DigitalPaint: Miscellaneous

Low-Level DigitalPaint: Support

Automated Painting

DigitalPaint Automation: Containers

DigitalPaint Automation: Toolbar

DigitalPaint Automation: Printing

DigitalPaint Automation: Editing a Container

DigitalPaint Automation: Undoing and Redoing Operations


Low-Level DigitalPaint: Dialogs

Brush Dialog

DlgAlignment property

DlgDensity property

DlgDiameter property

DlgFadeOut property

DlgFlags property

DlgHardnessValue property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgSpacing property

DlgTitle property

DlgTouchColor property

DlgTouchContentsType property

DlgTouchImage property

DlgTouchImageCount property

DlgTouchImageIndex property

DlgTouchTransparentColor property

ShowBrushDlg method

Fill Dialog

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBackgroundTileBitmapIndex property

DlgFillGradientStyle property

DlgFillStyle property

DlgFlags property

DlgGradientEndColor property

DlgGradientStartColor property

DlgGradientSteps property

DlgLowerTolerance property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgSolidFillColor property

DlgTitle property

DlgUpperTolerance property

ShowFillDlg method

Region Dialog

DlgFlags property

DlgTitle property

DlgLowerTolerance property

DlgRoundRectEllipseHeight property

DlgRoundRectEllipseWidth property

DlgUpperTolerance property

ShowRegionDlg method

Shape Dialog

DlgBackgroundColor property

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBackgroundTileBitmapIndex property

DlgBorderColor property

DlgBorderEndCap property

DlgBorderStyle property

DlgBorderTileBitmap property

DlgBorderTileBitmapCount property

DlgBorderTileBitmapIndex property

DlgBorderWidth property

DlgFlags property

DlgGradientEndColor property

DlgGradientStartColor property

DlgGradientSteps property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgRoundRectEllipseHeight property

DlgRoundRectEllipseWidth property

DlgShapeBackgroundStyle property

DlgShapeBorderBrushStyle property

DlgShapeGradientStyle property

DlgTitle property

ShowShapeDlg method

Text Dialog

DlgBackgroundColor property

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBorderColor property

DlgBorderWidth property

DlgBackgroundTileBitmapIndex property

DlgFlags property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgTextBackgroundStyle property

DlgTextBorderBrushStyle property

DlgTextFont property

DlgTextString property

DlgTransformRotate property

DlgTransformScaleX property

DlgTransformScaleY property

DlgTitle property

ShowTextDlg method


Low-Level DigitalPaint: Filling an Area

BackgroundTileBitmap property

Border method

ColorReplace method

Fill property

GradientEndColor property

GradientStartColor property

GradientSteps property

GradientStyle property

LowerTolerance property

Opacity property

SolidFillColor property

Style property

Surface method

Texture property

UpperTolerance property


Low-Level DigitalPaint: Painting with a brush

Brush property

Density property

Diameter property

FadeOutRate property

HardnessDistributionType property

HardnessValue property

LineTo method

MoveTo method

Opacity property

Spacing property

Texture property

TouchBitmap property

TouchColor property

TouchContentsType property

TouchTransparentColor property

TouchShape property


Low-Level DigitalPaint: Region
Low-Level DigitalPaint: Regions

Painting a region

Border method

Color method

Ellipse method

hRgn property

LowerTolerance property

Polygon method

PolygonCount property

PolygonX property

PolygonY property

Rect method

Region property

RoundRect method

RoundRectEllipseWidth property

RoundRectEllipseHeight property

ScaleRgn method

Surface method

TranslateRgn method

UpperTolerance property

Working with clipping regions

GetClipRgn method

OffsetClipRgn method

SetClipRgn method


Low-Level DigitalPaint: Painting shapes

BackgroundColor property

BackgroundStyle property

BackgroundTileBitmap property

BorderBrushStyle property

BorderColor property

BorderEndCap property

BorderStyle property

BorderTileBitmap property

BorderWidth property

DrawEllipse method

DrawLine method

DrawPolyBezier method

DrawPolygon method

DrawRect method

DrawRoundRect method

GradientEndColor property

GradientStartColor property

GradientSteps property

GradientStyle property

PolygonCount property

PolygonX property

PolygonY property

RoundRectEllipseHeight property

RoundRectEllipseWidth property

Opacity property

Texture property

Shape property


Low-Level DigitalPaint: Painting text

Alignment property

Apply method

BackgroundColor property

BackgroundStyle property

BackgroundTileBitmap property

Bold property

BorderBrushStyle property

BorderColor property

BorderWidth property

Charset property

Italic property

Name property

Opacity property

Size property

String property

Text property

Texture property

TransformRotate property

TransformScaleX property

TransformScaleY property

Weight property


Low-Level DigitalPaint: Miscellaneous

BitmapColor property

PickColor method

SetMetrics method

UpdateXForm method


Low-Level DigitalPaint: Support

EnableMethodErrors property

IsSupportLocked method

UnlockSupport method


DigitalPaint Automation:
Containers

AutoContainer property

AutoSelect method

BackColor property

CreateAutoContainer method

DeleteAutoContainer method

Enabled property

LimitLeft property

LimitTop property

LimitWidth property

LimitHeight property

OffsetX property

OffsetY property

PaintContainer event

PaintUserMode property

ScalarNumX property

ScalarNumY property

ScalarDenX property

ScalarDenY property

SetActive method

UpdateBitmap method


DigitalPaint Automation:
Toolbar

ToolbarControl property


DigitalPaint Automation:
Printing

AutoRender method


DigitalPaint Automation:
Editing a Container

AutoCopy method

AutoCut method

AutoDelete method

AutoPaste method

ClipboardReady method


DigitalPaint Automation:
Undoing and Redoing Operations

CanRedo method

CanUndo method

Redo method

Undo method

UndoLevel property


Tutorial for Visual Basic Programmers

The following topics provide brief and simple examples to help you learn how to use the LEADTOOLS Low-Level DigitalPaint ActiveX and LEADTOOLS DigitalPaint Automation ActiveX.

Implementing Automated Mode Painting

Miscellaneous Examples


Implementing Automated Mode Painting (Visual Basic)

Take the following steps to start a project and to add some code that implements Automated Mode Painting:

1.	Start Visual Basic.
2.	Add the LEAD Controls to your project.
3.	On the Project pull-down menu, use the Components option, and select the LEAD Main Control  (14), select the LEAD Toolbar Control (14), and select the LEAD DigitalPaint Control (14).
4.	Select the LEAD Main control; then add the control to your main form. Size and position the control as you want it to appear at run time.
5.	Select the LEAD Toolbar control; then add the control to your main form.  Position and Size of the control does not matter, because the control is invisible at runtime.
6.	Select the LEAD DigitalPaint control; then add the control to your main form.  Position and Size of the control does not matter, because the control is invisible at runtime.
7.	Add a command button to your form and name it as follows:
	Name	Caption
	LoadLead	Load Image
8.	Code the LoadLead button's click procedure as follows:
Private Sub LoadLead_Click()
    'change the path to a file on your system
    LEAD1.Load "v:\images\babe.cmp", 0, 1, 1

    'Create the Toolbar
    LEADToolBar1.CreateToolbar Me.hWnd, "DigitalPaint", TOOLBAR_PAINT
    LEADToolBar1.RowCount = 1
    LEADToolBar1.Visible = True

    'enable automation
    LEADPaint1.PaintUserMode = PAINT_USERMODE_AUTO
    'setup toolbar
    LEADPaint1.ToolbarControl = LEADToolBar1

    'Create an automation container
    LEADPaint1.CreateAutoContainer LEAD1.hWnd, LEAD1.Bitmap
    'enable the container
    LEADPaint1.AutoContainer(LEAD1.hWnd).SetActive
    LEADPaint1.AutoContainer(LEAD1.hWnd).Enabled = True

    'set the container limit

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitLeft = 0

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitTop = 0

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitWidth = LEAD1.BitmapWidth

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitHeight = LEAD1.BitmapHeight
End Sub

9.	Code the LEAD control's Scroll event as follows:
Private Sub LEAD1_Scroll()
    If (LEAD1.Bitmap <> 0) Then
        UpdateXForm
    End If
End Sub

10.	Add a command button to your form and name it as follows:
	Name	Caption
	ZoomIn	ZoomIn
11.	Code the ZoomIn button's click procedure as follows:
    'zoom image and update container's Scalars
    LEAD1.PaintZoomFactor = 200

LEADPaint1.AutoContainer(LEAD1.hWnd).ScalarNumX = LEAD1.PaintZoomFactor / 100

LEADPaint1.AutoContainer(LEAD1.hWnd).ScalarNumY = LEAD1.PaintZoomFactor / 100

LEADPaint1.AutoContainer(LEAD1.hWnd).ScalarDenX = 1

LEADPaint1.AutoContainer(LEAD1.hWnd).ScalarDenY = 1

    'now, update container's XForm
    LEADPaint1.AutoContainer(LEAD1.hWnd).OffsetX = -LEAD1.DstLeft
    LEADPaint1.AutoContainer(LEAD1.hWnd).OffsetY = -LEAD1.DstTop

12.	Code the LEAD PaintTools control's  PaintContainer event procedure as follows:
Private Sub LEADPaint1_PaintContainer(ByVal hWndContainer As Long, ByVal nEventType As Integer, ByVal nObjectType As Integer, ByVal nState As Integer, ByVal nStatus As Integer)
    Dim Zoom As Single
    'this will check the automation action.
    'if it was Zoom, then it will update the Main control
    'and then update the XForm
    If (nEventType = PAINT_CONTAINER_EVENT_DRAW) Then
        If (nObjectType = PAINT_CONTAINER_OBJECT_TYPE_POINT) Then
            If (LEADToolBar1.Button(BUTTON_ID_TOOL_PAINT_ZOOM).Checked = True) Then
                If ((nState = PAINT_CONTAINER_STATE_END) And (nStatus = 0)) Then
                    Zoom = LEADPaint1.AutoContainer(LEAD1.hWnd).ScalarNumX / LEADPaint1.AutoContainer(LEAD1.hWnd).ScalarDenX
                    Zoom = Zoom * 100
                    If (LEAD1.PaintZoomFactor <> Zoom) Then
                        LEAD1.PaintZoomFactor = Zoom
                        UpdateXForm
                    End If
                End If
            End If
        End If
    End If
End Sub

13.	Code the LEAD Main control's Resize event procedure as follows:
Private Sub LEAD1_Resize()
    If (LEAD1.Bitmap <> 0) Then
        UpdateXForm
    End If
End Sub

14.	Add the following procedure to your program:
Public Sub UpdateXForm()
    On Error Resume Next
    If (LEAD1.Bitmap <> 0) Then
        If (LEADPaint1.PaintUserMode = PAINT_USERMODE_AUTO) Then
            'set the container limit

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitLeft = 0

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitTop = 0

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitWidth = LEAD1.BitmapWidth

LEADPaint1.AutoContainer(LEAD1.hWnd).LimitHeight = LEAD1.BitmapHeight
            'set the container offset

LEADPaint1.AutoContainer(LEAD1.hWnd).OffsetX = -LEAD1.DstLeft

LEADPaint1.AutoContainer(LEAD1.hWnd).OffsetY = -LEAD1.DstTop
        End If
    End If
End Sub

15.	Code the Form's Unload procedure as follows:
Private Sub Form_Unload(Cancel As Integer)
    LEADPaint1.DeleteAutoContainer LEAD1.hWnd
End Sub

16.	Run your program to test it.


Miscellaneous Examples (Visual Basic)

AutoContainer.UpdateBitmap example for Visual Basic

AutoCopy example for Visual Basic

AutoCut example for Visual Basic

AutoRender example for Visual Basic

BackColor example for Visual Basic

BitmapColor example for Visual Basic

Brush example for Visual Basic

Brush.TouchBitmap example for Visual Basic

CanRedo example for Visual Basic

CanUndo example for Visual Basic

ClipboardReady example for Visual Basic

EnableMethodErrors example for Visual Basic

Fill example for Visual Basic

Fill.BackgroundTileBitmap example for Visual Basic

Fill.Border example for Visual Basic

Fill.ColorReplace example for Visual Basic

Fill.Texture example for Visual Basic

Fill.Surface example for Visual Basic

IsSupportLocked example for Visual Basic

OffsetClipRgn example for Visual Basic

Region.Border example for Visual Basic

Region.Color example for Visual Basic

Region.Ellipse example for Visual Basic

Region.LowerTolerance example for Visual Basic

Region.Rect example for Visual Basic

Region.RoundRect example for Visual Basic

Region.Polygon example for Visual Basic

Region.Surface example for Visual Basic

SetMetrics example for Visual Basic

Shape example for Visual Basic

Shape.BackgroundStyle example for Visual Basic

Shape.BorderTileBitmap example for Visual Basic

Shape.DrawPolyBezier example for Visual Basic

Shape.DrawPolygon example for Visual Basic

Shape.Texture example for Visual Basic

Text example for Visual Basic

UndoLevel example for Visual Basic

UnlockSupport example for Visual Basic

UpdateXForm example for Visual Basic


AutoContainer.UpdateBitmap example for Visual Basic

    'change the bitmap
    LEAD1.Rotate 4500, 0, RGB(255, 0, 0)
    'update the Automation container
    LEADPaint1.AutoContainer(LEAD1.hWnd).UpdateBitmap LEAD1.Bitmap


AutoCopy example for Visual Basic

    'copy selection to clipboard
    LEADPaint1.AutoCopy 0


AutoCut example for Visual Basic

    'cut selection to clipboard
    LEADPaint1.AutoCut 0


AutoRender example for Visual Basic

    'print the image
    LEADPaint1.AutoRender 0


BackColor example for Visual Basic

    LEADPaint1.BackColor = RGB(255, 0, 0)
    LEADPaint1.AutoSelect PAINT_AUTOMATION_SELTYPE_ALL, 0
    LEADPaint1.AutoDelete 0


BitmapColor example for Visual Basic

Private Sub LEAD1_MouseMove (Button As Integer, Shift As Integer, x As Single, y As Single)
    Dim Red As Long
    Dim Green As Long
    Dim Blue As Long
    Dim color As Long

    If (LEAD1.Bitmap <> 0) Then
        x = x \ Screen.TwipsPerPixelX
        y = y \ Screen.TwipsPerPixelX
        LEADPaint1.PickColor x, y
        color = LEADPaint1.BitmapColor
        Blue = color \ &H10000
        Green = (color - (Blue * &H10000)) \ &H100
        Red = (color - (Blue * &H10000) - (Green * &H100))
        Caption = "PickColor Bitmap - (" & CStr(x) & "," & CStr(y) & ") = {" & CStr(Red) & "," & CStr(Green) & "," & CStr(Blue) & "}"
    End If
End Sub


Brush example for Visual Basic

    'set some initial values
    LEADPaint1.DlgTitle = "Brush Options"
    LEADPaint1.DlgFlags = PAINT_DLG_BRUSH_SHOWALL
    LEADPaint1.DlgTouchContentsType = BRUSH_TOUCH_CONTENTS_COLOR
    LEADPaint1.DlgTouchColor = vbGreen
    LEADPaint1.DlgTouchImageCount = 2
    LEADPaint1.DlgTouchImage (0) = "d:\lead14\dist\images\ulay1.bmp"
    LEADPaint1.DlgTouchImage(1) = "d:\lead14\dist\images\ulay2.bmp"
    LEADPaint1.DlgTouchImageIndex = 0
    LEADPaint1.DlgDiameter = 15
    LEADPaint1.DlgHardnessValue = 5
    LEADPaint1.DlgSpacing = 7
    LEADPaint1.DlgDensity = 50
    LEADPaint1.DlgOpacity = 25
    LEADPaint1.DlgFadeOut = 25
    LEADPaint1.DlgPaperTextureCount = 3
    LEADPaint1.DlgPaperTexture (0) = "d:\temp\texture1.bmp"
    LEADPaint1.DlgPaperTexture(1) = "d:\temp\texture2.bmp"
    LEADPaint1.DlgPaperTexture(2) = "d:\temp\texture3.bmp"
    LEADPaint1.DlgPaperTextureIndex = 2
    LEADPaint1.DlgTouchTransparentColor = vbBlack

    'show the dialog
    LEADPaint1.ShowBrushDlg Me.hWnd

    'copy the results and use them
    LEADPaint1.Brush.TouchContentsType = LEADPaint1.DlgTouchContentsType
    If (LEADPaint1.Brush.TouchContentsType = BRUSH_TOUCH_CONTENTS_COLOR) Then
        LEADPaint1.Brush.TouchColor = LEADPaint1.DlgTouchColor
    Else
        LEAD2.Load LEADPaint1.DlgTouchImage(LEADPaint1.DlgTouchImageIndex), _
                   0, 1, 1
        LEADPaint1.Brush.TouchBitmap = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    End If
    LEADPaint1.Brush.Diameter = LEADPaint1.DlgDiameter
    LEADPaint1.Brush.HardnessValue = LEADPaint1.DlgHardnessValue
    LEADPaint1.Brush.Spacing = LEADPaint1.DlgSpacing
    LEADPaint1.Brush.Density = LEADPaint1.DlgDensity
    LEADPaint1.Brush.Opacity = LEADPaint1.DlgOpacity
    LEADPaint1.Brush.FadeOutRate = LEADPaint1.DlgFadeOut
    If (LEADPaint1.DlgPaperTextureIndex > -1) Then
        LEAD2.Load LEADPaint1.DlgPaperTexture(LEADPaint1.DlgPaperTextureIndex), _
                   0, 1, 1
        LEADPaint1.Brush.Texture = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    End If

    'Paint using the Brush
    LEADPaint1.Brush.MoveTo 0, 0
    LEADPaint1.Brush.LineTo 200, 200


Brush.TouchBitmap example for Visual Basic

    'modify Brush properties
    LEADPaint1.Brush.TouchBitmap = LEAD2.Bitmap
    LEADPaint1.Brush.TouchTransparentColor = RGB(0, 0, 0)
    LEADPaint1.Brush.TouchContentsType = BRUSH_TOUCH_CONTENTS_IMAGE


CanRedo example for Visual Basic

    If (LEADPaint1.CanRedo ()) Then
        LEADPaint1.Redo 0
    End If


CanUndo example for Visual Basic

    If (LEADPaint1.CanUndo ()) Then
        LEADPaint1.Undo 0
    End If


ClipboardReady example for Visual Basic

    If (LEADPaint1.ClipboardReady ()) Then
        LEADPaint1.AutoPaste 0
    End If


EnableMethodErrors example for Visual Basic

    LEADPaint1.EnableMethodErrors = FALSE


Fill example for Visual Basic

    'set some initial values
    LEADPaint1.DlgTitle = "Fill Options"
    LEADPaint1.DlgFlags = PAINT_DLG_FILL_SHOWALL
    LEADPaint1.DlgFillStyle = FILL_FILLSTYLE_GRADIENT
    LEADPaint1.DlgSolidFillColor = vbBlack
    LEADPaint1.DlgBackgroundTileBitmapCount = 3
    LEADPaint1.DlgBackgroundTileBitmap (0) = "d:\lead14\dist\images\ulay1.bmp"
    LEADPaint1.DlgBackgroundTileBitmap(1) = "d:\lead14\dist\images\ulay2.bmp"
    LEADPaint1.DlgBackgroundTileBitmap(2) = "d:\lead14\dist\images\ulay3.bmp"
    LEADPaint1.DlgBackgroundTileBitmapIndex = 1
    LEADPaint1.DlgFillGradientStyle = FILL_GRADIENTSTYLE_ANGLE_TO_LB
    LEADPaint1.DlgGradientStartColor = vbYellow
    LEADPaint1.DlgGradientEndColor = vbGreen
    LEADPaint1.DlgGradientSteps = 220
    LEADPaint1.DlgUpperTolerance = RGB(20, 20, 20)
    LEADPaint1.DlgLowerTolerance = RGB(0, 0, 0)
    LEADPaint1.DlgOpacity = 0
    LEADPaint1.DlgPaperTextureCount = 3
    LEADPaint1.DlgPaperTexture(0) = "d:\temp\texture1.bmp"
    LEADPaint1.DlgPaperTexture(1) = "d:\temp\texture2.bmp"
    LEADPaint1.DlgPaperTexture(2) = "d:\temp\texture3.bmp"
    LEADPaint1.DlgPaperTextureIndex = 2

    'show the dialog
    LEADPaint1.ShowFillDlg Me.hWnd

    'copy the results and use them
    LEADPaint1.Fill.Style = LEADPaint1.DlgFillStyle
    LEADPaint1.Fill.SolidFillColor = LEADPaint1.DlgSolidFillColor
    If (LEADPaint1.Fill.Style = FILL_FILLSTYLE_PATTERN) Then
        LEAD2.Load LEADPaint1.DlgBackgroundTileBitmap(LEADPaint1.DlgBackgroundTileBitmapIndex), _
                   0, 1, 1
        LEADPaint1.Fill.BackgroundTileBitmap = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    End If
    LEADPaint1.Fill.GradientStyle = LEADPaint1.DlgFillGradientStyle
    LEADPaint1.Fill.GradientStartColor = LEADPaint1.DlgGradientStartColor
    LEADPaint1.Fill.GradientEndColor = LEADPaint1.DlgGradientEndColor
    LEADPaint1.Fill.GradientSteps = LEADPaint1.DlgGradientSteps
    LEADPaint1.Fill.UpperTolerance = LEADPaint1.DlgUpperTolerance
    LEADPaint1.Fill.LowerTolerance = LEADPaint1.DlgLowerTolerance
    LEADPaint1.Fill.Opacity = LEADPaint1.DlgOpacity
    If (LEADPaint1.DlgPaperTextureIndex > -1) Then
        LEAD2.Load LEADPaint1.DlgPaperTexture(LEADPaint1.DlgPaperTextureIndex), _
                   0, 1, 1
        LEADPaint1.Fill.Texture = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    Else
        LEADPaint1.Fill.Texture = 0
    End If


Fill.BackgroundTileBitmap example for Visual Basic

    'modify Fill properties
    LEADPaint1.Fill.BackgroundTileBitmap = LEAD2.Bitmap
    LEADPaint1.Fill.Style = FILL_FILLSTYLE_PATTERN


Fill.Border example for Visual Basic

Private Sub LEAD1_MouseDown (Button As Integer, Shift As Integer, x As Single, y As Single)
    x = x \ Screen.TwipsPerPixelX
    y = y \ Screen.TwipsPerPixelX
    LEADPaint1.Fill.Border x, y, RGB(0, 0, 0)
End Sub


Fill.ColorReplace example for Visual Basic

    LEADPaint1.Fill.ColorReplace RGB(255, 0, 0)


Fill.Surface example for Visual Basic

Private Sub LEAD1_MouseDown (Button As Integer, Shift As Integer, x As Single, y As Single)
    x = x \ Screen.TwipsPerPixelX
    y = y \ Screen.TwipsPerPixelX
    LEADPaint1.Fill.Surface x, y
End Sub


Fill.Texture example for Visual Basic

    'modify Fill properties
    LEADPaint1.Fill.Texture = LEAD2.Bitmap
    LEADPaint1.Fill.Style = FILL_FILLSTYLE_SOLID


IsSupportLocked example for Visual Basic

   Dim bRet as Boolean
   bRet = LEADPaint1.IsSupportLocked (L_SUPPORT_DIGITALPAINT)


OffsetClipRgn example for Visual Basic

    LEADPaint1.OffsetClipRgn -5, -5
    LEADPaint2.Region.hRgn = LEADPaint1.GetClipRgn


Region.Border example for Visual Basic

    LEADPaint1.Region.Border 12, 31, RGB(0, 0, 255) 'some random values
    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn


Region.Color example for Visual Basic

    LEADPaint1.Region.Color vbBlack
    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn


Region.Ellipse example for Visual Basic

    LEADPaint1.Region.Ellipse 10, 10, 50, 50
    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn


Region.LowerTolerance example for Visual Basic

    'set some initial values
    LEADPaint1.DlgTitle = "Region Options"
    LEADPaint1.DlgFlags = PAINT_DLG_REGION_SHOWALL
    LEADPaint1.DlgLowerTolerance = vbBlack
    LEADPaint1.DlgUpperTolerance = RGB(20, 20, 20)
    LEADPaint1.DlgRoundRectEllipseWidth = 20
    LEADPaint1.DlgRoundRectEllipseHeight = 20

    'show the dialog
    LEADPaint1.ShowRegionDlg Me.hWnd

    'copy the results and use them
    LEADPaint1.Region.UpperTolerance = LEADPaint1.DlgUpperTolerance
    LEADPaint1.Region.LowerTolerance = LEADPaint1.DlgLowerTolerance
    LEADPaint1.Region.RoundRectEllipseWidth = LEADPaint1.DlgRoundRectEllipseWidth
    LEADPaint1.Region.RoundRectEllipseHeight = LEADPaint1.DlgRoundRectEllipseHeight

    LEADPaint1.Region.RoundRect 10, 10, 100, 100

    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn
    LEADPaint1.Shape.Rect 0, 0, 500, 500


Region.Rect example for Visual Basic

    LEADPaint1.Region.Rect 10, 10, 25, 25
    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn


Region.RoundRect example for Visual Basic

    LEADPaint1.Region.RoundRect 10, 10, 50, 50
    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn


Region.Polygon example for Visual Basic

    Dim x As Long

    LEADPaint1.PolygonCount = 5\

    LEADPaint1.PolygonX(0) = 3 * 10
    LEADPaint1.PolygonX(1) = 5 * 10
    LEADPaint1.PolygonX(2) = 0 * 10
    LEADPaint1.PolygonX(3) = 6 * 10
    LEADPaint1.PolygonX(4) = 2 * 10

    LEADPaint1.PolygonY(0) = 0 * 10
    LEADPaint1.PolygonY(1) = 7 * 10
    LEADPaint1.PolygonY(2) = 3 * 10
    LEADPaint1.PolygonY(3) = 3 * 10
    LEADPaint1.PolygonY(4) = 7 * 10

    LEADPaint1.Region.Polygon 0
    'scale region by 1/2
    LEADPaint1.Region.ScaleRgn 50, 50, PAINT_ALIGN_HCENTER Or PAINT_ALIGN_VCENTER
    LEADPaint1.Region.TranslateRgn 5, 5

    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn


Region.Surface example for Visual Basic

    LEADPaint1.Region.Surface 134, 38 'some random values
    LEADPaint1.SetClipRgn LEADPaint1.Region.hRgn


SetMetrics example for Visual Basic

    LEAD1.Load "v:\images\babe.cmp", 0, 1, 1
    LEADPaint1.SetMetrics LEAD1.hWnd, LEAD1.Bitmap


Shape example for Visual Basic

    'set some initial values
    LEADPaint1.DlgTitle = "Shape Options"
    LEADPaint1.DlgFlags = PAINT_DLG_SHAPE_SHOWALL
    LEADPaint1.DlgShapeBackgroundStyle = SHAPE_BACKSTYLE_GRADIENT
    LEADPaint1.DlgBackgroundColor = vbBlack
    LEADPaint1.DlgBackgroundTileBitmapCount = 3
    LEADPaint1.DlgBackgroundTileBitmap(0) = "d:\lead14\dist\images\ulay1.bmp"
    LEADPaint1.DlgBackgroundTileBitmap(1) = "d:\lead14\dist\images\ulay2.bmp"
    LEADPaint1.DlgBackgroundTileBitmap(2) = "d:\lead14\dist\images\ulay3.bmp"
    LEADPaint1.DlgBackgroundTileBitmapIndex = 1
    LEADPaint1.DlgBorderStyle = SHAPE_BORDERSTYLE_SOLID
    LEADPaint1.DlgBorderWidth = 1
    LEADPaint1.DlgShapeBorderBrushStyle = SHAPE_BORDERBRUSHSTYLE_COLOR
    LEADPaint1.DlgBorderColor = vbBlue
    LEADPaint1.DlgBorderTileBitmapCount = 2
    LEADPaint1.DlgBorderTileBitmap(0) = "d:\lead14\dist\images\ulay4.bmp"
    LEADPaint1.DlgBorderTileBitmap(1) = "d:\lead14\dist\images\ulay5.bmp"
    LEADPaint1.DlgBorderTileBitmapIndex = 1
    LEADPaint1.DlgShapeGradientStyle = SHAPE_GRADIENTSTYLE_ANGLE_TO_LB
    LEADPaint1.DlgGradientStartColor = vbYellow
    LEADPaint1.DlgGradientEndColor = vbGreen
    LEADPaint1.DlgGradientSteps = 200
    LEADPaint1.DlgBorderEndCap = SHAPE_BORDERENDCAP_FLAT
    LEADPaint1.DlgPaperTextureCount = 3
    LEADPaint1.DlgPaperTexture(0) = "d:\temp\texture1.bmp"
    LEADPaint1.DlgPaperTexture(1) = "d:\temp\texture2.bmp"
    LEADPaint1.DlgPaperTexture(2) = "d:\temp\texture3.bmp"
    LEADPaint1.DlgPaperTextureIndex = 2

    'show the dialog
    LEADPaint1.ShowShapeDlg Me.hWnd

    'copy the results and use them
    LEADPaint1.Shape.BackgroundStyle = LEADPaint1.DlgShapeBackgroundStyle
    LEADPaint1.Shape.BackgroundColor = LEADPaint1.DlgBackgroundColor
    If (LEADPaint1.Shape.BackgroundStyle = SHAPE_BACKSTYLE_TILEDIMAGE) Then
        LEAD2.Load LEADPaint1.DlgBackgroundTileBitmap(LEADPaint1.DlgBackgroundTileBitmapIndex), _
                   0, 1, 1
        LEADPaint1.Shape.BackgroundTileBitmap = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    End If
    LEADPaint1.Shape.BorderStyle = LEADPaint1.DlgBorderStyle
    LEADPaint1.Shape.BorderWidth = LEADPaint1.DlgBorderWidth
    LEADPaint1.Shape.BorderBrushStyle = LEADPaint1.DlgShapeBorderBrushStyle
    LEADPaint1.Shape.BorderColor = LEADPaint1.DlgBorderColor
    If (LEADPaint1.Shape.BorderStyle = SHAPE_BACKSTYLE_TILEDIMAGE) Then
        LEAD2.Load LEADPaint1.DlgBorderTileBitmap(LEADPaint1.DlgBorderTileBitmapIndex), _
                   0, 1, 1
        LEADPaint1.Shape.BorderTileBitmap = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    End If
    LEADPaint1.Shape.GradientStyle = LEADPaint1.DlgShapeGradientStyle
    LEADPaint1.Shape.GradientStartColor = LEADPaint1.DlgGradientStartColor
    LEADPaint1.Shape.GradientEndColor = LEADPaint1.DlgGradientEndColor
    LEADPaint1.Shape.GradientSteps = LEADPaint1.DlgGradientSteps
    LEADPaint1.Shape.BorderEndCap = LEADPaint1.DlgBorderEndCap
    LEADPaint1.Shape.RoundRectEllipseWidth = LEADPaint1.DlgRoundRectEllipseWidth
    LEADPaint1.Shape.RoundRectEllipseHeight = LEADPaint1.DlgRoundRectEllipseHeight
    LEADPaint1.Shape.Opacity = LEADPaint1.DlgOpacity
    If (LEADPaint1.DlgPaperTextureIndex > -1) Then
        LEAD2.Load LEADPaint1.DlgPaperTexture(LEADPaint1.DlgPaperTextureIndex), _
                   0, 1, 1
        LEADPaint1.Shape.Texture = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    End If

    'Draw a Line
    LEADPaint1.Shape.DrawLine 0, 0, 150, 150
    'Draw a Rect
    LEADPaint1.Shape.DrawRect 10, 10, 100, 100
    'Draw a RoundRect
    LEADPaint1.Shape.DrawRoundRect 20, 20, 100, 100
    'Draw an Ellipse
    LEADPaint1.Shape.DrawEllipse 30, 30, 100, 100


Shape.BackgroundStyle example for Visual Basic

    'modify Shape properties
    LEADPaint1.Shape.BackgroundStyle = SHAPE_BACKSTYLE_TILEDIMAGE
    LEADPaint1.Shape.BackgroundTileBitmap = LEAD2.Bitmap


Shape.BorderTileBitmap example for Visual Basic

    'modify Shape properties
    LEADPaint1.Shape.BorderTileBitmap = LEAD2.Bitmap


Shape.DrawPolyBezier example for Visual Basic

    LEADPaint1.PolygonCount = 4

    LEADPaint1.PolygonX(0) = 3 * 10
    LEADPaint1.PolygonX(1) = 5 * 10
    LEADPaint1.PolygonX(2) = 2 * 10
    LEADPaint1.PolygonX(3) = 0 * 10

    LEADPaint1.PolygonY(0) = 0 * 10
    LEADPaint1.PolygonY(1) = 7 * 10
    LEADPaint1.PolygonY(2) = 7 * 10
    LEADPaint1.PolygonY(3) = 3 * 10

    LEADPaint1.Shape.DrawPolyBezier


Shape.DrawPolygon example for Visual Basic

    LEADPaint1.PolygonCount = 5

    LEADPaint1.PolygonX(0) = 3 * 10
    LEADPaint1.PolygonX(1) = 5 * 10
    LEADPaint1.PolygonX(2) = 0 * 10
    LEADPaint1.PolygonX(3) = 6 * 10
    LEADPaint1.PolygonX(4) = 2 * 10

    LEADPaint1.PolygonY(0) = 0 * 10
    LEADPaint1.PolygonY(1) = 7 * 10
    LEADPaint1.PolygonY(2) = 3 * 10
    LEADPaint1.PolygonY(3) = 3 * 10
    LEADPaint1.PolygonY(4) = 7 * 10

    LEADPaint1.Shape.DrawPolygon 0


Shape.Texture example for Visual Basic

    'modify Shape properties
    LEADPaint1.Shape.Texture = LEAD2.Bitmap


Text example for Visual Basic

    'set some initial values
    LEADPaint1.DlgTitle = "Text Options"
    LEADPaint1.DlgFlags = PAINT_DLG_TEXT_SHOWALL

    LEADPaint1.DlgTextString = "Testing"
    LEADPaint1.DlgTextFont.Bold = True
    LEADPaint1.DlgTextFont.Italic = True
    LEADPaint1.DlgTextFont.Name = "Bones"
    LEADPaint1.DlgTextFont.Size = 18

    LEADPaint1.DlgTextBorderBrushStyle = TEXT_BORDER_BRUSHSTYLE_COLOR
    LEADPaint1.DlgBorderWidth = 3
    LEADPaint1.DlgBorderColor = vbGreen
    LEADPaint1.DlgTextBackgroundStyle = TEXT_BACKSTYLE_OPAQUE
    LEADPaint1.DlgBackgroundColor = vbRed

    LEADPaint1.DlgBackgroundTileBitmapCount = 3
    LEADPaint1.DlgBackgroundTileBitmap(0) = "d:\lead14\dist\images\ulay1.bmp"
    LEADPaint1.DlgBackgroundTileBitmap(1) = "d:\lead14\dist\images\ulay2.bmp"
    LEADPaint1.DlgBackgroundTileBitmap(2) = "d:\lead14\dist\images\ulay3.bmp"
    LEADPaint1.DlgBackgroundTileBitmapIndex = 1

    LEADPaint1.DlgAlignment = PAINT_ALIGN_HCENTER Or PAINT_ALIGN_VCENTER
    LEADPaint1.DlgOpacity = 0

    LEADPaint1.DlgPaperTextureCount = 3
    LEADPaint1.DlgPaperTexture(0) = "d:\temp\texture1.bmp"
    LEADPaint1.DlgPaperTexture(1) = "d:\temp\texture2.bmp"
    LEADPaint1.DlgPaperTexture(2) = "d:\temp\texture3.bmp"
    LEADPaint1.DlgPaperTextureIndex = 2

    LEADPaint1.DlgTransformRotate = 0
    LEADPaint1.DlgTransformScaleX = 100
    LEADPaint1.DlgTransformScaleY = 100

    'show the dialog
    LEADPaint1.ShowTextDlg Me.hWnd

    'copy the results and use them
    LEADPaint1.Text.String = LEADPaint1.DlgTextString
    LEADPaint1.Text.Font.Bold = LEADPaint1.DlgTextFont.Bold
    LEADPaint1.Text.Font.Italic = LEADPaint1.DlgTextFont.Italic
    LEADPaint1.Text.Font.Name = LEADPaint1.DlgTextFont.Name
    LEADPaint1.Text.Font.Size = LEADPaint1.DlgTextFont.Size

    LEADPaint1.Text.BorderBrushStyle = LEADPaint1.DlgTextBorderBrushStyle
    LEADPaint1.Text.BorderWidth = LEADPaint1.DlgBorderWidth
    LEADPaint1.Text.BorderColor = LEADPaint1.DlgBorderColor
    LEADPaint1.Text.BackgroundStyle = LEADPaint1.DlgTextBackgroundStyle
    LEADPaint1.Text.BackgroundColor = LEADPaint1.DlgBackgroundColor

    If (LEADPaint1.Text.BackgroundStyle = TEXT_BACKSTYLE_TILEDIMAGE) Then
        LEAD2.Load LEADPaint1.DlgBackgroundTileBitmap(LEADPaint1.DlgBackgroundTileBitmapIndex), _
                   0, 1, 1
        LEADPaint1.Text.BackgroundTileBitmap = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    End If
    LEADPaint1.Text.Alignment = LEADPaint1.DlgAlignment
    LEADPaint1.Text.Opacity = LEADPaint1.DlgOpacity
    If (LEADPaint1.DlgPaperTextureIndex > -1) Then
        LEAD2.Load LEADPaint1.DlgPaperTexture(LEADPaint1.DlgPaperTextureIndex), _
                   0, 1, 1
        LEADPaint1.Text.Texture = LEAD2.Bitmap
        LEAD2.Bitmap = 0
    Else
        LEADPaint1.Text.Texture = 0
    End If

    LEADPaint1.Text.Apply 10, 10, 300, 300


UndoLevel example for Visual Basic

    'set undo level
    LEADPaint1.UndoLevel = 5


UnlockSupport example for Visual Basic

    LEADPaint1.UnlockSupport L_SUPPORT_DIGITALPAINT, "testkey"


UpdateXForm example for Visual Basic

Private Sub LEAD1_Resize ()
    If (LEAD1.Bitmap <> 0) Then
        LEADPaint1.SetMetrics LEAD1.hWnd, LEAD1.Bitmap
        LEADPaint1.UpdateXForm LEAD1.PaintZoomFactor, -LEAD1.DstLeft, -LEAD1.DstTop
    End IfEnd Sub


Data Types

Low-Level DigitalPaint Interfaces

ILTBrush

ILTFill

ILTFont

ILTRegion

ILTShape

ILTText

Automated DigitalPaint Interface

ILTPaintContainer


ILTBrush

Properties:

TouchShape property

TouchContentsType property

TouchColor property

TouchTransparentColor property

TouchBitmap property

Diameter property

HardnessDistributionType property

HardnessValue property

Spacing property

Density property

Opacity property

FadeOutRate property

Texture property

Methods:

MoveTo method

LineTo method


ILTShape

Properties:

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderEndCap property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

Methods:

DrawLine method

DrawRect method

DrawRoundRect method

DrawEllipse method

DrawPolygon method

DrawPolyBezier method


ILTRegion

Properties:

hRgn property

LowerTolerance property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

UpperTolerance property

Methods:

Border method

Color method

Ellipse method

Polygon method

Rect method

RoundRect method

ScaleRgn method

Surface method

TranslateRgn method


ILTFill

Properties:

Style property

SolidFillColor property

BackgroundTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

UpperTolerance property

LowerTolerance property

Opacity property

Texture property

Methods:

Surface method

Border method

ColorReplace method


ILTFont

Properties:

Bold property

Charset property

Italic property

Name property

Size property

Weight property


ILTText

Properties:

BorderBrushStyle property

BorderWidth property

BorderColor property

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

Alignment property

Opacity property

Texture property

String property

TransformRotate property

TransformScaleX property

TransformScaleY property

Methods:

Apply method


ILTPaintContainer

Properties:

LimitLeft property

LimitTop property

LimitWidth property

LimitHeight property

ScalarNumX property

ScalarNumY property

ScalarDenX property

ScalarDenY property

Enabled property

OffsetX property

OffsetY property

Methods:

SetActive method

UpdateBitmap method


Version History

Current version:	14
Last update:	August 23, 2004
Changes from Version 13 to Version 14

Changes from Version 12.1 to Version 13

Version 12.1


Changes from Version 13 to Version 14

Version 14 of the LEADTOOLS DigitalPaint OCX has not changed from Version 13.


Changes from Version 12.1 to Version 13

Version 13 of the LEADTOOLS DigitalPaint OCX has not changed from Version 12.1.


Version 12.1

This is the first version of LEADTOOLS DigitalPaint OCX.

The rest of this topic lists the new properties, methods and events in version 12.1.

Low–Level DigitalPaint:

Painting with a brush

MoveTo method

LineTo method

Density property

Diameter property

FadeOutRate property

HardnessDistributionType property

HardnessValue property

Opacity property

Spacing property

Texture property

TouchBitmap property

TouchColor property

TouchContentsType property

TouchShape property

TouchTransparentColor property

Painting a Shape

DrawLine method

DrawRect method

DrawRoundRect method

DrawEllipse method

DrawPolygon method

DrawPolyBezier method

BackgroundStyle property

BackgroundColor property

BackgroundTileBitmap property

BorderStyle property

BorderWidth property

BorderBrushStyle property

BorderColor property

BorderTileBitmap property

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

BorderEndCap property

RoundRectEllipseWidth property

RoundRectEllipseHeight property

Opacity property

Texture property

PolygonCount property

PolygonX property

PolygonY property

Creating a Region

Border method

Ellipse method

Polygon method

Rect method

RoundRect method

Surface method

Color method

hRgn property

LowerTolerance property

RoundRectEllipseHeight property

RoundRectEllipseWidth property

UpperTolerance property

Filling an Area

Border method

ColorReplace method

Surface method

BackgroundTileBitmap property

GradientEndColor property

GradientStartColor property

GradientSteps property

GradientStyle property

LowerTolerance property

Opacity property

SolidFillColor property

Style property

Texture property

UpperTolerance property

PickColor method

BitmapColor property

Painting Text

Apply method

Alignment property

BackgroundColor property

BackgroundStyle property

BackgroundTileBitmap property

BorderBrushStyle property

BorderColor property

BorderWidth property

Opacity property

String property

Texture property

TransformRotate property

TransformScaleX property

TransformScaleY property

Bold property

Charset property

Italic property

Name property

Size property

Weight property

Setting a Clipping Region

GetClipRgn method

OffsetClipRgn method

SetClipRgn method

Dialogs

DlgAlignment property

DlgBackgroundColor property

DlgBackgroundTileBitmap property

DlgBackgroundTileBitmapCount property

DlgBackgroundTileBitmapIndex property

DlgBorderColor property

DlgBorderEndCap property

DlgBorderStyle property

DlgBorderTileBitmap property

DlgBorderTileBitmapCount property

DlgBorderTileBitmapIndex property

DlgBorderWidth property

DlgDensity property

DlgDiameter property

DlgFadeOut property

DlgFillGradientStyle property

DlgFillStyle property

DlgFlags property

DlgGradientEndColor property

DlgGradientStartColor property

DlgGradientSteps property

DlgHardnessValue property

DlgLowerTolerance property

DlgOpacity property

DlgPaperTexture property

DlgPaperTextureCount property

DlgPaperTextureIndex property

DlgRoundRectEllipseHeight property

DlgRoundRectEllipseWidth property

DlgShapeBackgroundStyle property

DlgShapeBorderBrushStyle property

DlgShapeGradientStyle property

DlgSolidFillColor property

DlgSpacing property

DlgTextBackgroundStyle property

DlgTextBorderBrushStyle property

DlgTextFont property

DlgTextString property

DlgTitle property

DlgTouchColor property

DlgTouchContentsType property

DlgTouchImage property

DlgTouchImageCount property

DlgTouchImageIndex property

DlgTouchTransparentColor property

DlgTransformRotate property

DlgTransformScaleX property

DlgTransformScaleY property

DlgUpperTolerance property

ShowBrushDlg method

ShowShapeDlg method

ShowRegionDlg method

ShowFillDlg method

ShowTextDlg method

Miscellaneous

EnableMethodErrors property

IsSupportLocked method

SetMetrics method

UnlockSupport method

UpdateXForm method

Automated DigitalPaint:

AutoContainer property

AutoCopy method

AutoCut method

AutoDelete method

AutoPaste method

AutoRender method

AutoSelect method

BackColor property

CanRedo method

CanUndo method

ClipboardReady method

CreateAutoContainer method

DeleteAutoContainer method

PaintContainer event

PaintUserMode property

Redo method

ToolbarControl property

Undo method

UndoLevel property


Example Programs

Note:	You can run some of the example programs on your system by clicking the appropriate buttons in online help. An error message will appear if you try to run an example program that is not on your system, or if you try to run a Delphi example without Delphi on your system.
The executable files for these examples were compiled with Document/Medical capabilities and with a Multimedia features license.  To get Document/Medical capabilities, you must buy a LEADTOOLS Document/Medical toolkit.  To get Internet capabilities, you must buy one of the toolkits, which includes the Internet features.  Otherwise, if you recompile the examples, the resulting executable files will not have the Document/Medical or Internet capabilities.

Visual C++ 5.0

PAINT	(32-bit editions only) EXAMPLES\OCX\MFC40\PAINT contains a sample application that demonstrates most of the low-level digital painting capabilities in the Visual C++ 5.0 environment. You can open the project in Visual C++; then compile and run it.
AUTO PAINT	(32-bit editions only) EXAMPLES\OCX\MFC40\PAINT contains a sample application that demonstrates most of the automated digital painting capabilities in the Visual C++ 5.0 environment. You can open the project in Visual C++; then compile and run it.
Visual Basic

PAINT32	(32-bit editions only) EXAMPLES\OCX\VB\PAINT32 contains a sample application that demonstrates most of the low-level digital painting capabilities in the Visual Basic 5.0 environment. You can open the project in Visual Basic; then compile and run it.
AUTO PAINT32	(32-bit editions only) EXAMPLES\OCX\VB\PAINT32 contains a sample application that demonstrates most of the automated digital painting capabilities in the Visual Basic 5.0 environment. You can open the project in Visual Basic; then compile and run it.