Introduction

LEADTOOLS VCL consists of several packages. Each package contains one or more custom controls developed by LEAD Technologies, Inc. These packages and their contents are as follows:

LEADTOOLS VCL Main Package: The LEADTOOLS VCL Main Package contains the LEAD Main Control Module. The LEAD Main Control Module (32-bit) provides the custom controls for incorporating image compression, file format support, and image processing into your applications.

LEADTOOLS VCL Additional Package: The LEADTOOLS VCL Additional Package contains the LEAD ImageList Control Module, the LEAD ThumbnailBrowser Control Module and the LEAD Screen Capture Control. The LEAD ImageList Control Module provides the custom controls for displaying and manipulating image lists. The LEAD Thumbnail Browser Control Module provides custom controls for generating thumbnails of LEAD supported images from a directory. The LEAD Screen Capture Control Module provides custom controls for performing the following captures: entire screen, active window, selected menu, menu under cursor, selected window object (button, tool bar, icon, or client area), selected area (rectangle, ellipse, triangle, polygon or freehand), wallpaper, mouse pointer, and resource stored in EXE or DLL. Options include multi-capture, Hot Keys, and time interval. Please note that the Documentation for the LEAD Screen Capture Control Module can be found in the LEADTOOLS Screen Capture VCL help file, Ltscrvcl.chm in the LEAD\Help directory. In addition, please note that the LEADTOOLS VCL Main Package must be installed on the system in order to install the LEADTOOLS VCL Additional Package.

LEADTOOLS VCL Scanning Package: The LEADTOOLS VCL Scanning Package contains the LEAD ISIS Control Module. LEAD ISIS Control Module provides custom controls for incorporating ISIS scanner control into your applications. In addition, please note that the LEADTOOLS VCL Main Package must be installed on the system in order to install the LEADTOOLS VCL Scanning Package.

LEADTOOLS VCL DICOM Package: The LEADTOOLS VCL DICOM Package contains the LEAD DICOM Control Module. The LEAD DICOM Control Module provides a custom control for incorporating DICOM image file format support into your applications. The LEAD DICOM Control Module is only available in the LEADTOOLS Medical toolkits. Please note that the Documentation for the LEAD DICOM Control Module can be found in the LEADTOOLS DICOM VCL help file, Ltdicvcl.chm in the LEAD\Help directory. In addition, please note that the LEADTOOLS VCL Main Package must be installed on the system in order to install the LEADTOOLS VCL DICOM Package.

LEADTOOLS VCL Annotation Package: The LEADTOOLS VCL Annotation Package contains the LEAD Annotation Control Module. The LEAD Annotation Control Module provides a custom control for incorporating annotation support into your applications. The LEAD Annotation Control Module is only available in the LEADTOOLS Document/Medical toolkits. Please note that the Documentation for the LEAD Annotation Control Module can be found in the LEADTOOLS Main VCL help file, Ltvcl.chm in the LEAD\Help directory. In addition, please note that the LEADTOOLS VCL Main Package must be installed on the system in order to install the LEADTOOLS VCL Annotation Package.

LEADTOOLS VCL MRC Package: The LEADTOOLS VCL MRC Package contains the LEAD MRC Control Module. The LEAD MRC Control Module provides a custom control to let you incorporate the ability to work with MRC (Mixed Raster Content) files in your applications. The LEAD MRC Control Module is only available in the LEADTOOLS Document/Medical toolkits. Please note that the Documentation for the LEAD MRC Control Module can be found in the LEADTOOLS MRC VCL help file, Ltmrcvcln.chm in the LEAD\Help directory. In addition, please note that the LEADTOOLS VCL Main Package must be installed on the system in order to install the LEADTOOLS VCL MRC Package.

In the documentation, the properties, methods and events in the LEAD Main Module are designated by (Main Control). The properties, methods and events are designated as follows:

in the LEAD ImageList Control Module they are designated by (ImageList Control)

in the LEAD Thumbnail Browser Control Module they are designated by (ThumbnailBrowser Control)

in the LEAD Screen Capture Control Module they are designated by (Screen Control)

in the LEAD ISIS Control Module they are designated by(ISIS Control)

in the LEAD Annotation Control Module they are designated by(Annotation Control)

To use the same bitmap between controls, assign the bitmap property from one control to the other control.

The toolkit comes in 32-bit Document/Medical and non-Document/Medical editions. You can use the LEADTOOLS VCL in:

Delphi 4.0

Delphi 5.0

Delphi 6.0

Delphi 7.0

C++ Builder 4.0

C++ Builder 5.0

C++ Builder 6.0

Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

Introduction To Image Processing with LEADTOOLS

Compression Using LEAD and JPEG Formats

Summary of All Supported Image File Formats

Compression Quality Factors


Version History

Current version: | 14.5
Last update: | November 2, 2005

Changes from Version 14 to Version 14.5

Changes from Version 13 to Version 14

Changes from Version 12.1 to Version 13

Changes from Version 12 to Version 12.1

Changes from Version 11.5 to Version 12

Changes from Version 10 to Version 11(11.5)

Version 10


Changes from Version 14 to Version 14.5

Version 14.5 of the LEADTOOLS VCL has changed from version 14 as follows:

With this mid-release of LEADTOOLS version 14, many new features are being introduced to the annotations. Some of these features alter the way annotations are displayed. Other features change or enhance the user interface. To maintain backward compatibility within version 14, most of these features must be enabled by calling the AnnOptions property. In LEADTOOLS version 15, these options will be enabled by default.

The following features are being introduced:

New Rubber Stamp Display Style

New XP Style Annotation Toolbar

New Alpha Background Fill Option

New Annotation Rotate Option

New Annotation Side Handles

New Annotation Multi-select

New Annotation Cursors

New ESC to Cancel

New Calibrate Ruler Feature

New Dot Dash Lines

New XML Format

New Text Annotation Options

For detailed information regarding the new features, refer to New Annotation Features of Version 14.5.

LEADTOOLS has improved the annotation toolkit by adding the following new features:

New functionality allows the user to extract information from annotation objects.

Several methods for manipulating annotation objects so they are flipped, reversed, or rotated.

Improve the annotation objects displaying and manipulating; such as; alter the object’s display order within the container, perform geometric transformations on an annotation, set the color display options of any annotation object, set the bitmap transparency if the annotation object(s) are Stamp or Point.

LEADTOOLS has added the following new features for the ImageList Control, importing and exporting bitmap lists and an extended sorting of items in the control.

LEADTOOLS has added new functionality to handle regions and masks.

When saving JBIG2 file, you can get or change the current values for the control options used by LEADTOOLS.

LEADTOOLS now supports the following file formats:

File Formats: ABIC Format (ABIC, ICA)

File Formats: JBIG2 Format (JB2)

New properties, methods and events:

The following list is the new properties, methods and events in version 14.5.

ImageList Control

ExportBitmapList method

ImportBitmapList method

SortExt method

Annotation Control

AnnCreateItem method

AnnCut method

AnnGetAngle method

AnnGetAutoBackColor method

AnnGetBitmap method

AnnGetContainer method

AnnGetMetafile method

AnnGetNodes method

AnnGetPredefinedMetafile method

AnnGetProtractorOptions method

AnnGetROP2 method

AnnGetSecondaryBitmap method

AnnGetSelected method

AnnGetSelectRect method

AnnGetShowFlags method

AnnGetTopContainer method

AnnGetTransparent method

AnnGetTransparentColor method

AnnRemove method

AnnSelectPoint method

AnnSelectRect method

AnnSetAutoBackColor method

AnnSetBitmap method

AnnSetMetafile method

AnnSetNodes method

AnnSetPredefinedMetafile method

AnnSetProtractorOptions method

AnnSetROP2 method

AnnSetSecondaryBitmap method

AnnSetShowFlags method

AnnSetTransparent method

AnnSetTransparentColor method

AnnOptions property

Regions and Masks

CreateMaskFromBitmapRgn method

SetRgnFromMask method

MaskBitmap property

JBIG2 Files Saving Options

JBIG2SaveFlags property

JBIG2TemplateType property

JBIG2GBATX1 property

JBIG2GBATY1 property

JBIG2GBATX2 property

JBIG2GBATY2 property

JBIG2GBATX3 property

JBIG2GBATY3 property

JBIG2GBATX4 property

JBIG2GBATY4 property

Miscellaneous

LoadFast property


Changes from Version 13 to Version 14

Version 14 of the LEADTOOLS VCL has changed from version 13 as follows:

The Common Dialog functionality has been removed from this help file and is presented in the new LEADTOOLS Common Dialog VCL objects help file. For information on the new version 14 of the LEADTOOLS Common Dialog VCL objects, refer to the LEADTOOLS Common Dialog VCL Objects Help File .

The Mixed Raster Content functionality has been removed from this help file and is presented in the new LEADTOOLS Mixed Raster Content VCL object help file. For information on the LEADTOOLS Mixed Raster Content VCL object, refer to the LEADTOOLS Mixed Raster Content VCL Object Help File .

LEADTOOLS now supports overlay bitmap drawing.

When loading PTOCA and AFP:PTOCA files, you can get and change the current values for the control options used by LEADTOOLS when loading a PTOCA file.

LEADTOOLS now lets you load embedded ICC profiles.

LEADTOOLS now supports the ability to instruct the toolkit to react dynamically depending on the bitmap size or the amount of available memory.

LEADTOOLS now can subtract the live (destination) bitmap from the mask (source) bitmap to show the differences between the two bitmaps.

LEADTOOLS now supports double buffering; which is used to reduce flickering when painting windows.

LEADTOOLS now can detect the registration marks.

LEADTOOLS has improved the brightness and contrast functionality by adding the following new features:

Improve the brightness of an image by adding bitmaps within a bitmap list.

Increase or decrease the brightness in the bitmap by multiplying the colors in the specified bitmap.

Performs an adaptive contrast enhancement (ACE) to areas that are originally low in contrast.

Changes the distribution of the red, green, or blue channels.

Applies brightness, contrast and intensity adjustments to enhance the image tonal range.

Change the hue, saturation and brightness of all or specified colors in the image.

Adjust the hue, saturation and brightness of an image by applying one of five mathematical functions to a bitmaps pixel values: square, square root, log, sine, and cosine and then multiplying the results by specified factor.

Remap pixel values using a lookup table, or by applying a linear transformation.

Set up window leveling options for a bitmap using a lookup table or a linear transformation.

Converts a bitmap into a black and white image without changing its bits per pixel by using a local threshold value for each pixel of the image.

Wraps techniques of image enhancements, such as contrast enhancement, edge enhancement and latitude reduction, for Computed Radiography (CR).

Correcting nonuniform brightness.

LEADTOOLS has added Fourier Transforms to remove noise from video signals, CCDs, and harmonic noise like:

Herringbone patterns seen in video images

Sine wave patterns

Moiré patterns

Halftone patterns

Interference patterns

LEADTOOLS has improved the Annotation Automation Object by adding new features.

Functionality has been added with Version 14 that makes it possible for you to create custom annotations that look and behave in almost any way imaginable.

LEADTOOLS has improved the automated annotation by adding new six tools:

Curve Tool

Closed Curve Tool

RTF Tool

PolyRuler Tool

Encrypt Tool

Text Pointer Tool

In addition, LEADTOOLS has made the following Annotation improvements:

Ability to create handles on existing annotation object to provide a custom user-interface or manipulating annotations.

Ability to create custom annotations

Improved options for all text annotations including

  • control of alignment

  • ability to rotate text

  • support for text tokens

  • import text from a file

Ability to fix annotations so that they are attached to the window instead of the image. A fixed annotation will not change size or move when the underlying image is scrolled or moved.

Improved options for annotation names

Improved ruler options for polyruler, ruler, protractor, cross-product, including

  • Smart Unit display

  • Option to display tic-marks

Improved "Point Annotation" options

Ability to store user-defined data in an annotation object

Ability to change all cursor associated with annotation automation

LEADTOOLS now supports the following file formats:

CIN

DjVu

CRW

DCR

DCS ECW

FITS

KDC

PSP

RTF SFF

MrSID

TIFF-FX

WMZ

LEADTOOLS now supports The PLT/RTF Options.

LEADTOOLS now supports AutoCAD Color Scheme.

LEADTOOLS now can compare all or part of one bitmap with all the areas of the same dimensions in another bitmap and finds those areas that match according to the measure of correlation.

LEADTOOLS now can be used to improve the brightness of an image by adding bitmaps within a bitmap list.

LEADTOOLS now can increase or decrease the brightness in the bitmap by multiplying the colors in the specified bitmap.

LEADTOOLS now filters a specified bitmap to detect colors in a specified intensity range in all planes or a specific plane.

LEADTOOLS now can combine image data from the source bitmap (the slave) and the destination bitmap (the master), using a perspective warp.

LEADTOOLS now supports linearizes the number of pixels locally in a bitmap, based on the specified color space.

LEADTOOLS now supports averaging the bitmaps in a list, eliminating random noise contained in the images.

LEADTOOLS now transforms the bitmap into a binary image.

LEADTOOLS now deinterlaces video source images by removing the black lines. It proceeds by merging lines in the image together and/or blending them together.

LEADTOOLS now smoothes the edges of a bitmap.

LEADTOOLS now can detect the edges in a bitmap by applying a statistical filter that analyzes the variations of colors in all directions around each pixel.

LEADTOOLS now can find the skeleton of regions or objects in a binary bitmap.

LEADTOOLS now converts a grayscale bitmap into a colored one by mixing or replacing the original values of the pixels with one or more new colors. Also it converts the image to a grayscale level by reducing the saturation of each color to zero.

LEADTOOLS now can removes holes from a bitmap region.

LEADTOOLS has improved the artistic effects by adding the following new features:

Adds shadows to a bitmap, letting you specify the threshold value, the direction of the light source, and whether the shadows are colored or grayscale.

Adds effects that simulate random color changes, scratches, dust and pits, making a bitmap look like it was made from an old film.

Splits the image into square or rectangular blocks. If the blocks are square, rotates each block by 0, 90, 180, or 270 degrees. If the blocks are rectangular, flips the blocks around the X-axis and Y-axis.

Adds light to the bitmap according to a function-based distribution. This functional light will be generated by one of the following methods: linear, quadratic, sine, cosine, or using freehand points.

Splits the image into square blocks and randomizes these blocks inside the image.

Divides the image into a certain number of rings. Each ring is rotated according to a rotate angle. The rotate angle for each ring will be chosen randomly by the function or can be passed to the function.

Adds a pseudo-3D wave effect to the bitmap by drawing horizontal lines across the bitmap and basing each lines height at each point on its brightness at that point.

Divides the bitmap into segments where each segments pixels have approximately the same color (homogenous color).

LEADTOOLS now can combine image data from the mask bitmap and underlay bitmap with an underlay effect.

Wraps the bitmap along the inside or outside of an arc pattern.

Warps the bitmap to a cylindrical shape.

Shears the bitmap by the wave drawn using amplitude values

Distorts the bitmap by the wave drawn using amplitude values

Makes a bitmap look like it was painted by an impressionist painter.

Divides the bitmap into rectangular or circular cells and then recreates the image using those cells filled with the minimum, maximum, or average pixel value, depending upon the effect that was set.

Converts the bitmap from rectangular to polar coordinates and vice versa.

Warps the bitmap by pinching it toward the center or expanding the bitmap away from its center.

Rotates the bitmap pixels around a center point.

Distorts a bitmap using a wave radiating from the specified center.

Warps the image in concentric rings.

Warps the image around a 3D spherical shape.

Produces a swirl pattern by rotating the bitmap the specified number of degrees about the specified point.

Distorts the bitmap with two perpendicular waves at the specified angle and with the specified wave type.

Creates thin lines, directed along the specified angle, on the specified bitmap.

Blurs the bitmap along radial lines starting from the specified center point.

Distorts the bitmap with a wave zoomed from the specified center.

Draws a water wave effect

LEADTOOLS has improved the adjusting colors in an image by adding the following new features:

Performs specific Mathematical or logical operations on the colors of a bitmap.

Replaces specified colors by adjusting values of hue, saturation and brightness.

Using any one of eight color spaces, resets those bitmaps pixel component values that fall inside or outside of a specified range.

Changes the distribution of the red, green, or blue channels.

Colors an 8, 12 or 16-bit grayscale bitmap. The function changes the color bits/pixel of the bitmap from the specified formats into 24-bit RGB format.

Selects a specified number of bits of an 8, 12 or 16-bit grayscale bitmap and puts them into a mask, then colors the bitmap depending on the mask. This can show bitmap variances depending on user-defined conditions.

Selects a specified number of bits from an 8, 12 or 16-bit grayscale bitmap into a mask and places the mask in a new 8, 12 or 16-bit grayscale bitmap.

Makes dark values darker and light values lighter to automatically enhance shadows and brighten the image.

Adds a three-dimensional texture pattern by applying the bump image to the destination image.

Rebalances the colors in a bitmap in order to make color adjustments and to correct images which have more color than others.

Applies color leveling to an image. It changes the image shadows, midtones and highlights.

Remaps the bitmap into a collection of rotated rectangles (cubic faces), in the Cubist style.

Draws a star on the bitmap.

Simulates painting an image with the watercolor dry brush technique.

Wraps the bitmap onto a 3D plane.

Wraps the bitmap along its radius on a 3D surface.

Divides the image into cells and makes it look as if it is being viewed through glass blocks.

Makes colored edges shine with a neon-like glow.

Simulates the secondary reflections caused when bright lights are facing the camera lens.

Adds many spots of directed light sources to the bitmap.

Lightens or darkens all or part of a bitmap by remapping the pixel values.

Reflects the bitmap on an ocean surface.

Corrects color values by shifting the sample colors to the target colors.

Places the bitmap on parallel planes along the Z-axis bent towards a center point.

Places the bitmap on parallel planes along the Z-axis.

Corrects color values by shifting the sample colors to the target colors.

Changes the color of a bitmap by altering the definitions of one or more colors used by the bitmap.

Smoothes the rough edges in the bitmap.

applies color leveling to an image and changes the image's shadows, midtones and highlights.

Places the bitmap inside a tunnel along the Z-axis.

Changed or Removed properties, methods and events:

The following properties, methods and events were changed or removed in version 14.

TransparentColor property (Obsolete Use BitmapTransparentColor property.)

UseTransparentColor property (Obsolete Use BitmapEnableTransparency property.)

New properties, methods and events:

The following list is the new properties, methods and events in version 14.

AdaptiveContrast method

AddMessage method

AddShadow Method

AddWeightedBitmaps method

Aging method

AnnAddUserHandle method

AnnAdjustPoint method

AnnAutoCursor property

AnnAutoHilightPen property

AnnBottomPreviousClip property

AnnChangeUserHandle method

AnnClearTextTokenTable method

AnnContainerPointX property

AnnContainerPointY property

AnnConvert method

AnnDefine2 method

AnnDeleteTextTokenTable method

AnnDeleteUserHandle method

AnnDescription property

AnnDistance property

AnnDistanceCount property

AnnEnableAdjust property

AnnEncryptApply method

AnnEncryptOptions property

AnnEnumerateHandles method

AnnEnumerateTextToken method

AnnFixed property

AnnFlags property

AnnGetBitmapDpiX method

AnnGetBitmapDpiY method

AnnGetDistance2 method

AnnGetEncryptOptions method

AnnGetNameOptions method

AnnGetPointOptions method

AnnGetSecondaryMetaFile method

AnnGetUserHandle method

AnnGetUserHandles method

AnnHandle property

AnnHandleID property

AnnHandleIndex property

AnnHitTestExt method

AnnInsertTextTokenTable method

AnnIsFixedRect method

AnnLeftPreviousClip property

AnnNameOptions property

AnnObjectHitHandle property

AnnotationName property

AnnPointOptions property

AnnPopFixedState method

AnnPositionResult property

AnnPredefinedBitmap property

AnnPushFixedState method

AnnRestrictCursor method

AnnRestrictToContainer property

AnnRightPreviousClip property

AnnRotateAngle property

AnnRTFText property

AnnRTFTextLength property

AnnRulerUnit property

AnnSetBitmapDpiX method

AnnSetBitmapDpiY method

AnnSetEncryptOptions method

AnnSetNameOptions method

AnnSetPointOptions method

AnnSmartUnit property

AnnTextAlign property

AnnTextExpandTokens property

AnnTextPointerFixed property

AnnTextRotate property

AnnTicMarkLength property

AnnToken property

AnnTokenString property

AnnTokenType property

AnnTopPreviousClip property

AnnTotalDistance property

AnnTotalRulerUnit property

AnnTotalSmartUnit property

ApplyLinearModalityLUT Method

ApplyLinearVOILUT Method

ApplyMathLogic method

ApplyModalityLUT Method

ApplyTransformationParameters method

ApplyVOILUT Method

AutoBinary method

AutoColorLevel method

BackNameColor property

Bending method

BumpMap method

ChannelMix method

ClearDecryptorKey property (TAnnEncryptOptions)

ClearEncryptorKey property (TAnnEncryptOptions)

ClientPointX property

ClientPointY property

ClientX property (TAnnHandle)

ClientX property (TAnnHandleInfo)

ClientY property (TAnnHandle)

ClientY property (TAnnHandleInfo)

ColorIntensityBalance method

ColorizeGray method

ColorLevel method

ColorReplace Method

ColorThreshold Method

ContainerX property (TAnnHandle)

ContainerX property (TAnnHandleInfo)

ContainerY property (TAnnHandle)

ContainerY property (TAnnHandleInfo)

ContrastBrightIntensity method

ConvertUnsignedToSigned Method

Correlation method

CountLUTColors method

CountLUTColors method

Cubism method

Cylindrical method

Deinterlace method

Desaturate method

Deskew method

DiceEffect method

DigitalSubtract method

DirectionEdgeStatistical Method

DiscreteFourierTransformation Method

DisplayFourierTransformation Method

DrawStar method

Dry method

DynamicBinary method

EdgeDetectEffect method

EdgeDetectStatistical method

Encryptor property (TAnnEncryptOptions)

ExtractMessage method

FaceNameColor property (TAnnNameOptions)

FastFourierTransformation Method

FillColor property (TAnnHandle)

FillColor property (TAnnHandleInfo)

Flags property (TAnnEncryptOptions)

Flags property (TAnnHandle)

Flags property (TAnnNameOptions)

Flags property (TAnnPointOptions)

FontBold property (TAnnNameOptions)

FontItalic property (TAnnNameOptions)

FontName property (TAnnNameOptions)

FontSize property (TAnnNameOptions)

FontStrikeOut property (TAnnNameOptions)

FontUnderLine property (TAnnNameOptions)

FreeFourierTransformationData method

FreeHandShear method

FreeHandWave method

FreePlaneBend method

FreeRadBend method

FrequencyFilter Method

FrequencyFilterMask Method

FunctionalLight method

GetCurvePoints method

GetFeretsDiameter method

GetLinearVOILUT method

GetMarksCenterMass method

GetObjectInfo Method

GetRgnContourPoints Method

GetRgnPerimeterLength Method

GetStatisticsInfo Method

GetTransformationParameters method

GlassEffect method

GlowFilter method

GrayScaleToDuotone method

GrayScaleToMultitone Method

Halftone method

ID property (TAnnHandle)

ID property (TAnnHandleInfo)

Impressionist method

Index property (TAnnHandleInfo)

InitFourierTransformationData method

IntensityDetect method

Key property (TAnnEncryptOptions)

LensFlare method

Light method

LocalHistoEqualize method

MagGlassPaintContrast property

MagGlassPaintGamma property

MagGlassPaintIntensity property

MathFunction Method

Multiply method

MultiScaleEnhancement method

NameRestrict property (TAnnNameOptions)

NeverEncrypted property (TAnnEncryptOptions)

Ocean method

OLEDragCursor property

OnAnnChange event

OnAnnClicked event

OnAnnCreate event

OnAnnDestroy event

OnAnnDrawn event

OnAnnEnumerate event

OnAnnEnumerateHandles Event

OnAnnEnumerateHandles Event

OnAnnEnumerateTextTokenTable Event

OnAnnEnumerateTextTokenTable Event

OnAnnHyperlink event

OnAnnHyperlinkMenu event

OnAnnLocked event

OnAnnMenu event

OnAnnMouseDown event

OnAnnMouseMove event

OnAnnMouseUp event

OnAnnSelect event

OnAnnToolChecked event

OnAnnToolDestroy event

OnAnnUnlocked event

OnAnnUserMenu event

OnMagGlassCursor event

OnOLECompleteDrag event

OnOLEDragOver event

OnOLEGiveFeedback event

OnOLEStartDrag event

PenColor property (TAnnHandle)

PenColor property (TAnnHandleInfo)

PDFInitDir property

Pixelate method

Plane method

PlaneBend method

PLTPenColor property

PLTPenWidth property

PointBitmap property (TAnnPointOptions)

PointBorderColor property (TAnnPointOptions)

PointFillColor property (TAnnPointOptions)

PointFixedSize property (TAnnPointOptions)

PointRadius property (TAnnPointOptions)

PointsCount property

PointTransparentFill property (TAnnPointOptions)

PointUseBitmap property (TAnnPointOptions)

Polar method

PTKResolution property

Punch method

PuzzleEffect method

RadialBlur method

RadWave method

RemapHueTablesSize property

RevEffect Method

RingEffect method

Ripple method

RTFBottomMarg property

RTFLeftMarg property

RTFPaperHeight property

RTFPaperWidth property

RTFRightMarg property

RTFTopMarg property

SampleTarget method

SaveDecryptorKey property (TAnnEncryptOptions)

SaveEncryptorKey property (TAnnEncryptOptions)

SearchRegMarks method

Segment Method

SelectData method

SelectiveColor method

SetMagGlassPos method

SetRgnBorder method

Shape property (TAnnHandle)

Shape property (TAnnHandleInfo)

ShiftData method

ShowMagGlass method

ShowName property (TAnnNameOptions)

Skeleton method

SmoothEdges method

Spherize method

SubtractBackground Method

Swirl method

TextureAlphaBlend method

Totalhandles property (TAnnHandleInfo)

Tunnel method

UpdateMagGlassFromHandle method

UserFilter Method

Visible property (TAnnHandle)

Visible property (TAnnHandleInfo)

Wave method

Wind method

ZoomBlur method

ZoomWave method


Changes from Version 12.1 to Version 13

Version 13 of the LEADTOOLS VCL has changed from version 12.1 as follows:

LEADTOOLS now supports region of interest in J2K files.

LEADTOOLS now supports the drag-and-drop feature for the ImageList and Main controls.

IMPORTANT NOTICE CONCERNING SUPPORT FOR ISIS DRIVERS:

LEADTOOLS TOOLKITS CONTAIN SUPPORT FOR ISIS® DRIVERS USING PIXEL TRANSLATIONS RUNTIME (PIXDFLTN. DLL) VERSION NUMBER 55.1.260.832 OR EARLIER ALLOWING LEADTOOLS TO DIRECTLY INTERFACE WITH THE ISIS DRIVERS.

LEADTOOLS TOOLKITS DO NOT DIRECTLY COMMUNICATE WITH ISIS ® DRIVERS USING PIXEL TRANSLATIONS RUNTIME (PIXDFLTN) VERSION NUMBER 56.*.*.* OR HIGHER. A LEADTOOLS APPLICATION WHICH OPERATES PROPERLY WITH THE EARLIER VINTAGE ISIS DRIVERS WILL CEASE TO OPERATE PROPERLY IF THE OLDER ISIS DRIVER IS REPLACED WITH A NEWER ISIS DRIVER REQUIRING THE PIXEL TRANSLATIONS RUNTIME DLL VERSION NUMBER 56.*.*.* OR HIGHER.

Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is now available in Document and Medical toolkits.

LEADTOOLS no longer provides the Netscape Plug In.

LEADTOOLS now supports the following file formats:

PTOCA (Presentation Text Object Content Architecture)

SCT (Scitex Continuous Tone Format)

PCL (Printer Command Language)

AFP

IOCA (Image Object Content Architecture)

SHP (ESRI Shape Format)

SMP

CMW

LEADTOOLS now supports a Mixed Raster Content module for support of images that contain mixed image and text components.

LEADTOOLS now provides more extensive annotation support.

LEADTOOLS now supports super-compression of 1-bit and 24-bit bitmaps.

LEADTOOLS now provides the means to get information about annotation files and delete pages from annotation files.

LEADTOOLS can perform Lossless transformations (rotate, flip and reverse) on JPEG, CMP and JPEG TIFF files. This is superior to loading the image, performing the transformation and the saving the image.

LEADTOOLS provides support for removing red-eye from images.

LEADTOOLS supports an anti-aliasing filter.

LEADTOOLS can perform Gaussian blurring.

LEADTOOLS lets you swap color channel values across the R, G and B color channels.

A new method lets you give images an "old-fashioned" look by converting to "colored gray".

LEADTOOLS can add or average bitmaps within a list.

LEADTOOLS lets you resize individual regions within a bitmap.

LEADTOOLS can add motion blur to images.

New methods and properties let you combine images using a single opacity value, or varying opacity values. Using the varying opacity values creates a feathering appearance.

LEADTOOLS lets you add borders and frames to bitmaps.

The LEADTOOLS Image List now lets you redraw individual items within the Image List.

LEADTOOLS provides support for determining whether a magnifying glass is attached to a window, a control or an object.

Support for ISIS ASCII tags is now provided.

LEADTOOLS now supports loading and saving layers in PSD files.

LEADTOOLS now lets you get or set pixel data for 48 and 64-bit bitmaps.

The LEADTOOLS picturize capabilities have been extended to picturize an image using a single bitmap or a list of bitmaps.

LEADTOOLS now lets you alter the shape of certain annotations by holding down the Shift key while drawing. (An Ellipse object will automatically be drawn as a circle; other annotations like notes, buttons, audio clips, etc. will automatically be drawn as squares.)

LEADTOOLS now lets you associate metafiles with hotspot annotations and freehand hotspot annotations.

LEADTOOLS now provides the ability move the name of annotation objects.

LEADTOOLS now lets you create curved regions or add a curved region to an existing region.

LEADTOOLS now lets you convert standard curves to Bezier curves.

LEADTOOLS can now resize bitmaps during the load process.

LEADTOOLS now lets you save bitmaps to files in memory.

JPEG 2000 file format support

J2KUseROI property

J2KROIControl property

J2KROIRect property

Drag-and-Drop

EnableOLEDragMethod property (ImageList Control)

EnableOLEDragMethod property (Main Control)

OLEDragCursor property (ImageList Control)

OLEDragCursor property (Main Control)

OnOLECompleteDrag event (ImageList Control)

OnOLECompleteDrag event (Main Control)

OnOLEDragOver event (ImageList Control)

OnOLEDragOver event (Main Control)

OnOLEGiveFeedback event (ImageList Control)

OnOLEGiveFeedback event (Main Control)

OnOLEStartDrag event (ImageList Control)

OnOLEStartDrag event (Main Control)

Animations

AnimationBackColor property

AnimationBitsPerPixel property

AnimationEnable property

AnimationHeight property

AnimationLoop property

AnimationPalette property

AnimationPalette index

AnimationWidth property

AutoAnimationLoop property

Annotations (Document/Medical only)

AnnBoundingRectHeight property (Annotation Control)

AnnBoundingRectLeft property (Annotation Control)

AnnBoundingRectTop property (Annotation Control)

AnnBoundingRectWidth property (Annotation Control)

AnnDeletePage method

AnnDeletePageMemory method

AnnFileInfo method

AnnFileInfoMemory method

AnnInfoFormat property

AnnInfoTotalPages property

AnnInfoVersion property

AnnGetNameOffsetX method

AnnGetNameOffsetY method

AnnGetNameRestrict method

AnnNameBoundingRectHeight property

AnnNameBoundingRectLeft property

AnnNameBoundingRectTop property

AnnNameBoundingRectWidth property

AnnNameRectHeight property

AnnNameRectLeft property

AnnNameRectTop property

AnnNameRectWidth property

AnnSetNameOffsetX method

AnnSetNameOffsetY method

AnnSetNameRestrict method

Common Dialog

ColorResFlags property

ColorResPalette property

ColorResPaletteCount property

GammaBlueChannel property

GammaEnableAllChannels property

GammaGreenChannel property

GammaRedChannel property

Halftone method

HalftoneAngle property

HalftoneType property

ResizeFlags Property

ResizeMethod property

ResolutionX property

ResolutionY property

Image Processing

AddBitmaps method

AddBorder method

AddFrame method

AlphaBlend method

AntiAlias method

BalanceColors method

BitmapSize property

Combine method (Main Control)

CombineWarp method (Main Control)

CombineExt method

ConvertSignedToUnsigned method

ConvertToColoredGray method

CreateFadedMask method

EdgeDetector method

FeatherAlphaBlend method

GaussianFilter method

GetFunctionalLookupTable method

GetUserLookupTable method

GrayScaleExt method (Main Control)

HistogramTableSize property

LineProfile method

LoadFileTile method

LoadMemoryTile method

MotionBlur method

RemoveRedeye method

PicturizeBitmapList method

PicturizeSingle method

SwapColors method

UnsharpMask method

ImageList

FirstVisibleItem property (ImageList Control)

LoadDatabase method (ImageList Control)

OwnerDrawItem event (ImageList Control)

OwnerDrawItems property (ImageList Control)

SaveDatabase method (ImageList Control)

SelectedCount property (ImageList Control)

SelectedItems property (ImageList Control)

ViewSize property (ImageList Control)

ISIS

ISISGetASCIITag method (ISIS® Control)

ISISGetASCIITagChoice method (ISIS® Control)

ISISGetASCIITagChoiceCount method (ISIS® Control)

ISISGetTagChoice method (ISIS® Control)

ISISGetTagChoiceCount method (ISIS® Control)

ISISSetASCIITag method (ISIS® Control)

Magnifying Glass

HasMagGlass property (Main Control)

MagGlassPaintContrast property

MagGlassPaintGamma property

MagGlassPaintIntensity property

OnMagGlassCursor event

SetMagGlassPos method

ShowMagGlass method

UpdateMagGlassFromHandle method

Mixed Raster Content Module

AutoSegment method

BackgroundCoder property

BackgroundQFactor property

BaseBackColor property

BaseForeColor property

Bitmap property

DeleteSegment method

EnableMethodErrors property

EnhanceQuality property

EnumSegments method

GetPagesCount method

IsSupportLocked method

Load method

MaskCoder property

OnAutoSegment event

OnEnumSegments event

Save method

SaveT44 method

SetNewStripe method

SetStripeSegment method

StripeMaxHeight property

UnlockSupport method

UpdateSegmentData method

PSD Layers

InfoLayers property

LayerBlendModeKey property

LayerClipping property

LayerLeft property

LayerMaskBitmap property

LayerOpacity property

LayerTop property

LoadLayer method

SaveLayers property

Scrolling

HScrollInfo property (Main Control)

VScrollInfo property (Main Control)

Standard Curves and Bezier Curves

BezierSize property (Main Control)

BezierX property (Main Control)

BezierY property (Main Control)

CurveClose property (Main Control)

CurveSize property (Main Control)

CurveTension property (Main Control)

CurveToBezier method (Main Control)

CurveType property (Main Control)

CurveX property (Main Control)

CurveY property (Main Control)

SetRgnCurve method (Main Control)

UserLUTCurveSize property

UserLUTCurveX property

UserLUTCurveY property

Super Compression

BitmapCompression property

Thumbnail Browser

SkipFile property (ThumbnailBrowser Control)

Transforming Files

OnTransformMarker event

TransformFile method

WriteMarker method

WriteMarkerAction property

Miscellaneous

BitmapSize property (Main Control)

FileSizeWritten property

GetBitmapClipSegments method

GetBitmapClipSegmentsMax method

GetPixelData method

HistogramTableSize property (Main Control)

IsSigned property

LoadSigned property

OnBitmapDataPathClosed event

PutPixelData method

RemapTableSize property

RenderCenter property

ResizeRgn method

SaveOffset method

SavePad4 property

SaveTileHeight property

SaveTileWidth property


Changes from Version 12 to Version 12.1

Version 12.1 of the LEADTOOLS VCL has changed from version 12 as follows:

Essentially the changes are as follows:

LEADTOOLS now supports J2K and JP2 JPEG 2000 file formats. (JPEG 2000 Plug In only).

The LEADTOOLS Annotation Control and Annotation Toolbar Control, formerly implemented in the LT12xxAN.BPL, have been replaced with a new LEADTOOLS Annotation Control, implemented in LT12xxNT.BPL. Many of the properties, methods and events in the LT12xxAN.BPL have either undergone a name change, or have been completely removed from LT12xxNT.BPL. For a comparison of the old and new properties, methods and events, see below:

Old property, method or event: | New property, method or event:
AnnLoad method | New AnnLoad method
AnnSave method | New AnnSave method
AnnSaveTag method | New AnnSaveTag method
CanCopy method | No corresponding new method or property.
CanCut method | No corresponding new method or property.
CanPaste method | AnnPasteReady property
CanUndo method | AnnUndoDepth property
Copy method | AnnCopy method
CreateToolbar method | CreateTB method
CurSelTool property | Tool property
Cut method | No corresponding new method or property.
DrawEnable property | AnnAutoDrawEnable property
IsCreated method | h_Wnd property
Load method (Annotation Control) | Load method (Main Control) and AnnLoad method (Annotation Control)
Lock method | AnnLock method
MenuEnable property | AnnAutoMenuEnable property
OnAnnDrawn event | New OnAnnDrawn event
OnTBChecked event | OnAnnToolChecked event
OnTBShow event | h_Wnd property
OnUserCloseTB event | h_Wnd property
Paste method | AnnPaste method
Print method | Render method (Main Control)
Realize method | AnnRealize method
SetTool method | Tool property
Show method | Visible property
ShowLockedIcon method | AnnShowLockedIcon property
Undo method | AnnUndo method
Unlock method | AnnUnlock method
Unrealize method | AnnUnrealize method
UserMode property | AnnUserMode property
VisibleButton property | ButtonVisible property

A full list of the current Annotation properties, methods and events, is provided at the end of this topic.

LEADTOOLS DICOM VCL now supports several new classes, including:

Grayscale Softcopy Presentation State

Basic Voice Audio

12-Lead ECG

General ECG

Ambulatory ECG

Hemodynamic

Basic Cardiac EP

LEADTOOLS DICOM VCL now supports several new UIDs, including:

JPEG-LS Lossless Image Compression Transfer Syntax

JPEG-LS Lossy (Near-Lossless) Image Compression Transfer Syntax

Ambulatory ECG Waveform Storage

Hemodynamic Waveform Storage

Cardiac Electrophysiology Waveform Storage

Basic Voice Audio Waveform Storage

Grayscale Softcopy Presentation State Storage

LEADTOOLS DICOM VCL now supports several new Modules, including:

Presentation series

Presentation state

Bitmap display shutter

Overlay curve activation

Displayed area

Graphic annotation

Spatial transformation

Graphic layer

Softcopy VOI LUT

Softcopy presentation LUT

Synchronization

Waveform identification

Waveform

Waveform annotation

LEADTOOLS VCL now provides a means of determining whether a loaded PNG file contains alpha channel information.

LEADTOOLS VCL now supports Magnifying Glass features that let you update the bitmap from another source during the procedure.

LEADTOOLS also provides support for customizing the shape of the magnifying glass.

LEADTOOLS VCL now supports Annotation and Annotation Toolbar capabilities.

LEADTOOLS VCL now lets you retrieve bitmap information based on a row value and a column value.

Optional PDF plug-in for PDF file format support (PDF, PS, and EPS) is now available.

LEADTOOLS now provides support for controlling the rasterizing of vector image files.

LEADTOOLS can now convert between V4 and V5 DIBs.

DICOM now supports Structured IODs.

LEADTOOLS can now convert from JPEG compressed DIBs.

LEADTOOLS can now convert from RLE4 and RLE8 compressed DIBs.

LEADTOOLS now provides support for loading and saving PDF files.

LEADTOOLS now provides support for controlling the rasterizing of vector image files.

The rest of this section lists the new properties, methods and events included in version 12.1.

Annotation Control

AddItem method

AnnAddUndoNode method

AnnAutoDialogFontSize property

AnnAutoDrawEnable property

AnnAutomation property

AnnAutoMenuEnable property

AnnAutoResize property

AnnAutoRotate property

AnnContainer property

AnnCopy method

AnnCreate method

AnnDataPath property

AnnDefine method

AnnDestroy method

AnnEnumerate method

AnnFlip method

AnnGetAutoMenuItemEnable method

AnnGetAutoText method

AnnGetGrouping method

AnnGetHyperlinkParam method

AnnGetHyperlinkString method

AnnGetHyperlinkType method

AnnGetItemHandle method

AnnGetLocked method

AnnGetObjectFromTag method

AnnGetPointCount method

AnnGetPointX method

AnnGetPointY method

AnnGetSelectCount method

AnnGetSelectList method

AnnGetTag method

AnnGetType method

AnnGetVisible method

AnnGroup method

AnnHyperlinkMenuEnable property

AnnInsert method

AnnLoad method

AnnLoadMemory method

AnnLock method

AnnMove method

AnnPaste method

AnnPasteReady property

AnnRealize method

AnnRectHeight property

AnnRectLeft property

AnnRectTop property

AnnRectWidth property

AnnReverse method

AnnRotate method

AnnSave method

AnnSaveMemory method

AnnSaveTag method

AnnShowLockedIcon property

AnnSetAutoDefaults method

AnnSetAutoMenuItemEnable method

AnnSetAutoText method

AnnSetGrouping method

AnnSetHyperlinkMsg method

AnnSetHyperlinkString method

AnnSetSelected method

AnnSetTag method

AnnSetUser method

AnnSetVisible method

AnnShowLockedIcon property

AnnTool property

AnnToolbar property

AnnUndo method

AnnUndoDepth property

AnnUndoEnable property

AnnUngroup method

AnnUnlock method

AnnUnrealize method

AnnUserMode property

AutoSetTool property

ButtonBitmapDown property

ButtonBitmapUp property

ButtonColumns property

ButtonCount property

ButtonMenuText property

ButtonMenuTextID property

ButtonMenuTool property

ButtonRows property

ButtonTool property

ButtonToolCount property

ButtonToolTipText property

ButtonToolTipTextID property

ButtonVisible property

Count property

CreateTB method

DeleteItem method

GetSubMenu method

h_Wnd property

ItemChecked property

ItemEnabled property

ItemID property

ItemString property

ItemType property

OnAnnChange event

OnAnnClicked event

OnAnnCreate event

OnAnnDestroy event

OnAnnDrawn event

OnAnnEnumerate event

OnAnnHyperlink event

OnAnnHyperlinkMenu event

OnAnnLocked event

OnAnnMenu event

OnAnnMouseDown event

OnAnnMouseMove event

OnAnnMouseUp event

OnAnnSelect event

OnAnnToolChecked event

OnAnnToolDestroy event

OnAnnUnlocked event

OnAnnUserMenu event

Point property

SetMousePos method

Tool property

Visible property

Bitmap Row

BitmapBytesPerLine property

BitmapOrder property

GetBitmapRow method

GetBitmapRowCol method

PutBitmapRow method

PutBitmapRowCol method

JPEG 2000 file format support

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedBaseMantissa property

J2KGuardBits property

J2KProgressOrder property

J2KSetDefaults method

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property

PDF file format support

PDFDisplayDepth property

PDFGraphicsAlpha property

PDFSaveUseDPI property

PDFTextAlpha property

PDFUseLibFonts property

PDFXResolution property

PDFYResolution property

Rasterizing vector files

RasterizeViewMode property

RasterizeViewportHeight property

RasterizeViewportWidth property

Magnifying Glass

MagGlassBitonalScaling property

MagGlassFlags property

MagGlassMask property

MagGlassMaskCount property

MagGlassPaintDither property

MagGlassPaintPalette property

MagGlassPaintScaling property

MagGlassPointer property

StartMagGlass method

StopMagGlass method

UpdateMagGlassShape method

Miscellaneous

InfoHasAlpha property

OnBitmapDataPathClosed event


Changes from Version 11.5 to Version 12

Version 12 of the LEADTOOLS VCL has changed from version 11.5 as follows:

The product line in Version 12 has been redesigned. If you are an existing LEADTOOLS customer, please take a moment to familiarize yourself with the new line of products and the new features.

Essentially the changes are as follows:

LEADTOOLS no longer supports 16-bit development environments.

LEADTOOLS Imaging is now LEADTOOLS Raster Imaging.

LEADTOOLS Imaging Pro is now LEADTOOLS Raster Imaging Pro.

LEADTOOLS Vector Imaging Suite is no longer available.

LEADTOOLS Vector Imaging Pro Suite is now LEADTOOLS Vector Imaging Pro. It no longer includes LEADTOOLS Imaging Pro, but provides many more vector features, including automation, container and toolbar capabilities.

LEADTOOLS Document Express is now LEADTOOLS Document Imaging. It no longer includes support for Multimedia and Vector features.

LEADTOOLS Document Express Suite is now LEADTOOLS Document Imaging Suite. It no longer includes support for Multimedia and Vector features. It now includes a "Clean-up" module for improving 1-bit images.

LEADTOOLS Medical Express is now LEADTOOLS Medical Imaging. It no longer includes Multimedia and Vector support.

LEADTOOLS Medical Express Suite is now LEADTOOLS Medical Imaging Suite. It no longer includes Multimedia and Vector support.

Reduced the number of TLS slots (thread local storage) used by LEADTOOLS DLLs. Previous versions of LEADTOOLS used up to 23 TLS slots. LEADTOOLS v12 now uses up to 2 TLS slots.

Optimized memory management, which increases the speed of all LEADTOOLS functions.

Redesigned the CCITT G3/G4 compression/decompression process, resulting in an additional 80% speed increase over version 11.5.

Hand-optimized (MMX, PII and PIII) faster code for the JPEG compression/decompression process.

Added more flavors to most LEADTOOLS 12 file filters.

Optional Raster plug-ins for vector file format support (DXF, DWG, DRW, PLT, TIFF with DXF, and INTERGRAPH_VECTOR) are now available.

The Picturize algorithm now supports more options.

TIFF files can be loaded and saved faster.

Loading (decompressing) and saving (compressing) JPEG files have been optimized for MMX, Pentium II and Pentium III. Most files now compress 100% faster and decompress 50% faster.

Loading and saving TIFF files with CMP and JBIG compression are now supported.

Saving vector images as a DXF inside a TIFF file is now supported in LEADTOOLS Vector Imaging Pro.

Loading and saving uncompressed SGI files are now supported.

Loading and saving RLE compressed SGI files are now supported.


Changes from Version 10 to Version 11(11.5)

Version 11 of the LEADTOOLS VCL has changed from version 10 as follows:

LEADTOOLS now supports 48-bit and 64-bit bitmaps. 48-bit bitmaps are color bitmaps with 16-bits per each component (R, G and B). 64-bit bitmaps are 48-bit bitmaps with alpha channel information (16-bit alpha value). (11.5) (Medical Express only)

The Netscape Plug-in now installs by clicking on a self-extracting file and provides more image processing. (11.5)

LEADTOOLS VCL now supports a new Screen Capture control for capturing all or part of the screen. (11.5)

An ImageList Control has been added to make working with and displaying a list of images simple. (11.5)

You can now browse a directory for LEAD supported images and generate thumbnails. (11.5)

Extensive DICOM file format support is now provided. (Medical Express toolkits only) (11.5)

The following new formats are supported:

FILE_CLP (11.5)

FILE_XWD10 (11.5)

FILE_XWD11 (11.5)

FILE_ANI (11.5)

FILE_FLC (11.5)

FILE_DRW (11.5)

FILE_CGM (11.5)

FILE_PCT (Vector) (11.5)

FILE_PLT (11.5)

FILE_INTERGRAPH_VECTOR (11.5)

FILE_PBM_ASCII

FILE_PBM_BINARY

FILE_PGM_ASCII

FILE_PGM_BINARY

FILE_PPM_ASCII

FILE_PPM_BINARY

FILE_CUT

FILE_XPM

FILE_XBM

FILE_IFF_ILBM

FILE_IFF_CAT

FILE_INTERGRAPH_RLE

FILE_DICOM_RLE_GRAY

FILE_DICOM_RLE_COLOR

FILE_DICOM_JPEG_GRAY

FILE_DICOM_JPEG_COLOR

FILE_CALS4

FILE_CALS2

FILE_CALS3

FILE_MPEG2

FILE_DXF.

[Express editions] Support for ISIS scanning has been added.

The SaveFormatFlags property has be removed.

The following properties, methods and events have been added:

ImageList Control (11.5)

AllowSelection property (ImageList Control)

BackColor property (ImageList Control)

BitonalScaling property (ImageList Control)

BorderColor property (ImageList Control)

Clear method (ImageList Control)

ColumnCount property (ImageList Control)

Count property (ImageList Control)

CurrentPage property (ImageList Control)

EnableMethodErrors property (ImageList Control)

Error property (ImageList Control)

ErrorMsg property (ImageList Control)

DisplayItemText property (ImageList Control)

EnableKeyboard property (ImageList Control)

EnsureVisible method (ImageList Control)

Font property (ImageList Control)

ForeColor property (ImageList Control)

HitTest method (ImageList Control)

Insert method (ImageList Control)

InsertAt method (ImageList Control)

InsertFromBitmapList method (ImageList Control)

IsSupportLocked method (ImageList Control)

Item property (ImageList Control)

ItemBackgroundColor property (ImageList Control)

ItemHeight property (ImageList Control)

ItemHorizontalSpacing property (ImageList Control)

OnItemSelected event (ImageList Control)

ItemVerticalSpacing property (ImageList Control)

ItemWidth property (ImageList Control)

LoadFromFile method (ImageList Control)

PageCount property (ImageList Control)

PaintDither property (ImageList Control)

Remove method (ImageList Control)

RowCount property (ImageList Control)

SaveToFile method (ImageList Control)

OnScroll event (ImageList Control)

ScrollItems method (ImageList Control)

ScrollStyle property (ImageList Control)

SelectAll method (ImageList Control)

SelectionColor property (ImageList Control)

SelectionStyle property (ImageList Control)

Sort method (ImageList Control)

UnlockSupport method (ImageList Control)

Thumbnail Browser Control (11.5)

BrowseDir method

ContinueBrowse property

DitherFlags property

EnableMethodErrors property

Error property

ErrorMsg property

ExpandMultipage property

ForceSize property

IncludeSubDirectories property

InfoBits property

InfoCompression property

InfoFormat property

InfoHeight property

InfoPage property

InfoSizeDisk property

InfoSizeMem property

InfoTotalPages property

InfoWidth property

InfoXRes property

InfoYRes property

IsSupportLocked method

LoadStamp property

MaintainAspect property

MaxSizeDisk property

MaxSizeMem property

PaletteFlags property

Resample property

Filter property

StopOnError property

ThumbnailBackgroundColor property

ThumbnailBitsPerPixel property

ThumbnailEvent event

ThumbnailHeight property

ThumbnailWidth property

UnlockSupport method

Screen Capture Control (11.5)

Bitmap property (Refer to Ltscrvcl.hlp)

CaptureActiveClient method (Refer to Ltscrvcl.hlp)

CaptureActiveWindow method (Refer to Ltscrvcl.hlp)

CaptureArea method (Refer to Ltscrvcl.hlp)

CaptureAreaBitmapWithRegion property (Refer to Ltscrvcl.hlp)

CaptureAreaDrawCursor property (Refer to Ltscrvcl.hlp)

CaptureAreaDrawEllipseHeight property (Refer to Ltscrvcl.hlp)

CaptureAreaDrawEllipseWidth property (Refer to Ltscrvcl.hlp)

CaptureAreaDrawLineColor property (Refer to Ltscrvcl.hlp)

CaptureAreaDrawLineStyle property (Refer to Ltscrvcl.hlp)

CaptureAreaEnableKeyboard property (Refer to Ltscrvcl.hlp)

CaptureAreaFillBackColor property (Refer to Ltscrvcl.hlp)

CaptureAreaFillForeColor property (Refer to Ltscrvcl.hlp)

CaptureAreaFillPattern property (Refer to Ltscrvcl.hlp)

CaptureAreaIncludeCursor property (Refer to Ltscrvcl.hlp)

CaptureAreaInfoHeight property (Refer to Ltscrvcl.hlp)

CaptureAreaInfoLeft property (Refer to Ltscrvcl.hlp)

CaptureAreaInfoTop property (Refer to Ltscrvcl.hlp)

CaptureAreaInfoWidth property (Refer to Ltscrvcl.hlp)

CaptureAreaOptionDlg method (Refer to Ltscrvcl.hlp)

CaptureAreaSensitiveInfoWindow property (Refer to Ltscrvcl.hlp)

CaptureAreaShowAreaSize property (Refer to Ltscrvcl.hlp)

CaptureAreaShowCursorPosition property (Refer to Ltscrvcl.hlp)

CaptureAreaShowDrawCursor property (Refer to Ltscrvcl.hlp)

CaptureAreaShowInfoWindow property (Refer to Ltscrvcl.hlp)

CaptureAreaShowOpaqueText property (Refer to Ltscrvcl.hlp)

CaptureAreaTextBackColor property (Refer to Ltscrvcl.hlp)

CaptureAreaTextForeColor property (Refer to Ltscrvcl.hlp)

CaptureAreaType property (Refer to Ltscrvcl.hlp)

CaptureAreaUseCrossLinesCursor property (Refer to Ltscrvcl.hlp)

CaptureAreaZoomFactor property (Refer to Ltscrvcl.hlp)

CaptureCancelKey property (Refer to Ltscrvcl.hlp)

CaptureCount property (Refer to Ltscrvcl.hlp)

CaptureCursor property (Refer to Ltscrvcl.hlp)

CaptureDelay property (Refer to Ltscrvcl.hlp)

CaptureEXE method (Refer to Ltscrvcl.hlp)

CaptureEXEDlg method (Refer to Ltscrvcl.hlp)

CaptureFullScreen method (Refer to Ltscrvcl.hlp)

CaptureGetResourceCount method (Refer to Ltscrvcl.hlp)

CaptureHotKey property (Refer to Ltscrvcl.hlp)

CaptureHotKeyModifiers property (Refer to Ltscrvcl.hlp)

CaptureInfoExeName property (Refer to Ltscrvcl.hlp)

CaptureInfoHeight property (Refer to Ltscrvcl.hlp)

CaptureInfohWnd property (Refer to Ltscrvcl.hlp)

CaptureInfoLeft property (Refer to Ltscrvcl.hlp)

CaptureInfoResIndex property (Refer to Ltscrvcl.hlp)

CaptureInfoResourceID property (Refer to Ltscrvcl.hlp)

CaptureInfoResType property (Refer to Ltscrvcl.hlp)

CaptureInfoTop property (Refer to Ltscrvcl.hlp)

CaptureInfoWidth property (Refer to Ltscrvcl.hlp)

CaptureInterval property (Refer to Ltscrvcl.hlp)

CaptureMenuUnderCursor method (Refer to Ltscrvcl.hlp)

CaptureMouseCursor method (Refer to Ltscrvcl.hlp)

CaptureObjectBorderWidth property (Refer to Ltscrvcl.hlp)

CaptureObjectEnableKeyboard property (Refer to Ltscrvcl.hlp)

CaptureObjectInvert property (Refer to Ltscrvcl.hlp)

CaptureObjectOptionDlg method (Refer to Ltscrvcl.hlp)

CaptureObjectSelectCursor property (Refer to Ltscrvcl.hlp)

CaptureOptionDlg method (Refer to Ltscrvcl.hlp)

CaptureSelectedObject method (Refer to Ltscrvcl.hlp)

CaptureStatusCursor property (Refer to Ltscrvcl.hlp)

CaptureWallPaper method (Refer to Ltscrvcl.hlp)

CaptureWindowUnderCursor method (Refer to Ltscrvcl.hlp)

EnableMethodErrors property (Refer to Ltscrvcl.hlp)

IsCaptureActive method (Refer to Ltscrvcl.hlp)

OnCaptureHotKeyPressed event (Refer to Ltscrvcl.hlp)

OnCaptureImage event (Refer to Ltscrvcl.hlp)

ResetAreaOptions method (Refer to Ltscrvcl.hlp)

ResetObjectOptions method (Refer to Ltscrvcl.hlp)

StopCapture method (Refer to Ltscrvcl.hlp)

TransparentColor property (Refer to Ltscrvcl.hlp)

DICOM Control (11.5)

AgeValueCount property (Refer to Ltdicvcl.hlp)

AgeValues property (Refer to Ltdicvcl.hlp)

BinaryValueCount property (Refer to Ltdicvcl.hlp)

BinaryValues property (Refer to Ltdicvcl.hlp)

Bitmap property (Refer to Ltdicvcl.hlp)

BitmapList property (Refer to Ltdicvcl.hlp)

BitmapListCount property (Refer to Ltdicvcl.hlp)

CharValueCount property (Refer to Ltdicvcl.hlp)

CharValues property (Refer to Ltdicvcl.hlp)

ConformanceTestDS method (Refer to Ltdicvcl.hlp)

CurrentElement property (Refer to Ltdicvcl.hlp)

CurrentIOD property (Refer to Ltdicvcl.hlp)

CurrentModule property (Refer to Ltdicvcl.hlp)

CurrentTag property (Refer to Ltdicvcl.hlp)

CurrentUID property (Refer to Ltdicvcl.hlp)

CurrentVR property (Refer to Ltdicvcl.hlp)

DateTimeValueCount property (Refer to Ltdicvcl.hlp)

DateTimeValues property (Refer to Ltdicvcl.hlp)

DateValueCount property (Refer to Ltdicvcl.hlp)

DateValues property (Refer to Ltdicvcl.hlp)

DefaultIOD method (Refer to Ltdicvcl.hlp)

DefaultTag method (Refer to Ltdicvcl.hlp)

DefaultUID method (Refer to Ltdicvcl.hlp)

DefaultVR method (Refer to Ltdicvcl.hlp)

DeleteBitmapValue method (Refer to Ltdicvcl.hlp)

DeleteElement method (Refer to Ltdicvcl.hlp)

DeleteIOD method (Refer to Ltdicvcl.hlp)

DeleteModule method (Refer to Ltdicvcl.hlp)

DeleteTag method (Refer to Ltdicvcl.hlp)

DeleteUID method (Refer to Ltdicvcl.hlp)

DeleteVR method (Refer to Ltdicvcl.hlp)

DoubleValueCount property (Refer to Ltdicvcl.hlp)

DoubleValues property (Refer to Ltdicvcl.hlp)

DSTempPath property (Refer to Ltdicvcl.hlp)

EnableConformanceStatus property (Refer to Ltdicvcl.hlp)

EnableMethodErrors property (Refer to Ltdicvcl.hlp)

EnableProgressEvent property (Refer to Ltdicvcl.hlp)

FindClassIOD method (Refer to Ltdicvcl.hlp)

FindFirstElement method (Refer to Ltdicvcl.hlp)

FindIndexModule method (Refer to Ltdicvcl.hlp)

FindIndexTag method (Refer to Ltdicvcl.hlp)

FindIndexUID method (Refer to Ltdicvcl.hlp)

FindIndexVR method (Refer to Ltdicvcl.hlp)

FindIOD method (Refer to Ltdicvcl.hlp)

FindLastElement method (Refer to Ltdicvcl.hlp)

FindModule method (Refer to Ltdicvcl.hlp)

FindModuleIOD method (Refer to Ltdicvcl.hlp)

FindNextElement method (Refer to Ltdicvcl.hlp)

FindPrevElement method (Refer to Ltdicvcl.hlp)

FindTag method (Refer to Ltdicvcl.hlp)

FindUID method (Refer to Ltdicvcl.hlp)

FindVR method (Refer to Ltdicvcl.hlp)

FloatValueCount property (Refer to Ltdicvcl.hlp)

FloatValues property (Refer to Ltdicvcl.hlp)

GetAgeValue method (Refer to Ltdicvcl.hlp)

GetBinaryValue method (Refer to Ltdicvcl.hlp)

GetBitmapCount method (Refer to Ltdicvcl.hlp)

GetBitmapListValue method (Refer to Ltdicvcl.hlp)

GetBitmapValue method (Refer to Ltdicvcl.hlp)

GetCharValue method (Refer to Ltdicvcl.hlp)

GetConvertValue method (Refer to Ltdicvcl.hlp)

GetDateTimeValue method (Refer to Ltdicvcl.hlp)

GetDateValue method (Refer to Ltdicvcl.hlp)

GetDoubleValue method (Refer to Ltdicvcl.hlp)

GetDSPreamble method (Refer to Ltdicvcl.hlp)

GetElementLevel method (Refer to Ltdicvcl.hlp)

GetFloatValue method (Refer to Ltdicvcl.hlp)

GetImageInformation method (Refer to Ltdicvcl.hlp)

GetInfoDS method (Refer to Ltdicvcl.hlp)

GetLongValue method (Refer to Ltdicvcl.hlp)

GetModuleCount method (Refer to Ltdicvcl.hlp)

GetShortValue method (Refer to Ltdicvcl.hlp)

GetStringValue method (Refer to Ltdicvcl.hlp)

GetTagCount method (Refer to Ltdicvcl.hlp)

GetTimeValue method (Refer to Ltdicvcl.hlp)

GetUIDCount method (Refer to Ltdicvcl.hlp)

GetValueCount method (Refer to Ltdicvcl.hlp)

GetVRCount method (Refer to Ltdicvcl.hlp)

ImageInfo property (Refer to Ltdicvcl.hlp)

IncludeVolatile property (Refer to Ltdicvcl.hlp)

InfoClass property (Refer to Ltdicvcl.hlp)

InfoFlags property (Refer to Ltdicvcl.hlp)

InitDS method (Refer to Ltdicvcl.hlp)

InsertBitmapListValue method (Refer to Ltdicvcl.hlp)

InsertBitmapValue method (Refer to Ltdicvcl.hlp)

InsertElement method (Refer to Ltdicvcl.hlp)

InsertIOD method (Refer to Ltdicvcl.hlp)

InsertModule method (Refer to Ltdicvcl.hlp)

InsertTag method (Refer to Ltdicvcl.hlp)

InsertUID method (Refer to Ltdicvcl.hlp)

InsertVR method (Refer to Ltdicvcl.hlp)

IsSupportLocked method (Refer to Ltdicvcl.hlp)

LoadDS method (Refer to Ltdicvcl.hlp)

LongValueCount property (Refer to Ltdicvcl.hlp)

LongValues property (Refer to Ltdicvcl.hlp)

MoveChildElement method (Refer to Ltdicvcl.hlp)

MoveChildIOD method (Refer to Ltdicvcl.hlp)

MoveFirstElement method (Refer to Ltdicvcl.hlp)

MoveFirstIOD method (Refer to Ltdicvcl.hlp)

MoveFirstTag method (Refer to Ltdicvcl.hlp)

MoveFirstUID method (Refer to Ltdicvcl.hlp)

MoveFirstVR method (Refer to Ltdicvcl.hlp)

MoveLastElement method (Refer to Ltdicvcl.hlp)

MoveLastIOD method (Refer to Ltdicvcl.hlp)

MoveLastTag method (Refer to Ltdicvcl.hlp)

MoveLastUID method (Refer to Ltdicvcl.hlp)

MoveLastVR method (Refer to Ltdicvcl.hlp)

MoveNextElement method (Refer to Ltdicvcl.hlp)

MoveNextIOD method (Refer to Ltdicvcl.hlp)

MoveNextTag method (Refer to Ltdicvcl.hlp)

MoveNextUID method (Refer to Ltdicvcl.hlp)

MoveNextVR method (Refer to Ltdicvcl.hlp)

MoveParentElement method (Refer to Ltdicvcl.hlp)

MoveParentIOD method (Refer to Ltdicvcl.hlp)

MovePrevElement method (Refer to Ltdicvcl.hlp)

MovePrevIOD method (Refer to Ltdicvcl.hlp)

MovePrevTag method (Refer to Ltdicvcl.hlp)

MovePrevUID method (Refer to Ltdicvcl.hlp)

MovePrevVR method (Refer to Ltdicvcl.hlp)

MoveRootElement method (Refer to Ltdicvcl.hlp)

MoveRootIOD method (Refer to Ltdicvcl.hlp)

OnConformanceStatus event (Refer to Ltdicvcl.hlp)

OnProgressStatus event (Refer to Ltdicvcl.hlp)

Preamble property (Refer to Ltdicvcl.hlp)

ResetDS method (Refer to Ltdicvcl.hlp)

ResetIOD method (Refer to Ltdicvcl.hlp)

ResetTag method (Refer to Ltdicvcl.hlp)

ResetUID method (Refer to Ltdicvcl.hlp)

ResetVR method (Refer to Ltdicvcl.hlp)

SaveDS method (Refer to Ltdicvcl.hlp)

SetAgeValue method (Refer to Ltdicvcl.hlp)

SetBinaryValue method (Refer to Ltdicvcl.hlp)

SetBitmapListValue method (Refer to Ltdicvcl.hlp)

SetBitmapValue method (Refer to Ltdicvcl.hlp)

SetCharValue method (Refer to Ltdicvcl.hlp)

SetConvertValue method (Refer to Ltdicvcl.hlp)

SetCurrentElement method (Refer to Ltdicvcl.hlp)

SetCurrentIOD method (Refer to Ltdicvcl.hlp)

SetDateTimeValue method (Refer to Ltdicvcl.hlp)

SetDateValue method (Refer to Ltdicvcl.hlp)

SetDoubleValue method (Refer to Ltdicvcl.hlp)

SetDSPreamble method (Refer to Ltdicvcl.hlp)

SetFloatValue method (Refer to Ltdicvcl.hlp)

SetIODDescription method (Refer to Ltdicvcl.hlp)

SetIODName method (Refer to Ltdicvcl.hlp)

SetLongValue method (Refer to Ltdicvcl.hlp)

SetShortValue method (Refer to Ltdicvcl.hlp)

SetStringValue method (Refer to Ltdicvcl.hlp)

SetTagName method (Refer to Ltdicvcl.hlp)

SetTimeValue method (Refer to Ltdicvcl.hlp)

SetUIDName method (Refer to Ltdicvcl.hlp)

SetVRName method (Refer to Ltdicvcl.hlp)

ShortValueCount property (Refer to Ltdicvcl.hlp)

ShortValues property (Refer to Ltdicvcl.hlp)

StringValueCount property (Refer to Ltdicvcl.hlp)

StringValues property (Refer to Ltdicvcl.hlp)

TimeValueCount property (Refer to Ltdicvcl.hlp)

TimeValues property (Refer to Ltdicvcl.hlp)

UnlockSupport method (Refer to Ltdicvcl.hlp)

Dialogs

SaveFormats property

SaveFormatCount property

SubTypeIndex property

DlgFont property

GetDlgString method

SetDlgString method

GetContourFilter method

ContourThreshold property

ContourDeltaDirection property

ContourMaximumError property

ContourOption property

ContourOptionFlags property

ContourFilter method

ISIS Support

DriverName property

EnableISISEvent property

EnableMethodErrors property

ISISGetTag method

IsISISAvailable property

ISISLoadDriver method

ISISSelect method

ISISSetScanOptions method

ISISSetTag method

Bitmap property

ISISAcquire method

ISISAcquireMulti method

OnISISPage event

Bitmap property

ISISUnloadDriver method

Error property

ErrorMsg property

PagesDiscarded property


Version 10

The first LEADTOOLS VCL was based on version 10 of the LEADTOOLS ActiveX.


Copyright notice

Copyright Notices

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

Portions of the PCDLIB32.DLL, PCDLIB.DLL, LFFPX7.DLL, LFKODAK.DLL, EKFPIXJPEG140.DLL, PDC_SDK.DLL, PROFIRE.DLL and DC120V154_32.DLL files contain material that is ©Copyright Eastman Kodak Company, 1996.

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

Portions of the OCR Features and the help file for the OCR Features are ©Copyright Scansoft, Inc. 1995-2000. 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.

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.

Portions of the LEADTOOLS ICC Profiles material is © Copyright 2004, International Color Consortium.

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
Home page: http://www.leadtools.com


Introduction To Image Processing with LEADTOOLS

The following topics provide general information about image processing, and where appropriate, they describe the related LEADTOOLS capabilities. These topics build up concepts and terminology; so if you are new to image processing, it is best to read them in order.

Animation

Bitmaps in Memory and in Files

Bits Per Pixel and Related Ideas

Color Resolution and Dithering

Data Transfer

Database Interaction

DIBs, DDBs, and the Clipboard

Image Display

Image Manipulation and Analysis

Palette Handling

Printing

TWAIN and ISIS Input


Introduction: Animation

GIF files are commonly used for small, animated images in applications. These are multipage files, and animation is achieved by processing the list of images. (This is not the same as AVI or other full-motion video formats.)

LEADTOOLS lets you load a multi-page file into a list of bitmaps; then create and play an animation sequence using the list. With the paint-while-load feature, you can also play the animation while the list is being loaded.

LEADTOOLS takes advantage of the special animation features in GIF files, such as using one palette for the whole list of bitmaps. But you can create, play, and save animations in any multipage format, including GIF, TIFF, and PCX. You can also create a list of bitmaps from an AVI file, but this is a read-only feature.


Introduction: Bitmaps in Memory and in Files

Generally, the size of a bitmap in memory is determined by its dimensions and its color resolution. For example, to calculate the number of bytes for a 500-by-500 pixel, 24-bit image, you multiply 500 * 500 * 3. (Multiply by 3 because there are 3 bytes in 24 bits.) For an 8-bit image, it would be 500 * 500, plus the size of its palette, which is about 1K. There is an exception for 1-bit files, which can be loaded in a compressed format using the LEADTOOLS Document/Medical toolkit.

For any color image, whether the color values are in a palette or in the image data, the color of each pixel in the bitmap consists of red, green, and blue values. They always use the RGB color-space model, which means that red, green, and blue values are combined to represent a color.

The size of the same color image when it is stored in a file is often much smaller, and the color-space model is not always RGB. For example, JPEG and LEAD CMP files both use a YUV color-space model, where Y is a luminance value, and the U and V values are chrominance values. In this color-space model, brightness information is stored in the luminance value, and color information is stored in the chrominance values. JPEG and LEAD CMP achieve data compression through sampling techniques that can affect the accuracy of the YUV values. This kind of compression is sometimes referred to as lossy compression, because you can manipulate the compression parameters to choose between greater compression or greater accuracy. (YCbCr, used in TIFF images, is the same color-space model as YUV.)

Another color-space model used in image files is CMYK (designed for color printing using cyan, magenta, yellow, and blackness). Other compression techniques include RLE (run-length encoding) and LZW (Lempel-Ziv and Welch). Both of these techniques preserve the accuracy of the image data, and they achieve compression solely by identifying repetitions of data. Some grayscale and 1-bit image file formats also use RLE and LZW compression techniques.

There is also a family of Reference Output Medium Metric (ROMM) BGR Color encodings that is a wide-primary output-referred extended color-gamut BGR color encoding. These encodings are used by digital still picture imaging systems to manipulate, store, transmit, display and print digital images. Unlike sRGB color encoding, the range of colors is not limited to those colors that can be displayed on a CRT monitor, and unlike e-sRGB, these encodings do not use negative RGB colorimetry co-ordinates. ROMM color order can be used only with 24 or 48-bit bitmaps and is supported by the CMP/JPEG/Exif JPEG/JTIF/TIFF CMP file formats.

The image file formats are not only used for storage in the computer's file system, but are also used for database storage and for transmission of images. Furthermore, some applications keep frequently-used images in memory in a compressed file format. Thus, they can take advantage of memory speed when loading bitmaps from these files.


Introduction: Bits Per Pixel and Related Ideas

The terminology for image formats can be confusing because there are often several ways of describing the same format. This topic explains what the terms mean.

If an image is 24 bits per pixel, it is also called a 24-bit image, a true color image, or a 16M color image. Sixteen million is roughly the number of different colors that can be represented by 24 bits, where there are 8 bits for each of the red, green, and blue (RGB) values.

A 32-bit image is a specialized true-color format used in image files, where the extra byte carries information that is either converted or ignored when the file is loaded. The extra byte is used for an additional color plane in CMYK files, which are specialized files for color printing. In that case, LEADTOOLS, by default, converts the values to 24-bit RGB values when loading the image. The additional byte may also be used for an Alpha channel, which carries extra information such as a transparency indicator.

If an image is 16 bits per pixel, it is also called a 16-bit image, a high color image, or a 32K color image. Thirty-two thousand is roughly the number of different colors that can be represented by 16 bits, where there are 5 bits for each of the red, green, and blue values. (Devices that specify 64K color support are also referring to 16-bit images, but they are counting the left-over bit.)

If an image is 8 bits per pixel, it is also called an 8-bit image or a 256-color image. Two hundred fifty-six is the number of different colors that can be achieved by using the image data as 8-bit indexes to an array of colors called a palette.

If an image is 4 bits per pixel, it is also called a 4-bit image or a 16-color image. Sixteen is the number of different colors that can be achieved by using the image data as 4-bit indexes to a palette.

If an image is 1 bit per pixel, it is also called a 1-bit image, a black and white image, a 2-color image, or a bitonal image. Two is the number of different colors that can be achieved by using the image data as 1-bit indexes to a palette. The palette can contain colors other than black and white, although black and white are most common.

If an image is grayscale, its red, green, and blue values are all the same, and the values are incremented from the lowest to the highest. For example, an 8-bit grayscale image has 256 shades of gray, with values from 0 to 255. LEADTOOLS supports 4, 8, 12, and 16-bit grayscale. Support for the 12 and 16-bit grayscale images is only available in the Document/Medical toolkits.

Most of this same terminology is applied to video cards. For example, an 8-bit card is one that is capable of displaying 256 colors.


Introduction: Color Resolution and Dithering

Color resolution (also called color depth) refers to the number of possible colors in an image, as determined by the bits-per-pixel. If an image in your computer is loaded from a FAX scanner or received as a FAX transmission, it is a black-and-white (1-bit) image. If it is loaded from a color scanner or a JPEG file, it can have 16 million colors. If it is loaded from a GIF file, it is likely to have 256 colors. There are many possibilities, ranging from two colors to 16 million.

LEADTOOLS lets you manipulate an image and display it on any Windows-compatible device, regardless of the image's color resolution. Therefore, in most cases you can load, display, modify, and save an image without ever changing its color resolution. Nevertheless, in some cases you may need to increase or decrease the color resolution. Here are some examples:

Suppose you need to load a large 24-bit image on a computer that does not have much memory. You can conserve memory by loading it as an 8-bit image. Then, if you were using an 8-bit display device, you would not see any difference in the quality of the image. Of course, there would be some loss of quality on a 24-bit display device, and the loss would be permanent if you then saved the image in the same file.

Suppose you want to save an image in a different file format. If the new file format does not support the original color resolution, you can specify a different color resolution when you save the image.

Suppose you want to combine one 8-bit image with another one. To combine two images, they must have the same color resolution, and if they are less than 16 bits per pixel, they must use the same palette. The simplest solution is to convert both images to 24 bits per pixel before combining them. Then, if necessary, you can reduce the color resolution of the combined image.

Whenever you reduce an image's color resolution to 8 bits per pixel or less, a dithering method comes into play. One alternative is to use a nearest-color match (no dithering), which means that the color of each pixel is changed to the palette color that most closely matches it. If the original image contains subtle color details, the result of a nearest-color match may have large blotches of color that are not very pleasing.

Dithering methods create the appearance of more subtle shades by mixing in pixels of different colors. This is similar to the way newspaper pictures produce the appearance of shades of gray, even though the only actual colors are black and white.

Ordered dithering is the fastest method. It is the default dithering method when painting to a display device that is 256 colors or less. Ordered dithering takes advantage of the fact that the colors in most palettes are ordered so that similar shades are next to each other in the palette. This method avoids blotches of color by adding to or subtracting from the nearest-color value of each pixel to ensure that adjacent pixels do not have exactly the same color. (If the colors in the palette are not ordered, the results are not good.)

All of the other dithering methods in LEADTOOLS use error-diffusion algorithms. In error diffusion, the error is the difference between the original pixel color and the nearest match, and diffusion of this error is what the algorithm accomplishes. Floyd-Steinberg is a high-quality, fast error-diffusion method. It is the default method that LEADTOOLS uses if you reduce the color resolution when loading or saving an image, or if you specify error diffusion as the dithering method when painting to a display device that is 256 colors or less.

If you use a LEADTOOLS function to change the color resolution of a bitmap in memory, you can choose from a list of possible dithering methods. All of the alternative error-diffusion methods are slower than Floyd-Steinberg, and the quality may or may not be better, depending on the original image, and depending on whether the resulting image is to be displayed or printed. Choosing an alternative dithering method is a subjective, trial-and-error decision. Stevenson and Arce dithering, the slowest of the alternatives, is most likely to produce a higher quality result.

There is a family of Reference Output Medium Metric (ROMM) BGR Color encodings that is a wide-primary output-referred extended color-gamut BGR color encoding. These encodings are used by digital still picture imaging systems to manipulate, store, transmit, display and print digital images. Unlike sRGB color encoding, the range of colors is not limited to those colors that can be displayed on a CRT monitor, and unlike e-sRGB, these encodings do not use negative RGB colorimetry co-ordinates.

ROMM color order can be used only with 24 or 48-bit bitmaps and is supported by the CMP/JPEG/Exif JPEG/JTIF/TIFF CMP file formats. There are colors that can be represented in RGB, but not in ROMM. Conversely, there are colors that can be represented in ROMM that cannot be represented in RGB. If you convert from one to the other you lose the colors that can be represented only in one of the colorspaces.


Introduction: Data Transfer

When receiving transferred data, as in an Internet application or a FAX modem transmission, you often want to display the image as it is received.

To meet that need, LEADTOOLS provides simple functions that let you load image data into a bitmap as it is received. You can also use the LEADTOOLS paint-while-load feature to display the bitmap as it is received.

For Internet support, LEADTOOLS provides a plug-in DLL that can be used on WIN32 systems to view compressed images with Netscape Navigator or Microsoft Internet Explorer.


Introduction: Database Interaction

With LEADTOOLS, you can use a variety of strategies to maintain images in a database. This variety is necessary because of the uneven support for storing images using different development and database systems.

The simplest database support is with Visual Basic, where you can bind a LEAD control (ActiveX) to a data control. You can associate the LEAD control with a long binary field in the database, and let the data control handle all of the database maintenance and navigation.

For other systems with ActiveX support, you may be able to use ODBC (Open Database Connectivity). ODBC is a standard interface for accessing local and remote databases. To use it, you define a data source that is implemented with an ODBC driver; then you access the data source in the same way you would a local database. LEADTOOLS provides ActiveX methods and properties that let you directly access image data through an ODBC data source. There are a couple of limitations in this approach. First, since the ActiveX accesses the image data directly and does not access any other data in the record, you must deal with the problem of identifying the image. To solve this problem, you can use another means of selecting records; then synchronize the ActiveX's view, so that it is always accessing the same record. (The ActiveX tutorials describe how to do this.) The second limitation is with ODBC drivers. Most of the available ODBC drivers do not properly support access to long binary fields. (The ACCESS 7.0 and FoxPro 2.x drivers have been tested successfully and are described in the ActiveX tutorials.)

Also, for systems with ActiveX support, you can use OLE DB and ADO to access data. You can bind the LEADTOOLS OLE DB Control to an OLE DB data source, such as the Microsoft ADO Data Control. You can associate the LEADTOOLS OLE DB Control with a long binary field in the database, and let the data control handle all of the database maintenance and navigation.

The LEAD VCL uses a standard approach to data binding, by binding to a DataSet object through a DataSource object. For an overview of data binding, refer to your Delphi or Builder documentation.

You can also use the LEAD VCL with the ODBC. To do this you configure data sources using ODBC, select a database file with the required fields, set the DatabaseName property to the required database source, and set the TableName property to the specified table. You will also need a DataSource object to link the LEAD VCL Main Control to the Table object.

A more flexible approach on lower-level development systems, such as C, C++, and Delphi, is to use the ability of LEADTOOLS to save a file in memory. Once the image is available in memory in a compressed file format, you can use your choice of database engines to store and retrieve the data.

Finally, you may want to consider using your computer's or network's file system to store the images, use a database to store the file paths as strings, and write your own code to do the synchronization. In some cases, this could be a better solution than storing the images directly in the database.


Introduction: DIBs, DDBs, and the Clipboard

A DIB (device independent bitmap) is a standard Windows representation of a bitmap. It is similar to the LEADTOOLS representation of a bitmap in that it includes palette information. A DDB (device dependent bitmap) is a hardware-specific representation that does not include palette information. Sometimes, you may need to manipulate a bitmap using Windows functions that work with DIBs or DDBs. For example, you may need to interact with an existing application that uses those functions. For that purpose, LEADTOOLS functions let you convert or copy to and from DIBs or DDBs. Of course, when converting to and from a DDB, you must preserve the palette information separately.

The clipboard is a standard Windows object for copying data from one application to another. LEADTOOLS lets you copy images to the clipboard and paste images from the clipboard. When copying to the clipboard, most LEADTOOLS functions clear the existing data from the clipboard, and copy image data to it in the form of a DIB, a DDB, and a palette (if one is needed). If that is not what you want, you can use a LEADTOOLS DLL function to specify exactly which actions to take.


Introduction: Image Display

When you display an image, the following things come into play:

Sizing and positioning the display.

Adapting the image to the color resolution of the display device.

Making other refinements that affect the display but not the bitmap in memory.

The LEADTOOLS paint functions let you specify which part of an image to display, how big to make the display, and where to position the origin (for scrolling and zooming). In the ActiveX, the origin defaults to 0,0 and the size defaults to the bitmap size. This is arbitrary, and even with automatic scroll bars, it is unlikely to be what a user wants to see. Instead, the typical user either wants to see the whole image or wants to select a portion of the image to view.

Fortunately, LEADTOOLS makes it easy to show the user exactly what he wants to see. LEADTOOLS lets you control the size and position of the display without resizing or trimming the bitmap. In fact, it usually is best to think of the bitmap size as a measure of resolution, rather than a measure of size. The larger the bitmap, the more you can zoom in without losing detail.

As for adapting to the color resolution of the display device, if the color resolution of your device is greater than 256 colors, no adaptation is necessary. If the color resolution is higher than 256 colors, images are displayed using their own color values. Of course, if a 24-bit image is displayed on a 16-bit device, there is some loss, but there are still no programming issues, since the only remedy is to change the display mode.

If the color resolution of your display device is 256 colors or less, you have to make some programming decisions regarding dithering and palette selection. When displaying 16-, 24-, or 32-bit images, you can determine whether LEADTOOLS uses ordered dithering or error diffusion to handle the color reduction. (LEADTOOLS uses a fixed palette for these images.) When displaying 8-, 4-, or 1-bit images, you must decide whether to use a fixed palette or the individual image's palette. Using the fixed palette avoids palette shifting when more than one image is displayed at the same time. Using the image's original palette produces the best possible display of the image's colors.

Other LEADTOOLS functions let you determine how the new display interacts with whatever is already on the display device. For example, when displaying 1-bit images, you can set scale-to-gray or favor-black options that can improve the readability of scaled images (images that are zoomed in or out to fit the available space).

If the image is a 24 or 48-bit bitmap it is possible to specify use of Reference Output Medium Metric (ROMM) BGR Color encoding. This is a wide-primary output-referred extended color-gamut BGR color encoding. This encoding is used by digital still picture imaging systems to manipulate, store, transmit, display and print digital images. Unlike sRGB color encoding, the range of colors is not limited to those colors that can be displayed on a CRT monitor, and unlike e-sRGB, these encodings do not use negative RGB colorimetry co-ordinates.

ROMM color order is supported by the CMP/JPEG/Exif JPEG/JTIF/TIFF CMP file formats. Because there are colors that can be represented in RGB, but not in ROMM as well as colors that can be represented in ROMM that cannot be represented in RGB, if you convert from one to the other you lose the colors that can be represented only in one of the colorspaces.

For displaying 12 to 16-bit grayscale images, LEADTOOLS provides functions for window leveling. Window leveling is only available in the Medical Imaging editions.


Introduction: Image Manipulation and Analysis

Most LEADTOOLS functions for image manipulation and analysis act on the bitmap in memory. It is important to keep this in mind, because the changes become permanent when you save the bitmap in a file. Sometimes you want the changes to be permanent, and sometimes you do not. It all depends on the reason for making the changes.

Sometimes, you start with an image that has some undesirable qualities. For example, if the original image is too flat, you may want to use one of the contrast enhancement functions to make permanent improvements.

At other times, you may need to make temporary changes for use on a particular monitor or printer. Using the ActiveX control or DLL functions, you can set the brightness, contrast, and gamma correction for the display of all images, without affecting the bitmaps. But for other changes, such as creating a halftone for printing, a good strategy is to modify a copy of the image, and give the user the ability to undo changes. The undo strategy also makes sense with a manipulation, such as a mosaic effect, that intentionally distorts an image.

Some image manipulations, such as edge-detection filters, are commonly used to analyze an image, rather than to improve it. For example, in an industrial quality-assurance application, defects in a machine part may be easier to detect if an image of the part is processed with an edge-detection filter. Similarly, the creation of a histogram (an array that charts the frequency of color usage in an image) can be of value in an analytical situation.

Edge detection and histogram creation can also be used as steps in improving an image. For example, creating a histogram is a necessary step, internally, in some of the contrast-improvement functions. Also, an image created with an edge detection filter can be combined with the original image to harden or soften the original's edges.


Introduction: Palette Handling

Any image that is 8 bits per pixel or less must have a palette. The palette is an array that contains the colors for displaying the image. The pixel values are indexes into the array. An image can have its own unique palette or it can share a common fixed palette. In either case, every bitmap in memory that is 8 bits per pixel or less has its own copy of a palette (even if it is a common fixed palette).

One way for a bitmap to have a unique palette is to load an image from a file that is 8 bits per pixel or less. In that case, the file contains a palette for the image, and you can assume that the palette is unique. By default, LEADTOOLS loads the palette that is stored in the file and associates it with the bitmap in memory.

Another way for a bitmap to get a unique palette is to create the palette. For example, if you reduce a 24-bit image to 8 bits per pixel, you can let LEADTOOLS create an optimized palette for the image.

By using a unique, optimized palette, you get the best possible image quality, but there is a drawback. When a display device uses a palette (for example, when it is in 256-color mode), it can only use one palette at a time to display colors. Therefore, if you are displaying more than one image at the same time, the current image may look perfect, while all of the others look bad, because they are mapped to the wrong palette. This is called palette shift.

Using a fixed palette solves these palette-shift problems. The best approach is to specify the fixed palette as a display option. Then, LEADTOOLS remaps each image to the fixed palette when it is displayed, without disturbing the individual image's palette. (When displaying 16-, 24-, or 32-bit images on a device with 256 colors or less, LEADTOOLS always uses the fixed palette.)

Alternatively, you can use a color resolution function to specify a fixed palette for each individual image. But then, when you save the image to a file, the fixed palette is saved in the file, and any unique palette information is lost.

If the image is a 24 or 48-bit bitmap it is possible to specify use of Reference Output Medium Metric (ROMM) BGR Color encoding. This is a wide-primary output-referred extended color-gamut BGR color encoding. This encoding is used by digital still picture imaging systems to manipulate, store, transmit, display and print digital images. Unlike sRGB color encoding, the range of colors is not limited to those colors that can be displayed on a CRT monitor, and unlike e-sRGB, these encodings do not use negative RGB colorimetry co-ordinates.

ROMM color order is supported by the CMP/JPEG/Exif JPEG/JTIF/TIFF CMP file formats. Because there are colors that can be represented in RGB, but not in ROMM as well as colors that can be represented in ROMM that cannot be represented in RGB, if you convert from one to the other you lose the colors that can be represented only in one of the color spaces.


Introduction: Printing

LEADTOOLS printing functions are designed to work with Windows printing functions. Normally, you use Windows to select a device context (DC) and start the print job. LEADTOOLS functions let you scale and position one or more images in the printer DC. You use Windows functions to get the available page dimensions. You also use Windows functions to eject each page and to end the print job.

In most cases, you can scale and position an image on a printer DC with the same flexibility as when you display an image on a computer screen. You can let the printer handle any dithering or half-toning. However, if you halftone a bitmap, yourself, before sending it to a printer, you should resize the bitmap to the desired height and width, then use the halftone function, then send the image to the printer without scaling it. (You get bad results if you scale a half-toned image.)

In C, C++, Visual Basic, and Delphi, you can use the actual Windows printing functions, or their equivalents in the development system. However, printing with Microsoft FoxPro and older versions of Access is more limited, because they do not give you direct access to the printer DC. The LEADTOOLS ActiveX handles this problem by providing methods to start and stop the print job.

With Access 7.0, you can also add code to a report's Print event to include ActiveX images. Or, more simply, you can embed the LEAD OLE Server, which is provided as a separate toolkit component.


Introduction: TWAIN Input and ISIS® Input

TWAIN:

TWAIN is a standard for image input devices, such as scanners and digital cameras. Getting an image from a TWAIN device can be very simple. First, there is a standard facility for selecting the input device. It is similar to selecting a default printer, and you can skip this step if you know that the default is right. Then, each TWAIN device has its own user interface, which you invoke to acquire an image.

Some complexity is introduced only when acquiring multiple images or when bypassing the user interface. If you acquire multiple images, you must code a callback function or event procedure to handle each image. If you bypass the user interface, you must set some standard TWAIN parameters to provide the information that the TWAIN driver would normally get from the user interface. The tricky part is that some TWAIN drivers implement the standard more fully than others. If you do not know in advance how the TWAIN device will behave, it is a good idea to add logic to your program to test the success of setting the TWAIN parameters. LEADTOOLS provides functions for all of this.

Please note that TWAIN support requires TWAIN.DLL for 16-bit or TWAIN_32.DLL for 32-bit. These files must be obtained from the TWAIN device manufacturer.

ISIS [Document/Medical]:

The Image and Scanner Interface Specification (ISIS) is a standard for scanner control and provides a complete framework for image processing. LEADTOOLS supports image acquisition from ISIS scanner drivers. The ISIS interface is message based, using tags to get and set scanner information and operating parameters.

LEADTOOLS provides ISIS Scanner support which allows you to determine if ISIS is available, load and unload ISIS Scanner Drivers, select and/or add an ISIS Scanner Driver through a dialog, scan one or more pages and save the images to files, and get or set Scanner Driver tags. These tags provide information about the scanner and let you set parameters pertaining to scanning, such as contrast, brightness, resolution, compression method, etc. With multipage scanning, you can code a callback function to provide a status report or cancel the operation.

Please note that ISIS support requires PIXDFLTN.DLL, which is not included with this package. This file must be obtained from the ISIS device manufacturer. Also note that you must obtain an ISIS driver from the scanner manufacturer or from Pixel Translations. The .chn or .chw file must be in your path for ISIS scanning to work. LEAD does not grant any license to the ISIS driver or to ISIS development capabilities. It is your responsibility to obtain the appropriate license to your development project, either from Pixel Translations, or one of their licensees. For more information on using ISIS, refer to Using ISIS to Scan Images.


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 of the toolkit. To get Document/Medical capabilities, you must buy a LEADTOOLS Document/Medical editions toolkit. Otherwise, if you recompile the examples, the resulting executable files will not have the Document/Medical capabilities.

C++ Builder

EXAMPLES\VCL\BUILDER\DEMO contains sample project code for C++ Builder. You can open the project in C++ Builder; then compile and run it.

EXAMPLES\VCL\BUILDER\ANNDEMO contains sample project code for C++ Builder for a program that demonstrates the annotation capabilities of LEADTOOLS. You can open the project in C++ Builder; then compile and run it.

Delphi

EXAMPLES\VCL\DELPHI\DEMO contains sample project code for Delphi. To run the sample application, you can run the EXE file in LEAD's BIN directory.

EXAMPLES\VCL\DELPHI\ANNDEMO contains sample project code for Delphi. This demo demonstrates the annotation capabilities of LEADTOOLS. To run the sample application, you can run the EXE file in LEAD's BIN directory.


Using the RTF Filter in Windows 98

In order for the RTF filter to function properly on a Windows98 machine:

Replace this DLL: | With this DLL:
riched20.dll version number: 5.30.23.1200 Description: Rich Text Edit Control, v3.0 size: 421 KB | riched20.dll version number: 5.30.23.1211 Description: Rich Text Edit Control, v3.0 size: 413 KB
And replace this DLL: | With this DLL:
riched32.dll version number: 5.1.330.0 Description: Windows 98 Rich Text Edit Control size: 200 KB | riched32.dll version number: 5.1.2600.0 Description: Wrapper DLL for Richedit 1.0 size: 4.0 KB


Programming with the LEADTOOLS VCL

The following topics provide a systematic approach to understanding and using the LEAD control's properties, methods, and events:

Unlocking Special LEAD Features

Unlocking Vector File Format Support

Concepts and Definitions

Bitmaps and Bitmap Lists

Loading Filters

Input and Output

Implementing Internet Features

Displaying an Image

ThumbnailBrowser

Using the ImageListControl

Using a PanWindow

Implementing Transparency

Using Special Effects When Painting

Playing an Animation

Printing an Image

Marking a Selection with a Rubberband

Drawing Shapes and Text

Cleaning Up 1-Bit Images

Using a Data Source

Using the Magnifying Glass

Copying and Creating Bitmaps

Memory Storage Types for Bitmaps

Image Processing

Creating and Using a Bitmap Region

Managing Palettes

Implementing TIFF Tags

Loading and Saving Large TIFF Files

Super Compressed Bitmaps

Controlling and Detecting Events

Getting LEADTOOLS Toolkit Information

Miscellaneous Methods and Properties

Implementing Annotations

Annotation Files

Annotation Toolbar

Annotation Menu

Annotation Points

Implementing Annotation Security

Moving the Name of an Annotation

Implementing Annotation Hyperlinks

Grouping and Ungrouping Annotation Objects

Converting Annotation Automation Dialogs to Other Language

Undoing Automation Operations

The Annotation Text Token Table

Fixed Annotations

Using Rulers in Annotation Objects

Displaying and Manipulating Annotation Objects

Using Annotation Object Bitmaps

Changing the Annotation Automation Background Colors

Flipping, Reversing, and Rotating Annotation Objects

Layers in Files

Working with the RAW File Filter

Grayscale Images

Detecting Registration Marks


Installing VCL

Listed below are the steps used to install the VCL controls in Delphi 4.0, Delphi 5.0, Delphi 6.0, C++ Builder 4.0, and C++ Builder 5.0 and C++ Builder 6.0.

Delphi 4.0

1. | Start Delphi.
2. | On the Components menu, choose Install Packages.
3. | Click on the Design Packages Add button.
4. | Browse to the location of the Delphi LEAD VCL files. These are found in the LTVCL\LIB\VCL\Delphi4 directory. (LTVCL represents the directory in which you installed the LEADTOOLS VCL toolkit.) Select the control to add (LT14D4MN.BPL, LT14D4AD.BPL, LT14D4SN.BPL etc.) and press OK. Please note that the LT14D4MN.BPL control must be on the system in order to install any of the other packages.
5. | To be able to compile with the control added, add the Delphi LEAD VCL files path ( LTVCL\LIB\VCL\Delphi4 ) in the Project | Options | Directories dialog (Search Path).

Delphi 5.0

1. | Start Delphi.
2. | On the Components menu, choose Install Packages.
3. | Click on the Design Packages Add button.
4. | Browse to the location of the Delphi LEAD VCL files. These are found in the LTVCL\LIB\VCL\Delphi5 directory. (LTVCL represents the directory in which you installed the LEADTOOLS VCL toolkit.) Select the control to add (LT14D5MN.BPL, LT14D5AD.BPL, LT14D5SN.BPL, etc.) and press OK. Please note that the LT14D5MN.BPL control must be on the system in order to install any of the other packages.
5. | To be able to compile with the control added, add the Delphi LEAD VCL files path ( LTVCL\LIB\VCL\Delphi5 ) in the Project | Options | Directories dialog (Search Path).

Delphi 6.0

1. | Start Delphi.
2. | On the Components menu, choose Install Packages.
3. | Click on the Design Packages Add button.
4. | Browse to the location of the Delphi LEAD VCL files. These are found in the LTVCL\LIB\VCL\Delphi6 directory. (LTVCL represents the directory in which you installed the LEADTOOLS VCL toolkit.) Select the control to add (LT14D6MN.BPL, LT14D6AD.BPL, LT14D6SN.BPL, etc.) and press OK. Please note that the LT14D6MN.BPL control must be on the system in order to install any of the other packages.
5. | To be able to compile with the control added, add the Delphi LEAD VCL files path (LTVCL\LIB\VCL\Delphi6) in the Project | Options | Directories dialog (Search Path).

Delphi 7.0

1. | Start Delphi.
2. | On the Components menu, choose Install Packages.
3. | Click on the Design Packages Add button.
4. | Browse to the location of the Delphi LEAD VCL files. These are found in the LTVCL\LIB\VCL\Delphi7 directory. (LTVCL represents the directory in which you installed the LEADTOOLS VCL toolkit.) Select the control to add (LT14D7MN.BPL, LT14D7AD.BPL, LT14D7SN.BPL, etc.) and press OK. Please note that the LT14D7MN.BPL control must be on the system in order to install any of the other packages.
5. | To be able to compile with the control added, add the Delphi LEAD VCL files path (LTVCL\LIB\VCL\Delphi7) in the Project | Options | Directories dialog (Search Path).

C++ Builder 4.0

1. | Start C++ Builder.
2. | On the Component menu, choose Install Packages.
3. | Click on the Design Packages Add button.
4. | Browse to the location of the C++Builder LEAD VCL files. These are found in the (LTVCL)\LIB\VCL\BUILDER4 directory. (LTVCL) represents the directory in which you installed the LEADTOOLS VCL toolkit. Select the control to add (LT14B4MN.BPL, LT14B4AD.BPL, LT14B4SN.BPL etc.), press Open, and press OK. Please note that the LT14B4MN.BPL control must be on the system in order to install any of the other packages.
5. | Add (LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER4 to the library path and (LTVCL)\LIB\VCL\BUILDER4 to the include path. In addition, please note that the header files are located in (LTVCL)\LIB\VCL\BUILDER4 and have the .hpp extension.
6. | In the Project menu, choose Add to Project, and add the .LIB files listed below. These can be found in the LTVCL14\LIB directory, and must be added to use the controls in any application.

Ltdis_bc.lib

Ltdlg_bc.lib

Ltefx_bc.lib

Ltfil_bc.lib

Ltimg_bc.lib

Ltkrn_bc.lib

Lttwn_bc.lib

Ltisi_bc.lib

Lttmb_bc.lib

Ltlst_bc.lib

LtScr_bc.lib

LtDic_bc.lib

Ltann_bc.lib

LtSgm_bc.lib

C++ Builder 5.0

1. | Start C++ Builder.
2. | On the Component menu, choose Install Packages.
3. | Click on the Design Packages Add button.
4. | Browse to the location of the C++Builder LEAD VCL files. These are found in the (LTVCL)\LIB\VCL\BUILDER5 directory. (LTVCL) represents the directory in which you installed the LEADTOOLS VCL toolkit. Select the control to add (LT14B5MN.BPL, LT14B5AD.BPL, LT14B5SN.BPL etc.), press Open, and press OK. Please note that the LT14B5MN.BPL control must be on the system in order to install any of the other packages.
5. | Add (LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER5 to the library path and (LTVCL)\LIB\VCL\BUILDER5 to the include path. In addition, please note that the header files are located in (LTVCL)\LIB\VCL\BUILDER5 and have the .hpp extension.
6. | In the Project menu, choose Add to Project, and add the .LIB files listed below. These can be found in the LTVCL14\LIB directory, and must be added to use the controls in any application.

Ltdis_bc.lib

Ltdlg_bc.lib

Ltefx_bc.lib

Ltfil_bc.lib

Ltimg_bc.lib

Ltkrn_bc.lib

Lttwn_bc.lib

Ltisi_bc.lib

Lttmb_bc.lib

Ltlst_bc.lib

LtScr_bc.lib

LtDic_bc.lib

Ltann_bc.lib

LtSgm_bc.lib

C++ Builder 6.0

1. | Start C++ Builder.
2. | On the Component menu, choose Install Packages.
3. | Click on the Design Packages Add button.
4. | Browse to the location of the C++Builder LEAD VCL files. These are found in the (LTVCL)\LIB\VCL\BUILDER6 directory. (LTVCL) represents the directory in which you installed the LEADTOOLS VCL toolkit. Select the control to add (LT14B6MN.BPL, LT14B6AD.BPL, LT14B6SN.BPL etc.), press Open, and press OK. Please note that the LT14B6MN.BPL control must be on the system in order to install any of the other packages.
5. | Add (LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER6 to the library path and (LTVCL)\LIB\VCL\BUILDER6 to the include path. In addition, please note that the header files are located in (LTVCL)\LIB\VCL\BUILDER6 and have the .hpp extension.
6. | In the Project menu, choose Add to Project, and add the .LIB files listed below. These can be found in the LTVCL14\LIB directory, and must be added to use the controls in any application.

Ltdis_bc.lib

Ltdlg_bc.lib

Ltefx_bc.lib

Ltfil_bc.lib

Ltimg_bc.lib

Ltkrn_bc.lib

Lttwn_bc.lib

Ltisi_bc.lib

Lttmb_bc.lib

Ltlst_bc.lib

LtScr_bc.lib

LtDic_bc.lib

Ltann_bc.lib

LtSgm_bc.lib


Adding Context Sensitive Help

Listed below are the steps used to add LEADTOOLS context sensitive help to Delphi 4.0, Delphi 5.0, Delphi 6.0, C++ Builder 4.0, C++ Builder 5.0 and C++ Builder 6.0.

Delphi 4.0

1.

Open the Delphi4.cnt file found in your ..\Borland\Delphi4\Help directory. You can open this using NotePad or the Help Workshop. Add the following line to provide context sensitive help from the Main VCL help file:

:Index LEADTOOLS VCL=(LEAD)\Help\ltvcl.chm

where (LEAD) represents the directory in which you installed the LEADTOOLS VCL toolkit. Please note that a comparable line must be added for each help file used to provide context sensitive help. For example, to add context sensitive help from the DICOM VCL, add the following line:

:Index LEADTOOLS DICOM VCL = (LEAD)\Help\Ltdicvcl.chm

2.

Then you highlight a property or event in the Object Inspector and press F1, or press F1 after typing the name of a property or method in the Editor, you will go to the corresponding LEADTOOLS help file page.

Delphi 5.0

1.

Open the Delphi5.cnt file found in your ..\Borland\Delphi5\Help directory. You can open this using NotePad or the Help Workshop. Add the following line:

:Index LEADTOOLS VCL=(LEAD)\Help\ltvcl.chm

where (LEAD) represents the directory in which you installed the LEADTOOLS VCL toolkit. Please note that a comparable line must be added for each help file used to provide context sensitive help. For example, to add context sensitive help from the DICOM VCL, add the following line:

:Index LEADTOOLS DICOM VCL = (LEAD)\Help\Ltdicvcl.chm

2.

Then you highlight a property or event in the Object Inspector and press F1, or press F1 after highlighting the name of a property or method in the Editor, you will go to the corresponding LEADTOOLS help file page.

Delphi 6.0

1.

Open the Delphi6.cnt file found in your ..\Borland\Delphi6\Help directory. You can open this using NotePad or the Help Workshop. Add the following line:

:Index LEADTOOLS VCL=(LEAD)\Help\ltvcl.chm

where (LEAD) represents the directory in which you installed the LEADTOOLS VCL toolkit. Please note that a comparable line must be added for each help file used to provide context sensitive help. For example, to add context sensitive help from the DICOM VCL, add the following line:

:Index LEADTOOLS DICOM VCL = (LEAD)\Help\Ltdicvcl.chm

2.

When you highlight a property or event in the Object Inspector and press F1, or press F1 after highlighting the name of a property or method in the Editor, you will go to the corresponding LEADTOOLS help file page.

C++ Builder 4.0

1.

Open the BCB4.cnt file found in your ..\Borland\CBuilder4\Help directory. You can open this using NotePad or the Help Workshop. Add the following line before the INCLUDE lines:

:Index LEADTOOLS VCL=(LEAD)\Help\ltvcl.chm

where (LEAD) represents the directory in which you installed the LEADTOOLS VCL toolkit. Please note that a comparable line must be added for each help file used to provide context sensitive help. For example, to add context sensitive help from the DICOM VCL, add the following line:

:Index LEADTOOLS DICOM VCL = (LEAD)\Help\Ltdicvcl.chm

2.

When you highlight a property or event in the Object Inspector and press F1, or press F1 after typing the name of a property or method in the Editor, you will go to the corresponding LEADTOOLS help file page.

C++ Builder 5.0

1.

Open the BCB5.cnt file found in your ..\Borland\CBuilder5\Help directory. You can open this using NotePad or the Help Workshop. Add the following line:

:Index LEADTOOLS VCL=(LEAD)\Help\ltvcl.chm

where (LEAD) represents the directory in which you installed the LEADTOOLS VCL toolkit. Please note that a comparable line must be added for each help file used to provide context sensitive help. For example, to add context sensitive help from the DICOM VCL, add the following line:

:Index LEADTOOLS DICOM VCL = (LEAD)\Help\Ltdicvcl.chm

2.

Then you highlight a property or event in the Object Inspector and press F1, or press F1 after typing the name of a property or method in the Editor, you will go to the corresponding LEADTOOLS help file page.

C++ Builder 6.0

1.

Open the BCB6.cnt file found in your ..\Borland\CBuilder6\Help directory. You can open this using NotePad or the Help Workshop. Add the following line:

:Index LEADTOOLS VCL=(LEAD)\Help\ltvcl.chm

where (LEAD) represents the directory in which you installed the LEADTOOLS VCL toolkit. Please note that a comparable line must be added for each help file used to provide context sensitive help. For example, to add context sensitive help from the DICOM VCL, add the following line:

:Index LEADTOOLS DICOM VCL = (LEAD)\Help\Ltdicvcl.chm

2.

When you highlight a property or event in the Object Inspector and press F1, or press F1 after typing the name of a property or method in the Editor, you will go to the corresponding LEADTOOLS help file page.


Unlocking Special LEAD Features

LEAD offers a variety of features, such as Document support, Medical support, Vector support, etc., which are only available in certain toolkits and are locked. To use these features you must:

purchase a toolkit that supports the desired feature(s).

print the applicable runtime agreement from the help file. For information on the runtime agreements, go to Topic Selection and click on the LEAD Licensing button.

complete the Transmittal document and fax it and the runtime agreement to LEAD's Licensing Department at 704 – 372 – 3789. (To get a copy of the Transmittal document, you must contact LEAD.)

if prepaid licenses are desired, include the order form with payment information. You can fax this along with the Transmittal form and the runtime agreement. (To get a copy of the order form, you must contact LEAD.)

once we have received the signed agreement, we will send instructions for eliminating the license dialogs and the key(s) necessary for unlocking the appropriate features.

when you have received the instructions and the key(s) call the UnlockSupport method with the appropriate key.

For example, if you have purchased the LEADTOOLS Document Imaging toolkit:

print the Document Imaging Agreement (or the Document Imaging with OCR Agreement if you have also purchased the LEADTOOLS OCR Module).

complete the Transmittal document and fax it and the Document Imaging Agreement (or the Document Imaging with OCR Agreement) to LEAD's Licensing Department.

if you want prepaid licenses, print a copy of the order form, fill it out and send the order form and payment information to LEAD.

once we have received the signed Document Imaging Agreement (or Document Imaging with OCR Agreement), we will send the instructions for eliminating the license dialogs and any necessary keys.

when you receive the instructions and the key(s), call UnlockSupport (L_SUPPORT_DOCUMENT, "Document Key") to unlock the Document features. Please note that "Document Key" represents the actual key you will receive from LEAD. Also note that if you also purchased the LEADTOOLS OCR Module, the OCR features will have to be unlocked separately, using the appropriate key.

For information on products and the features available in each product, or for information on licensing, refer to Topic Selection.

To determine if a certain feature is locked, call the IsSupportLocked method.


Unlocking Vector File Format Support

Vector Toolkits

Support for the DXF, DWG, PCT, PLT, DRW, DGN, WMF, EMF and CGM file formats is provided in the LEADTOOLS Vector toolkits. This support is unlocked when the Vector features are unlocked by calling UnlockSupport (L_SUPPORT_VECTOR, L_KEY_VECTOR). The L_KEY_VECTOR key is provided when a LEADTOOLS Vector toolkits is purchased.


Concepts and Definitions

The LEAD control lets you load an image from a file, manipulate it as a bitmap in memory, display it in the control, manipulate the way it is displayed, print the bitmap, and save it to a file.

The following illustrates the fundamental components and their relationships:

The LEAD control is the VCL custom control that you add to your application. In the illustration, the LEAD control is the box inside the window where the image is displayed.

The bitmap is the image data in memory. The LEAD control references the bitmap. Most LEAD methods that alter an image (such as Grayscale or Rotate) actually alter the bitmap. If you alter a bitmap, the changes you make do not appear in the control until the image repaints. When you save a bitmap, the changes you have made are saved in the file.

The displayed image is the rectangle on the screen that shows all or part of the bitmap. It can be positioned, scaled, and cropped without affecting the image data in memory. For a description of how to position, scale, and crop an image, refer to Displaying an Image.


Copying and Creating Bitmaps

Use the following methods for Clipboard input and output:

Copy method

Paste method

Use the following methods to copy the bitmap to or from a DIB or DDB:

GetDDB method

GetDIB method

SetDDB method

SetDIB method

Use the following property to create a bitmap from scratch:

CreateBitmap method

You can copy a control's entire list of bitmaps by assigning the BitmapList property from one control to another. You can free all of the bitmaps in the list by setting the property to 0.

You can copy one control's current bitmap to another control's current bitmap by assigning the Bitmap property from one control to the other. You can remove the current bitmap from the list (freeing the bitmap) by setting the Bitmap property to 0. When a control has only one bitmap, you do not have to set the BitmapListIndex property to specify the current bitmap.


Memory Storage Types for Bitmaps

There are several types of bitmaps:

Conventional bitmaps: The most common bitmaps - support all bits/pixel and with the fastest access time. But they also require the highest amount of memory.

Compressed bitmaps: 1-bit only, using a proprietary RLE compression. They usually require less memory than the conventional bitmaps.

Super-Compressed bitmaps: 1-bit (uses Fax G4 compression), 8-bit, or 24-bit (uses MCMP compression) only. They require little memory but the read and write operations performed on the bitmap are slower. Also, the 24-bit compression is lossy, which means there is some small amount of degradation each the 24-bit super-compressed bitmap changes. (The 1-bit super-compressed bitmap uses lossy compression, so there is never any quality loss).

Disk bitmaps: all the bitmap data is on disk. But a memory view is used to access the disk, which causes more and more conventional memory to be used the as you read or write more bitmap pixels.

Tiled bitmaps: the bitmap is broken into separate tiles. Tiles can be disk or conventional memory.

You can specify the size of bitmap you want when you call the CreateBitmap method. You can also instruct LEADTOOLS to react dynamically depending on the bitmap size or the amount of available memory using SetMemoryThresholds.

When LEADTOOLS has to allocate a conventional bitmap, it does the following:

1. | If the size of the bitmap being allocated is less than the fixed tile size (set through SetMemoryThresholds when nTileSize is > 0), the bitmap is allocated as conventional. If the allocation fails, the memory allocation function fails. If the allocation succeeds, the memory allocation function returns SUCCESS. No other steps are executed.
2. | Checks the maximum size for a conventional bitmap (set through SetMemoryThresholds). If the size of the bitmap being allocated is greater than this threshold, a tiled bitmap will be allocated. Go to step 5. If the size of the bitmap being allocated is lower than the threshold, go to step 3.
3. | Checks whether there is enough available memory to allocate a conventional bitmap. (This threshold is also set through SetMemoryThresholds). If there is not enough free memory, a tiled bitmap will be allocated and go to step 5. Else, go to step 4.
4. | Try to allocate a conventional memory bitmap (bitmap which is contained entirely in conventional memory. If the allocation succeeds, the memory allocation returns success and no other steps are performed. If the allocation fails, go to step 5.
5. | Try to allocate a tiled bitmap. There can be a mix of disk and conventional memory tiles. If the function succeeds, the allocation function returns success and no other steps are performed. If the allocation fails, go to step 6.
6. | Try to allocate a tiled bitmap. Return success if the allocation succeeds, error otherwise.

To get the memory threshold information set by the SetMemoryThreshold method, call the GetMemoryThresholds method.

Even when you have lots of RAM and enough space in the swap file, Windows might fail to allocate you one contiguous chunk of conventional memory. In this case, the bitmap will be allocated as tiled or disk.

Example: You attempt to allocate a 512MB bitmap. Windows might fail to allocate a contiguous 512MB memory chunk, but it might be able to allocate you 2x 256 MB chunks or 4x 128 MB chunks. In this case, LEADTOOLS allocates your 512MB bitmap using several smaller chunks in a tiled bitmap.

In a more extreme case, you might have not enough space to allocate the whole bitmap in conventional memory. Or you might have specified a maximum amount of conventional memory to be used with a bitmap. In either of these cases, LEADTOOLS will try to allocate a tiled bitmap with some tiles in conventional memory and others on disk.

The conventional memory tiles are always accessible (read further to see why this matters). Disk tiles will still need some chunks of conventional memory to read from disk/write to disk. We will refer to these chunks as "views". The more views you have, the more disk tiles can be accessed at a time and the faster the working with the bitmap will be. When you read or read from a disk tile, data is being cached to the view and no disk access is performed unless you move to another tile. The "move to another tile" operation is performed automatically when you read or write data to a certain row.

When you go to a disk tile that has no view, LEADTOOLS will:

create a new "view" (if you have not exceeded the maximum allowed of views and you have available memory) or

discard an old view and reassign it to the new tile. When the old view is discarded, data is written to the disk (if it has been modified since it was read). The writing of data to disk will cause a performance hit.

You can find out the memory allocation parameters for a bitmap using the GetMemoryInfo method.


Controlling and Detecting Events

The following topics describe how to control and detect events:

Controlling Events

Detecting Events


Controlling Events

Use the following properties to control the generation of error, and status:

EnableMethodErrors property

EnableProgressEvent property


Detecting Events

The LEAD control provides the following events:

OnAnimate event

OnChange event

OnDropFile

OnFilePage event

OnLoadInfo event

OnPaint event

OnPaintNotify event

OnPanWin event

OnRgnChange event

OnRubberBand event

OnScroll event

OnStatus event

OnZoomInDone event

The events listed below are Borland events. For information concerning these events, consult your Borland documentation:

OnClick event

OnDblClick event

OnDragDrop event

OnDragOver event

OnEndDrag event

OnEnter event

OnKeyDown event

OnKeyPress event

OnKeyUp event

OnMouseDown event

OnMouseMove event

OnMouseUp event

OnResize event

OnStartDrag event


Getting LEADTOOLS Toolkit Information

Use the following to get information about the LEADTOOLS toolkit:

AboutBox method

VersionDate property

VersionLevel property

VersionMajor property

VersionMinor property

VersionProduct property

VersionTime property


Input and Output

The following topics describe the kinds of input and output:

Loading a Bitmap from a File

Loading a Bitmap from Your Own Buffer

Saving a Bitmap to a File

Maintaining File Comments

Implementing PhotoCD and FlashPix Features

Implementing JBIG Features

Implementing PDF Plug in Features

Using Memory-Resident Image Files

Capturing an Image from the Screen

Drag and Drop


Loading Filters

Some operating systems (like Windows 95) have a limit for the number of DLLs that can be loaded at a time and that limit can be quickly reached, especially if there are several different controls on the same page/form or if the programming environments themselves load many DLLs. By default, LEADTOOLS loads several fixed filters and several cached filters. The fixed filters are FAX, CMP, TIF, JBG, LMB, BMP and PCX. The cached filters are a random selection of filters.

Use the following method to specify the file format filters you want LEADTOOLS to load:

PreLoadFilters method

Use the following method to specify the file formats LEADTOOLS should never load:

IgnoreFilters method


Loading a Bitmap from a File

Use the following method to load a file into a bitmap. In most cases, this method is all you need to load a file. Other methods and properties listed in this topic are for optional features and special cases.

Load method

To load an image from a file and resize it as it loads to the desired width, height and bits per pixel, use the following:

LoadResize method

Use the following properties and event to control loading an image through an OLE drag-and-drop operation:

DropFilesAllowed property

DropAutoLoad property

OnDropFile event

Use the following method to load a thumbnail (stamp image) into a bitmap from a JFIF or LEAD CMP file:

LoadStamp method

Use the following method to get information about a file before loading it:

GetFileInfo method

Then, read the following properties, which the method updates:

InfoAnimation property

InfoAnimationHeight property

InfoAnimationWidth property

InfoBits property

InfoCompress property

InfoFormat property

InfoHeight property

InfoHasAlpha property

InfoLayers property

InfoXRes property

InfoYRes property

InfoPage property

InfoPCDRes property

InfoSizeDisk property

InfoSizeMem property

InfoTotalPages property

InfoViewPerspective property

InfoWidth property

Use the following property to let the user see the progress when loading a bitmap:

PaintWhileLoad property

The WMFResolutionX property and WMFResolutionY property set the DPI (dots per inch) value that LEADTOOLS uses when loading WMF files.

When loading DJVU files, you can use the DJVResolution property to get or set the current display resolution used by LEADTOOLS when loading a DJVU file. The default value for this property is 96 DPI.

When loading PTOCA and AFP:PTOCA files, you can use the PTKResolution property to get or set the current display resolution used by LEADTOOLS.

Bitmap data can be signed or unsigned. If the bitmap data is signed, the image processing and paint methods may not work correctly. A bitmap will not be loaded signed unless the LoadSigned property is set to TRUE before loading the image. For more information on this, refer to Examining and Altering Bitmaps.

Use the following property to specify the number of paint-while-load passes when the file is a progressive LEAD or JPEG file, or when it is an interlaced PNG file:

ProgressivePasses property

Use the following property to specify which of the available resolutions in a PCD file to load:

PCDRes property

When loading RTF files, you can use the RTFTopMarg, RTFBottomMarg, RTFRightMarg, RTFLeftMarg, RTFPaperWidth, and RTFPaperHeight properties to get or set the current value for the control options used by LEADTOOLS.

When loading HPGL files, you can use the PLTPenColor property and the PLTPenWidth property to get or set the current value for the control options used by LEADTOOLS.

For PCD and FlashPix files, additional methods and properties are described in Implementing PhotoCD and FlashPix Features.

Use the following property to let a bitmap with a rotated view perspective keep its internal orientation when it is loaded.

LoadUseViewPerspective property

Use the following properties, if necessary, to supply format information about the image data that is being loaded. You can use this feature for loading input data (such as raw fax) that LEADTOOLS cannot recognize. When loading an image from a file, LEADTOOLS normally determines the file format from the file header, and if the format is unrecognized, the method returns an error. The OnLoadInfo event occurs before the error, and you can set these properties in that event (or anywhere else in your program) to supply the missing format information and prevent the error. (LEADTOOLS checks for a non-zero value in the LoadInfoFormat property, but to implement this feature, you need to set all of the properties to appropriate values.)

LoadInfoBits property

LoadInfoFlags property

LoadInfoFormat property

LoadInfoHeight property

LoadInfoOffset property

LoadInfoWidth property

LoadInfoXRes property

LoadInfoYRes property

To set the file format to try first when recognizing files for loading, set the PreferredLoadFormat property.

When working with Vector files (DXF, DWG, WMF, EMF, PCT, CGM, DRW, PLT, TIF (with a DXF saved internally) and Intergraph Vector), you can use the standard loading methods, and you can modify the view port and view mode using the following:

RasterizeViewportWidth Property

RasterizeViewportHeight Property

RasterizeViewMode Property

To load a section of an image from a file into the Main Control use LoadFileTile method.

LEADTOOLS lets you set the color scheme to use when loading AutoCAD files (DXF and DWG). These files can be loaded either Black on White or White on Black. To determine the current color scheme being used by LEADTOOLS, use the AutoCADFilesColorScheme property.

Please note that the Mixed Raster Content functionality (Document/Medical) has been removed from this help file and is presented in the new LEADTOOLS Mixed Raster Content VCL object help file for the LEADMrc Control. For information on the new version 14 of the LEADTOOLS Mixed Raster Content VCL object, refer to the LEADTOOLS Mixed Raster Content VCL Object Help File .

To use the fast loading algorithm while loading LEAD ABC files, use the LoadFast property. The fast loading algorithm provides faster loading with less image details.


Loading a Bitmap from Your Own Buffer

You can use the following methods to control the input stream in a file-load process. This is especially useful for handling a transmitted image, such as an image received over the Internet. These methods let you collect image data in your own buffer and feed the data to the LEAD control little-by-little, each time your buffer fills.

StartFeedLoad method

FeedLoad method

StopFeedLoad method


Loading and Saving Large TIFF Files

TIFF files can contain large numbers of pages. This can make loading and saving these TIFF files very time consuming. To speed-up both the loading and saving of very large TIFF files, LEADTOOLS provides several properties.

The InfoIFD property contains an offset to the current page of a TIFF file. The page starting at this offset is considered page one, the next page is considered page 2, and so forth. The value of the InfoIFD property can be used for the LoadIFD and SaveIFD properties.

When loading a page from a TIFF file, setting the LoadIFD property tells the control to treat the page beginning at the specified offset as page 1. Therefore, the control does not have to go through all pages from the beginning of the file prior to loading the desired page.

Similarly, when saving a page to a TIFF file, setting the SaveIFD property tells the control to treat the page beginning at the specified offset as page 1. Pages after this offset can be replaced, appended or deleted more quickly, since the control does not have to go through all pages from the beginning of the file.


Saving a Bitmap to a File

Use one of the following methods to save the bitmap in a file:

Save method

SaveWithStamp method

If you are saving a progressive JPEG or CMP file, set the following property to specify the number of passes in the file:

ProgressivePasses property

If you are saving a GIF file, set the following property to specify whether it is saved as an interlaced file:

SaveInterlaced property

If you are saving an animated GIF file, information specified in the animation playback properties is saved in the file. For details, refer to the description of the Save method.

When saving a TIFF 1-bit image, you can save it least significant bit first or most significant bit first by setting the SaveLSB property.

TIF files can be saved in strips or they may be saved in tiles. The SaveTileWidth property determines whether a TIF files will be saved in strips or tiles. If it is set to 0, TIF files will be saved in strips. If the SaveTileWidth property is greater than the bitmap width, the TIF file will be saved in strips. If the SaveTileWidth property is less than the bitmap width, the TIF file will be saved in tiles and the SaveTileHeight property will determine the height of the tiles.

When saving a page to a multipage file, the new page either replaces an existing page or is inserted before an existing page. Set the following property to determine which page to replace, or where to insert the new page.

SavePage property

The SaveOffset method saves a bitmap to a file, starting at a specified offset. This enables you to embed an image file in another file. After calling the SaveOffset method, the FileSizeWritten property is updated with the length of the file written, in bytes.

When saving RAW uncompressed data, the SavePad4 property can be used to determine whether or not to pad each line so the length is a multiple of four bytes. For more information on saving RAW uncompressed data, refer to Working with the RAW File Filter.

For FlashPix files, additional considerations are described in Implementing PhotoCD and FlashPix Features.

Please note that the Mixed Raster Content functionality (Document/Medical) has been removed from this help file and is presented in the new LEADTOOLS Mixed Raster Content VCL object help file for the LEADMrc Control. For information on the new version 14 of the LEADTOOLS Mixed Raster Content VCL object, refer to the LEADTOOLS Mixed Raster Content VCL Object Help File .

When saving JBIG2 file, you can use the following properties to get or change the values for the control options used by LEADTOOLS:

JBIG2SaveFlags property

JBIG2TemplateType property

JBIG2GBATX1 property

JBIG2GBATY1 property

JBIG2GBATX2 property

JBIG2GBATY2 property

JBIG2GBATX3 property

JBIG2GBATY3 property

JBIG2GBATX4 property

JBIG2GBATY4 property


Thumbnail Browser

LEADTOOLS VCL provides a thumbnail browser that browses a specified directory for images supported by LEADTOOLS. For each supported image, a thumbnail image is generated.

To browse a directory, call the BrowseDir method. For each thumbnail image generated, a ThumbnailEvent event occurs.

The browse process can be modified using the following properties:

ContinueBrowse property

ExpandMultipage property

Filter property

IncludeSubDirectories property

LoadStamp property

MaxSizeDisk property

MaxSizeMem property

StopOnError property

In addition, you can modify thumbnail characteristics using these properties:

DitherFlags property

ForceSize property

MaintainAspect property

PaletteFlags property

Resample property

ThumbnailBackgroundColor property

ThumbnailBitsPerPixel property

ThumbnailHeight property

ThumbnailWidth property

To gain information about the file, from which the thumbnail images were generated, use the following properties:

InfoBits property

InfoCompression property

InfoFormat property

InfoHeight property

InfoPage property

InfoSizeDisk property

InfoSizeMem property

InfoTotalPages property

InfoWidth property

InfoXRes property

InfoYRes property

The following are provided as general support for the thumbnail browser:

EnableMethodErrors property

Error property

ErrorMsg property

IsSupportLocked method

UnlockSupport method


Using a Data Source

Use the following properties to specify the data control and field to which the LEAD control is bound:

DataSource property

DataField property

Use the following properties to specify how images are stored in the data field:

DataSaveBits property

DataSaveFormat property

DataSaveQuality property

Use the following property to specify the bits per pixel of the bitmap in memory:

DataLoadBits property

Use the following property to see whether the bitmap is current with the database field:

DataChanged property


Using Memory-Resident Image Files

The following methods let you work with files that are stored in memory in their original formats:

GetMemoryInfo method

LoadMemory method

LoadMemoryTile method

SaveMemory method


Capturing an Image from the Screen

Use the following method to capture an image from a device context (usually the screen) and load it into the bitmap:

Capture method

Use the following to capture and zoom in on an image:

EnableZoomInRect property

ZoomIn method

OnZoomInDone event


Drag and Drop

LEADTOOLS provides properties and events that support the drag and drop process in the ImageList control and in the Main control. The properties and events of the ImageList control let you drag an image that is open in one ImageList control and drop it in another ImageList control. The properties and events of the Main control let you drag an image that is open in one Main control and drop it in another Main control.

To begin the drag and drop process, you must enable the process by setting the EnableOLEDragMethod property (Main Control) or the EnableOLEDragMethod property (ImageList Control) to TRUE, depending on the control you are using. If you are working with the ImageList control you must also set the AllowSelection property to ALLOWSELECTION_SINGLE.

With the drag and drop process enabled, select an image within the ImageList control or press the left mouse button within the Main control and begin dragging. This will generate the OnOLEStartDrag event (ImageList control) if you are working with the ImageList control, or it will generate the OnOLEStartDrag event (Main Control) if you re working with the Main control.

As you continue to drag the image, two more events are generated repeatedly for each control. If you are working in the ImageList control the OnOLEDragOver event (ImageList Control) and the OnOLEGiveFeedback event (ImageList Control) are generated. If you are working with the Main Control, the OnOLEDragOver event (Main Control) and the OnOLEGiveFeedback event (Main Control) are generated. The OnOLEDragOver event receives information concerning the button(s) used in the dragging process and the location of the cursor during the dragging process. The OnOLEGiveFeedback event receives a parameter that is used to indicate which cursor to use during the dragging process. By setting the parameter received by the OnOLEGiveFeedback event to FALSE, a custom cursor can be displayed during the dragging process. The custom cursor that will be used in this case is set in the OLEDragCursor property (Main Control) for the Main control or the OLEDragCursor property (ImageList Control) for the ImageList control.

When the dragging process is finished and you drop the image into the target control, an OnOLECompleteDrag event (Main Control) or OnOLECompleteDrag event (ImageList Control) is generated.


A Special Note About Loading 12 and 16-Bit Grayscale Images

If the image to be loaded is 12 or 16-bit grayscale and 0 is passed for the parameter that controls the number of bits per pixel at which to load the image, then if L_SUPPORT_EXTGRAY support is locked, the image will be loaded as 8-bit grayscale, instead of the original bits per pixel.

For more information on the L_SUPPORT_EXTGRAY support, refer to the UnlockSupport method.


Implementing Internet Features

Loading a Bitmap over the Internet

The LEADTOOLS VCL Main Control is a net-aware component. This means you can support loading various image formats from the Internet in your application simply by adding the LEADTOOLS Control.

Use the following elements to manage asynchronous loading of a bitmap from a local file or from an Internet URL.

BitmapDataPath property

OnBitmapDataPathClosed event

OnReadyStateChanged event

ReadyState property

Use the AutoSetRects property and its related properties to simplify the display rectangles when loading an image from the Internet.


Implementing JBIG Features

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 now completely supports all three types of images, giving you the ability to make full use of this powerful compression.

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. You can use the ReadLoadResolutions method to examine which sizes are available in a file. You can then use the SetLoadResolution method to specify which size to load. (The GetLoadResolution method only gets the last width and height values that were set with the SetLoadResolution method.). When saving a file, you can use the SaveResolutionHeight and SaveResolutionWidth properties to set resolutions for the next save operation . To set the number of resolutions to save, set the SaveResolutionCount property.

To achieve the highest compression ratios available in the JBIG format, LEAD now takes full advantage of all the functional blocks of this robust standard:

The Adaptive Arithmetic Encoder , which presents the heart of this format, has the ability to predict and hence encode future data symbols based on the data which is being currently encoded.

The Adaptive Template Block provides real coding gain for images rendered by grayscale with halftoning. This gain ratio approaches 80% in some situations.

This feature is useful for dealing with grayscale image data.

The Typical Prediction Block speeds implementations and provides some coding gain.

The Resolution Reduction Block is used to get a lower resolution version of an image so that no loss of data is encountered. This is mainly important for bi-level images, to avoid any deletion of thin lines.

The Deterministic Prediction Block provides good coding gain when saving more than one resolution layer in the same file.

All the free parameters specified by the JBIG standard are applied in LEAD to achieve maximal compression and the highest speed for any saving or loading operation.

LEADTOOLS currently supports more than 1 bit plane and more than 1 resolution layer in JBIG files. However, we do not support saving different ordering of strips inside the JBIG file. The JBIG filter is built now such that it supports the optimum ordering of strips inside the JBIG file such that as soon as you open the file you find the lowest resolution layer.

JBIG supports progressive loading of an image. This is done by loading the lowest resolution available in a file and then loading the next resolution, and so on, up to the last available resolution. To implement progressive loading of a JBIG image, use the ProgressivePasses property. Progressive loading will be implemented as follows:

1) | If only one resolution exists in the JBIG File, then the OnStatus event will be called for that resolution as it is decompressed. The percentages sent to the OnStatus event will be 0 to 100.
2) | If the image contains more than one resolution and (ProgressivePasses >= nResolutions, where nResolutions represents the number of resolutions present in the file) then the OnStatus event will be generated for each resolution layer that is loaded. The image data will be padded to the remaining width (that is, the size of the last resolution available in the file) with 0s. This will be repeated nResolution times, until the entire image (that is, the last resolution available) is loaded. Setting ProgressivePasses to PROGRESSIVEPASSES_WHEN_MEANINGFUL or PROGRESSIVEPASSES_ALWAYS has the same effect.
 | The percentages passed to the OnStatus event represent what percentage that resolution is of the whole. For example, if there are three resolutions present in the file (nResolutions = 3), the dimensions of the first resolution layer are one-fourth the dimensions of the top resolution layer. The dimensions of the second resolution layer are one-half the dimensions of the top resolution layer. Consequently, when the first resolution layer is loaded, the percentages sent to the OnStatus event are from 0 to 25. When the second resolution layer is loaded, the percentages sent to the OnStatus event are from 0 to 50. When the top resolution layer is loaded, the percentages sent to the OnStatus event are 0 to 100.
3) | If the image contains more than one resolution and (ProgressivePasses is < nResolutions) then the process is the same as in case 2, except loading starts with the first resolution available, continues with the 2nd resolution, and so on, up to resolution Passes-1, and then loading is completed with the decompression of the last resolution available in the file. Again, the percentages sent to the OnStatus event represent what percentage that resolution is of the whole. For example, if there are three resolutions present in the file, (nResolutions = 3), and the ProgressivePasses property is 2, the smallest resolution will be loaded first. The percentages sent to the OnStatus event will be 0 to 25. The second resolution level will be skipped and the top resolution level loaded. The percentages sent to the OnStatus event for the top resolution level will be 0 to 100.

JBIG support is available only with the JBIG Module. To unlock JBIG support, UnlockSupport must be called with the key found on the JBIG Module Certificate, which will be e-mailed to you. UnlockSupport(L_SUPPORT_JBIG, "JBIG Certificate key") tells the package to unlock JBIG support and passes the key for verification. For more information about required files, refer to Files To Be Included With Your Application.


Implementing JPEG 2000 Plug in Features

JPEG 2000 is a wavelet based compression stored in a hierarchical format which contains several stored resolutions of the image in the same file without duplication. For that reason, a JPEG 2000 compressed image can then be sent to a device in the resolution that best fits, without additional storage overhead.

The LEADTOOLS JPEG 2000 Plug in provides support for loading and saving the JPEG 2000 file formats. The JPEG 2000 file formats provide greater flexibility and better image quality, especially at higher compression, than standard JPEG. The greater flexibility includes the ability to control:

whether or not to transform RGB images to YUV prior to compression

the type of quantization to use when determining the quantization step size

the amount of compression

the size and location of tiles

the number of resolution levels in the file

the progression order

the code block height and width

whether to use markers to help detect corruption during transmission

etc.

LEADTOOLS provides a several properties for controlling the JPEG 2000 features listed above. These properties are:

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedQuantization property

J2KGuardBits property

J2KProgressOrder property

J2KROIRect property

J2KSetDefaults method

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseROI property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property

To update the properties listed above with the default values used when saving a JPEG 2000 file, call the J2KSetDefaults method. To change the JPEG 2000 features, set the properties themselves.

A region of interest can now be used for a J2K image. The J2KUseROI property indicates whether or not to use a region of interest. If this is TRUE, then the region of interest is defined based on the J2KROIControl property. If the J2KUseROI property is TRUE and the J2KROIControl property is set to J2K_USE_LEAD_REGION, then the region of interest is designated by the LEAD bitmap region. If the J2KUseROI property is TRUE and the J2KROIControl property is set to J2K_USE_OPTION_RECT, then the region of interest is designated by the rectangle defined by the J2KROIRect.

This support is available only in the LEADTOOLS JPEG 2000 Plug in, and must be unlocked. For more information on unlocking this support, refer to JPEG 2000 Plug In Support Instructions.

Please note that LEAD also offers the LEADTOOLS JPEG 2000 COM Object for IE, which lets you view JPEG 2000 images in ActiveX enabled web browsers, such as Internet Explorer. For more information, refer to LEADTOOLS JPEG 2000 COM Object for IE in the Products help file.


Implementing PDF Plug in Features

Overview:

The PDF module enhances the input/output functionality in LEADTOOLS by supporting a number of new powerful and complex file formats including:

PDF PDF stands for Portable Document Format. It was developed by Adobe Corporation to allow users to exchange and view their electronic documents in an easy and reliable way , independent of the environment in which these documents were created. A PDF file will look the same on the screen and in print regardless of what kind of machine you are using or which software package was used to create that file. One major advantage of PDF is that a large document can be compressed small enough to download very quickly, and still displays content as if you were looking at the original source such as a book or magazine.

PDF is emerging as a powerful format for reproducing documents over the web. Because of its high precision and accuracy in representing text and pictures along with its "hyper" nature, PDF is becoming a popular alternative to HTML and Postscript.

PS Postscript is a simple interpretive page description language. Its primary application is to describe the appearance of text, graphical shapes, and sampled images on printed or displayed pages. Some of the page description and interactive graphics capabilities of the PostScript language include arbitrary shapes, painting operators, text fully integrated with graphics and sampled images derived from natural sources. Postscript is the language that most advanced laser printers use in order to render electronic information on a printed page.

EPS EPS stands for encapsulated PostScript .An EPS file is a PostScript language program describing the appearance of a single page. Usually, the purpose of the EPS file is to be embedded inside another PostScript language page description. The EPS file can contain any combination of text, graphics, and images, and it is the same as any other PostScript language page description with only a few limitations.

Occasionally, a customer may install two separate software applications that use two different versions of the LEADTOOLS® PDF filter. If both applications use the default PDF initialization directories, the runtime library of the second application installed will overwrite the runtime library of the first application installed. This can be avoided by setting the PDFInitDir property to some location other than the default.

Loading Capabilities.

The LEADTOOLS PDF plug-in has the following import capabilities:

1. | Loads essentially all PDF 1.3 (Acrobat 4.x compatible) files.
2. | Loads all PostScript Language Level 3 files.
3. | Loads any EPS file.

The loading support is of course multi-page, where you can specify which page to load from the file and to find the number of pages in a certain document.

The plug-in gives the user a number of control options in order to customize the resulting rasterized page. These options include:

1. | Pixel depth. Valid values are 1,4,8 and 24 .The default value for this control parameter is 24. This value is set in the PDFDisplayDepth property.
2. | Horizontal resolution in dots per inch with a default value of 96. This value is set in the PDFXResolution property.
3. | Vertical resolution in dots per inch with a default value of 96. This value is set in the PDFYResolution property.
4. | Ability to use either library installed fonts (fonts installed by the plug in) or system fonts. The default value of this control option is to use library installed fonts. This value is set in the PDFUseLibFonts property.
5. | Font anti-aliasing. Valid values are 1bit(no anti-aliasing) , 2 and 4-bit anti-aliasing. The default value is 4, which gives maximum anti-aliasing. This value is set in the PDFTextAlpha property.
6. | Graphics anti-aliasing. Valid values are 1bit(no anti-aliasing) , 2 and 4-bit anti-aliasing. The default value is 1. This value is set in the PDFGraphicsAlpha property.

Saving Capabilities.

Full multi-page write support is provided by this module for the PDF format. This plug in lets you append, insert, replace or delete specific pages in a PDF file.

The plug-in gives you a wide range of control options for the resulting image data in terms of compression, including:

1. | No compression
2. | Compressed using CCITT Group 3, 1 dimension. For 1-bit images.
3. | Compressed using CCITT Group 3, 2 dimensions. For 1-bit images.
4. | Compressed using CCITT Group 4. For 1-bit images.
5. | JPEG compression and YUV 4:4:4 color space loss-less. Bits per pixel: 8 for grayscale, 24 for color.
6. | JPEG compression and YUV 4:2:2 color space. Bits per pixel: 8 for grayscale, 24 for color.
7. | JPEG compression and YUV 4:1:1 color space. Bits per pixel: 8 for grayscale, 24 for color.

To save a PDF file using the DPI values of the loaded bitmap, set the PDFSaveUseDPI property to TRUE.

A number of new save format constants have been added to LEADTOOLS in order to support types of files created by the PDF plug-in. For a list of these, please refer to Formats of Output Files..

LEADTOOLS supports several properties that let the user control the security of and access to the PDF file that is saved. These include the PDFEnable128bit property, the PDFEncryptFlags property, the PDFOwnerPassword property, and the PDFUserPassword property.

Distributing an application built using the PDF Module

The PDF plug-in needs some initialization files in order to work properly. Before distributing an application built using this plug-in, you need to setup the end-user machine with appropriate directories and files. Please follow the steps below:

1. | Create a main directory (referred to later as MAIN) on the hard-drive to contain the files. For example "C:\Pdf".
2. | Create 3 subdirectories within this "MAIN" directory, please name them "Lib, "Fonts", and "Resource".
3. | Copy the contents of the directory "Redist\Pdf\Fonts" to the "Fonts" directory.
4. | Copy the contents of the directory "Redist\Pdf\Lib" to the "Lib" directory.
5. | Copy the contents of the directory "Redist\Pdf\Resource" to the "Resource" directory.
6. | Setup the registry configuration below:

a.

Create the following registry key:

"HKEY_LOCAL_MACHINE\SOFTWARE\LEAD Technologies, Inc.\Pdf"

b. | Under this key create a string value and give it the name "GS_LIB".
c. | Now set the value data of the "GS_LIB" value as follows:

"MAIN\Lib;MAIN\Fonts;MAIN\Resource"

If MAIN stands for "C:\Pdf" then this would become:

"C:\ Pdf\Lib;C:\ Pdf\Fonts;C:\Resource"


Implementing PhotoCD and FlashPix Features

A Kodak PhotoCD or FlashPix file can contain more than one copy of the same image, each at a different physical resolution (width and height in pixels). For PhotoCD files, the resolutions are based on fixed sizes. As a result, all PhotoCD files have the same aspect ratio. For FlashPix files, the aspect ratio can vary; so there is not a list of fixed sizes.

For PhotoCD files, which LEADTOOLS can read but not write, you can use the InfoPCDRes property to examine which of the fixed sizes are available in a file. You can then use the PCDRes property to specify which of the fixed sizes to load.

LEADTOOLS can read and write FlashPix files.

When loading FlashPix files, there are some newer methods and properties, which can also be used with the PhotoCD files. You can use the following method and properties to examine which sizes are available in a file:

ReadLoadResolutions method

LoadResolutionCount property

LoadResolutionHeight property

LoadResolutionWidth property

You can then use the following method to specify which size to load:

SetLoadResolution method

The following method gets the last width and height values that were set with the SetLoadResolution method:

GetLoadResolution method

Special considerations when saving FlashPix files:

LEADTOOLS does not support the multi-resolution update features of the FlashPix format. The LEADTOOLS save methods always create a new file from the current bitmap, and the highest resolution in the new FlashPix file has the dimensions of the current bitmap. Therefore, if you overwrite an existing FlashPix file, you can lose any resolutions with larger dimensions than the current bitmap.

The format constant that you specify when saving a FlashPix file determines the type of compression. The following are the possible choices:

Format Constant | Meaning
FILE_FPX | FlashPix, with no compression
FILE_FPX_SINGLE_COLOR | FlashPix, compressed with the single color method, which is a FlashPix-specific compression method
FILE_FPX_JPEG | FlashPix, compressed with JPEG, using the FlashPix default Q factor
FILE_FPX_JPEG_QFACTOR | FlashPix, compressed with JPEG, using the specified Q factor

The compression is done by the Kodak support DLLs (LFKODAK.DLL and LFFPX7.DLL). You can use the same Q factors as with LEAD's JPEG engine (setting a value from 2 to 255, where 2 is the highest quality and 255 is the most compression), but the compression engine is not the same as LEAD's. You cannot use the InfoCompress property to determine the compression method in a FlashPix file.

Other considerations for PhotoCD and FlashPix files:

LEADTOOLS can only read PhotoCD and FlashPix files directly from disk files. Therefore, the methods for loading files from memory and saving files to memory are not applicable.

The FlashPix format requires OLE support. Therefore, you may need to include OLE support files, such as MSVCRT40.DLL, MFC40.DLL, and OLEPRO32.DLL, with your application.


Layers in Files

Certain files may contain layers. Currently, only PSD files support layers, although not all PSD files contain layers. Layers are numbered starting with 0. Therefore, the first layer in the file is layer 0. The next layer in the file is layer 1, etc. To load a layer from a file, call the LoadLayer method. Once the layer is loaded, the LayerLeft[0] and LayerTop[0] properties are updated with positioning information on the loaded layer.

The number of layers present in a file can be determined by calling the GetFileInfo method for a particular file. This method updates the InfoLayers property with the number of layers present in the file.

Each layer may have certain properties associated with it. These can be set or retrieved using the following properties:

LayerBlendModeKey property

LayerClipping property

LayerMaskBitmap property

LayerOpacity property

Bitmaps may also be saved to a file as layers by setting the SaveLayers property to TRUE. If the SaveLayers property is set to TRUE, then the next time a PSD file is saved, all bitmaps are saved as layers. Prior to saving a PSD file, the LayerLeft[x] and LayerTop[x] properties can be set to contain the positioning information for each layer. When the PSD file is saved, this positioning information is used to save the layers.


Working with the RAW File Filter

The RAW File Filter can be used to load and save raw uncompressed data. The raw data can have

any offset in the file

any bits per pixel

any width/height

each line padded to 4 bytes

any view perspective

BGR or RGB color order

Loading a file with the RAW filter

Parameters for loading raw uncompressed data are set through the OnLoadInfo event in the Main Control.

Inside the OnLoadInfo event (or prior to the call of the LoadInfo event),set the LoadInfoBits property to FILE_RAW. Valid values must also be set for the following properties: LoadInfoWidth, LoadInfoHeight, LoadInfoBits, and LoadInfoOffset (byte location in the file where the raw data begins). If each line of RAW data is padded so that the number of bytes is a multiple of 4 (as is the case with raw Windows BMP data), include LOADINFO_PAD4 in the LoadInfoFlags property. Include an orientation flag in the LoadInfoFlags property to load the image with the proper orientation. For example, raw Windows BMP data is stored with a BOTTOM_LEFT orientation. If the orientation is unknown, include the TOP_LEFT flag. If the raw data is 8 bits per pixel or less, then the image is palettized and a palette must be generated. If this is the case, include the LOADINFO_PALETTE flag, and fill in the first (2 bits per pixel) entries of the UserPalette property.

If the color order is ORDER_RGB then include this flag. If the ORDER_RGB flag is not included, the data will be loaded as ORDER_BGR.

Saving a file with the RAW filter

To save raw uncompressed data, an image must already be loaded into a LEAD control. When saving raw uncompressed data, the raw data will correspond to the width, height, bits per pixel, and view perspective of the image when it was loaded. For example, if a Window BMP file that is 300x400 24-bit color is loaded and then saved as raw uncompressed data, the raw data is 24-bit, ORDER_BGR, with a view perspective BOTTOM_LEFT (the first bytes in the file correspond to the bottom-left of the image). The total size of the raw data file will be 300x400x3 = 360,000 bytes.

You can affect the way the raw data is saved by setting certain properties. The bits in each byte can be reversed by setting the SaveLSB property to TRUE. Each line of raw data can be padded so that the length is a multiple of four bytes by setting the SavePad4 property to TRUE. The raw data can be saved at any offset in the file by using the SaveOffset method.

When using the Save method or the SaveOffset method to save RAW data that is 8 bits per pixel or less, no palette information is saved. Consequently, after loading RAW data, it is necessary to supply a palette.(see Loading a file with the RAW filter above.)

For examples that demonstrate how to load and save raw uncompressed data, Refer to:

RawLoad example for Delphi

RawLoad example for C++ Builder

RawSave example for Delphi

RawSave example for C++ Builder


Displaying an Image

Set the following properties (possibly at design time) to control the style of display:

AutoRepaint property

BackColor property

BackErase property

BitonalScaling property

PaintDither property

PaintPalette property

PaintRgnOnly property

PaintROP3 property

PaintGamma property

PaintIntensity property

PaintContrast property

Transparent property

PaintScaling property

For additional settings, refer to Using Special Effects When Painting. and Adding a Frame to the Control.

Use the following properties to implement automated scaling, positioning and scrolling of an image.

AutoScroll property

AutoSetRects property

AutoSize property

CenterImage property

EnableKeyboard property

EnableScroll property

PaintSizeMode property

PaintSizeUseDPI property

PaintZoomFactor property

ZoomToRect method

If you do not use the automated scaling properties, other properties and methods let you specify exactly which part of an image to paint and how big to make it.

When painting an image, LEADTOOLS uses the following four rectangles that determine how the image is scaled, positioned, and cropped:

The source rectangle determines which part of the bitmap LEADTOOLS treats as the source image. By default, it is the whole bitmap. (In fact, by default, all four rectangles are initialized to the size of the bitmap.)

The destination rectangle positions the displayed image relative to the LEAD control and determines the displayed size. If the destination rectangle is larger or smaller than the source rectangle, LEADTOOLS scales the image to fit the destination rectangle. You can view the following illustrations in a separate window:

Specifying Only the Destination Rectangles

Specifying Both the Source and Destination Rectangles

The source clipping rectangle limits the part of the source rectangle that LEADTOOLS paints. This rectangle does not affect scaling. You can view the following illustration in a separate window:

Specifying the Source Clipping Rectangle

The destination clipping rectangle limits the part of the destination rectangle that LEADTOOLS paints. This rectangle does not affect scaling, but if the image is scaled, you should set it to match the destination rectangle. You can view the following illustration in a separate window:

Specifying the Destination Clipping Rectangle

If you set the AutoSetRects property to true, when a bitmap is loaded or resized, LEADTOOLS initializes all four rectangles to a 0, 0 position and to the same width and height as the bitmap. If you set the AutoScroll property, LEADTOOLS automatically adjusts the origin of the destination rectangles when the user scrolls the image.

The size of the LEAD control also can limit how much of the image is displayed. The way you size and position the LEAD control depends on your programming environment, but you can set the destination rectangle to fit the size of the control.

Use the following properties to get the current client area of the LEAD control. Typically, you would use these properties to fit the destination rectangle to the size of the control. These are basic properties which are not documented.

Height property

Left property

Top property

Width property

Use the following methods to set the rectangle specifications:

SetDstClipRect method

SetDstRect method

SetSrcClipRect method

SetSrcRect method

Alternatively, you can read or write the following properties that define the rectangles:

DstClipHeight property

DstClipLeft property

DstClipTop property

DstClipWidth property

DstHeight property

DstLeft property

DstTop property

DstWidth property

SrcClipHeight property

SrcClipLeft property

SrcClipTop property

SrcClipWidth property

SrcHeight property

SrcLeft property

SrcTop property

SrcWidth property

Occasionally, it is necessary to convert between bitmap coordinates and client area coordinates. LEADTOOLS provides the BitmapToClient and ClientToBitmap methods for converting coordinates. Each of these methods takes as parameters the X and Y coordinates to be converted, and updates the ConvertX and ConvertY properties with the newly converted coordinates.

Use the following method to force repainting of the image. (If the AutoRepaint property is set to TRUE, you do not have to force a repaint.)

ForceRepaint method

Use the following method to force repainting of a specified rectangle in the LEAD control's client area.

RepaintRect method

Use the following properties and methods to apply window leveling to a 12 or 16-bit grayscale image. (Support for 12 and 16-bit grayscale images is available in Document/Medical toolkits only. Support for window leveling is available in Medical toolkits only.):

WindowLevel method

WindowLevelFillLUT method

LevelLUT property

LevelLUTLength property


Bitmaps and Bitmap Lists

To support multipage files and animation, the LEAD control can reference a list of bitmaps. In fact, even a control with only one bitmap has a list, and the list contains only the one bitmap.

The following properties reference the control's entire list of bitmaps:

BitmapList property

BitmapListCount property

The following methods lets you update a bitmap list:

InsertBitmapListItem method

DeleteBitmapListItems method

You can copy an entire list by assigning the BitmapList property from one control to another. You can free all of the bitmaps in the list by setting the property to 0. You can also reference the entire list of bitmaps when you load and save multipage files and when you play the list as an animation.

Most methods and properties reference only one bitmap (the current bitmap). When there is a list of bitmaps, the following property lets you specify the current bitmap:

BitmapListIndex property

The following property references the control's current bitmap:

Bitmap property

You can copy one control's current bitmap to another control's current bitmap by assigning the Bitmap property from one control to the other. You can remove the current bitmap from the list (freeing the bitmap) by setting the Bitmap property to 0. When a control has only one bitmap, you do not have to set the BitmapListIndex property to specify the current bitmap.

When assigning a bitmap of one control to a bitmap of another control, RefBitmap property can be used to indicate whether to perform a copy, or simply reference the source control’s Bitmap property.

To copy images between the VCL Main Control and the LEADTOOLS ActiveX controls, use:

OCXBitmap property

To delete a specific page from a multipage file that supports delete operations, use the following method:

DeletePage method

Comparing Images

Two bitmaps or parts of two bitmaps can be compared using the Correlation method. This method compares all or part of one bitmap with all the areas of the same dimensions in another bitmap and finds those areas that match according to the measure of correlation. The Correlation method updates its parameters with the X and Y coordinates of the points of correlated areas and the number of correlated areas actually found.


Implementing Transparency

You can implement transparency when doing any of the following:

Animation. When playing an animation, the playback process recognizes the transparent color specified in the BitmapTransparentColor property if the BitmapEnableTransparency property is set to TRUE. The transparent color is loaded from and saved to GIF files. If you save animated files in other multi-page formats, you must maintain the color yourself. For more information, refer to Playing an Animation.

Paint effects. When painting a bitmap or other object, you can specify a transparent color in the TransparentColor property and set the UseTransparentColor property. For more information about painting images, refer to Displaying an Image. For painting other objects, refer to Drawing Three-Dimensional Shapes and Text.

Displaying an image with transparent color. When painting a bitmap, you can specify a transparent color in the TransparentColor property and set the UseTransparentColor property to TRUE. LEAD will then paint the bitmap without the color set in the TransparentColor property.

Note:

When loading an image file of any supported file format, LEADTOOLS VCL control will load the transparent color information into the BitmapTransparentColor property. You must assign the BitmapTransparentColor property to the TransparentColor property and set UseTransparentColor property to TRUE for proper display. For example:

Delphi Example:

var
value: Integer;
begin
Lead1.Load('d:\ltwin14\images\image3.gif', 0, 0, -1);
value := LEAD1.BitmapTransparentColor;
{Account for the COLORREF, which can be a palette index or an RGB value}
If (value AND $1000000) <> 0 Then {Palette index}
Lead1.TransparentColor := Lead1.BitmapPalette[value AND $FFFFFF]
Else {RGB value}
LEAD1.TransparentColor := value;
Lead1.UseTransparentColor := True;
Lead1.ForceRepaint;
end;

Region processing. Defining a region in a bitmap makes it possible to treat the area outside the region as transparent. You can set the PaintRgnOnly property to TRUE to paint only the region that is defined for a bitmap. When combining images with the Combine method, if a region is defined for the target bitmap, the combine applies only to the region. (Any region defined in the source bitmap is ignored.). For example, if a transparent color is defined for a bitmap, you can create a region that omits pixels of that color. For details, refer to Combining Images.

To combine image data from the source bitmap (the slave) into the destination bitmap (master) using a perspective warp, use the CombineWarp method. If you want to specify the areas to be combined, the operations to be performed when combining the data, and which color planes (R or G or B or R, G, and B) are used, use the CombineExt method.

Once a region is defined, you can create a mask from it, which you can save in the alpha channel of a 16- or 32-bit file. Refer to the BitmapAlpha property for an example of how to save a region in an alpha channel.

Transparent control. You can make the background of the LEAD control transparent by setting the Transparent property to True. This lets you take advantage of related transparency properties when one control is positioned on top of another one.

When specifying a transparent color, you can refer to a particular palette index, instead of the RGB value. This can be useful in cases where a color is used for transparency and the palette may contain the same color in more than one palette position.

When specifying a palette index as a color value, use the following formula(Pascal):

$1000000 OR index

When evaluating a value to see if it is a palette index, you can use the following logic(Pascal):

If (value AND $1000000) <> 0 Then {value is a Palette index}
index := value AND $FFFFFF;

(Document/Medical only) Setting Transparent Colors For Annotation Bitmap Objects

The annotation Stamp (ANNOBJECT_STAMP, which includes the different Rubber Stamp tools) and Point (ANNOBJECT_POINT) objects can be set to display bitmaps that use a transparent color. A transparent color is a color that is not painted when painting an image. Use the AnnSetTransparent method to set such objects to use a transparent color. By default the transparent color is white (0x00FFFFFF). Use the AnnSetTransparentColor method to set the color to be used as the transparent color. Use the AnnGetTransparent method to get a value that indicates whether the bitmap being used by the annotation object is using a transparent color. Use the AnnGetTransparentColor method to get a value that indicates which color is being used as the transparent color.

FeatherAlphaBlend is a powerful method that can be used to implement transparency, using a mask. In many applications, a transparency mask is saved as an alpha channel. If a bitmap contains a transparency mask in the alpha channel, call BitmapAlpha property to get the alpha channel information back into a bitmap form. Once the transparency mask information is in a bitmap, it can be passed directly to the FeatherAlphaBlend method as the mask. The following code demonstrates how to do this:

1. For Delphi Users:

var
nRet: L_INT;
begin
{ Load a bitmap as 16 bits per pixel }
nRet:= LEADMainImage.Load ('Test.bmp', 16, 1, 1);
if(nRet = SUCCESS)then
begin
{ Let the ViewPerspective = TOP_LEFT }
LEADMainImage.InfoViewPerspective:= TOP_LEFT;
{ Create a rgn }
LEADMainImage.SetRgnEllipse(Trunc(LEADMainImage.Width/8),
Trunc(LEADMainImage.Height/8),
Trunc(LEADMainImage.Width/2),
Trunc(LEADMainImage.Height/2),
L_RGN_SET);
{ Create a mask bitmap from the region }
nRet:= LEADMainImage.CreateMaskFromBitmapRgn ();
if(nRet = SUCCESS)then
begin
LEADAlphaImage.Bitmap:= LEADMainImage.MaskBitmap;
{ Update the alpha channel in the main control }
LEADMainImage.BitmapAlpha:= LEADAlphaImage.Bitmap;
{ Save the bitmap at 16 bits per pixel to keep the alpha channel }
LEADMainImage.Save('Test.tif', FILE_TIF, 16, 0, SAVE_OVERWRITE);

{ Free the main bitmaps }
LEADMainImage.Bitmap:= 0;
LEADAlphaImage.Bitmap:= 0;
{ Load the bitmap that we just saved and get its alpha channel }
nRet:= LEADMainImage.Load ('Test.tif', 0, 1, 1);
{ Create a Bitmap in the Result Control}
LEADResultImage.CreateBitmap(LEADMainImage.BitmapWidth,
LEADMainImage.BitmapHeight,
LEADMainImage.BitmapBits);
if(nRet = SUCCESS)then
begin
LEADAlphaImage.Bitmap:= LEADMainImage.BitmapAlpha;
LEADResultImage.FeatherAlphaBlend(0,
0,
LEADAlphaImage.BitmapWidth,
LEADAlphaImage.BitmapHeight,
LEADMainImage.Bitmap,
0,
0,
LEADAlphaImage.Bitmap);
end;
end;
end;
LEADAlphaImage.Bitmap:= 0;
LEADMainImage.Bitmap:= 0;
end;

2. For C++ Builder Users

{
int nRet;

/* Load a bitmap as 16 bits per pixel */
nRet= LEADMainImage->Load ("Test.bmp", 16, 1, 1);
if(nRet == SUCCESS)
{
/* Let the ViewPerspective = TOP_LEFT */
LEADMainImage->InfoViewPerspective= TOP_LEFT;
/* Create a rgn */
LEADMainImage->SetRgnEllipse(LEADMainImage->Width/8,
LEADMainImage->Height/8,
LEADMainImage->Width/2,
LEADMainImage->Height/2,
L_RGN_SET);
/* Create a mask bitmap from the region */
nRet= LEADMainImage->CreateMaskFromBitmapRgn ();
if(nRet == SUCCESS)
{
LEADAlphaImage->Bitmap= LEADMainImage->MaskBitmap;
/* Update the alpha channel in the main control */
LEADMainImage->BitmapAlpha= LEADAlphaImage->Bitmap;
/* Save the bitmap at 16 bits per pixel to keep the alpha channel */
LEADMainImage->Save("Test.tif", FILE_TIF, 16, 0, SAVE_OVERWRITE);

/* Free the main bitmaps */
LEADMainImage->Bitmap= 0;
LEADAlphaImage->Bitmap= 0;
/* Load the bitmap that we just saved and get its alpha channel */
nRet= LEADMainImage->Load ("Test.tif", 0, 1, 1);
/* Create a Bitmap in the Result Control*/
LEADResultImage->CreateBitmap(LEADMainImage->BitmapWidth,
LEADMainImage->BitmapHeight,
LEADMainImage->BitmapBits);
if(nRet == SUCCESS)
{
LEADAlphaImage->Bitmap= LEADMainImage->BitmapAlpha;
LEADResultImage->FeatherAlphaBlend(0,
0,
LEADAlphaImage->BitmapWidth,
LEADAlphaImage->BitmapHeight,
LEADMainImage->Bitmap,
0,
0,
LEADAlphaImage->Bitmap);
}
}
}
LEADAlphaImage->Bitmap= 0;
LEADMainImage->Bitmap= 0;
}


Managing Palettes

Use the following properties to modify a palette that is used to display an image on a device that is 8 bits per pixel or less:

BitmapPalette property

UserPalette property

Use the following method to get the palette used in a particular device context:

GetBitmapPalette method

For related information about palette usage, refer to the ColorRes and ColorResList methods, and to the PaintPalette property.


Marking a Selection with a Rubberband

You can mark a selection area by using a rubberband, which is a one-pixel rectangle on the display surface.

The following property lets you automate the rubberband so that it appears whenever the mouse is moved with the left button down:

AutoRubberBand property

Alternatively, you can control the rubberband by adding code to the mouse events. You can use the following method to set the size and position of the rubberband:

SetRubberBandRect method

You can use the following property to change the visibility of the rectangle, effectively turning it on or off:

RubberBandVisible property

You can use the following properties to get or set the current size and position of the rectangle:

RubberBandHeight property

RubberBandLeft property

RubberBandTop property

RubberBandWidth property

The following event occurs before the MouseUp event when the rubberband is turned on:

OnRubberBand event


Playing an Animation

When you play an animation, you display a sequence of images from a list of bitmaps. This list of bitmaps can be in a multipage file that plays as it loads, or they can be already loaded in a control. For an explanation of bitmap lists, refer to Bitmaps and Bitmap Lists.

To execute a playback, LEADTOOLS creates a temporary target bitmap, renders the listed bitmaps to the target, and displays the target bitmap. An animated GIF file can specify properties of this target bitmap. With images from other sources, LEADTOOLS uses default values that are based on bitmaps in the list.

Before playing an animation from a file, you can use the GetFileInfo method to find out whether the file is an animated file and to find out the height and width of the target bitmap. The GetFileInfo method updates the following properties that contain this information:

InfoAnimation property

InfoAnimationHeight property

InfoAnimationWidth property

To determine how a particular bitmap in a list behaves during playback, you can get and set the following properties:

BitmapDelay property

BitmapDisposalMethod property

BitmapEnableTransparency property

BitmapTransparentColor property

To determine how a particular bitmap in a list is positioned relative to the temporary target bitmap, you can get and set the following properties:

BitmapLeft property

BitmapTop property

You can get and set the following properties of the temporary target bitmap:

AnimationBackColor property

AnimationBitsPerPixel property

AnimationPalette property

AnimationWidth property

AnimationHeight property

Use the following properties to control the playback execution:

AnimationLoop property

AnimationEnable property

AutoAnimate property

AutoAnimationLoop property

Use the following event to add code that executes when an animation playback starts or stops:

OnAnimate event


PNG Files and Transparency

Bitmaps may or may not contain transparency. The transparent color is a RGB color for bitmaps that are not palettized (> 8 bits per pixel). For palettized bitmaps, the transparent color is an index to a color within the palette.

PNG supports transparent bitmaps that have one or more transparent colors. However, currently LEADTOOLS cannot handle more than one transparent color. Therefore, the first transparent color encountered by LEADTOOLS is used as the transparent color for the bitmap.

When loading PNG bitmaps that have transparency, LEADTOOLS sets the BitmapEnableTransparency property to TRUE and BitmapTransparentColor property to the transparent color. Please note that if the loaded PNG bitmap is not palettized, then the BitmapTransparentColor property is set to an RGB color. If the loaded PNG bitmap is palettized, the BitmapTransparentColor property is set to 0x010000XX, where XX is the index of the transparent color.

When a bitmap that contains transparency (i.e. BitmapEnableTransparency property is set to TRUE) is saved as PNG, the transparency information is saved automatically. This is true for all bitmaps, regardless of their bits/pixel.

Please note that some developers consider the alpha channel to contain transparency information. Transparency is implemented in LEADTOOLS as explained above. However, FeatherAlphaBlend is a powerful method that can be used to implement transparency, using a mask saved as an alpha channel. If a bitmap contains a transparency mask in the alpha channel, call BitmapAlpha property to get the alpha channel information back into a bitmap form. Once the transparency mask information is in a bitmap, it can be passed directly to the FeatherAlphaBlend method as the mask. For sample code that demonstrates how to do this, refer to Implementing Transparency. For more information on functions that utilize alpha channel information, refer to Working with the Alpha Channel.If a PNG file contains an alpha bitmap, the InfoHasAlpha property will be set to TRUE when the GetFileInfo method is called. You can access the alpha channel information through the BitmapAlpha property.

Some PNG files have an 8-bit palettized component (for the image) and 8-bit alpha information. When you get the information for these files, InfoBits property gets set to 8 and the InfoHasAlpha property gets set to TRUE. By default (when passing 0 for iBitsPerPixel to the Load methods), the image is loaded as 8 bits (the alpha information is ignored). To get the alpha information from these files, you need to load the image as 32 or 64-bit. In this case, the alpha information can be accessed with the BitmapAlpha property. LEADTOOLS does not save these 8+8 files.


Scrolling an Image

LEADTOOLS provides the following for scrolling images in the Main Control:

AutoScroll property

HScrollInfo property

OnScroll event

VScrollInfo property

To enable the implementation of automatic scrollbars, the AutoScroll property must be set to TRUE. Is this property is set to TRUE, then whenever the user drags the box on a Main Control's scrollbar, an OnScroll event occurs, notifying the user that the image has been scrolled. Information about the horizontal and vertical scrollbars can be obtained in the HScrollInfo property and VScrollInfo property.


Specifying Both the Source and Destination Rectangles

The following illustrates how you can specify a part of the bitmap as the source rectangle. Then, the source rectangle (rather than the whole bitmap) is scaled and displayed.


Specifying Only the Destination Rectangles

The following illustrates how you can scale the displayed image by accepting the default source rectangle and specifying only the destination rectangles. (To paint the whole image, you must set the clipping rectangle to the same values as the destination rectangle.)


Specifying the Destination Clipping Rectangle

The following illustrates how you can specify a destination clipping rectangle to limit the part of the destination rectangle that gets painted. (Keep in mind that if you want the whole destination rectangle to paint, you must update the clipping area to match it.)


Specifying the Source Clipping Rectangle

The following illustrates how you can specify a source clipping rectangle to limit the part of the source rectangle that gets painted. Usually, you do not need to specify a source clipping rectangle. However, this feature can be useful in sophisticated applications that treat the bitmap as both a display surface and a display source.


Using a PanWindow

The Pan Window is a small window which will display a scaled view of a bitmap, which is also being displayed in the Main Control's window at a size that would require scrolling. The Pan Window will maintain the image’s aspect ratio. In the Pan Window, a colored Pan Rect will be displayed to indicate the portion of the image currently being displayed in the main window. When a user clicks inside the Pan Window and moves the mouse, while holding down the button, the Pan Rect will move with the mouse pointer.

To set the location of the PanWindow, use:

PanWinX property

PanWinY property

To set the dimensions of the PanWindow, use:

PanWinWidth property

PanWinHeight property

The following properties can be set to control image quality in the PanWindow:

PanWinPaintPalette property

PanWinBitonalScaling property

PanWinPaintDither property

PanWinPaintScaling property

To make the PanWindow visible (or invisible) use:

ShowPanWin method

When the PanWindow is created, updated, destroyed or moved, the following event is generated:

OnPanWin event

Other PanWindow characteristics which can be set are:

PanWinTitle property

PanWinRectColor property

PanWinSysMenu property

PanWinPointer property

PanWinIcon property


Using Color Values in LEADTOOLS

The standard Windows values for COLORREF(OLE_COLOR) represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format $00BBGGRR represents the blue, green, and red color values for the specified pixel, where $BB is the blue value, $GG is the green value and $RR is the red value. If $01000000 is set in the COLORREF value ($010000ZZ), the lower 8 bits ($ZZ) represent an index into the bitmap's palette, which holds the color value. You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes As Color Values.

In the Document/Medical toolkits, the COLORREF value may represent a 16-bit grayscale value if the pBitmap is a 12 or 16-bit grayscale. So that the value is not confused with an RGB value, the COLORREF_GRAY16 mask ($04000000) is set. In this case ($0400YYYY), the lower 16 bits ($YYYY) of the COLORREF value represent the 16-bit grayscale value. ($0400FFFF is 16-bit white and $04000000is 16-bit black.) This is not a standard Windows value. Therefore, LEADTOOLS elements will recognize a COLORREF having this format, but Windows elements will not. For information on converting from a 16-bit value, refer to Converting 16-bit Grayscale Values.

VCL uses the TColor enumerated data type that covers the values that can be returned by the Windows RGB macro. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.


Using Palette Indexes As Color Values

Methods and properties that take a COLORREF data type can also reference a particular index in the current bitmap's palette. This can be useful in cases where a color is used for transparency and the palette may contain the same color in more than one palette position.

When specifying a palette index as a color value, use the following formula:

$1000000 OR index

When evaluating a value to see if it is a palette index, you can use the following logic:

if (value AND $1000000)<>0 then
index = value AND $FFFFFF


Gradients and Patterns

You can specify a gradient color or a pattern when you implement a transitional paint effect or when you draw a three-dimensional shape or text object.

The following properties let you specify a gradient color, which starts as one color and ends as another, with the specified number of transitional colors from start to end. The direction of the transition depends on the gradient style.

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

The following properties let you specify a pattern or solid color:

PatternStyle property

PatternBackColor property

PatternForeColor property

The usage of gradients and patterns varies as follows:

For painting transitions, described in Using Special Effects When Painting, you always use a gradient or pattern to achieve the effect.

For a three-dimensional shape, described in Drawing Three-Dimensional Shapes and Text, you can use these properties for a fill pattern or a background bitmap, as follows:

- The pattern properties (but not the gradient properties) specify the shape's fill style.

- If the ShapeBackgroundStyle property specifies an image in the background, you can draw a patterned or gradient rectangle to another control's bitmap, then use that bitmap as the background of the shape when drawing to the main control.

For a text object, described in Drawing Three-Dimensional Shapes and Text, you can only use a pattern or gradient to create a bitmap that you use as the foreground of the text. First you draw a patterned or gradient rectangle to another control's bitmap. Then you use that bitmap as foreground of a text object when drawing to the main control.


Working with the ImageList Control

Using the ImageList Control

LEADTOOLS VCL provides an image list control that lets you display and manipulate a list of images. Any events listed below that are not underlined are VCL Control events, not LEAD events. For information concerning those events, consult your Borland documentation. The ImageList properties, methods and events let you do the following with a list of images:

You can load and save image lists using these methods:

LoadFromFile method

SaveToFile method

The following provide support for dragging and dropping:

EnableOLEDragMethod property (ImageList Control)

OLEDragCursor property (ImageList Control)

OnOLECompleteDrag event (ImageList Control)

OnOLEDragOver event (ImageList Control)

OnOLEGiveFeedback event (ImageList Control)

OnOLEStartDrag event (ImageList Control)

To insert and delete images, use the following:

Clear method

Insert method

InsertAt method

InsertFromBitmapList method

Remove method

To specialize mouse and keyboard input, use the following:

Click event

DblClick event

EnableKeyboard property

KeyDown event

KeyPress event

KeyUp event

MouseDown event

MouseMove event

MouseUp event

Cursor property

You can modify the display characteristics, or item characteristics, using the following:

AllowSelection property

Ctl3D Property;

BackColor property

BitonalScaling property

BorderColor property

BorderStyle property

DisplayItemText property

FirstVisibleItem property

Font property

ForeColor property

Item property

ItemBackgroundColor property

ItemHeight property

ItemHorizontalSpacing property

OnItemSelected event

ItemVerticalSpacing property

ItemWidth property

PaintDither property

PaintScaling property

Resize event

SelectAll method

SelectedCount property

SelectedItems property

SelectionColor property

SelectionStyle property

Sort method

SetSelectionBitmap method

ViewSize property

The following provide support for user-defined or custom painting of the ImageList items:

OwnerDrawItem event

OwnerDrawItems property

The following elements let you scroll through the image list:

EnsureVisible method

OnScroll event

ScrollItems method

ScrollStyle property

To obtain information about the image list, use the following:

ColumnCount property

Count property

CurrentPage property

HitTest method

PageCount property

RowCount property

LEADTOOLS also provides the following general elements:

EnableMethodErrors property

ErrorMsg property

Error property

IsSupportLocked method

UnlockSupport method

The properties and events listed below are inherited from TWinControl VCL control. For information concerning these events, consult your Borland documentation:

Click event

DblClick event

KeyDown event

KeyPress event

KeyUp event

MouseDown event

MouseMove event

MouseUp event

Cursor property

Ctl3D Property

To import a list of bitmaps to the Image List control or to export a number of bitmaps from the Image List control to a bitmap list, use the following methods:

ImportBitmapList method

ExportBitmapList method

To sort the items in the ImageList Control according to the passed options, use the following method:

SortExt method


Using the Magnifying Glass

LEADTOOLS provides a "magnifying glass" for the Main Control. This magnifying glass provides a means of "zooming in" on the image loaded into the Main Control To start the magnifying glass procedure, call the StartMagGlass method. This method lets you set the following:

size of the magnifying glass

shape of the magnifying glass

magnifying glass border (color, thickness, appearance)

magnification level

section of the pixel on which to center the zoomed image

The user can check the HasMagGlass property to determine whether the control has a magnifying glass attached to it. As the magnifying glass is moved over an image, the zoomed - in view is also displayed.

A magnifying glass can be used in one of the following ways:

1. | Attach an ordinary magnifying glass to the control's window. To do this, do not set MAGGLASS_MANUAL_UPDATE in the MagGlassFlags property, and then call the StartMagGlass method. If you use the magnifying glass this way, there is no need to write any code to display the magnifying glass or to handle its movement across an image. All this is handled internally by LEADTOOLS.
2. | In the second method, the user is responsible for manually updating the magnifying glass by handling the WM_LBUTTONDOWN, WM_LBUTTONDBLCLK, WM_LBUTTONUP, WM_MOUSEMOVE, WM_SETCURSOR and WM_KILLFOCUS messages instead of having them handled internally by LEADTOOLS. To do this, set MAGGLASS_MANUAL_UPDATE in the MagGlassFlags property. The magnifying glass can then be manipulated manually using the ShowMagGlass method, the SetMagGlassPos method, the UpdateMagGlassFromHandle method and the OnMagGlassCursor event. The ShowMagGlass method will show or hide the Magnifying Glass while the SetMagGlassPos method will move the Magnifying Glass to a specified position. The UpdateMagFromHandle method can be used to update the bitmap that the Magnifying Glass displays in the zoomed area. The OnMagGlassCursor event occurs repeatedly while the left mouse button is not pressed. This event lets the user set the Magnifying Glass cursor.

To set masks for certain colors to be masked from the zoomed - in display, LEADTOOLS provides the MagGlassMaskCount property and the MagGlassMask property. Setting the MagGlassMaskCount allocates the array of the MagGlassMask property. The MagGlassFlags property controls two behaviors of the Magnifying Glass:

whether the colors set in the MagGlassMask property are the only displayed colors or the only masked colors in the displayed image.

whether the Magnifying Glass will be manually updated.

LEADTOOLS provides two defined shapes for the Magnifying Glass: Rectangle and Ellipse. The UpdateMagGlassShape method lets you update the shape of the magnifying glass to one of the previously listed shapes, or to a custom shape.

To control the painting options for the zoomed display, use the following:

PanWinPaintPalette property

PanWinBitonalScaling property

PanWinPaintDither property

PanWinPaintScaling property

To control the Contrast, Gamma and Intensity of the zoomed area, use the following:

MagGlassPaintContrast property

MagGlassPaintGamma property

MagGlassPaintIntensity property

To use a custom shape for the magnifying glass, use the following:

MagGlassPointer property

When the magnifying glass is no longer needed, call the StopMagGlass method to stop the magnifying glass procedure.


Adding a Frame to the Control

The following properties let you add a three-dimensional frame to the LEAD control:

FrameThickness property

FrameColor property

You can turn the frame off by specifying a thickness of 0. When the frame is turned on, the automated fit modes fit the image into the smaller display area.

The following properties specify the inner and outer bands that give the frame a three-dimensional appearance:

FrameInnerStyle property

FrameInnerThickness property

FrameInnerHiliteColor property

FrameInnerShadowColor property

FrameOuterStyle property

FrameOuterThickness property

FrameOuterHiliteColor property

FrameOuterShadowColor property


Using Special Effects When Painting

You can specify a special effect to be applied when painting an image, and you can specify a transitional effect that occurs before the image is painted. Other aspects of painting (such as zooming) are automated or controlled as explained in Displaying an Image.

The following property lets you specify a special effect when painting an image:

PaintEffect property

The following properties let you implement a transitional effect that paints before the image paints:

TransitionStyle property

TransitionEffect property

The TransitionStyle property determines whether a transitional effect is used, and it determines whether the transition is based on pattern properties or gradient color properties. Refer to Gradients and Patterns for related properties.

The following properties let you specify the speed and granularity of the effect:

EffectDelay property

EffectGrain property

The following properties and event let you control the number of passes when painting an image or transition. If you specify more than one pass, a pattern brush paints some of the pixels on each pass, and the painting is complete when you finish all of the passes.

PaintMaxPasses property

PaintPass property

PaintNotificationDelay property

OnPaintNotify event

The first OnPaintNotify event occurs before the first pass and after each pass when painting a transition or an image. Therefore, you can use the event to change other properties between passes, or after the transition paints and before the image paints.

The following properties let you specify a transparent color (a color that is not painted):

UseTransparentColor property

TransparentColor property

The following properties let you specify a wand (a band of color that is used at the leading edge of some effects):

WandColor property

WandSize property

To add a three-dimensional shape or text object, refer to Drawing Shapes and Text.


BackStyle

The following values may be used for the ShapeBackgroundStyle property (Main Control).

Value | Meaning
sbsTransparent | Transparent
sbsOpaque | Opaque
sbsTranslucent | Translucent
sbsTiledImage | Tiled image
sbsTranslucentTiledImage | Translucent tiled image
sbsGradient | Gradient color
sbsTranslucentGradient | Translucent gradient color


BorderStyles

The following values may be used for the ShapeBorderStyle property (Main Control).

Value | Meaning
sbrTransparent | Transparent
sbrSolid | Solid line
sbrDash | Dash line (valid only for 1-pixel lines)
sbrDot | Dot line (valid only for 1-pixel lines)
sbrDashDot | Dash dot line (valid only for 1-pixel lines)
sbrDashDotDot | Dash dot dot line (valid only for 1-pixel lines)


Effects

The following values may be used for the PaintEffect property.

Value | Meaning
No effect class |
EFX_EFFECT_NONE | No effect
EFX_EFFECT_NO_PICTURE | No picture (no background)
EFX_EFFECT_MAX | Number of effects in this class.
Linear wipe class |
EFX_EFFECT_WIPE_L_TO_R | Wipe left to right
EFX_EFFECT_WIPE_R_TO_L | Wipe right to left
EFX_EFFECT_WIPE_T_TO_B | Wipe top to bottom
EFX_EFFECT_WIPE_B_TO_T | Wipe bottom to top
EFX_EFFECT_WIPE_LT_TO_RB | Wipe left-top to right-bottom
EFX_EFFECT_WIPE_LB_TO_RT | Wipe left-bottom to right-top
EFX_EFFECT_WIPE_RT_TO_LB | Wipe right-top to left-bottom
EFX_EFFECT_WIPE_RB_TO_LT | Wipe right-bottom to left-top
EFX_EFFECT_WIPE_INTERH_L_TO_R_THEN_L_TO_R | Wipe horizontal interlace left to right twice
EFX_EFFECT_WIPE_INTERV_T_TO_B_THEN_T_TO_B | Wipe vertical interlace top to bottom twice
EFX_EFFECT_WIPE_INTERH_L_TO_R_THEN_R_TO_L | Wipe horizontal interlace left to right then back
EFX_EFFECT_WIPE_INTERV_T_TO_B_THEN_B_TO_T | Wipe vertical interlace top to bottom then back
EFX_EFFECT_WIPE_INTERV_L_TO_R_THEN_L_TO_R | Wipe vertical interlace left to right twice
EFX_EFFECT_WIPE_INTERV_R_TO_L_THEN_R_TO_L | Wipe vertical interlace right to left twice
EFX_EFFECT_WIPE_INTERH_T_TO_B_THEN_T_TO_B | Wipe horizontal interlace top to bottom twice
EFX_EFFECT_WIPE_INTERH_B_TO_T_THEN_B_TO_T | Wipe horizontal interlace bottom to top twice
EFX_EFFECT_WIPE_INTERV_L_TO_R_THEN_R_TO_L | Wipe vertical interlace left to right then back
EFX_EFFECT_WIPE_INTERV_R_TO_L_THEN_L_TO_R | Wipe vertical interlace right to left then back
EFX_EFFECT_WIPE_INTERH_T_TO_B_THEN_B_TO_T | Wipe horizontal interlace top to bottom then back
EFX_EFFECT_WIPE_INTERH_B_TO_T_THEN_T_TO_B | Wipe horizontal interlace bottom to top then back
EFX_EFFECT_WIPE_INTERH_L_TO_R_AND_R_TO_L | Wipe horizontal interlace left to right and right to left
EFX_EFFECT_WIPE_INTERV_T_TO_B_AND_B_TO_T | Wipe vertical interlace top to bottom and bottom to top
EFX_EFFECT_WIPE_INTERV_L_AND_R_TO_C | Wipe vertical interlace left and right to center
EFX_EFFECT_WIPE_INTERV_C_TO_L_AND_R | Wipe vertical interlace center to left and right
EFX_EFFECT_WIPE_INTERH_T_AND_B_TO_C | Wipe horizontal interlace top and bottom to center
EFX_EFFECT_WIPE_INTERH_C_TO_T_AND_B | Wipe horizontal interlace center to top and bottom
EFX_EFFECT_WIPE_INTERV_L_AND_R_TO_C_THEN_C_TO_L_AND_R | Wipe vertical interlace left and right to center then back
EFX_EFFECT_WIPE_INTERV_C_TO_L_AND_R_THEN_L_AND_R_TO_C | Wipe vertical interlace center to left and right then back
EFX_EFFECT_WIPE_INTERH_T_AND_B_TO_C_THEN_C_TO_T_AND_B | Wipe horizontal interlace top and bottom to center then back
EFX_EFFECT_WIPE_INTERH_C_TO_T_AND_B_THEN_T_AND_B_TO_C | Wipe horizontal interlace center to top and bottom then back
EFX_EFFECT_WIPE2_LT_AND_RB_TO_C | Wipe2 left-top and right-bottom to center
EFX_EFFECT_WIPE2_LB_AND_RT_TO_C | Wipe2 left-bottom and right-top to center
EFX_EFFECT_WIPE2_C_TO_LT_AND_RB | Wipe2 center to left-top and right-bottom
EFX_EFFECT_WIPE2_C_TO_LB_AND_RT | Wipe2 center to left-bottom and right-top
EFX_EFFECT_WIPE2_LB_AND_RB_TO_T | Wipe2 left-bottom and right-bottom to top
EFX_EFFECT_WIPE2_LT_AND_RT_TO_B | Wipe2 left-top and right-top to bottom
EFX_EFFECT_WIPE2_RT_AND_RB_TO_L | Wipe2 right-top and right-bottom to left
EFX_EFFECT_WIPE2_LT_AND_LB_TO_R | Wipe2 left-top and left-bottom to right
EFX_EFFECT_WIPE2_L_T_TO_B_AND_R_B_TO_T | Wipe2 left top to bottom and right bottom to top
EFX_EFFECT_WIPE2_T_L_TO_R_AND_B_R_TO_L | Wipe2 top left to right and bottom right to left
EFX_EFFECT_WIPE4_CORNERS_OUT | Wipe4 corners out
EFX_EFFECT_WIPE4_C_TO_L_AND_R_THEN_T_AND_B | Wipe4 center to left and right then top and bottom
EFX_EFFECT_WIPE4_T_AND_B_THEN_L_AND_R_TO_C | Wipe4 top and bottom then left and right to center
EFX_EFFECT_WIPE4_L_L_L_L | Wipe4 left left left left
EFX_EFFECT_WIPE4_L_L_L_R | Wipe4 left left left right
EFX_EFFECT_WIPE4_L_L_L_T | Wipe4 left left left top
EFX_EFFECT_WIPE4_L_L_L_B | Wipe4 left left left bottom
EFX_EFFECT_WIPE4_L_L_R_L | Wipe4 left left right left
EFX_EFFECT_WIPE4_L_L_R_R | Wipe4 left left right right
EFX_EFFECT_WIPE4_L_L_R_T | Wipe4 left left right top
EFX_EFFECT_WIPE4_L_L_R_B | Wipe4 left left right bottom
EFX_EFFECT_WIPE4_L_L_T_L | Wipe4 left left top left
EFX_EFFECT_WIPE4_L_L_T_R | Wipe4 left left top right
EFX_EFFECT_WIPE4_L_L_T_T | Wipe4 left left top top
EFX_EFFECT_WIPE4_L_L_T_B | Wipe4 left left top bottom
EFX_EFFECT_WIPE4_L_L_B_L | Wipe4 left left bottom left
EFX_EFFECT_WIPE4_L_L_B_R | Wipe4 left left bottom right
EFX_EFFECT_WIPE4_L_L_B_T | Wipe4 left left bottom top
EFX_EFFECT_WIPE4_L_L_B_B | Wipe4 left left bottom bottom
EFX_EFFECT_WIPE4_L_R_L_L | Wipe4 left right left left
EFX_EFFECT_WIPE4_L_R_L_R | Wipe4 left right left right
EFX_EFFECT_WIPE4_L_R_L_T | Wipe4 left right left top
EFX_EFFECT_WIPE4_L_R_L_B | Wipe4 left right left bottom
EFX_EFFECT_WIPE4_L_R_R_L | Wipe4 left right right left
EFX_EFFECT_WIPE4_L_R_R_R | Wipe4 left right right right
EFX_EFFECT_WIPE4_L_R_R_T | Wipe4 left right right top
EFX_EFFECT_WIPE4_L_R_R_B | Wipe4 left right right bottom
EFX_EFFECT_WIPE4_L_R_T_L | Wipe4 left right top left
EFX_EFFECT_WIPE4_L_R_T_R | Wipe4 left right top right
EFX_EFFECT_WIPE4_L_R_T_T | Wipe4 left right top top
EFX_EFFECT_WIPE4_L_R_T_B | Wipe4 left right top bottom
EFX_EFFECT_WIPE4_L_R_B_L | Wipe4 left right bottom left
EFX_EFFECT_WIPE4_L_R_B_R | Wipe4 left right bottom right
EFX_EFFECT_WIPE4_L_R_B_T | Wipe4 left right bottom top
EFX_EFFECT_WIPE4_L_R_B_B | Wipe4 left right bottom bottom
EFX_EFFECT_WIPE4_L_T_L_L | Wipe4 left top left left
EFX_EFFECT_WIPE4_L_T_L_R | Wipe4 left top left right
EFX_EFFECT_WIPE4_L_T_L_T | Wipe4 left top left top
EFX_EFFECT_WIPE4_L_T_L_B | Wipe4 left top left bottom
EFX_EFFECT_WIPE4_L_T_R_L | Wipe4 left top right left
EFX_EFFECT_WIPE4_L_T_R_R | Wipe4 left top right right
EFX_EFFECT_WIPE4_L_T_R_T | Wipe4 left top right top
EFX_EFFECT_WIPE4_L_T_R_B | Wipe4 left top right bottom
EFX_EFFECT_WIPE4_L_T_T_L | Wipe4 left top top left
EFX_EFFECT_WIPE4_L_T_T_R | Wipe4 left top top right
EFX_EFFECT_WIPE4_L_T_T_T | Wipe4 left top top top
EFX_EFFECT_WIPE4_L_T_T_B | Wipe4 left top top bottom
EFX_EFFECT_WIPE4_L_T_B_L | Wipe4 left top bottom left
EFX_EFFECT_WIPE4_L_T_B_R | Wipe4 left top bottom right
EFX_EFFECT_WIPE4_L_T_B_T | Wipe4 left top bottom top
EFX_EFFECT_WIPE4_L_T_B_B | Wipe4 left top bottom bottom
EFX_EFFECT_WIPE4_L_B_L_L | Wipe4 left bottom left left
EFX_EFFECT_WIPE4_L_B_L_R | Wipe4 left bottom left right
EFX_EFFECT_WIPE4_L_B_L_T | Wipe4 left bottom left top
EFX_EFFECT_WIPE4_L_B_L_B | Wipe4 left bottom left bottom
EFX_EFFECT_WIPE4_L_B_R_L | Wipe4 left bottom right left
EFX_EFFECT_WIPE4_L_B_R_R | Wipe4 left bottom right right
EFX_EFFECT_WIPE4_L_B_R_T | Wipe4 left bottom right top
EFX_EFFECT_WIPE4_L_B_R_B | Wipe4 left bottom right bottom
EFX_EFFECT_WIPE4_L_B_T_L | Wipe4 left bottom top left
EFX_EFFECT_WIPE4_L_B_T_R | Wipe4 left bottom top right
EFX_EFFECT_WIPE4_L_B_T_T | Wipe4 left bottom top top
EFX_EFFECT_WIPE4_L_B_T_B | Wipe4 left bottom top bottom
EFX_EFFECT_WIPE4_L_B_B_L | Wipe4 left bottom bottom left
EFX_EFFECT_WIPE4_L_B_B_R | Wipe4 left bottom bottom right
EFX_EFFECT_WIPE4_L_B_B_T | Wipe4 left bottom bottom top
EFX_EFFECT_WIPE4_L_B_B_B | Wipe4 left bottom bottom bottom
EFX_EFFECT_WIPE4_R_L_L_L | Wipe4 right left left left
EFX_EFFECT_WIPE4_R_L_L_R | Wipe4 right left left right
EFX_EFFECT_WIPE4_R_L_L_T | Wipe4 right left left top
EFX_EFFECT_WIPE4_R_L_L_B | Wipe4 right left left bottom
EFX_EFFECT_WIPE4_R_L_R_L | Wipe4 right left right left
EFX_EFFECT_WIPE4_R_L_R_R | Wipe4 right left right right
EFX_EFFECT_WIPE4_R_L_R_T | Wipe4 right left right top
EFX_EFFECT_WIPE4_R_L_R_B | Wipe4 right left right bottom
EFX_EFFECT_WIPE4_R_L_T_L | Wipe4 right left top left
EFX_EFFECT_WIPE4_R_L_T_R | Wipe4 right left top right
EFX_EFFECT_WIPE4_R_L_T_T | Wipe4 right left top top
EFX_EFFECT_WIPE4_R_L_T_B | Wipe4 right left top bottom
EFX_EFFECT_WIPE4_R_L_B_L | Wipe4 right left bottom left
EFX_EFFECT_WIPE4_R_L_B_R | Wipe4 right left bottom right
EFX_EFFECT_WIPE4_R_L_B_T | Wipe4 right left bottom top
EFX_EFFECT_WIPE4_R_L_B_B | Wipe4 right left bottom bottom
EFX_EFFECT_WIPE4_R_R_L_L | Wipe4 right right left left
EFX_EFFECT_WIPE4_R_R_L_R | Wipe4 right right left right
EFX_EFFECT_WIPE4_R_R_L_T | Wipe4 right right left top
EFX_EFFECT_WIPE4_R_R_L_B | Wipe4 right right left bottom
EFX_EFFECT_WIPE4_R_R_R_L | Wipe4 right right right left
EFX_EFFECT_WIPE4_R_R_R_R | Wipe4 right right right right
EFX_EFFECT_WIPE4_R_R_R_T | Wipe4 right right right top
EFX_EFFECT_WIPE4_R_R_R_B | Wipe4 right right right bottom
EFX_EFFECT_WIPE4_R_R_T_L | Wipe4 right right top left
EFX_EFFECT_WIPE4_R_R_T_R | Wipe4 right right top right
EFX_EFFECT_WIPE4_R_R_T_T | Wipe4 right right top top
EFX_EFFECT_WIPE4_R_R_T_B | Wipe4 right right top bottom
EFX_EFFECT_WIPE4_R_R_B_L | Wipe4 right right bottom left
EFX_EFFECT_WIPE4_R_R_B_R | Wipe4 right right bottom right
EFX_EFFECT_WIPE4_R_R_B_T | Wipe4 right right bottom top
EFX_EFFECT_WIPE4_R_R_B_B | Wipe4 right right bottom bottom
EFX_EFFECT_WIPE4_R_T_L_L | Wipe4 right top left left
EFX_EFFECT_WIPE4_R_T_L_R | Wipe4 right top left right
EFX_EFFECT_WIPE4_R_T_L_T | Wipe4 right top left top
EFX_EFFECT_WIPE4_R_T_L_B | Wipe4 right top left bottom
EFX_EFFECT_WIPE4_R_T_R_L | Wipe4 right top right left
EFX_EFFECT_WIPE4_R_T_R_R | Wipe4 right top right right
EFX_EFFECT_WIPE4_R_T_R_T | Wipe4 right top right top
EFX_EFFECT_WIPE4_R_T_R_B | Wipe4 right top right bottom
EFX_EFFECT_WIPE4_R_T_T_L | Wipe4 right top top left
EFX_EFFECT_WIPE4_R_T_T_R | Wipe4 right top top right
EFX_EFFECT_WIPE4_R_T_T_T | Wipe4 right top top top
EFX_EFFECT_WIPE4_R_T_T_B | Wipe4 right top top bottom
EFX_EFFECT_WIPE4_R_T_B_L | Wipe4 right top bottom left
EFX_EFFECT_WIPE4_R_T_B_R | Wipe4 right top bottom right
EFX_EFFECT_WIPE4_R_T_B_T | Wipe4 right top bottom top
EFX_EFFECT_WIPE4_R_T_B_B | Wipe4 right top bottom bottom
EFX_EFFECT_WIPE4_R_B_L_L | Wipe4 right bottom left left
EFX_EFFECT_WIPE4_R_B_L_R | Wipe4 right bottom left right
EFX_EFFECT_WIPE4_R_B_L_T | Wipe4 right bottom left top
EFX_EFFECT_WIPE4_R_B_L_B | Wipe4 right bottom left bottom
EFX_EFFECT_WIPE4_R_B_R_L | Wipe4 right bottom right left
EFX_EFFECT_WIPE4_R_B_R_R | Wipe4 right bottom right right
EFX_EFFECT_WIPE4_R_B_R_T | Wipe4 right bottom right top
EFX_EFFECT_WIPE4_R_B_R_B | Wipe4 right bottom right bottom
EFX_EFFECT_WIPE4_R_B_T_L | Wipe4 right bottom top left
EFX_EFFECT_WIPE4_R_B_T_R | Wipe4 right bottom top right
EFX_EFFECT_WIPE4_R_B_T_T | Wipe4 right bottom top top
EFX_EFFECT_WIPE4_R_B_T_B | Wipe4 right bottom top bottom
EFX_EFFECT_WIPE4_R_B_B_L | Wipe4 right bottom bottom left
EFX_EFFECT_WIPE4_R_B_B_R | Wipe4 right bottom bottom right
EFX_EFFECT_WIPE4_R_B_B_T | Wipe4 right bottom bottom top
EFX_EFFECT_WIPE4_R_B_B_B | Wipe4 right bottom bottom bottom
EFX_EFFECT_WIPE4_T_L_L_L | Wipe4 top left left left
EFX_EFFECT_WIPE4_T_L_L_R | Wipe4 top left left right
EFX_EFFECT_WIPE4_T_L_L_T | Wipe4 top left left top
EFX_EFFECT_WIPE4_T_L_L_B | Wipe4 top left left bottom
EFX_EFFECT_WIPE4_T_L_R_L | Wipe4 top left right left
EFX_EFFECT_WIPE4_T_L_R_R | Wipe4 top left right right
EFX_EFFECT_WIPE4_T_L_R_T | Wipe4 top left right top
EFX_EFFECT_WIPE4_T_L_R_B | Wipe4 top left right bottom
EFX_EFFECT_WIPE4_T_L_T_L | Wipe4 top left top left
EFX_EFFECT_WIPE4_T_L_T_R | Wipe4 top left top right
EFX_EFFECT_WIPE4_T_L_T_T | Wipe4 top left top top
EFX_EFFECT_WIPE4_T_L_T_B | Wipe4 top left top bottom
EFX_EFFECT_WIPE4_T_L_B_L | Wipe4 top left bottom left
EFX_EFFECT_WIPE4_T_L_B_R | Wipe4 top left bottom right
EFX_EFFECT_WIPE4_T_L_B_T | Wipe4 top left bottom top
EFX_EFFECT_WIPE4_T_L_B_B | Wipe4 top left bottom bottom
EFX_EFFECT_WIPE4_T_R_L_L | Wipe4 top right left left
EFX_EFFECT_WIPE4_T_R_L_R | Wipe4 top right left right
EFX_EFFECT_WIPE4_T_R_L_T | Wipe4 top right left top
EFX_EFFECT_WIPE4_T_R_L_B | Wipe4 top right left bottom
EFX_EFFECT_WIPE4_T_R_R_L | Wipe4 top right right left
EFX_EFFECT_WIPE4_T_R_R_R | Wipe4 top right right right
EFX_EFFECT_WIPE4_T_R_R_T | Wipe4 top right right top
EFX_EFFECT_WIPE4_T_R_R_B | Wipe4 top right right bottom
EFX_EFFECT_WIPE4_T_R_T_L | Wipe4 top right top left
EFX_EFFECT_WIPE4_T_R_T_R | Wipe4 top right top right
EFX_EFFECT_WIPE4_T_R_T_T | Wipe4 top right top top
EFX_EFFECT_WIPE4_T_R_T_B | Wipe4 top right top bottom
EFX_EFFECT_WIPE4_T_R_B_L | Wipe4 top right bottom left
EFX_EFFECT_WIPE4_T_R_B_R | Wipe4 top right bottom right
EFX_EFFECT_WIPE4_T_R_B_T | Wipe4 top right bottom top
EFX_EFFECT_WIPE4_T_R_B_B | Wipe4 top right bottom bottom
EFX_EFFECT_WIPE4_T_T_L_L | Wipe4 top top left left
EFX_EFFECT_WIPE4_T_T_L_R | Wipe4 top top left right
EFX_EFFECT_WIPE4_T_T_L_T | Wipe4 top top left top
EFX_EFFECT_WIPE4_T_T_L_B | Wipe4 top top left bottom
EFX_EFFECT_WIPE4_T_T_R_L | Wipe4 top top right left
EFX_EFFECT_WIPE4_T_T_R_R | Wipe4 top top right right
EFX_EFFECT_WIPE4_T_T_R_T | Wipe4 top top right top
EFX_EFFECT_WIPE4_T_T_R_B | Wipe4 top top right bottom
EFX_EFFECT_WIPE4_T_T_T_L | Wipe4 top top top left
EFX_EFFECT_WIPE4_T_T_T_R | Wipe4 top top top right
EFX_EFFECT_WIPE4_T_T_T_T | Wipe4 top top top top
EFX_EFFECT_WIPE4_T_T_T_B | Wipe4 top top top bottom
EFX_EFFECT_WIPE4_T_T_B_L | Wipe4 top top bottom left
EFX_EFFECT_WIPE4_T_T_B_R | Wipe4 top top bottom right
EFX_EFFECT_WIPE4_T_T_B_T | Wipe4 top top bottom top
EFX_EFFECT_WIPE4_T_T_B_B | Wipe4 top top bottom bottom
EFX_EFFECT_WIPE4_T_B_L_L | Wipe4 top bottom left left
EFX_EFFECT_WIPE4_T_B_L_R | Wipe4 top bottom left right
EFX_EFFECT_WIPE4_T_B_L_T | Wipe4 top bottom left top
EFX_EFFECT_WIPE4_T_B_L_B | Wipe4 top bottom left bottom
EFX_EFFECT_WIPE4_T_B_R_L | Wipe4 top bottom right left
EFX_EFFECT_WIPE4_T_B_R_R | Wipe4 top bottom right right
EFX_EFFECT_WIPE4_T_B_R_T | Wipe4 top bottom right top
EFX_EFFECT_WIPE4_T_B_R_B | Wipe4 top bottom right bottom
EFX_EFFECT_WIPE4_T_B_T_L | Wipe4 top bottom top left
EFX_EFFECT_WIPE4_T_B_T_R | Wipe4 top bottom top right
EFX_EFFECT_WIPE4_T_B_T_T | Wipe4 top bottom top top
EFX_EFFECT_WIPE4_T_B_T_B | Wipe4 top bottom top bottom
EFX_EFFECT_WIPE4_T_B_B_L | Wipe4 top bottom bottom left
EFX_EFFECT_WIPE4_T_B_B_R | Wipe4 top bottom bottom right
EFX_EFFECT_WIPE4_T_B_B_T | Wipe4 top bottom bottom top
EFX_EFFECT_WIPE4_T_B_B_B | Wipe4 top bottom bottom bottom
EFX_EFFECT_WIPE4_B_L_L_L | Wipe4 bottom left left left
EFX_EFFECT_WIPE4_B_L_L_R | Wipe4 bottom left left right
EFX_EFFECT_WIPE4_B_L_L_T | Wipe4 bottom left left top
EFX_EFFECT_WIPE4_B_L_L_B | Wipe4 bottom left left bottom
EFX_EFFECT_WIPE4_B_L_R_L | Wipe4 bottom left right left
EFX_EFFECT_WIPE4_B_L_R_R | Wipe4 bottom left right right
EFX_EFFECT_WIPE4_B_L_R_T | Wipe4 bottom left right top
EFX_EFFECT_WIPE4_B_L_R_B | Wipe4 bottom left right bottom
EFX_EFFECT_WIPE4_B_L_T_L | Wipe4 bottom left top left
EFX_EFFECT_WIPE4_B_L_T_R | Wipe4 bottom left top right
EFX_EFFECT_WIPE4_B_L_T_T | Wipe4 bottom left top top
EFX_EFFECT_WIPE4_B_L_T_B | Wipe4 bottom left top bottom
EFX_EFFECT_WIPE4_B_L_B_L | Wipe4 bottom left bottom left
EFX_EFFECT_WIPE4_B_L_B_R | Wipe4 bottom left bottom right
EFX_EFFECT_WIPE4_B_L_B_T | Wipe4 bottom left bottom top
EFX_EFFECT_WIPE4_B_L_B_B | Wipe4 bottom left bottom bottom
EFX_EFFECT_WIPE4_B_R_L_L | Wipe4 bottom right left left
EFX_EFFECT_WIPE4_B_R_L_R | Wipe4 bottom right left right
EFX_EFFECT_WIPE4_B_R_L_T | Wipe4 bottom right left top
EFX_EFFECT_WIPE4_B_R_L_B | Wipe4 bottom right left bottom
EFX_EFFECT_WIPE4_B_R_R_L | Wipe4 bottom right right left
EFX_EFFECT_WIPE4_B_R_R_R | Wipe4 bottom right right right
EFX_EFFECT_WIPE4_B_R_R_T | Wipe4 bottom right right top
EFX_EFFECT_WIPE4_B_R_R_B | Wipe4 bottom right right bottom
EFX_EFFECT_WIPE4_B_R_T_L | Wipe4 bottom right top left
EFX_EFFECT_WIPE4_B_R_T_R | Wipe4 bottom right top right
EFX_EFFECT_WIPE4_B_R_T_T | Wipe4 bottom right top top
EFX_EFFECT_WIPE4_B_R_T_B | Wipe4 bottom right top bottom
EFX_EFFECT_WIPE4_B_R_B_L | Wipe4 bottom right bottom left
EFX_EFFECT_WIPE4_B_R_B_R | Wipe4 bottom right bottom right
EFX_EFFECT_WIPE4_B_R_B_T | Wipe4 bottom right bottom top
EFX_EFFECT_WIPE4_B_R_B_B | Wipe4 bottom right bottom bottom
EFX_EFFECT_WIPE4_B_T_L_L | Wipe4 bottom top left left
EFX_EFFECT_WIPE4_B_T_L_R | Wipe4 bottom top left right
EFX_EFFECT_WIPE4_B_T_L_T | Wipe4 bottom top left top
EFX_EFFECT_WIPE4_B_T_L_B | Wipe4 bottom top left bottom
EFX_EFFECT_WIPE4_B_T_R_L | Wipe4 bottom top right left
EFX_EFFECT_WIPE4_B_T_R_R | Wipe4 bottom top right right
EFX_EFFECT_WIPE4_B_T_R_T | Wipe4 bottom top right top
EFX_EFFECT_WIPE4_B_T_R_B | Wipe4 bottom top right bottom
EFX_EFFECT_WIPE4_B_T_T_L | Wipe4 bottom top top left
EFX_EFFECT_WIPE4_B_T_T_R | Wipe4 bottom top top right
EFX_EFFECT_WIPE4_B_T_T_T | Wipe4 bottom top top top
EFX_EFFECT_WIPE4_B_T_T_B | Wipe4 bottom top top bottom
EFX_EFFECT_WIPE4_B_T_B_L | Wipe4 bottom top bottom left
EFX_EFFECT_WIPE4_B_T_B_R | Wipe4 bottom top bottom right
EFX_EFFECT_WIPE4_B_T_B_T | Wipe4 bottom top bottom top
EFX_EFFECT_WIPE4_B_T_B_B | Wipe4 bottom top bottom bottom
EFX_EFFECT_WIPE4_B_B_L_L | Wipe4 bottom bottom left left
EFX_EFFECT_WIPE4_B_B_L_R | Wipe4 bottom bottom left right
EFX_EFFECT_WIPE4_B_B_L_T | Wipe4 bottom bottom left top
EFX_EFFECT_WIPE4_B_B_L_B | Wipe4 bottom bottom left bottom
EFX_EFFECT_WIPE4_B_B_R_L | Wipe4 bottom bottom right left
EFX_EFFECT_WIPE4_B_B_R_R | Wipe4 bottom bottom right right
EFX_EFFECT_WIPE4_B_B_R_T | Wipe4 bottom bottom right top
EFX_EFFECT_WIPE4_B_B_R_B | Wipe4 bottom bottom right bottom
EFX_EFFECT_WIPE4_B_B_T_L | Wipe4 bottom bottom top left
EFX_EFFECT_WIPE4_B_B_T_R | Wipe4 bottom bottom top right
EFX_EFFECT_WIPE4_B_B_T_T | Wipe4 bottom bottom top top
EFX_EFFECT_WIPE4_B_B_T_B | Wipe4 bottom bottom top bottom
EFX_EFFECT_WIPE4_B_B_B_L | Wipe4 bottom bottom bottom left
EFX_EFFECT_WIPE4_B_B_B_R | Wipe4 bottom bottom bottom right
EFX_EFFECT_WIPE4_B_B_B_T | Wipe4 bottom bottom bottom top
EFX_EFFECT_WIPE4_B_B_B_B | Wipe4 bottom bottom bottom bottom
EFX_EFFECT_WIPE4_LT_LT_LT_LT | Wipe4 left-top left-top left-top left-top
EFX_EFFECT_WIPE4_LT_LT_LT_LB | Wipe4 left-top left-top left-top left-bottom
EFX_EFFECT_WIPE4_LT_LT_LT_RT | Wipe4 left-top left-top left-top right-top
EFX_EFFECT_WIPE4_LT_LT_LT_RB | Wipe4 left-top left-top left-top right-bottom
EFX_EFFECT_WIPE4_LT_LT_LB_LT | Wipe4 left-top left-top left-bottom left-top
EFX_EFFECT_WIPE4_LT_LT_LB_LB | Wipe4 left-top left-top left-bottom left-bottom
EFX_EFFECT_WIPE4_LT_LT_LB_RT | Wipe4 left-top left-top left-bottom right-top
EFX_EFFECT_WIPE4_LT_LT_LB_RB | Wipe4 left-top left-top left-bottom right-bottom
EFX_EFFECT_WIPE4_LT_LT_RT_LT | Wipe4 left-top left-top right-top left-top
EFX_EFFECT_WIPE4_LT_LT_RT_LB | Wipe4 left-top left-top right-top left-bottom
EFX_EFFECT_WIPE4_LT_LT_RT_RT | Wipe4 left-top left-top right-top right-top
EFX_EFFECT_WIPE4_LT_LT_RT_RB | Wipe4 left-top left-top right-top right-bottom
EFX_EFFECT_WIPE4_LT_LT_RB_LT | Wipe4 left-top left-top right-bottom left-top
EFX_EFFECT_WIPE4_LT_LT_RB_LB | Wipe4 left-top left-top right-bottom left-bottom
EFX_EFFECT_WIPE4_LT_LT_RB_RT | Wipe4 left-top left-top right-bottom right-top
EFX_EFFECT_WIPE4_LT_LT_RB_RB | Wipe4 left-top left-top right-bottom right-bottom
EFX_EFFECT_WIPE4_LT_LB_LT_LT | Wipe4 left-top left-bottom left-top left-top
EFX_EFFECT_WIPE4_LT_LB_LT_LB | Wipe4 left-top left-bottom left-top left-bottom
EFX_EFFECT_WIPE4_LT_LB_LT_RT | Wipe4 left-top left-bottom left-top right-top
EFX_EFFECT_WIPE4_LT_LB_LT_RB | Wipe4 left-top left-bottom left-top right-bottom
EFX_EFFECT_WIPE4_LT_LB_LB_LT | Wipe4 left-top left-bottom left-bottom left-top
EFX_EFFECT_WIPE4_LT_LB_LB_LB | Wipe4 left-top left-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_LT_LB_LB_RT | Wipe4 left-top left-bottom left-bottom right-top
EFX_EFFECT_WIPE4_LT_LB_LB_RB | Wipe4 left-top left-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_LT_LB_RT_LT | Wipe4 left-top left-bottom right-top left-top
EFX_EFFECT_WIPE4_LT_LB_RT_LB | Wipe4 left-top left-bottom right-top left-bottom
EFX_EFFECT_WIPE4_LT_LB_RT_RT | Wipe4 left-top left-bottom right-top right-top
EFX_EFFECT_WIPE4_LT_LB_RT_RB | Wipe4 left-top left-bottom right-top right-bottom
EFX_EFFECT_WIPE4_LT_LB_RB_LT | Wipe4 left-top left-bottom right-bottom left-top
EFX_EFFECT_WIPE4_LT_LB_RB_LB | Wipe4 left-top left-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_LT_LB_RB_RT | Wipe4 left-top left-bottom right-bottom right-top
EFX_EFFECT_WIPE4_LT_LB_RB_RB | Wipe4 left-top left-bottom right-bottom right-bottom
EFX_EFFECT_WIPE4_LT_RT_LT_LT | Wipe4 left-top right-top left-top left-top
EFX_EFFECT_WIPE4_LT_RT_LT_LB | Wipe4 left-top right-top left-top left-bottom
EFX_EFFECT_WIPE4_LT_RT_LT_RT | Wipe4 left-top right-top left-top right-top
EFX_EFFECT_WIPE4_LT_RT_LT_RB | Wipe4 left-top right-top left-top right-bottom
EFX_EFFECT_WIPE4_LT_RT_LB_LT | Wipe4 left-top right-top left-bottom left-top
EFX_EFFECT_WIPE4_LT_RT_LB_LB | Wipe4 left-top right-top left-bottom left-bottom
EFX_EFFECT_WIPE4_LT_RT_LB_RT | Wipe4 left-top right-top left-bottom right-top
EFX_EFFECT_WIPE4_LT_RT_LB_RB | Wipe4 left-top right-top left-bottom right-bottom
EFX_EFFECT_WIPE4_LT_RT_RT_LT | Wipe4 left-top right-top right-top left-top
EFX_EFFECT_WIPE4_LT_RT_RT_LB | Wipe4 left-top right-top right-top left-bottom
EFX_EFFECT_WIPE4_LT_RT_RT_RT | Wipe4 left-top right-top right-top right-top
EFX_EFFECT_WIPE4_LT_RT_RT_RB | Wipe4 left-top right-top right-top right-bottom
EFX_EFFECT_WIPE4_LT_RT_RB_LT | Wipe4 left-top right-top right-bottom left-top
EFX_EFFECT_WIPE4_LT_RT_RB_LB | Wipe4 left-top right-top right-bottom left-bottom
EFX_EFFECT_WIPE4_LT_RT_RB_RT | Wipe4 left-top right-top right-bottom right-top
EFX_EFFECT_WIPE4_LT_RT_RB_RB | Wipe4 left-top right-top right-bottom right-bottom
EFX_EFFECT_WIPE4_LT_RB_LT_LT | Wipe4 left-top right-bottom left-top left-top
EFX_EFFECT_WIPE4_LT_RB_LT_LB | Wipe4 left-top right-bottom left-top left-bottom
EFX_EFFECT_WIPE4_LT_RB_LT_RT | Wipe4 left-top right-bottom left-top right-top
EFX_EFFECT_WIPE4_LT_RB_LT_RB | Wipe4 left-top right-bottom left-top right-bottom
EFX_EFFECT_WIPE4_LT_RB_LB_LT | Wipe4 left-top right-bottom left-bottom left-top
EFX_EFFECT_WIPE4_LT_RB_LB_LB | Wipe4 left-top right-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_LT_RB_LB_RT | Wipe4 left-top right-bottom left-bottom right-top
EFX_EFFECT_WIPE4_LT_RB_LB_RB | Wipe4 left-top right-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_LT_RB_RT_LT | Wipe4 left-top right-bottom right-top left-top
EFX_EFFECT_WIPE4_LT_RB_RT_LB | Wipe4 left-top right-bottom right-top left-bottom
EFX_EFFECT_WIPE4_LT_RB_RT_RT | Wipe4 left-top right-bottom right-top right-top
EFX_EFFECT_WIPE4_LT_RB_RT_RB | Wipe4 left-top right-bottom right-top right-bottom
EFX_EFFECT_WIPE4_LT_RB_RB_LT | Wipe4 left-top right-bottom right-bottom left-top
EFX_EFFECT_WIPE4_LT_RB_RB_LB | Wipe4 left-top right-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_LT_RB_RB_RT | Wipe4 left-top right-bottom right-bottom right-top
EFX_EFFECT_WIPE4_LT_RB_RB_RB | Wipe4 left-top right-bottom right-bottom right-bottom
EFX_EFFECT_WIPE4_LB_LT_LT_LT | Wipe4 left-bottom left-top left-top left-top
EFX_EFFECT_WIPE4_LB_LT_LT_LB | Wipe4 left-bottom left-top left-top left-bottom
EFX_EFFECT_WIPE4_LB_LT_LT_RT | Wipe4 left-bottom left-top left-top right-top
EFX_EFFECT_WIPE4_LB_LT_LT_RB | Wipe4 left-bottom left-top left-top right-bottom
EFX_EFFECT_WIPE4_LB_LT_LB_LT | Wipe4 left-bottom left-top left-bottom left-top
EFX_EFFECT_WIPE4_LB_LT_LB_LB | Wipe4 left-bottom left-top left-bottom left-bottom
EFX_EFFECT_WIPE4_LB_LT_LB_RT | Wipe4 left-bottom left-top left-bottom right-top
EFX_EFFECT_WIPE4_LB_LT_LB_RB | Wipe4 left-bottom left-top left-bottom right-bottom
EFX_EFFECT_WIPE4_LB_LT_RT_LT | Wipe4 left-bottom left-top right-top left-top
EFX_EFFECT_WIPE4_LB_LT_RT_LB | Wipe4 left-bottom left-top right-top left-bottom
EFX_EFFECT_WIPE4_LB_LT_RT_RT | Wipe4 left-bottom left-top right-top right-top
EFX_EFFECT_WIPE4_LB_LT_RT_RB | Wipe4 left-bottom left-top right-top right-bottom
EFX_EFFECT_WIPE4_LB_LT_RB_LT | Wipe4 left-bottom left-top right-bottom left-top
EFX_EFFECT_WIPE4_LB_LT_RB_LB | Wipe4 left-bottom left-top right-bottom left-bottom
EFX_EFFECT_WIPE4_LB_LT_RB_RT | Wipe4 left-bottom left-top right-bottom right-top
EFX_EFFECT_WIPE4_LB_LT_RB_RB | Wipe4 left-bottom left-top right-bottom right-bottom
EFX_EFFECT_WIPE4_LB_LB_LT_LT | Wipe4 left-bottom left-bottom left-top left-top
EFX_EFFECT_WIPE4_LB_LB_LT_LB | Wipe4 left-bottom left-bottom left-top left-bottom
EFX_EFFECT_WIPE4_LB_LB_LT_RT | Wipe4 left-bottom left-bottom left-top right-top
EFX_EFFECT_WIPE4_LB_LB_LT_RB | Wipe4 left-bottom left-bottom left-top right-bottom
EFX_EFFECT_WIPE4_LB_LB_LB_LT | Wipe4 left-bottom left-bottom left-bottom left-top
EFX_EFFECT_WIPE4_LB_LB_LB_LB | Wipe4 left-bottom left-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_LB_LB_LB_RT | Wipe4 left-bottom left-bottom left-bottom right-top
EFX_EFFECT_WIPE4_LB_LB_LB_RB | Wipe4 left-bottom left-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_LB_LB_RT_LT | Wipe4 left-bottom left-bottom right-top left-top
EFX_EFFECT_WIPE4_LB_LB_RT_LB | Wipe4 left-bottom left-bottom right-top left-bottom
EFX_EFFECT_WIPE4_LB_LB_RT_RT | Wipe4 left-bottom left-bottom right-top right-top
EFX_EFFECT_WIPE4_LB_LB_RT_RB | Wipe4 left-bottom left-bottom right-top right-bottom
EFX_EFFECT_WIPE4_LB_LB_RB_LT | Wipe4 left-bottom left-bottom right-bottom left-top
EFX_EFFECT_WIPE4_LB_LB_RB_LB | Wipe4 left-bottom left-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_LB_LB_RB_RT | Wipe4 left-bottom left-bottom right-bottom right-top
EFX_EFFECT_WIPE4_LB_LB_RB_RB | Wipe4 left-bottom left-bottom right-bottom right-bottom
EFX_EFFECT_WIPE4_LB_RT_LT_LT | Wipe4 left-bottom right-top left-top left-top
EFX_EFFECT_WIPE4_LB_RT_LT_LB | Wipe4 left-bottom right-top left-top left-bottom
EFX_EFFECT_WIPE4_LB_RT_LT_RT | Wipe4 left-bottom right-top left-top right-top
EFX_EFFECT_WIPE4_LB_RT_LT_RB | Wipe4 left-bottom right-top left-top right-bottom
EFX_EFFECT_WIPE4_LB_RT_LB_LT | Wipe4 left-bottom right-top left-bottom left-top
EFX_EFFECT_WIPE4_LB_RT_LB_LB | Wipe4 left-bottom right-top left-bottom left-bottom
EFX_EFFECT_WIPE4_LB_RT_LB_RT | Wipe4 left-bottom right-top left-bottom right-top
EFX_EFFECT_WIPE4_LB_RT_LB_RB | Wipe4 left-bottom right-top left-bottom right-bottom
EFX_EFFECT_WIPE4_LB_RT_RT_LT | Wipe4 left-bottom right-top right-top left-top
EFX_EFFECT_WIPE4_LB_RT_RT_LB | Wipe4 left-bottom right-top right-top left-bottom
EFX_EFFECT_WIPE4_LB_RT_RT_RT | Wipe4 left-bottom right-top right-top right-top
EFX_EFFECT_WIPE4_LB_RT_RT_RB | Wipe4 left-bottom right-top right-top right-bottom
EFX_EFFECT_WIPE4_LB_RT_RB_LT | Wipe4 left-bottom right-top right-bottom left-top
EFX_EFFECT_WIPE4_LB_RT_RB_LB | Wipe4 left-bottom right-top right-bottom left-bottom
EFX_EFFECT_WIPE4_LB_RT_RB_RT | Wipe4 left-bottom right-top right-bottom right-top
EFX_EFFECT_WIPE4_LB_RT_RB_RB | Wipe4 left-bottom right-top right-bottom right-bottom
EFX_EFFECT_WIPE4_LB_RB_LT_LT | Wipe4 left-bottom right-bottom left-top left-top
EFX_EFFECT_WIPE4_LB_RB_LT_LB | Wipe4 left-bottom right-bottom left-top left-bottom
EFX_EFFECT_WIPE4_LB_RB_LT_RT | Wipe4 left-bottom right-bottom left-top right-top
EFX_EFFECT_WIPE4_LB_RB_LT_RB | Wipe4 left-bottom right-bottom left-top right-bottom
EFX_EFFECT_WIPE4_LB_RB_LB_LT | Wipe4 left-bottom right-bottom left-bottom left-top
EFX_EFFECT_WIPE4_LB_RB_LB_LB | Wipe4 left-bottom right-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_LB_RB_LB_RT | Wipe4 left-bottom right-bottom left-bottom right-top
EFX_EFFECT_WIPE4_LB_RB_LB_RB | Wipe4 left-bottom right-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_LB_RB_RT_LT | Wipe4 left-bottom right-bottom right-top left-top
EFX_EFFECT_WIPE4_LB_RB_RT_LB | Wipe4 left-bottom right-bottom right-top left-bottom
EFX_EFFECT_WIPE4_LB_RB_RT_RT | Wipe4 left-bottom right-bottom right-top right-top
EFX_EFFECT_WIPE4_LB_RB_RT_RB | Wipe4 left-bottom right-bottom right-top right-bottom
EFX_EFFECT_WIPE4_LB_RB_RB_LT | Wipe4 left-bottom right-bottom right-bottom left-top
EFX_EFFECT_WIPE4_LB_RB_RB_LB | Wipe4 left-bottom right-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_LB_RB_RB_RT | Wipe4 left-bottom right-bottom right-bottom right-top
EFX_EFFECT_WIPE4_LB_RB_RB_RB | Wipe4 left-bottom right-bottom right-bottom right-bottom
EFX_EFFECT_WIPE4_RT_LT_LT_LT | Wipe4 right-top left-top left-top left-top
EFX_EFFECT_WIPE4_RT_LT_LT_LB | Wipe4 right-top left-top left-top left-bottom
EFX_EFFECT_WIPE4_RT_LT_LT_RT | Wipe4 right-top left-top left-top right-top
EFX_EFFECT_WIPE4_RT_LT_LT_RB | Wipe4 right-top left-top left-top right-bottom
EFX_EFFECT_WIPE4_RT_LT_LB_LT | Wipe4 right-top left-top left-bottom left-top
EFX_EFFECT_WIPE4_RT_LT_LB_LB | Wipe4 right-top left-top left-bottom left-bottom
EFX_EFFECT_WIPE4_RT_LT_LB_RT | Wipe4 right-top left-top left-bottom right-top
EFX_EFFECT_WIPE4_RT_LT_LB_RB | Wipe4 right-top left-top left-bottom right-bottom
EFX_EFFECT_WIPE4_RT_LT_RT_LT | Wipe4 right-top left-top right-top left-top
EFX_EFFECT_WIPE4_RT_LT_RT_LB | Wipe4 right-top left-top right-top left-bottom
EFX_EFFECT_WIPE4_RT_LT_RT_RT | Wipe4 right-top left-top right-top right-top
EFX_EFFECT_WIPE4_RT_LT_RT_RB | Wipe4 right-top left-top right-top right-bottom
EFX_EFFECT_WIPE4_RT_LT_RB_LT | Wipe4 right-top left-top right-bottom left-top
EFX_EFFECT_WIPE4_RT_LT_RB_LB | Wipe4 right-top left-top right-bottom left-bottom
EFX_EFFECT_WIPE4_RT_LT_RB_RT | Wipe4 right-top left-top right-bottom right-top
EFX_EFFECT_WIPE4_RT_LT_RB_RB | Wipe4 right-top left-top right-bottom right-bottom
EFX_EFFECT_WIPE4_RT_LB_LT_LT | Wipe4 right-top left-bottom left-top left-top
EFX_EFFECT_WIPE4_RT_LB_LT_LB | Wipe4 right-top left-bottom left-top left-bottom
EFX_EFFECT_WIPE4_RT_LB_LT_RT | Wipe4 right-top left-bottom left-top right-top
EFX_EFFECT_WIPE4_RT_LB_LT_RB | Wipe4 right-top left-bottom left-top right-bottom
EFX_EFFECT_WIPE4_RT_LB_LB_LT | Wipe4 right-top left-bottom left-bottom left-top
EFX_EFFECT_WIPE4_RT_LB_LB_LB | Wipe4 right-top left-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_RT_LB_LB_RT | Wipe4 right-top left-bottom left-bottom right-top
EFX_EFFECT_WIPE4_RT_LB_LB_RB | Wipe4 right-top left-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_RT_LB_RT_LT | Wipe4 right-top left-bottom right-top left-top
EFX_EFFECT_WIPE4_RT_LB_RT_LB | Wipe4 right-top left-bottom right-top left-bottom
EFX_EFFECT_WIPE4_RT_LB_RT_RT | Wipe4 right-top left-bottom right-top right-top
EFX_EFFECT_WIPE4_RT_LB_RT_RB | Wipe4 right-top left-bottom right-top right-bottom
EFX_EFFECT_WIPE4_RT_LB_RB_LT | Wipe4 right-top left-bottom right-bottom left-top
EFX_EFFECT_WIPE4_RT_LB_RB_LB | Wipe4 right-top left-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_RT_LB_RB_RT | Wipe4 right-top left-bottom right-bottom right-top
EFX_EFFECT_WIPE4_RT_LB_RB_RB | Wipe4 right-top left-bottom right-bottom right-bottom
EFX_EFFECT_WIPE4_RT_RT_LT_LT | Wipe4 right-top right-top left-top left-top
EFX_EFFECT_WIPE4_RT_RT_LT_LB | Wipe4 right-top right-top left-top left-bottom
EFX_EFFECT_WIPE4_RT_RT_LT_RT | Wipe4 right-top right-top left-top right-top
EFX_EFFECT_WIPE4_RT_RT_LT_RB | Wipe4 right-top right-top left-top right-bottom
EFX_EFFECT_WIPE4_RT_RT_LB_LT | Wipe4 right-top right-top left-bottom left-top
EFX_EFFECT_WIPE4_RT_RT_LB_LB | Wipe4 right-top right-top left-bottom left-bottom
EFX_EFFECT_WIPE4_RT_RT_LB_RT | Wipe4 right-top right-top left-bottom right-top
EFX_EFFECT_WIPE4_RT_RT_LB_RB | Wipe4 right-top right-top left-bottom right-bottom
EFX_EFFECT_WIPE4_RT_RT_RT_LT | Wipe4 right-top right-top right-top left-top
EFX_EFFECT_WIPE4_RT_RT_RT_LB | Wipe4 right-top right-top right-top left-bottom
EFX_EFFECT_WIPE4_RT_RT_RT_RT | Wipe4 right-top right-top right-top right-top
EFX_EFFECT_WIPE4_RT_RT_RT_RB | Wipe4 right-top right-top right-top right-bottom
EFX_EFFECT_WIPE4_RT_RT_RB_LT | Wipe4 right-top right-top right-bottom left-top
EFX_EFFECT_WIPE4_RT_RT_RB_LB | Wipe4 right-top right-top right-bottom left-bottom
EFX_EFFECT_WIPE4_RT_RT_RB_RT | Wipe4 right-top right-top right-bottom right-top
EFX_EFFECT_WIPE4_RT_RT_RB_RB | Wipe4 right-top right-top right-bottom right-bottom
EFX_EFFECT_WIPE4_RT_RB_LT_LT | Wipe4 right-top right-bottom left-top left-top
EFX_EFFECT_WIPE4_RT_RB_LT_LB | Wipe4 right-top right-bottom left-top left-bottom
EFX_EFFECT_WIPE4_RT_RB_LT_RT | Wipe4 right-top right-bottom left-top right-top
EFX_EFFECT_WIPE4_RT_RB_LT_RB | Wipe4 right-top right-bottom left-top right-bottom
EFX_EFFECT_WIPE4_RT_RB_LB_LT | Wipe4 right-top right-bottom left-bottom left-top
EFX_EFFECT_WIPE4_RT_RB_LB_LB | Wipe4 right-top right-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_RT_RB_LB_RT | Wipe4 right-top right-bottom left-bottom right-top
EFX_EFFECT_WIPE4_RT_RB_LB_RB | Wipe4 right-top right-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_RT_RB_RT_LT | Wipe4 right-top right-bottom right-top left-top
EFX_EFFECT_WIPE4_RT_RB_RT_LB | Wipe4 right-top right-bottom right-top left-bottom
EFX_EFFECT_WIPE4_RT_RB_RT_RT | Wipe4 right-top right-bottom right-top right-top
EFX_EFFECT_WIPE4_RT_RB_RT_RB | Wipe4 right-top right-bottom right-top right-bottom
EFX_EFFECT_WIPE4_RT_RB_RB_LT | Wipe4 right-top right-bottom right-bottom left-top
EFX_EFFECT_WIPE4_RT_RB_RB_LB | Wipe4 right-top right-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_RT_RB_RB_RT | Wipe4 right-top right-bottom right-bottom right-top
EFX_EFFECT_WIPE4_RT_RB_RB_RB | Wipe4 right-top right-bottom right-bottom right-bottom
EFX_EFFECT_WIPE4_RB_LT_LT_LT | Wipe4 right-bottom left-top left-top left-top
EFX_EFFECT_WIPE4_RB_LT_LT_LB | Wipe4 right-bottom left-top left-top left-bottom
EFX_EFFECT_WIPE4_RB_LT_LT_RT | Wipe4 right-bottom left-top left-top right-top
EFX_EFFECT_WIPE4_RB_LT_LT_RB | Wipe4 right-bottom left-top left-top right-bottom
EFX_EFFECT_WIPE4_RB_LT_LB_LT | Wipe4 right-bottom left-top left-bottom left-top
EFX_EFFECT_WIPE4_RB_LT_LB_LB | Wipe4 right-bottom left-top left-bottom left-bottom
EFX_EFFECT_WIPE4_RB_LT_LB_RT | Wipe4 right-bottom left-top left-bottom right-top
EFX_EFFECT_WIPE4_RB_LT_LB_RB | Wipe4 right-bottom left-top left-bottom right-bottom
EFX_EFFECT_WIPE4_RB_LT_RT_LT | Wipe4 right-bottom left-top right-top left-top
EFX_EFFECT_WIPE4_RB_LT_RT_LB | Wipe4 right-bottom left-top right-top left-bottom
EFX_EFFECT_WIPE4_RB_LT_RT_RT | Wipe4 right-bottom left-top right-top right-top
EFX_EFFECT_WIPE4_RB_LT_RT_RB | Wipe4 right-bottom left-top right-top right-bottom
EFX_EFFECT_WIPE4_RB_LT_RB_LT | Wipe4 right-bottom left-top right-bottom left-top
EFX_EFFECT_WIPE4_RB_LT_RB_LB | Wipe4 right-bottom left-top right-bottom left-bottom
EFX_EFFECT_WIPE4_RB_LT_RB_RT | Wipe4 right-bottom left-top right-bottom right-top
EFX_EFFECT_WIPE4_RB_LT_RB_RB | Wipe4 right-bottom left-top right-bottom right-bottom
EFX_EFFECT_WIPE4_RB_LB_LT_LT | Wipe4 right-bottom left-bottom left-top left-top
EFX_EFFECT_WIPE4_RB_LB_LT_LB | Wipe4 right-bottom left-bottom left-top left-bottom
EFX_EFFECT_WIPE4_RB_LB_LT_RT | Wipe4 right-bottom left-bottom left-top right-top
EFX_EFFECT_WIPE4_RB_LB_LT_RB | Wipe4 right-bottom left-bottom left-top right-bottom
EFX_EFFECT_WIPE4_RB_LB_LB_LT | Wipe4 right-bottom left-bottom left-bottom left-top
EFX_EFFECT_WIPE4_RB_LB_LB_LB | Wipe4 right-bottom left-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_RB_LB_LB_RT | Wipe4 right-bottom left-bottom left-bottom right-top
EFX_EFFECT_WIPE4_RB_LB_LB_RB | Wipe4 right-bottom left-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_RB_LB_RT_LT | Wipe4 right-bottom left-bottom right-top left-top
EFX_EFFECT_WIPE4_RB_LB_RT_LB | Wipe4 right-bottom left-bottom right-top left-bottom
EFX_EFFECT_WIPE4_RB_LB_RT_RT | Wipe4 right-bottom left-bottom right-top right-top
EFX_EFFECT_WIPE4_RB_LB_RT_RB | Wipe4 right-bottom left-bottom right-top right-bottom
EFX_EFFECT_WIPE4_RB_LB_RB_LT | Wipe4 right-bottom left-bottom right-bottom left-top
EFX_EFFECT_WIPE4_RB_LB_RB_LB | Wipe4 right-bottom left-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_RB_LB_RB_RT | Wipe4 right-bottom left-bottom right-bottom right-top
EFX_EFFECT_WIPE4_RB_LB_RB_RB | Wipe4 right-bottom left-bottom right-bottom right-bottom
EFX_EFFECT_WIPE4_RB_RT_LT_LT | Wipe4 right-bottom right-top left-top left-top
EFX_EFFECT_WIPE4_RB_RT_LT_LB | Wipe4 right-bottom right-top left-top left-bottom
EFX_EFFECT_WIPE4_RB_RT_LT_RT | Wipe4 right-bottom right-top left-top right-top
EFX_EFFECT_WIPE4_RB_RT_LT_RB | Wipe4 right-bottom right-top left-top right-bottom
EFX_EFFECT_WIPE4_RB_RT_LB_LT | Wipe4 right-bottom right-top left-bottom left-top
EFX_EFFECT_WIPE4_RB_RT_LB_LB | Wipe4 right-bottom right-top left-bottom left-bottom
EFX_EFFECT_WIPE4_RB_RT_LB_RT | Wipe4 right-bottom right-top left-bottom right-top
EFX_EFFECT_WIPE4_RB_RT_LB_RB | Wipe4 right-bottom right-top left-bottom right-bottom
EFX_EFFECT_WIPE4_RB_RT_RT_LT | Wipe4 right-bottom right-top right-top left-top
EFX_EFFECT_WIPE4_RB_RT_RT_LB | Wipe4 right-bottom right-top right-top left-bottom
EFX_EFFECT_WIPE4_RB_RT_RT_RT | Wipe4 right-bottom right-top right-top right-top
EFX_EFFECT_WIPE4_RB_RT_RT_RB | Wipe4 right-bottom right-top right-top right-bottom
EFX_EFFECT_WIPE4_RB_RT_RB_LT | Wipe4 right-bottom right-top right-bottom left-top
EFX_EFFECT_WIPE4_RB_RT_RB_LB | Wipe4 right-bottom right-top right-bottom left-bottom
EFX_EFFECT_WIPE4_RB_RT_RB_RT | Wipe4 right-bottom right-top right-bottom right-top
EFX_EFFECT_WIPE4_RB_RT_RB_RB | Wipe4 right-bottom right-top right-bottom right-bottom
EFX_EFFECT_WIPE4_RB_RB_LT_LT | Wipe4 right-bottom right-bottom left-top left-top
EFX_EFFECT_WIPE4_RB_RB_LT_LB | Wipe4 right-bottom right-bottom left-top left-bottom
EFX_EFFECT_WIPE4_RB_RB_LT_RT | Wipe4 right-bottom right-bottom left-top right-top
EFX_EFFECT_WIPE4_RB_RB_LT_RB | Wipe4 right-bottom right-bottom left-top right-bottom
EFX_EFFECT_WIPE4_RB_RB_LB_LT | Wipe4 right-bottom right-bottom left-bottom left-top
EFX_EFFECT_WIPE4_RB_RB_LB_LB | Wipe4 right-bottom right-bottom left-bottom left-bottom
EFX_EFFECT_WIPE4_RB_RB_LB_RT | Wipe4 right-bottom right-bottom left-bottom right-top
EFX_EFFECT_WIPE4_RB_RB_LB_RB | Wipe4 right-bottom right-bottom left-bottom right-bottom
EFX_EFFECT_WIPE4_RB_RB_RT_LT | Wipe4 right-bottom right-bottom right-top left-top
EFX_EFFECT_WIPE4_RB_RB_RT_LB | Wipe4 right-bottom right-bottom right-top left-bottom
EFX_EFFECT_WIPE4_RB_RB_RT_RT | Wipe4 right-bottom right-bottom right-top right-top
EFX_EFFECT_WIPE4_RB_RB_RT_RB | Wipe4 right-bottom right-bottom right-top right-bottom
EFX_EFFECT_WIPE4_RB_RB_RB_LT | Wipe4 right-bottom right-bottom right-bottom left-top
EFX_EFFECT_WIPE4_RB_RB_RB_LB | Wipe4 right-bottom right-bottom right-bottom left-bottom
EFX_EFFECT_WIPE4_RB_RB_RB_RT | Wipe4 right-bottom right-bottom right-bottom right-top
EFX_EFFECT_WIPE4_RB_RB_RB_RB | Wipe4 right-bottom right-bottom right-bottom right-bottom
EFX_EFFECT_WIPE_MAX | Number of effects in this class.
Rectangular wipe class |
EFX_EFFECT_WIPE_RECTANGLE_IN | Wipe rectangle in
EFX_EFFECT_WIPE_RECTANGLE_OUT | Wipe rectangle out
EFX_EFFECT_WIPE_RECTANGLE_INTER_IN_THEN_IN | Wipe rectangle interlace in then in
EFX_EFFECT_WIPE_RECTANGLE_INTER_OUT_THEN_OUT |
 | Wipe rectangle interlace out then out
EFX_EFFECT_WIPE_RECTANGLE_INTER_IN_THEN_OUT |
 | Wipe rectangle interlace in then out
EFX_EFFECT_WIPE_RECTANGLE_INTER_OUT_THEN_IN | Wipe rectangle interlace out then in
EFX_EFFECT_WIPE_RECTANGLE_MAX | Number of effects in this class.
Circular wipe class |
EFX_EFFECT_WIPE_CIRCLE_C_CW_FROM_L | Wipe circle center CW from left
EFX_EFFECT_WIPE_CIRCLE_C_CCW_FROM_L | Wipe circle center CCW from left
EFX_EFFECT_WIPE_CIRCLE_C_CW_FROM_R | Wipe circle center CW from right
EFX_EFFECT_WIPE_CIRCLE_C_CCW_FROM_R | Wipe circle center CCW from right
EFX_EFFECT_WIPE_CIRCLE_C_CW_FROM_T | Wipe circle center CW from top
EFX_EFFECT_WIPE_CIRCLE_C_CCW_FROM_T | Wipe circle center CCW from top
EFX_EFFECT_WIPE_CIRCLE_C_CW_FROM_B | Wipe circle center CW from bottom
EFX_EFFECT_WIPE_CIRCLE_C_CCW_FROM_B | Wipe circle center CCW from bottom
EFX_EFFECT_WIPE_CIRCLE_L_CCW_FROM_B | Wipe circle left CCW from bottom
EFX_EFFECT_WIPE_CIRCLE_L_CW_FROM_T | Wipe circle left CW from top
EFX_EFFECT_WIPE_CIRCLE_R_CW_FROM_B | Wipe circle right CW from bottom
EFX_EFFECT_WIPE_CIRCLE_R_CCW_FROM_T | Wipe circle right CCW from top
EFX_EFFECT_WIPE_CIRCLE_T_CCW_FROM_L | Wipe circle top CCW from left
EFX_EFFECT_WIPE_CIRCLE_T_CW_FROM_R | Wipe circle top CW from right
EFX_EFFECT_WIPE_CIRCLE_B_CW_FROM_L | Wipe circle bottom CW from left
EFX_EFFECT_WIPE_CIRCLE_B_CCW_FROM_R | Wipe circle bottom CCW from right
EFX_EFFECT_WIPE_CIRCLE2_C_CW_FROM_L_AND_FROM_R | Wipe circle2 center CW from left and from right
EFX_EFFECT_WIPE_CIRCLE2_C_CCW_FROM_L_AND_FROM_R | Wipe circle2 center CCW from left and from right
EFX_EFFECT_WIPE_CIRCLE2_C_CW_FROM_T_AND_FROM_B | Wipe circle2 center CW from top and from bottom
EFX_EFFECT_WIPE_CIRCLE2_C_CCW_FROM_T_AND_FROM_B | Wipe circle2 center CCW from top and from bottom
EFX_EFFECT_WIPE_CIRCLE2_L_CW_FROM_T_AND_CCW_FROM_B | Wipe circle2 left CW from top and CCW from bottom
EFX_EFFECT_WIPE_CIRCLE2_L_CCW_TO_T_AND_CW_TO_B | Wipe circle2 left CCW to top and CW to bottom
EFX_EFFECT_WIPE_CIRCLE2_R_CCW_FROM_T_AND_CW_FROM_B | Wipe circle2 right CCW from top and CW from bottom
EFX_EFFECT_WIPE_CIRCLE2_R_CW_TO_T_AND_CCW_TO_B | Wipe circle2 right CW to top and CCW to bottom
EFX_EFFECT_WIPE_CIRCLE2_T_CCW_FROM_L_AND_CW_FROM_R | Wipe circle2 top CCW from left and CW from right
EFX_EFFECT_WIPE_CIRCLE2_T_CW_TO_L_AND_CCW_TO_R | Wipe circle2 top CW to left and CCW to right
EFX_EFFECT_WIPE_CIRCLE2_B_CW_FROM_L_AND_CCW_FROM_R | Wipe circle2 bottom CW from left and CCW from right
EFX_EFFECT_WIPE_CIRCLE2_B_CCW_TO_L_AND_CW_TO_R | Wipe circle2 bottom CCW to left and CW to right
EFX_EFFECT_WIPE_CIRCLE4_C_CW_CCW_CCW_CW | Wipe circle4 center CW CCW CCW CW
EFX_EFFECT_WIPE_CIRCLE4_C_CCW_CW_CW_CCW | Wipe circle4 center CCW CW CW CCW
EFX_EFFECT_WIPE_CIRCLE_MAX | Number of effects in this class.
Push class |
EFX_EFFECT_PUSH_R_TO_L | Push right to left
EFX_EFFECT_PUSH_L_TO_R | Push left to right
EFX_EFFECT_PUSH_B_TO_T | Push bottom to top
EFX_EFFECT_PUSH_T_TO_B | Push top to bottom
EFX_EFFECT_PUSH2_T_R_TO_L_AND_B_L_TO_R | Push2 top right to left and bottom left to right
EFX_EFFECT_PUSH2_T_L_TO_R_AND_B_R_TO_L | Push2 top left to right and bottom right to left
EFX_EFFECT_PUSH2_L_B_TO_T_AND_R_T_TO_B | Push2 left bottom to top and right top to bottom
EFX_EFFECT_PUSH2_L_T_TO_B_AND_R_B_TO_T | Push2 left top to bottom and right bottom to top
EFX_EFFECT_PUSH4_L_L_L_L | Push4 left left left left
EFX_EFFECT_PUSH4_L_L_L_R | Push4 left left left right
EFX_EFFECT_PUSH4_L_L_L_T | Push4 left left left top
EFX_EFFECT_PUSH4_L_L_L_B | Push4 left left left bottom
EFX_EFFECT_PUSH4_L_L_R_L | Push4 left left right left
EFX_EFFECT_PUSH4_L_L_R_R | Push4 left left right right
EFX_EFFECT_PUSH4_L_L_R_T | Push4 left left right top
EFX_EFFECT_PUSH4_L_L_R_B | Push4 left left right bottom
EFX_EFFECT_PUSH4_L_L_T_L | Push4 left left top left
EFX_EFFECT_PUSH4_L_L_T_R | Push4 left left top right
EFX_EFFECT_PUSH4_L_L_T_T | Push4 left left top top
EFX_EFFECT_PUSH4_L_L_T_B | Push4 left left top bottom
EFX_EFFECT_PUSH4_L_L_B_L | Push4 left left bottom left
EFX_EFFECT_PUSH4_L_L_B_R | Push4 left left bottom right
EFX_EFFECT_PUSH4_L_L_B_T | Push4 left left bottom top
EFX_EFFECT_PUSH4_L_L_B_B | Push4 left left bottom bottom
EFX_EFFECT_PUSH4_L_R_L_L | Push4 left right left left
EFX_EFFECT_PUSH4_L_R_L_R | Push4 left right left right
EFX_EFFECT_PUSH4_L_R_L_T | Push4 left right left top
EFX_EFFECT_PUSH4_L_R_L_B | Push4 left right left bottom
EFX_EFFECT_PUSH4_L_R_R_L | Push4 left right right left
EFX_EFFECT_PUSH4_L_R_R_R | Push4 left right right right
EFX_EFFECT_PUSH4_L_R_R_T | Push4 left right right top
EFX_EFFECT_PUSH4_L_R_R_B | Push4 left right right bottom
EFX_EFFECT_PUSH4_L_R_T_L | Push4 left right top left
EFX_EFFECT_PUSH4_L_R_T_R | Push4 left right top right
EFX_EFFECT_PUSH4_L_R_T_T | Push4 left right top top
EFX_EFFECT_PUSH4_L_R_T_B | Push4 left right top bottom
EFX_EFFECT_PUSH4_L_R_B_L | Push4 left right bottom left
EFX_EFFECT_PUSH4_L_R_B_R | Push4 left right bottom right
EFX_EFFECT_PUSH4_L_R_B_T | Push4 left right bottom top
EFX_EFFECT_PUSH4_L_R_B_B | Push4 left right bottom bottom
EFX_EFFECT_PUSH4_L_T_L_L | Push4 left top left left
EFX_EFFECT_PUSH4_L_T_L_R | Push4 left top left right
EFX_EFFECT_PUSH4_L_T_L_T | Push4 left top left top
EFX_EFFECT_PUSH4_L_T_L_B | Push4 left top left bottom
EFX_EFFECT_PUSH4_L_T_R_L | Push4 left top right left
EFX_EFFECT_PUSH4_L_T_R_R | Push4 left top right right
EFX_EFFECT_PUSH4_L_T_R_T | Push4 left top right top
EFX_EFFECT_PUSH4_L_T_R_B | Push4 left top right bottom
EFX_EFFECT_PUSH4_L_T_T_L | Push4 left top top left
EFX_EFFECT_PUSH4_L_T_T_R | Push4 left top top right
EFX_EFFECT_PUSH4_L_T_T_T | Push4 left top top top
EFX_EFFECT_PUSH4_L_T_T_B | Push4 left top top bottom
EFX_EFFECT_PUSH4_L_T_B_L | Push4 left top bottom left
EFX_EFFECT_PUSH4_L_T_B_R | Push4 left top bottom right
EFX_EFFECT_PUSH4_L_T_B_T | Push4 left top bottom top
EFX_EFFECT_PUSH4_L_T_B_B | Push4 left top bottom bottom
EFX_EFFECT_PUSH4_L_B_L_L | Push4 left bottom left left
EFX_EFFECT_PUSH4_L_B_L_R | Push4 left bottom left right
EFX_EFFECT_PUSH4_L_B_L_T | Push4 left bottom left top
EFX_EFFECT_PUSH4_L_B_L_B | Push4 left bottom left bottom
EFX_EFFECT_PUSH4_L_B_R_L | Push4 left bottom right left
EFX_EFFECT_PUSH4_L_B_R_R | Push4 left bottom right right
EFX_EFFECT_PUSH4_L_B_R_T | Push4 left bottom right top
EFX_EFFECT_PUSH4_L_B_R_B | Push4 left bottom right bottom
EFX_EFFECT_PUSH4_L_B_T_L | Push4 left bottom top left
EFX_EFFECT_PUSH4_L_B_T_R | Push4 left bottom top right
EFX_EFFECT_PUSH4_L_B_T_T | Push4 left bottom top top
EFX_EFFECT_PUSH4_L_B_T_B | Push4 left bottom top bottom
EFX_EFFECT_PUSH4_L_B_B_L | Push4 left bottom bottom left
EFX_EFFECT_PUSH4_L_B_B_R | Push4 left bottom bottom right
EFX_EFFECT_PUSH4_L_B_B_T | Push4 left bottom bottom top
EFX_EFFECT_PUSH4_L_B_B_B | Push4 left bottom bottom bottom
EFX_EFFECT_PUSH4_R_L_L_L | Push4 right left left left
EFX_EFFECT_PUSH4_R_L_L_R | Push4 right left left right
EFX_EFFECT_PUSH4_R_L_L_T | Push4 right left left top
EFX_EFFECT_PUSH4_R_L_L_B | Push4 right left left bottom
EFX_EFFECT_PUSH4_R_L_R_L | Push4 right left right left
EFX_EFFECT_PUSH4_R_L_R_R | Push4 right left right right
EFX_EFFECT_PUSH4_R_L_R_T | Push4 right left right top
EFX_EFFECT_PUSH4_R_L_R_B | Push4 right left right bottom
EFX_EFFECT_PUSH4_R_L_T_L | Push4 right left top left
EFX_EFFECT_PUSH4_R_L_T_R | Push4 right left top right
EFX_EFFECT_PUSH4_R_L_T_T | Push4 right left top top
EFX_EFFECT_PUSH4_R_L_T_B | Push4 right left top bottom
EFX_EFFECT_PUSH4_R_L_B_L | Push4 right left bottom left
EFX_EFFECT_PUSH4_R_L_B_R | Push4 right left bottom right
EFX_EFFECT_PUSH4_R_L_B_T | Push4 right left bottom top
EFX_EFFECT_PUSH4_R_L_B_B | Push4 right left bottom bottom
EFX_EFFECT_PUSH4_R_R_L_L | Push4 right right left left
EFX_EFFECT_PUSH4_R_R_L_R | Push4 right right left right
EFX_EFFECT_PUSH4_R_R_L_T | Push4 right right left top
EFX_EFFECT_PUSH4_R_R_L_B | Push4 right right left bottom
EFX_EFFECT_PUSH4_R_R_R_L | Push4 right right right left
EFX_EFFECT_PUSH4_R_R_R_R | Push4 right right right right
EFX_EFFECT_PUSH4_R_R_R_T | Push4 right right right top
EFX_EFFECT_PUSH4_R_R_R_B | Push4 right right right bottom
EFX_EFFECT_PUSH4_R_R_T_L | Push4 right right top left
EFX_EFFECT_PUSH4_R_R_T_R | Push4 right right top right
EFX_EFFECT_PUSH4_R_R_T_T | Push4 right right top top
EFX_EFFECT_PUSH4_R_R_T_B | Push4 right right top bottom
EFX_EFFECT_PUSH4_R_R_B_L | Push4 right right bottom left
EFX_EFFECT_PUSH4_R_R_B_R | Push4 right right bottom right
EFX_EFFECT_PUSH4_R_R_B_T | Push4 right right bottom top
EFX_EFFECT_PUSH4_R_R_B_B | Push4 right right bottom bottom
EFX_EFFECT_PUSH4_R_T_L_L | Push4 right top left left
EFX_EFFECT_PUSH4_R_T_L_R | Push4 right top left right
EFX_EFFECT_PUSH4_R_T_L_T | Push4 right top left top
EFX_EFFECT_PUSH4_R_T_L_B | Push4 right top left bottom
EFX_EFFECT_PUSH4_R_T_R_L | Push4 right top right left
EFX_EFFECT_PUSH4_R_T_R_R | Push4 right top right right
EFX_EFFECT_PUSH4_R_T_R_T | Push4 right top right top
EFX_EFFECT_PUSH4_R_T_R_B | Push4 right top right bottom
EFX_EFFECT_PUSH4_R_T_T_L | Push4 right top top left
EFX_EFFECT_PUSH4_R_T_T_R | Push4 right top top right
EFX_EFFECT_PUSH4_R_T_T_T | Push4 right top top top
EFX_EFFECT_PUSH4_R_T_T_B | Push4 right top top bottom
EFX_EFFECT_PUSH4_R_T_B_L | Push4 right top bottom left
EFX_EFFECT_PUSH4_R_T_B_R | Push4 right top bottom right
EFX_EFFECT_PUSH4_R_T_B_T | Push4 right top bottom top
EFX_EFFECT_PUSH4_R_T_B_B | Push4 right top bottom bottom
EFX_EFFECT_PUSH4_R_B_L_L | Push4 right bottom left left
EFX_EFFECT_PUSH4_R_B_L_R | Push4 right bottom left right
EFX_EFFECT_PUSH4_R_B_L_T | Push4 right bottom left top
EFX_EFFECT_PUSH4_R_B_L_B | Push4 right bottom left bottom
EFX_EFFECT_PUSH4_R_B_R_L | Push4 right bottom right left
EFX_EFFECT_PUSH4_R_B_R_R | Push4 right bottom right right
EFX_EFFECT_PUSH4_R_B_R_T | Push4 right bottom right top
EFX_EFFECT_PUSH4_R_B_R_B | Push4 right bottom right bottom
EFX_EFFECT_PUSH4_R_B_T_L | Push4 right bottom top left
EFX_EFFECT_PUSH4_R_B_T_R | Push4 right bottom top right
EFX_EFFECT_PUSH4_R_B_T_T | Push4 right bottom top top
EFX_EFFECT_PUSH4_R_B_T_B | Push4 right bottom top bottom
EFX_EFFECT_PUSH4_R_B_B_L | Push4 right bottom bottom left
EFX_EFFECT_PUSH4_R_B_B_R | Push4 right bottom bottom right
EFX_EFFECT_PUSH4_R_B_B_T | Push4 right bottom bottom top
EFX_EFFECT_PUSH4_R_B_B_B | Push4 right bottom bottom bottom
EFX_EFFECT_PUSH4_T_L_L_L | Push4 top left left left
EFX_EFFECT_PUSH4_T_L_L_R | Push4 top left left right
EFX_EFFECT_PUSH4_T_L_L_T | Push4 top left left top
EFX_EFFECT_PUSH4_T_L_L_B | Push4 top left left bottom
EFX_EFFECT_PUSH4_T_L_R_L | Push4 top left right left
EFX_EFFECT_PUSH4_T_L_R_R | Push4 top left right right
EFX_EFFECT_PUSH4_T_L_R_T | Push4 top left right top
EFX_EFFECT_PUSH4_T_L_R_B | Push4 top left right bottom
EFX_EFFECT_PUSH4_T_L_T_L | Push4 top left top left
EFX_EFFECT_PUSH4_T_L_T_R | Push4 top left top right
EFX_EFFECT_PUSH4_T_L_T_T | Push4 top left top top
EFX_EFFECT_PUSH4_T_L_T_B | Push4 top left top bottom
EFX_EFFECT_PUSH4_T_L_B_L | Push4 top left bottom left
EFX_EFFECT_PUSH4_T_L_B_R | Push4 top left bottom right
EFX_EFFECT_PUSH4_T_L_B_T | Push4 top left bottom top
EFX_EFFECT_PUSH4_T_L_B_B | Push4 top left bottom bottom
EFX_EFFECT_PUSH4_T_R_L_L | Push4 top right left left
EFX_EFFECT_PUSH4_T_R_L_R | Push4 top right left right
EFX_EFFECT_PUSH4_T_R_L_T | Push4 top right left top
EFX_EFFECT_PUSH4_T_R_L_B | Push4 top right left bottom
EFX_EFFECT_PUSH4_T_R_R_L | Push4 top right right left
EFX_EFFECT_PUSH4_T_R_R_R | Push4 top right right right
EFX_EFFECT_PUSH4_T_R_R_T | Push4 top right right top
EFX_EFFECT_PUSH4_T_R_R_B | Push4 top right right bottom
EFX_EFFECT_PUSH4_T_R_T_L | Push4 top right top left
EFX_EFFECT_PUSH4_T_R_T_R | Push4 top right top right
EFX_EFFECT_PUSH4_T_R_T_T | Push4 top right top top
EFX_EFFECT_PUSH4_T_R_T_B | Push4 top right top bottom
EFX_EFFECT_PUSH4_T_R_B_L | Push4 top right bottom left
EFX_EFFECT_PUSH4_T_R_B_R | Push4 top right bottom right
EFX_EFFECT_PUSH4_T_R_B_T | Push4 top right bottom top
EFX_EFFECT_PUSH4_T_R_B_B | Push4 top right bottom bottom
EFX_EFFECT_PUSH4_T_T_L_L | Push4 top top left left
EFX_EFFECT_PUSH4_T_T_L_R | Push4 top top left right
EFX_EFFECT_PUSH4_T_T_L_T | Push4 top top left top
EFX_EFFECT_PUSH4_T_T_L_B | Push4 top top left bottom
EFX_EFFECT_PUSH4_T_T_R_L | Push4 top top right left
EFX_EFFECT_PUSH4_T_T_R_R | Push4 top top right right
EFX_EFFECT_PUSH4_T_T_R_T | Push4 top top right top
EFX_EFFECT_PUSH4_T_T_R_B | Push4 top top right bottom
EFX_EFFECT_PUSH4_T_T_T_L | Push4 top top top left
EFX_EFFECT_PUSH4_T_T_T_R | Push4 top top top right
EFX_EFFECT_PUSH4_T_T_T_T | Push4 top top top top
EFX_EFFECT_PUSH4_T_T_T_B | Push4 top top top bottom
EFX_EFFECT_PUSH4_T_T_B_L | Push4 top top bottom left
EFX_EFFECT_PUSH4_T_T_B_R | Push4 top top bottom right
EFX_EFFECT_PUSH4_T_T_B_T | Push4 top top bottom top
EFX_EFFECT_PUSH4_T_T_B_B | Push4 top top bottom bottom
EFX_EFFECT_PUSH4_T_B_L_L | Push4 top bottom left left
EFX_EFFECT_PUSH4_T_B_L_R | Push4 top bottom left right
EFX_EFFECT_PUSH4_T_B_L_T | Push4 top bottom left top
EFX_EFFECT_PUSH4_T_B_L_B | Push4 top bottom left bottom
EFX_EFFECT_PUSH4_T_B_R_L | Push4 top bottom right left
EFX_EFFECT_PUSH4_T_B_R_R | Push4 top bottom right right
EFX_EFFECT_PUSH4_T_B_R_T | Push4 top bottom right top
EFX_EFFECT_PUSH4_T_B_R_B | Push4 top bottom right bottom
EFX_EFFECT_PUSH4_T_B_T_L | Push4 top bottom top left
EFX_EFFECT_PUSH4_T_B_T_R | Push4 top bottom top right
EFX_EFFECT_PUSH4_T_B_T_T | Push4 top bottom top top
EFX_EFFECT_PUSH4_T_B_T_B | Push4 top bottom top bottom
EFX_EFFECT_PUSH4_T_B_B_L | Push4 top bottom bottom left
EFX_EFFECT_PUSH4_T_B_B_R | Push4 top bottom bottom right
EFX_EFFECT_PUSH4_T_B_B_T | Push4 top bottom bottom top
EFX_EFFECT_PUSH4_T_B_B_B | Push4 top bottom bottom bottom
EFX_EFFECT_PUSH4_B_L_L_L | Push4 bottom left left left
EFX_EFFECT_PUSH4_B_L_L_R | Push4 bottom left left right
EFX_EFFECT_PUSH4_B_L_L_T | Push4 bottom left left top
EFX_EFFECT_PUSH4_B_L_L_B | Push4 bottom left left bottom
EFX_EFFECT_PUSH4_B_L_R_L | Push4 bottom left right left
EFX_EFFECT_PUSH4_B_L_R_R | Push4 bottom left right right
EFX_EFFECT_PUSH4_B_L_R_T | Push4 bottom left right top
EFX_EFFECT_PUSH4_B_L_R_B | Push4 bottom left right bottom
EFX_EFFECT_PUSH4_B_L_T_L | Push4 bottom left top left
EFX_EFFECT_PUSH4_B_L_T_R | Push4 bottom left top right
EFX_EFFECT_PUSH4_B_L_T_T | Push4 bottom left top top
EFX_EFFECT_PUSH4_B_L_T_B | Push4 bottom left top bottom
EFX_EFFECT_PUSH4_B_L_B_L | Push4 bottom left bottom left
EFX_EFFECT_PUSH4_B_L_B_R | Push4 bottom left bottom right
EFX_EFFECT_PUSH4_B_L_B_T | Push4 bottom left bottom top
EFX_EFFECT_PUSH4_B_L_B_B | Push4 bottom left bottom bottom
EFX_EFFECT_PUSH4_B_R_L_L | Push4 bottom right left left
EFX_EFFECT_PUSH4_B_R_L_R | Push4 bottom right left right
EFX_EFFECT_PUSH4_B_R_L_T | Push4 bottom right left top
EFX_EFFECT_PUSH4_B_R_L_B | Push4 bottom right left bottom
EFX_EFFECT_PUSH4_B_R_R_L | Push4 bottom right right left
EFX_EFFECT_PUSH4_B_R_R_R | Push4 bottom right right right
EFX_EFFECT_PUSH4_B_R_R_T | Push4 bottom right right top
EFX_EFFECT_PUSH4_B_R_R_B | Push4 bottom right right bottom
EFX_EFFECT_PUSH4_B_R_T_L | Push4 bottom right top left
EFX_EFFECT_PUSH4_B_R_T_R | Push4 bottom right top right
EFX_EFFECT_PUSH4_B_R_T_T | Push4 bottom right top top
EFX_EFFECT_PUSH4_B_R_T_B | Push4 bottom right top bottom
EFX_EFFECT_PUSH4_B_R_B_L | Push4 bottom right bottom left
EFX_EFFECT_PUSH4_B_R_B_R | Push4 bottom right bottom right
EFX_EFFECT_PUSH4_B_R_B_T | Push4 bottom right bottom top
EFX_EFFECT_PUSH4_B_R_B_B | Push4 bottom right bottom bottom
EFX_EFFECT_PUSH4_B_T_L_L | Push4 bottom top left left
EFX_EFFECT_PUSH4_B_T_L_R | Push4 bottom top left right
EFX_EFFECT_PUSH4_B_T_L_T | Push4 bottom top left top
EFX_EFFECT_PUSH4_B_T_L_B | Push4 bottom top left bottom
EFX_EFFECT_PUSH4_B_T_R_L | Push4 bottom top right left
EFX_EFFECT_PUSH4_B_T_R_R | Push4 bottom top right right
EFX_EFFECT_PUSH4_B_T_R_T | Push4 bottom top right top
EFX_EFFECT_PUSH4_B_T_R_B | Push4 bottom top right bottom
EFX_EFFECT_PUSH4_B_T_T_L | Push4 bottom top top left
EFX_EFFECT_PUSH4_B_T_T_R | Push4 bottom top top right
EFX_EFFECT_PUSH4_B_T_T_T | Push4 bottom top top top
EFX_EFFECT_PUSH4_B_T_T_B | Push4 bottom top top bottom
EFX_EFFECT_PUSH4_B_T_B_L | Push4 bottom top bottom left
EFX_EFFECT_PUSH4_B_T_B_R | Push4 bottom top bottom right
EFX_EFFECT_PUSH4_B_T_B_T | Push4 bottom top bottom top
EFX_EFFECT_PUSH4_B_T_B_B | Push4 bottom top bottom bottom
EFX_EFFECT_PUSH4_B_B_L_L | Push4 bottom bottom left left
EFX_EFFECT_PUSH4_B_B_L_R | Push4 bottom bottom left right
EFX_EFFECT_PUSH4_B_B_L_T | Push4 bottom bottom left top
EFX_EFFECT_PUSH4_B_B_L_B | Push4 bottom bottom left bottom
EFX_EFFECT_PUSH4_B_B_R_L | Push4 bottom bottom right left
EFX_EFFECT_PUSH4_B_B_R_R | Push4 bottom bottom right right
EFX_EFFECT_PUSH4_B_B_R_T | Push4 bottom bottom right top
EFX_EFFECT_PUSH4_B_B_R_B | Push4 bottom bottom right bottom
EFX_EFFECT_PUSH4_B_B_T_L | Push4 bottom bottom top left
EFX_EFFECT_PUSH4_B_B_T_R | Push4 bottom bottom top right
EFX_EFFECT_PUSH4_B_B_T_T | Push4 bottom bottom top top
EFX_EFFECT_PUSH4_B_B_T_B | Push4 bottom bottom top bottom
EFX_EFFECT_PUSH4_B_B_B_L | Push4 bottom bottom bottom left
EFX_EFFECT_PUSH4_B_B_B_R | Push4 bottom bottom bottom right
EFX_EFFECT_PUSH4_B_B_B_T | Push4 bottom bottom bottom top
EFX_EFFECT_PUSH4_B_B_B_B | Push4 bottom bottom bottom bottom
EFX_EFFECT_PUSH_MAX | Number of effects in this class.
Slide class |
EFX_EFFECT_SLIDE_R_TO_L | Slide right to left
EFX_EFFECT_SLIDE_L_TO_R | Slide left to right
EFX_EFFECT_SLIDE_B_TO_T | Slide bottom to top
EFX_EFFECT_SLIDE_T_TO_B | Slide top to bottom
EFX_EFFECT_SLIDE_LT_TO_RB | Slide left-top to right-bottom
EFX_EFFECT_SLIDE_RT_TO_LB | Slide right-top to left-bottom
EFX_EFFECT_SLIDE_LB_TO_RT | Slide left-bottom to right-top
EFX_EFFECT_SLIDE_RB_TO_LT | Slide right-bottom to left-top
EFX_EFFECT_SLIDE_INTERH_L_TO_R_AND_R_TO_L | Slide horizontal interlace left to right and right to left
EFX_EFFECT_SLIDE_INTERV_T_TO_B_AND_B_TO_T | Slide vertical interlace top to bottom and bottom to top
EFX_EFFECT_SLIDE2_T_R_TO_L_AND_B_L_TO_R | Slide2 top right to left and bottom left to right
EFX_EFFECT_SLIDE2_T_L_TO_R_AND_B_R_TO_L | Slide2 top left to right and bottom right to left
EFX_EFFECT_SLIDE2_L_B_TO_T_AND_R_T_TO_B | Slide2 left bottom to top and right top to bottom
EFX_EFFECT_SLIDE2_L_T_TO_B_AND_R_B_TO_T | Slide2 left top to bottom and right bottom to top
EFX_EFFECT_SLIDE4_L_L_L_L | Slide4 left left left left
EFX_EFFECT_SLIDE4_L_L_L_R | Slide4 left left left right
EFX_EFFECT_SLIDE4_L_L_L_T | Slide4 left left left top
EFX_EFFECT_SLIDE4_L_L_L_B | Slide4 left left left bottom
EFX_EFFECT_SLIDE4_L_L_R_L | Slide4 left left right left
EFX_EFFECT_SLIDE4_L_L_R_R | Slide4 left left right right
EFX_EFFECT_SLIDE4_L_L_R_T | Slide4 left left right top
EFX_EFFECT_SLIDE4_L_L_R_B | Slide4 left left right bottom
EFX_EFFECT_SLIDE4_L_L_T_L | Slide4 left left top left
EFX_EFFECT_SLIDE4_L_L_T_R | Slide4 left left top right
EFX_EFFECT_SLIDE4_L_L_T_T | Slide4 left left top top
EFX_EFFECT_SLIDE4_L_L_T_B | Slide4 left left top bottom
EFX_EFFECT_SLIDE4_L_L_B_L | Slide4 left left bottom left
EFX_EFFECT_SLIDE4_L_L_B_R | Slide4 left left bottom right
EFX_EFFECT_SLIDE4_L_L_B_T | Slide4 left left bottom top
EFX_EFFECT_SLIDE4_L_L_B_B | Slide4 left left bottom bottom
EFX_EFFECT_SLIDE4_L_R_L_L | Slide4 left right left left
EFX_EFFECT_SLIDE4_L_R_L_R | Slide4 left right left right
EFX_EFFECT_SLIDE4_L_R_L_T | Slide4 left right left top
EFX_EFFECT_SLIDE4_L_R_L_B | Slide4 left right left bottom
EFX_EFFECT_SLIDE4_L_R_R_L | Slide4 left right right left
EFX_EFFECT_SLIDE4_L_R_R_R | Slide4 left right right right
EFX_EFFECT_SLIDE4_L_R_R_T | Slide4 left right right top
EFX_EFFECT_SLIDE4_L_R_R_B | Slide4 left right right bottom
EFX_EFFECT_SLIDE4_L_R_T_L | Slide4 left right top left
EFX_EFFECT_SLIDE4_L_R_T_R | Slide4 left right top right
EFX_EFFECT_SLIDE4_L_R_T_T | Slide4 left right top top
EFX_EFFECT_SLIDE4_L_R_T_B | Slide4 left right top bottom
EFX_EFFECT_SLIDE4_L_R_B_L | Slide4 left right bottom left
EFX_EFFECT_SLIDE4_L_R_B_R | Slide4 left right bottom right
EFX_EFFECT_SLIDE4_L_R_B_T | Slide4 left right bottom top
EFX_EFFECT_SLIDE4_L_R_B_B | Slide4 left right bottom bottom
EFX_EFFECT_SLIDE4_L_T_L_L | Slide4 left top left left
EFX_EFFECT_SLIDE4_L_T_L_R | Slide4 left top left right
EFX_EFFECT_SLIDE4_L_T_L_T | Slide4 left top left top
EFX_EFFECT_SLIDE4_L_T_L_B | Slide4 left top left bottom
EFX_EFFECT_SLIDE4_L_T_R_L | Slide4 left top right left
EFX_EFFECT_SLIDE4_L_T_R_R | Slide4 left top right right
EFX_EFFECT_SLIDE4_L_T_R_T | Slide4 left top right top
EFX_EFFECT_SLIDE4_L_T_R_B | Slide4 left top right bottom
EFX_EFFECT_SLIDE4_L_T_T_L | Slide4 left top top left
EFX_EFFECT_SLIDE4_L_T_T_R | Slide4 left top top right
EFX_EFFECT_SLIDE4_L_T_T_T | Slide4 left top top top
EFX_EFFECT_SLIDE4_L_T_T_B | Slide4 left top top bottom
EFX_EFFECT_SLIDE4_L_T_B_L | Slide4 left top bottom left
EFX_EFFECT_SLIDE4_L_T_B_R | Slide4 left top bottom right
EFX_EFFECT_SLIDE4_L_T_B_T | Slide4 left top bottom top
EFX_EFFECT_SLIDE4_L_T_B_B | Slide4 left top bottom bottom
EFX_EFFECT_SLIDE4_L_B_L_L | Slide4 left bottom left left
EFX_EFFECT_SLIDE4_L_B_L_R | Slide4 left bottom left right
EFX_EFFECT_SLIDE4_L_B_L_T | Slide4 left bottom left top
EFX_EFFECT_SLIDE4_L_B_L_B | Slide4 left bottom left bottom
EFX_EFFECT_SLIDE4_L_B_R_L | Slide4 left bottom right left
EFX_EFFECT_SLIDE4_L_B_R_R | Slide4 left bottom right right
EFX_EFFECT_SLIDE4_L_B_R_T | Slide4 left bottom right top
EFX_EFFECT_SLIDE4_L_B_R_B | Slide4 left bottom right bottom
EFX_EFFECT_SLIDE4_L_B_T_L | Slide4 left bottom top left
EFX_EFFECT_SLIDE4_L_B_T_R | Slide4 left bottom top right
EFX_EFFECT_SLIDE4_L_B_T_T | Slide4 left bottom top top
EFX_EFFECT_SLIDE4_L_B_T_B | Slide4 left bottom top bottom
EFX_EFFECT_SLIDE4_L_B_B_L | Slide4 left bottom bottom left
EFX_EFFECT_SLIDE4_L_B_B_R | Slide4 left bottom bottom right
EFX_EFFECT_SLIDE4_L_B_B_T | Slide4 left bottom bottom top
EFX_EFFECT_SLIDE4_L_B_B_B | Slide4 left bottom bottom bottom
EFX_EFFECT_SLIDE4_R_L_L_L | Slide4 right left left left
EFX_EFFECT_SLIDE4_R_L_L_R | Slide4 right left left right
EFX_EFFECT_SLIDE4_R_L_L_T | Slide4 right left left top
EFX_EFFECT_SLIDE4_R_L_L_B | Slide4 right left left bottom
EFX_EFFECT_SLIDE4_R_L_R_L | Slide4 right left right left
EFX_EFFECT_SLIDE4_R_L_R_R | Slide4 right left right right
EFX_EFFECT_SLIDE4_R_L_R_T | Slide4 right left right top
EFX_EFFECT_SLIDE4_R_L_R_B | Slide4 right left right bottom
EFX_EFFECT_SLIDE4_R_L_T_L | Slide4 right left top left
EFX_EFFECT_SLIDE4_R_L_T_R | Slide4 right left top right
EFX_EFFECT_SLIDE4_R_L_T_T | Slide4 right left top top
EFX_EFFECT_SLIDE4_R_L_T_B | Slide4 right left top bottom
EFX_EFFECT_SLIDE4_R_L_B_L | Slide4 right left bottom left
EFX_EFFECT_SLIDE4_R_L_B_R | Slide4 right left bottom right
EFX_EFFECT_SLIDE4_R_L_B_T | Slide4 right left bottom top
EFX_EFFECT_SLIDE4_R_L_B_B | Slide4 right left bottom bottom
EFX_EFFECT_SLIDE4_R_R_L_L | Slide4 right right left left
EFX_EFFECT_SLIDE4_R_R_L_R | Slide4 right right left right
EFX_EFFECT_SLIDE4_R_R_L_T | Slide4 right right left top
EFX_EFFECT_SLIDE4_R_R_L_B | Slide4 right right left bottom
EFX_EFFECT_SLIDE4_R_R_R_L | Slide4 right right right left
EFX_EFFECT_SLIDE4_R_R_R_R | Slide4 right right right right
EFX_EFFECT_SLIDE4_R_R_R_T | Slide4 right right right top
EFX_EFFECT_SLIDE4_R_R_R_B | Slide4 right right right bottom
EFX_EFFECT_SLIDE4_R_R_T_L | Slide4 right right top left
EFX_EFFECT_SLIDE4_R_R_T_R | Slide4 right right top right
EFX_EFFECT_SLIDE4_R_R_T_T | Slide4 right right top top
EFX_EFFECT_SLIDE4_R_R_T_B | Slide4 right right top bottom
EFX_EFFECT_SLIDE4_R_R_B_L | Slide4 right right bottom left
EFX_EFFECT_SLIDE4_R_R_B_R | Slide4 right right bottom right
EFX_EFFECT_SLIDE4_R_R_B_T | Slide4 right right bottom top
EFX_EFFECT_SLIDE4_R_R_B_B | Slide4 right right bottom bottom
EFX_EFFECT_SLIDE4_R_T_L_L | Slide4 right top left left
EFX_EFFECT_SLIDE4_R_T_L_R | Slide4 right top left right
EFX_EFFECT_SLIDE4_R_T_L_T | Slide4 right top left top
EFX_EFFECT_SLIDE4_R_T_L_B | Slide4 right top left bottom
EFX_EFFECT_SLIDE4_R_T_R_L | Slide4 right top right left
EFX_EFFECT_SLIDE4_R_T_R_R | Slide4 right top right right
EFX_EFFECT_SLIDE4_R_T_R_T | Slide4 right top right top
EFX_EFFECT_SLIDE4_R_T_R_B | Slide4 right top right bottom
EFX_EFFECT_SLIDE4_R_T_T_L | Slide4 right top top left
EFX_EFFECT_SLIDE4_R_T_T_R | Slide4 right top top right
EFX_EFFECT_SLIDE4_R_T_T_T | Slide4 right top top top
EFX_EFFECT_SLIDE4_R_T_T_B | Slide4 right top top bottom
EFX_EFFECT_SLIDE4_R_T_B_L | Slide4 right top bottom left
EFX_EFFECT_SLIDE4_R_T_B_R | Slide4 right top bottom right
EFX_EFFECT_SLIDE4_R_T_B_T | Slide4 right top bottom top
EFX_EFFECT_SLIDE4_R_T_B_B | Slide4 right top bottom bottom
EFX_EFFECT_SLIDE4_R_B_L_L | Slide4 right bottom left left
EFX_EFFECT_SLIDE4_R_B_L_R | Slide4 right bottom left right
EFX_EFFECT_SLIDE4_R_B_L_T | Slide4 right bottom left top
EFX_EFFECT_SLIDE4_R_B_L_B | Slide4 right bottom left bottom
EFX_EFFECT_SLIDE4_R_B_R_L | Slide4 right bottom right left
EFX_EFFECT_SLIDE4_R_B_R_R | Slide4 right bottom right right
EFX_EFFECT_SLIDE4_R_B_R_T | Slide4 right bottom right top
EFX_EFFECT_SLIDE4_R_B_R_B | Slide4 right bottom right bottom
EFX_EFFECT_SLIDE4_R_B_T_L | Slide4 right bottom top left
EFX_EFFECT_SLIDE4_R_B_T_R | Slide4 right bottom top right
EFX_EFFECT_SLIDE4_R_B_T_T | Slide4 right bottom top top
EFX_EFFECT_SLIDE4_R_B_T_B | Slide4 right bottom top bottom
EFX_EFFECT_SLIDE4_R_B_B_L | Slide4 right bottom bottom left
EFX_EFFECT_SLIDE4_R_B_B_R | Slide4 right bottom bottom right
EFX_EFFECT_SLIDE4_R_B_B_T | Slide4 right bottom bottom top
EFX_EFFECT_SLIDE4_R_B_B_B | Slide4 right bottom bottom bottom
EFX_EFFECT_SLIDE4_T_L_L_L | Slide4 top left left left
EFX_EFFECT_SLIDE4_T_L_L_R | Slide4 top left left right
EFX_EFFECT_SLIDE4_T_L_L_T | Slide4 top left left top
EFX_EFFECT_SLIDE4_T_L_L_B | Slide4 top left left bottom
EFX_EFFECT_SLIDE4_T_L_R_L | Slide4 top left right left
EFX_EFFECT_SLIDE4_T_L_R_R | Slide4 top left right right
EFX_EFFECT_SLIDE4_T_L_R_T | Slide4 top left right top
EFX_EFFECT_SLIDE4_T_L_R_B | Slide4 top left right bottom
EFX_EFFECT_SLIDE4_T_L_T_L | Slide4 top left top left
EFX_EFFECT_SLIDE4_T_L_T_R | Slide4 top left top right
EFX_EFFECT_SLIDE4_T_L_T_T | Slide4 top left top top
EFX_EFFECT_SLIDE4_T_L_T_B | Slide4 top left top bottom
EFX_EFFECT_SLIDE4_T_L_B_L | Slide4 top left bottom left
EFX_EFFECT_SLIDE4_T_L_B_R | Slide4 top left bottom right
EFX_EFFECT_SLIDE4_T_L_B_T | Slide4 top left bottom top
EFX_EFFECT_SLIDE4_T_L_B_B | Slide4 top left bottom bottom
EFX_EFFECT_SLIDE4_T_R_L_L | Slide4 top right left left
EFX_EFFECT_SLIDE4_T_R_L_R | Slide4 top right left right
EFX_EFFECT_SLIDE4_T_R_L_T | Slide4 top right left top
EFX_EFFECT_SLIDE4_T_R_L_B | Slide4 top right left bottom
EFX_EFFECT_SLIDE4_T_R_R_L | Slide4 top right right left
EFX_EFFECT_SLIDE4_T_R_R_R | Slide4 top right right right
EFX_EFFECT_SLIDE4_T_R_R_T | Slide4 top right right top
EFX_EFFECT_SLIDE4_T_R_R_B | Slide4 top right right bottom
EFX_EFFECT_SLIDE4_T_R_T_L | Slide4 top right top left
EFX_EFFECT_SLIDE4_T_R_T_R | Slide4 top right top right
EFX_EFFECT_SLIDE4_T_R_T_T | Slide4 top right top top
EFX_EFFECT_SLIDE4_T_R_T_B | Slide4 top right top bottom
EFX_EFFECT_SLIDE4_T_R_B_L | Slide4 top right bottom left
EFX_EFFECT_SLIDE4_T_R_B_R | Slide4 top right bottom right
EFX_EFFECT_SLIDE4_T_R_B_T | Slide4 top right bottom top
EFX_EFFECT_SLIDE4_T_R_B_B | Slide4 top right bottom bottom
EFX_EFFECT_SLIDE4_T_T_L_L | Slide4 top top left left
EFX_EFFECT_SLIDE4_T_T_L_R | Slide4 top top left right
EFX_EFFECT_SLIDE4_T_T_L_T | Slide4 top top left top
EFX_EFFECT_SLIDE4_T_T_L_B | Slide4 top top left bottom
EFX_EFFECT_SLIDE4_T_T_R_L | Slide4 top top right left
EFX_EFFECT_SLIDE4_T_T_R_R | Slide4 top top right right
EFX_EFFECT_SLIDE4_T_T_R_T | Slide4 top top right top
EFX_EFFECT_SLIDE4_T_T_R_B | Slide4 top top right bottom
EFX_EFFECT_SLIDE4_T_T_T_L | Slide4 top top top left
EFX_EFFECT_SLIDE4_T_T_T_R | Slide4 top top top right
EFX_EFFECT_SLIDE4_T_T_T_T | Slide4 top top top top
EFX_EFFECT_SLIDE4_T_T_T_B | Slide4 top top top bottom
EFX_EFFECT_SLIDE4_T_T_B_L | Slide4 top top bottom left
EFX_EFFECT_SLIDE4_T_T_B_R | Slide4 top top bottom right
EFX_EFFECT_SLIDE4_T_T_B_T | Slide4 top top bottom top
EFX_EFFECT_SLIDE4_T_T_B_B | Slide4 top top bottom bottom
EFX_EFFECT_SLIDE4_T_B_L_L | Slide4 top bottom left left
EFX_EFFECT_SLIDE4_T_B_L_R | Slide4 top bottom left right
EFX_EFFECT_SLIDE4_T_B_L_T | Slide4 top bottom left top
EFX_EFFECT_SLIDE4_T_B_L_B | Slide4 top bottom left bottom
EFX_EFFECT_SLIDE4_T_B_R_L | Slide4 top bottom right left
EFX_EFFECT_SLIDE4_T_B_R_R | Slide4 top bottom right right
EFX_EFFECT_SLIDE4_T_B_R_T | Slide4 top bottom right top
EFX_EFFECT_SLIDE4_T_B_R_B | Slide4 top bottom right bottom
EFX_EFFECT_SLIDE4_T_B_T_L | Slide4 top bottom top left
EFX_EFFECT_SLIDE4_T_B_T_R | Slide4 top bottom top right
EFX_EFFECT_SLIDE4_T_B_T_T | Slide4 top bottom top top
EFX_EFFECT_SLIDE4_T_B_T_B | Slide4 top bottom top bottom
EFX_EFFECT_SLIDE4_T_B_B_L | Slide4 top bottom bottom left
EFX_EFFECT_SLIDE4_T_B_B_R | Slide4 top bottom bottom right
EFX_EFFECT_SLIDE4_T_B_B_T | Slide4 top bottom bottom top
EFX_EFFECT_SLIDE4_T_B_B_B | Slide4 top bottom bottom bottom
EFX_EFFECT_SLIDE4_B_L_L_L | Slide4 bottom left left left
EFX_EFFECT_SLIDE4_B_L_L_R | Slide4 bottom left left right
EFX_EFFECT_SLIDE4_B_L_L_T | Slide4 bottom left left top
EFX_EFFECT_SLIDE4_B_L_L_B | Slide4 bottom left left bottom
EFX_EFFECT_SLIDE4_B_L_R_L | Slide4 bottom left right left
EFX_EFFECT_SLIDE4_B_L_R_R | Slide4 bottom left right right
EFX_EFFECT_SLIDE4_B_L_R_T | Slide4 bottom left right top
EFX_EFFECT_SLIDE4_B_L_R_B | Slide4 bottom left right bottom
EFX_EFFECT_SLIDE4_B_L_T_L | Slide4 bottom left top left
EFX_EFFECT_SLIDE4_B_L_T_R | Slide4 bottom left top right
EFX_EFFECT_SLIDE4_B_L_T_T | Slide4 bottom left top top
EFX_EFFECT_SLIDE4_B_L_T_B | Slide4 bottom left top bottom
EFX_EFFECT_SLIDE4_B_L_B_L | Slide4 bottom left bottom left
EFX_EFFECT_SLIDE4_B_L_B_R | Slide4 bottom left bottom right
EFX_EFFECT_SLIDE4_B_L_B_T | Slide4 bottom left bottom top
EFX_EFFECT_SLIDE4_B_L_B_B | Slide4 bottom left bottom bottom
EFX_EFFECT_SLIDE4_B_R_L_L | Slide4 bottom right left left
EFX_EFFECT_SLIDE4_B_R_L_R | Slide4 bottom right left right
EFX_EFFECT_SLIDE4_B_R_L_T | Slide4 bottom right left top
EFX_EFFECT_SLIDE4_B_R_L_B | Slide4 bottom right left bottom
EFX_EFFECT_SLIDE4_B_R_R_L | Slide4 bottom right right left
EFX_EFFECT_SLIDE4_B_R_R_R | Slide4 bottom right right right
EFX_EFFECT_SLIDE4_B_R_R_T | Slide4 bottom right right top
EFX_EFFECT_SLIDE4_B_R_R_B | Slide4 bottom right right bottom
EFX_EFFECT_SLIDE4_B_R_T_L | Slide4 bottom right top left
EFX_EFFECT_SLIDE4_B_R_T_R | Slide4 bottom right top right
EFX_EFFECT_SLIDE4_B_R_T_T | Slide4 bottom right top top
EFX_EFFECT_SLIDE4_B_R_T_B | Slide4 bottom right top bottom
EFX_EFFECT_SLIDE4_B_R_B_L | Slide4 bottom right bottom left
EFX_EFFECT_SLIDE4_B_R_B_R | Slide4 bottom right bottom right
EFX_EFFECT_SLIDE4_B_R_B_T | Slide4 bottom right bottom top
EFX_EFFECT_SLIDE4_B_R_B_B | Slide4 bottom right bottom bottom
EFX_EFFECT_SLIDE4_B_T_L_L | Slide4 bottom top left left
EFX_EFFECT_SLIDE4_B_T_L_R | Slide4 bottom top left right
EFX_EFFECT_SLIDE4_B_T_L_T | Slide4 bottom top left top
EFX_EFFECT_SLIDE4_B_T_L_B | Slide4 bottom top left bottom
EFX_EFFECT_SLIDE4_B_T_R_L | Slide4 bottom top right left
EFX_EFFECT_SLIDE4_B_T_R_R | Slide4 bottom top right right
EFX_EFFECT_SLIDE4_B_T_R_T | Slide4 bottom top right top
EFX_EFFECT_SLIDE4_B_T_R_B | Slide4 bottom top right bottom
EFX_EFFECT_SLIDE4_B_T_T_L | Slide4 bottom top top left
EFX_EFFECT_SLIDE4_B_T_T_R | Slide4 bottom top top right
EFX_EFFECT_SLIDE4_B_T_T_T | Slide4 bottom top top top
EFX_EFFECT_SLIDE4_B_T_T_B | Slide4 bottom top top bottom
EFX_EFFECT_SLIDE4_B_T_B_L | Slide4 bottom top bottom left
EFX_EFFECT_SLIDE4_B_T_B_R | Slide4 bottom top bottom right
EFX_EFFECT_SLIDE4_B_T_B_T | Slide4 bottom top bottom top
EFX_EFFECT_SLIDE4_B_T_B_B | Slide4 bottom top bottom bottom
EFX_EFFECT_SLIDE4_B_B_L_L | Slide4 bottom bottom left left
EFX_EFFECT_SLIDE4_B_B_L_R | Slide4 bottom bottom left right
EFX_EFFECT_SLIDE4_B_B_L_T | Slide4 bottom bottom left top
EFX_EFFECT_SLIDE4_B_B_L_B | Slide4 bottom bottom left bottom
EFX_EFFECT_SLIDE4_B_B_R_L | Slide4 bottom bottom right left
EFX_EFFECT_SLIDE4_B_B_R_R | Slide4 bottom bottom right right
EFX_EFFECT_SLIDE4_B_B_R_T | Slide4 bottom bottom right top
EFX_EFFECT_SLIDE4_B_B_R_B | Slide4 bottom bottom right bottom
EFX_EFFECT_SLIDE4_B_B_T_L | Slide4 bottom bottom top left
EFX_EFFECT_SLIDE4_B_B_T_R | Slide4 bottom bottom top right
EFX_EFFECT_SLIDE4_B_B_T_T | Slide4 bottom bottom top top
EFX_EFFECT_SLIDE4_B_B_T_B | Slide4 bottom bottom top bottom
EFX_EFFECT_SLIDE4_B_B_B_L | Slide4 bottom bottom bottom left
EFX_EFFECT_SLIDE4_B_B_B_R | Slide4 bottom bottom bottom right
EFX_EFFECT_SLIDE4_B_B_B_T | Slide4 bottom bottom bottom top
EFX_EFFECT_SLIDE4_B_B_B_B | Slide4 bottom bottom bottom bottom
EFX_EFFECT_SLIDE4_LT_LT_LT_LT | Slide4 left-top left-top left-top left-top
EFX_EFFECT_SLIDE4_LT_LT_LT_LB | Slide4 left-top left-top left-top left-bottom
EFX_EFFECT_SLIDE4_LT_LT_LT_RT | Slide4 left-top left-top left-top right-top
EFX_EFFECT_SLIDE4_LT_LT_LT_RB | Slide4 left-top left-top left-top right-bottom
EFX_EFFECT_SLIDE4_LT_LT_LB_LT | Slide4 left-top left-top left-bottom left-top
EFX_EFFECT_SLIDE4_LT_LT_LB_LB | Slide4 left-top left-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_LT_LB_RT | Slide4 left-top left-top left-bottom right-top
EFX_EFFECT_SLIDE4_LT_LT_LB_RB | Slide4 left-top left-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_LT_LT_RT_LT | Slide4 left-top left-top right-top left-top
EFX_EFFECT_SLIDE4_LT_LT_RT_LB | Slide4 left-top left-top right-top left-bottom
EFX_EFFECT_SLIDE4_LT_LT_RT_RT | Slide4 left-top left-top right-top right-top
EFX_EFFECT_SLIDE4_LT_LT_RT_RB | Slide4 left-top left-top right-top right-bottom
EFX_EFFECT_SLIDE4_LT_LT_RB_LT | Slide4 left-top left-top right-bottom left-top
EFX_EFFECT_SLIDE4_LT_LT_RB_LB | Slide4 left-top left-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_LT_RB_RT | Slide4 left-top left-top right-bottom right-top
EFX_EFFECT_SLIDE4_LT_LT_RB_RB | Slide4 left-top left-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_LT_LB_LT_LT | Slide4 left-top left-bottom left-top left-top
EFX_EFFECT_SLIDE4_LT_LB_LT_LB | Slide4 left-top left-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_LT_LB_LT_RT | Slide4 left-top left-bottom left-top right-top
EFX_EFFECT_SLIDE4_LT_LB_LT_RB | Slide4 left-top left-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_LT_LB_LB_LT | Slide4 left-top left-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_LT_LB_LB_LB | Slide4 left-top left-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_LB_LB_RT | Slide4 left-top left-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_LT_LB_LB_RB | Slide4 left-top left-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_LT_LB_RT_LT | Slide4 left-top left-bottom right-top left-top
EFX_EFFECT_SLIDE4_LT_LB_RT_LB | Slide4 left-top left-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_LT_LB_RT_RT | Slide4 left-top left-bottom right-top right-top
EFX_EFFECT_SLIDE4_LT_LB_RT_RB | Slide4 left-top left-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_LT_LB_RB_LT | Slide4 left-top left-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_LT_LB_RB_LB | Slide4 left-top left-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_LB_RB_RT | Slide4 left-top left-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_LT_LB_RB_RB | Slide4 left-top left-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE4_LT_RT_LT_LT | Slide4 left-top right-top left-top left-top
EFX_EFFECT_SLIDE4_LT_RT_LT_LB | Slide4 left-top right-top left-top left-bottom
EFX_EFFECT_SLIDE4_LT_RT_LT_RT | Slide4 left-top right-top left-top right-top
EFX_EFFECT_SLIDE4_LT_RT_LT_RB | Slide4 left-top right-top left-top right-bottom
EFX_EFFECT_SLIDE4_LT_RT_LB_LT | Slide4 left-top right-top left-bottom left-top
EFX_EFFECT_SLIDE4_LT_RT_LB_LB | Slide4 left-top right-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_RT_LB_RT | Slide4 left-top right-top left-bottom right-top
EFX_EFFECT_SLIDE4_LT_RT_LB_RB | Slide4 left-top right-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_LT_RT_RT_LT | Slide4 left-top right-top right-top left-top
EFX_EFFECT_SLIDE4_LT_RT_RT_LB | Slide4 left-top right-top right-top left-bottom
EFX_EFFECT_SLIDE4_LT_RT_RT_RT | Slide4 left-top right-top right-top right-top
EFX_EFFECT_SLIDE4_LT_RT_RT_RB | Slide4 left-top right-top right-top right-bottom
EFX_EFFECT_SLIDE4_LT_RT_RB_LT | Slide4 left-top right-top right-bottom left-top
EFX_EFFECT_SLIDE4_LT_RT_RB_LB | Slide4 left-top right-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_RT_RB_RT | Slide4 left-top right-top right-bottom right-top
EFX_EFFECT_SLIDE4_LT_RT_RB_RB | Slide4 left-top right-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_LT_RB_LT_LT | Slide4 left-top right-bottom left-top left-top
EFX_EFFECT_SLIDE4_LT_RB_LT_LB | Slide4 left-top right-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_LT_RB_LT_RT | Slide4 left-top right-bottom left-top right-top
EFX_EFFECT_SLIDE4_LT_RB_LT_RB | Slide4 left-top right-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_LT_RB_LB_LT | Slide4 left-top right-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_LT_RB_LB_LB | Slide4 left-top right-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_RB_LB_RT | Slide4 left-top right-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_LT_RB_LB_RB | Slide4 left-top right-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_LT_RB_RT_LT | Slide4 left-top right-bottom right-top left-top
EFX_EFFECT_SLIDE4_LT_RB_RT_LB | Slide4 left-top right-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_LT_RB_RT_RT | Slide4 left-top right-bottom right-top right-top
EFX_EFFECT_SLIDE4_LT_RB_RT_RB | Slide4 left-top right-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_LT_RB_RB_LT | Slide4 left-top right-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_LT_RB_RB_LB | Slide4 left-top right-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_LT_RB_RB_RT | Slide4 left-top right-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_LT_RB_RB_RB | Slide4 left-top right-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_LT_LT_LT | Slide4 left-bottom left-top left-top left-top
EFX_EFFECT_SLIDE4_LB_LT_LT_LB | Slide4 left-bottom left-top left-top left-bottom
EFX_EFFECT_SLIDE4_LB_LT_LT_RT | Slide4 left-bottom left-top left-top right-top
EFX_EFFECT_SLIDE4_LB_LT_LT_RB | Slide4 left-bottom left-top left-top right-bottom
EFX_EFFECT_SLIDE4_LB_LT_LB_LT | Slide4 left-bottom left-top left-bottom left-top
EFX_EFFECT_SLIDE4_LB_LT_LB_LB | Slide4 left-bottom left-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_LT_LB_RT | Slide4 left-bottom left-top left-bottom right-top
EFX_EFFECT_SLIDE4_LB_LT_LB_RB | Slide4 left-bottom left-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_LT_RT_LT | Slide4 left-bottom left-top right-top left-top
EFX_EFFECT_SLIDE4_LB_LT_RT_LB | Slide4 left-bottom left-top right-top left-bottom
EFX_EFFECT_SLIDE4_LB_LT_RT_RT | Slide4 left-bottom left-top right-top right-top
EFX_EFFECT_SLIDE4_LB_LT_RT_RB | Slide4 left-bottom left-top right-top right-bottom
EFX_EFFECT_SLIDE4_LB_LT_RB_LT | Slide4 left-bottom left-top right-bottom left-top
EFX_EFFECT_SLIDE4_LB_LT_RB_LB | Slide4 left-bottom left-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_LT_RB_RT | Slide4 left-bottom left-top right-bottom right-top
EFX_EFFECT_SLIDE4_LB_LT_RB_RB | Slide4 left-bottom left-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_LB_LT_LT | Slide4 left-bottom left-bottom left-top left-top
EFX_EFFECT_SLIDE4_LB_LB_LT_LB | Slide4 left-bottom left-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_LB_LB_LT_RT | Slide4 left-bottom left-bottom left-top right-top
EFX_EFFECT_SLIDE4_LB_LB_LT_RB | Slide4 left-bottom left-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_LB_LB_LB_LT | Slide4 left-bottom left-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_LB_LB_LB_LB | Slide4 left-bottom left-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_LB_LB_RT | Slide4 left-bottom left-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_LB_LB_LB_RB | Slide4 left-bottom left-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_LB_RT_LT | Slide4 left-bottom left-bottom right-top left-top
EFX_EFFECT_SLIDE4_LB_LB_RT_LB | Slide4 left-bottom left-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_LB_LB_RT_RT | Slide4 left-bottom left-bottom right-top right-top
EFX_EFFECT_SLIDE4_LB_LB_RT_RB | Slide4 left-bottom left-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_LB_LB_RB_LT | Slide4 left-bottom left-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_LB_LB_RB_LB | Slide4 left-bottom left-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_LB_RB_RT | Slide4 left-bottom left-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_LB_LB_RB_RB | Slide4 left-bottom left-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_RT_LT_LT | Slide4 left-bottom right-top left-top left-top
EFX_EFFECT_SLIDE4_LB_RT_LT_LB | Slide4 left-bottom right-top left-top left-bottom
EFX_EFFECT_SLIDE4_LB_RT_LT_RT | Slide4 left-bottom right-top left-top right-top
EFX_EFFECT_SLIDE4_LB_RT_LT_RB | Slide4 left-bottom right-top left-top right-bottom
EFX_EFFECT_SLIDE4_LB_RT_LB_LT | Slide4 left-bottom right-top left-bottom left-top
EFX_EFFECT_SLIDE4_LB_RT_LB_LB | Slide4 left-bottom right-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_RT_LB_RT | Slide4 left-bottom right-top left-bottom right-top
EFX_EFFECT_SLIDE4_LB_RT_LB_RB | Slide4 left-bottom right-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_RT_RT_LT | Slide4 left-bottom right-top right-top left-top
EFX_EFFECT_SLIDE4_LB_RT_RT_LB | Slide4 left-bottom right-top right-top left-bottom
EFX_EFFECT_SLIDE4_LB_RT_RT_RT | Slide4 left-bottom right-top right-top right-top
EFX_EFFECT_SLIDE4_LB_RT_RT_RB | Slide4 left-bottom right-top right-top right-bottom
EFX_EFFECT_SLIDE4_LB_RT_RB_LT | Slide4 left-bottom right-top right-bottom left-top
EFX_EFFECT_SLIDE4_LB_RT_RB_LB | Slide4 left-bottom right-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_RT_RB_RT | Slide4 left-bottom right-top right-bottom right-top
EFX_EFFECT_SLIDE4_LB_RT_RB_RB | Slide4 left-bottom right-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_RB_LT_LT | Slide4 left-bottom right-bottom left-top left-top
EFX_EFFECT_SLIDE4_LB_RB_LT_LB | Slide4 left-bottom right-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_LB_RB_LT_RT | Slide4 left-bottom right-bottom left-top right-top
EFX_EFFECT_SLIDE4_LB_RB_LT_RB | Slide4 left-bottom right-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_LB_RB_LB_LT | Slide4 left-bottom right-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_LB_RB_LB_LB | Slide4 left-bottom right-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_RB_LB_RT | Slide4 left-bottom right-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_LB_RB_LB_RB | Slide4 left-bottom right-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_LB_RB_RT_LT | Slide4 left-bottom right-bottom right-top left-top
EFX_EFFECT_SLIDE4_LB_RB_RT_LB | Slide4 left-bottom right-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_LB_RB_RT_RT | Slide4 left-bottom right-bottom right-top right-top
EFX_EFFECT_SLIDE4_LB_RB_RT_RB | Slide4 left-bottom right-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_LB_RB_RB_LT | Slide4 left-bottom right-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_LB_RB_RB_LB | Slide4 left-bottom right-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_LB_RB_RB_RT | Slide4 left-bottom right-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_LB_RB_RB_RB | Slide4 left-bottom right-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_LT_LT_LT | Slide4 right-top left-top left-top left-top
EFX_EFFECT_SLIDE4_RT_LT_LT_LB | Slide4 right-top left-top left-top left-bottom
EFX_EFFECT_SLIDE4_RT_LT_LT_RT | Slide4 right-top left-top left-top right-top
EFX_EFFECT_SLIDE4_RT_LT_LT_RB | Slide4 right-top left-top left-top right-bottom
EFX_EFFECT_SLIDE4_RT_LT_LB_LT | Slide4 right-top left-top left-bottom left-top
EFX_EFFECT_SLIDE4_RT_LT_LB_LB | Slide4 right-top left-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_LT_LB_RT | Slide4 right-top left-top left-bottom right-top
EFX_EFFECT_SLIDE4_RT_LT_LB_RB | Slide4 right-top left-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_LT_RT_LT | Slide4 right-top left-top right-top left-top
EFX_EFFECT_SLIDE4_RT_LT_RT_LB | Slide4 right-top left-top right-top left-bottom
EFX_EFFECT_SLIDE4_RT_LT_RT_RT | Slide4 right-top left-top right-top right-top
EFX_EFFECT_SLIDE4_RT_LT_RT_RB | Slide4 right-top left-top right-top right-bottom
EFX_EFFECT_SLIDE4_RT_LT_RB_LT | Slide4 right-top left-top right-bottom left-top
EFX_EFFECT_SLIDE4_RT_LT_RB_LB | Slide4 right-top left-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_LT_RB_RT | Slide4 right-top left-top right-bottom right-top
EFX_EFFECT_SLIDE4_RT_LT_RB_RB | Slide4 right-top left-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_LB_LT_LT | Slide4 right-top left-bottom left-top left-top
EFX_EFFECT_SLIDE4_RT_LB_LT_LB | Slide4 right-top left-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_RT_LB_LT_RT | Slide4 right-top left-bottom left-top right-top
EFX_EFFECT_SLIDE4_RT_LB_LT_RB | Slide4 right-top left-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_RT_LB_LB_LT | Slide4 right-top left-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_RT_LB_LB_LB | Slide4 right-top left-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_LB_LB_RT | Slide4 right-top left-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_RT_LB_LB_RB | Slide4 right-top left-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_LB_RT_LT | Slide4 right-top left-bottom right-top left-top
EFX_EFFECT_SLIDE4_RT_LB_RT_LB | Slide4 right-top left-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_RT_LB_RT_RT | Slide4 right-top left-bottom right-top right-top
EFX_EFFECT_SLIDE4_RT_LB_RT_RB | Slide4 right-top left-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_RT_LB_RB_LT | Slide4 right-top left-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_RT_LB_RB_LB | Slide4 right-top left-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_LB_RB_RT | Slide4 right-top left-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_RT_LB_RB_RB | Slide4 right-top left-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_RT_LT_LT | Slide4 right-top right-top left-top left-top
EFX_EFFECT_SLIDE4_RT_RT_LT_LB | Slide4 right-top right-top left-top left-bottom
EFX_EFFECT_SLIDE4_RT_RT_LT_RT | Slide4 right-top right-top left-top right-top
EFX_EFFECT_SLIDE4_RT_RT_LT_RB | Slide4 right-top right-top left-top right-bottom
EFX_EFFECT_SLIDE4_RT_RT_LB_LT | Slide4 right-top right-top left-bottom left-top
EFX_EFFECT_SLIDE4_RT_RT_LB_LB | Slide4 right-top right-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_RT_LB_RT | Slide4 right-top right-top left-bottom right-top
EFX_EFFECT_SLIDE4_RT_RT_LB_RB | Slide4 right-top right-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_RT_RT_LT | Slide4 right-top right-top right-top left-top
EFX_EFFECT_SLIDE4_RT_RT_RT_LB | Slide4 right-top right-top right-top left-bottom
EFX_EFFECT_SLIDE4_RT_RT_RT_RT | Slide4 right-top right-top right-top right-top
EFX_EFFECT_SLIDE4_RT_RT_RT_RB | Slide4 right-top right-top right-top right-bottom
EFX_EFFECT_SLIDE4_RT_RT_RB_LT | Slide4 right-top right-top right-bottom left-top
EFX_EFFECT_SLIDE4_RT_RT_RB_LB | Slide4 right-top right-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_RT_RB_RT | Slide4 right-top right-top right-bottom right-top
EFX_EFFECT_SLIDE4_RT_RT_RB_RB | Slide4 right-top right-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_RB_LT_LT | Slide4 right-top right-bottom left-top left-top
EFX_EFFECT_SLIDE4_RT_RB_LT_LB | Slide4 right-top right-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_RT_RB_LT_RT | Slide4 right-top right-bottom left-top right-top
EFX_EFFECT_SLIDE4_RT_RB_LT_RB | Slide4 right-top right-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_RT_RB_LB_LT | Slide4 right-top right-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_RT_RB_LB_LB | Slide4 right-top right-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_RB_LB_RT | Slide4 right-top right-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_RT_RB_LB_RB | Slide4 right-top right-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_RT_RB_RT_LT | Slide4 right-top right-bottom right-top left-top
EFX_EFFECT_SLIDE4_RT_RB_RT_LB | Slide4 right-top right-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_RT_RB_RT_RT | Slide4 right-top right-bottom right-top right-top
EFX_EFFECT_SLIDE4_RT_RB_RT_RB | Slide4 right-top right-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_RT_RB_RB_LT | Slide4 right-top right-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_RT_RB_RB_LB | Slide4 right-top right-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_RT_RB_RB_RT | Slide4 right-top right-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_RT_RB_RB_RB | Slide4 right-top right-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_LT_LT_LT | Slide4 right-bottom left-top left-top left-top
EFX_EFFECT_SLIDE4_RB_LT_LT_LB | Slide4 right-bottom left-top left-top left-bottom
EFX_EFFECT_SLIDE4_RB_LT_LT_RT | Slide4 right-bottom left-top left-top right-top
EFX_EFFECT_SLIDE4_RB_LT_LT_RB | Slide4 right-bottom left-top left-top right-bottom
EFX_EFFECT_SLIDE4_RB_LT_LB_LT | Slide4 right-bottom left-top left-bottom left-top
EFX_EFFECT_SLIDE4_RB_LT_LB_LB | Slide4 right-bottom left-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_LT_LB_RT | Slide4 right-bottom left-top left-bottom right-top
EFX_EFFECT_SLIDE4_RB_LT_LB_RB | Slide4 right-bottom left-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_LT_RT_LT | Slide4 right-bottom left-top right-top left-top
EFX_EFFECT_SLIDE4_RB_LT_RT_LB | Slide4 right-bottom left-top right-top left-bottom
EFX_EFFECT_SLIDE4_RB_LT_RT_RT | Slide4 right-bottom left-top right-top right-top
EFX_EFFECT_SLIDE4_RB_LT_RT_RB | Slide4 right-bottom left-top right-top right-bottom
EFX_EFFECT_SLIDE4_RB_LT_RB_LT | Slide4 right-bottom left-top right-bottom left-top
EFX_EFFECT_SLIDE4_RB_LT_RB_LB | Slide4 right-bottom left-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_LT_RB_RT | Slide4 right-bottom left-top right-bottom right-top
EFX_EFFECT_SLIDE4_RB_LT_RB_RB | Slide4 right-bottom left-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_LB_LT_LT | Slide4 right-bottom left-bottom left-top left-top
EFX_EFFECT_SLIDE4_RB_LB_LT_LB | Slide4 right-bottom left-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_RB_LB_LT_RT | Slide4 right-bottom left-bottom left-top right-top
EFX_EFFECT_SLIDE4_RB_LB_LT_RB | Slide4 right-bottom left-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_RB_LB_LB_LT | Slide4 right-bottom left-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_RB_LB_LB_LB | Slide4 right-bottom left-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_LB_LB_RT | Slide4 right-bottom left-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_RB_LB_LB_RB | Slide4 right-bottom left-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_LB_RT_LT | Slide4 right-bottom left-bottom right-top left-top
EFX_EFFECT_SLIDE4_RB_LB_RT_LB | Slide4 right-bottom left-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_RB_LB_RT_RT | Slide4 right-bottom left-bottom right-top right-top
EFX_EFFECT_SLIDE4_RB_LB_RT_RB | Slide4 right-bottom left-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_RB_LB_RB_LT | Slide4 right-bottom left-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_RB_LB_RB_LB | Slide4 right-bottom left-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_LB_RB_RT | Slide4 right-bottom left-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_RB_LB_RB_RB | Slide4 right-bottom left-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_RT_LT_LT | Slide4 right-bottom right-top left-top left-top
EFX_EFFECT_SLIDE4_RB_RT_LT_LB | Slide4 right-bottom right-top left-top left-bottom
EFX_EFFECT_SLIDE4_RB_RT_LT_RT | Slide4 right-bottom right-top left-top right-top
EFX_EFFECT_SLIDE4_RB_RT_LT_RB | Slide4 right-bottom right-top left-top right-bottom
EFX_EFFECT_SLIDE4_RB_RT_LB_LT | Slide4 right-bottom right-top left-bottom left-top
EFX_EFFECT_SLIDE4_RB_RT_LB_LB | Slide4 right-bottom right-top left-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_RT_LB_RT | Slide4 right-bottom right-top left-bottom right-top
EFX_EFFECT_SLIDE4_RB_RT_LB_RB | Slide4 right-bottom right-top left-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_RT_RT_LT | Slide4 right-bottom right-top right-top left-top
EFX_EFFECT_SLIDE4_RB_RT_RT_LB | Slide4 right-bottom right-top right-top left-bottom
EFX_EFFECT_SLIDE4_RB_RT_RT_RT | Slide4 right-bottom right-top right-top right-top
EFX_EFFECT_SLIDE4_RB_RT_RT_RB | Slide4 right-bottom right-top right-top right-bottom
EFX_EFFECT_SLIDE4_RB_RT_RB_LT | Slide4 right-bottom right-top right-bottom left-top
EFX_EFFECT_SLIDE4_RB_RT_RB_LB | Slide4 right-bottom right-top right-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_RT_RB_RT | Slide4 right-bottom right-top right-bottom right-top
EFX_EFFECT_SLIDE4_RB_RT_RB_RB | Slide4 right-bottom right-top right-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_RB_LT_LT | Slide4 right-bottom right-bottom left-top left-top
EFX_EFFECT_SLIDE4_RB_RB_LT_LB | Slide4 right-bottom right-bottom left-top left-bottom
EFX_EFFECT_SLIDE4_RB_RB_LT_RT | Slide4 right-bottom right-bottom left-top right-top
EFX_EFFECT_SLIDE4_RB_RB_LT_RB | Slide4 right-bottom right-bottom left-top right-bottom
EFX_EFFECT_SLIDE4_RB_RB_LB_LT | Slide4 right-bottom right-bottom left-bottom left-top
EFX_EFFECT_SLIDE4_RB_RB_LB_LB | Slide4 right-bottom right-bottom left-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_RB_LB_RT | Slide4 right-bottom right-bottom left-bottom right-top
EFX_EFFECT_SLIDE4_RB_RB_LB_RB | Slide4 right-bottom right-bottom left-bottom right-bottom
EFX_EFFECT_SLIDE4_RB_RB_RT_LT | Slide4 right-bottom right-bottom right-top left-top
EFX_EFFECT_SLIDE4_RB_RB_RT_LB | Slide4 right-bottom right-bottom right-top left-bottom
EFX_EFFECT_SLIDE4_RB_RB_RT_RT | Slide4 right-bottom right-bottom right-top right-top
EFX_EFFECT_SLIDE4_RB_RB_RT_RB | Slide4 right-bottom right-bottom right-top right-bottom
EFX_EFFECT_SLIDE4_RB_RB_RB_LT | Slide4 right-bottom right-bottom right-bottom left-top
EFX_EFFECT_SLIDE4_RB_RB_RB_LB | Slide4 right-bottom right-bottom right-bottom left-bottom
EFX_EFFECT_SLIDE4_RB_RB_RB_RT | Slide4 right-bottom right-bottom right-bottom right-top
EFX_EFFECT_SLIDE4_RB_RB_RB_RB | Slide4 right-bottom right-bottom right-bottom right-bottom
EFX_EFFECT_SLIDE_MAX | Number of effects in this class.
Roll class |
EFX_EFFECT_ROLL_L_TO_R | Roll left to right
EFX_EFFECT_ROLL_R_TO_L | Roll right to left
EFX_EFFECT_ROLL_T_TO_B | Roll top to bottom
EFX_EFFECT_ROLL_B_TO_T | Roll bottom to top
EFX_EFFECT_ROLL2_T_R_TO_L_AND_B_L_TO_R | Roll2 top right to left and bottom left to right
EFX_EFFECT_ROLL2_T_L_TO_R_AND_B_R_TO_L | Roll2 top left to right and bottom right to left
EFX_EFFECT_ROLL2_L_B_TO_T_AND_R_T_TO_B | Roll2 left bottom to top and right top to bottom
EFX_EFFECT_ROLL2_L_T_TO_B_AND_R_B_TO_T | Roll2 left top to bottom and right bottom to top
EFX_EFFECT_ROLL4_L_L_L_L | Roll4 left left left left
EFX_EFFECT_ROLL4_L_L_L_R | Roll4 left left left right
EFX_EFFECT_ROLL4_L_L_L_T | Roll4 left left left top
EFX_EFFECT_ROLL4_L_L_L_B | Roll4 left left left bottom
EFX_EFFECT_ROLL4_L_L_R_L | Roll4 left left right left
EFX_EFFECT_ROLL4_L_L_R_R | Roll4 left left right right
EFX_EFFECT_ROLL4_L_L_R_T | Roll4 left left right top
EFX_EFFECT_ROLL4_L_L_R_B | Roll4 left left right bottom
EFX_EFFECT_ROLL4_L_L_T_L | Roll4 left left top left
EFX_EFFECT_ROLL4_L_L_T_R | Roll4 left left top right
EFX_EFFECT_ROLL4_L_L_T_T | Roll4 left left top top
EFX_EFFECT_ROLL4_L_L_T_B | Roll4 left left top bottom
EFX_EFFECT_ROLL4_L_L_B_L | Roll4 left left bottom left
EFX_EFFECT_ROLL4_L_L_B_R | Roll4 left left bottom right
EFX_EFFECT_ROLL4_L_L_B_T | Roll4 left left bottom top
EFX_EFFECT_ROLL4_L_L_B_B | Roll4 left left bottom bottom
EFX_EFFECT_ROLL4_L_R_L_L | Roll4 left right left left
EFX_EFFECT_ROLL4_L_R_L_R | Roll4 left right left right
EFX_EFFECT_ROLL4_L_R_L_T | Roll4 left right left top
EFX_EFFECT_ROLL4_L_R_L_B | Roll4 left right left bottom
EFX_EFFECT_ROLL4_L_R_R_L | Roll4 left right right left
EFX_EFFECT_ROLL4_L_R_R_R | Roll4 left right right right
EFX_EFFECT_ROLL4_L_R_R_T | Roll4 left right right top
EFX_EFFECT_ROLL4_L_R_R_B | Roll4 left right right bottom
EFX_EFFECT_ROLL4_L_R_T_L | Roll4 left right top left
EFX_EFFECT_ROLL4_L_R_T_R | Roll4 left right top right
EFX_EFFECT_ROLL4_L_R_T_T | Roll4 left right top top
EFX_EFFECT_ROLL4_L_R_T_B | Roll4 left right top bottom
EFX_EFFECT_ROLL4_L_R_B_L | Roll4 left right bottom left
EFX_EFFECT_ROLL4_L_R_B_R | Roll4 left right bottom right
EFX_EFFECT_ROLL4_L_R_B_T | Roll4 left right bottom top
EFX_EFFECT_ROLL4_L_R_B_B | Roll4 left right bottom bottom
EFX_EFFECT_ROLL4_L_T_L_L | Roll4 left top left left
EFX_EFFECT_ROLL4_L_T_L_R | Roll4 left top left right
EFX_EFFECT_ROLL4_L_T_L_T | Roll4 left top left top
EFX_EFFECT_ROLL4_L_T_L_B | Roll4 left top left bottom
EFX_EFFECT_ROLL4_L_T_R_L | Roll4 left top right left
EFX_EFFECT_ROLL4_L_T_R_R | Roll4 left top right right
EFX_EFFECT_ROLL4_L_T_R_T | Roll4 left top right top
EFX_EFFECT_ROLL4_L_T_R_B | Roll4 left top right bottom
EFX_EFFECT_ROLL4_L_T_T_L | Roll4 left top top left
EFX_EFFECT_ROLL4_L_T_T_R | Roll4 left top top right
EFX_EFFECT_ROLL4_L_T_T_T | Roll4 left top top top
EFX_EFFECT_ROLL4_L_T_T_B | Roll4 left top top bottom
EFX_EFFECT_ROLL4_L_T_B_L | Roll4 left top bottom left
EFX_EFFECT_ROLL4_L_T_B_R | Roll4 left top bottom right
EFX_EFFECT_ROLL4_L_T_B_T | Roll4 left top bottom top
EFX_EFFECT_ROLL4_L_T_B_B | Roll4 left top bottom bottom
EFX_EFFECT_ROLL4_L_B_L_L | Roll4 left bottom left left
EFX_EFFECT_ROLL4_L_B_L_R | Roll4 left bottom left right
EFX_EFFECT_ROLL4_L_B_L_T | Roll4 left bottom left top
EFX_EFFECT_ROLL4_L_B_L_B | Roll4 left bottom left bottom
EFX_EFFECT_ROLL4_L_B_R_L | Roll4 left bottom right left
EFX_EFFECT_ROLL4_L_B_R_R | Roll4 left bottom right right
EFX_EFFECT_ROLL4_L_B_R_T | Roll4 left bottom right top
EFX_EFFECT_ROLL4_L_B_R_B | Roll4 left bottom right bottom
EFX_EFFECT_ROLL4_L_B_T_L | Roll4 left bottom top left
EFX_EFFECT_ROLL4_L_B_T_R | Roll4 left bottom top right
EFX_EFFECT_ROLL4_L_B_T_T | Roll4 left bottom top top
EFX_EFFECT_ROLL4_L_B_T_B | Roll4 left bottom top bottom
EFX_EFFECT_ROLL4_L_B_B_L | Roll4 left bottom bottom left
EFX_EFFECT_ROLL4_L_B_B_R | Roll4 left bottom bottom right
EFX_EFFECT_ROLL4_L_B_B_T | Roll4 left bottom bottom top
EFX_EFFECT_ROLL4_L_B_B_B | Roll4 left bottom bottom bottom
EFX_EFFECT_ROLL4_R_L_L_L | Roll4 right left left left
EFX_EFFECT_ROLL4_R_L_L_R | Roll4 right left left right
EFX_EFFECT_ROLL4_R_L_L_T | Roll4 right left left top
EFX_EFFECT_ROLL4_R_L_L_B | Roll4 right left left bottom
EFX_EFFECT_ROLL4_R_L_R_L | Roll4 right left right left
EFX_EFFECT_ROLL4_R_L_R_R | Roll4 right left right right
EFX_EFFECT_ROLL4_R_L_R_T | Roll4 right left right top
EFX_EFFECT_ROLL4_R_L_R_B | Roll4 right left right bottom
EFX_EFFECT_ROLL4_R_L_T_L | Roll4 right left top left
EFX_EFFECT_ROLL4_R_L_T_R | Roll4 right left top right
EFX_EFFECT_ROLL4_R_L_T_T | Roll4 right left top top
EFX_EFFECT_ROLL4_R_L_T_B | Roll4 right left top bottom
EFX_EFFECT_ROLL4_R_L_B_L | Roll4 right left bottom left
EFX_EFFECT_ROLL4_R_L_B_R | Roll4 right left bottom right
EFX_EFFECT_ROLL4_R_L_B_T | Roll4 right left bottom top
EFX_EFFECT_ROLL4_R_L_B_B | Roll4 right left bottom bottom
EFX_EFFECT_ROLL4_R_R_L_L | Roll4 right right left left
EFX_EFFECT_ROLL4_R_R_L_R | Roll4 right right left right
EFX_EFFECT_ROLL4_R_R_L_T | Roll4 right right left top
EFX_EFFECT_ROLL4_R_R_L_B | Roll4 right right left bottom
EFX_EFFECT_ROLL4_R_R_R_L | Roll4 right right right left
EFX_EFFECT_ROLL4_R_R_R_R | Roll4 right right right right
EFX_EFFECT_ROLL4_R_R_R_T | Roll4 right right right top
EFX_EFFECT_ROLL4_R_R_R_B | Roll4 right right right bottom
EFX_EFFECT_ROLL4_R_R_T_L | Roll4 right right top left
EFX_EFFECT_ROLL4_R_R_T_R | Roll4 right right top right
EFX_EFFECT_ROLL4_R_R_T_T | Roll4 right right top top
EFX_EFFECT_ROLL4_R_R_T_B | Roll4 right right top bottom
EFX_EFFECT_ROLL4_R_R_B_L | Roll4 right right bottom left
EFX_EFFECT_ROLL4_R_R_B_R | Roll4 right right bottom right
EFX_EFFECT_ROLL4_R_R_B_T | Roll4 right right bottom top
EFX_EFFECT_ROLL4_R_R_B_B | Roll4 right right bottom bottom
EFX_EFFECT_ROLL4_R_T_L_L | Roll4 right top left left
EFX_EFFECT_ROLL4_R_T_L_R | Roll4 right top left right
EFX_EFFECT_ROLL4_R_T_L_T | Roll4 right top left top
EFX_EFFECT_ROLL4_R_T_L_B | Roll4 right top left bottom
EFX_EFFECT_ROLL4_R_T_R_L | Roll4 right top right left
EFX_EFFECT_ROLL4_R_T_R_R | Roll4 right top right right
EFX_EFFECT_ROLL4_R_T_R_T | Roll4 right top right top
EFX_EFFECT_ROLL4_R_T_R_B | Roll4 right top right bottom
EFX_EFFECT_ROLL4_R_T_T_L | Roll4 right top top left
EFX_EFFECT_ROLL4_R_T_T_R | Roll4 right top top right
EFX_EFFECT_ROLL4_R_T_T_T | Roll4 right top top top
EFX_EFFECT_ROLL4_R_T_T_B | Roll4 right top top bottom
EFX_EFFECT_ROLL4_R_T_B_L | Roll4 right top bottom left
EFX_EFFECT_ROLL4_R_T_B_R | Roll4 right top bottom right
EFX_EFFECT_ROLL4_R_T_B_T | Roll4 right top bottom top
EFX_EFFECT_ROLL4_R_T_B_B | Roll4 right top bottom bottom
EFX_EFFECT_ROLL4_R_B_L_L | Roll4 right bottom left left
EFX_EFFECT_ROLL4_R_B_L_R | Roll4 right bottom left right
EFX_EFFECT_ROLL4_R_B_L_T | Roll4 right bottom left top
EFX_EFFECT_ROLL4_R_B_L_B | Roll4 right bottom left bottom
EFX_EFFECT_ROLL4_R_B_R_L | Roll4 right bottom right left
EFX_EFFECT_ROLL4_R_B_R_R | Roll4 right bottom right right
EFX_EFFECT_ROLL4_R_B_R_T | Roll4 right bottom right top
EFX_EFFECT_ROLL4_R_B_R_B | Roll4 right bottom right bottom
EFX_EFFECT_ROLL4_R_B_T_L | Roll4 right bottom top left
EFX_EFFECT_ROLL4_R_B_T_R | Roll4 right bottom top right
EFX_EFFECT_ROLL4_R_B_T_T | Roll4 right bottom top top
EFX_EFFECT_ROLL4_R_B_T_B | Roll4 right bottom top bottom
EFX_EFFECT_ROLL4_R_B_B_L | Roll4 right bottom bottom left
EFX_EFFECT_ROLL4_R_B_B_R | Roll4 right bottom bottom right
EFX_EFFECT_ROLL4_R_B_B_T | Roll4 right bottom bottom top
EFX_EFFECT_ROLL4_R_B_B_B | Roll4 right bottom bottom bottom
EFX_EFFECT_ROLL4_T_L_L_L | Roll4 top left left left
EFX_EFFECT_ROLL4_T_L_L_R | Roll4 top left left right
EFX_EFFECT_ROLL4_T_L_L_T | Roll4 top left left top
EFX_EFFECT_ROLL4_T_L_L_B | Roll4 top left left bottom
EFX_EFFECT_ROLL4_T_L_R_L | Roll4 top left right left
EFX_EFFECT_ROLL4_T_L_R_R | Roll4 top left right right
EFX_EFFECT_ROLL4_T_L_R_T | Roll4 top left right top
EFX_EFFECT_ROLL4_T_L_R_B | Roll4 top left right bottom
EFX_EFFECT_ROLL4_T_L_T_L | Roll4 top left top left
EFX_EFFECT_ROLL4_T_L_T_R | Roll4 top left top right
EFX_EFFECT_ROLL4_T_L_T_T | Roll4 top left top top
EFX_EFFECT_ROLL4_T_L_T_B | Roll4 top left top bottom
EFX_EFFECT_ROLL4_T_L_B_L | Roll4 top left bottom left
EFX_EFFECT_ROLL4_T_L_B_R | Roll4 top left bottom right
EFX_EFFECT_ROLL4_T_L_B_T | Roll4 top left bottom top
EFX_EFFECT_ROLL4_T_L_B_B | Roll4 top left bottom bottom
EFX_EFFECT_ROLL4_T_R_L_L | Roll4 top right left left
EFX_EFFECT_ROLL4_T_R_L_R | Roll4 top right left right
EFX_EFFECT_ROLL4_T_R_L_T | Roll4 top right left top
EFX_EFFECT_ROLL4_T_R_L_B | Roll4 top right left bottom
EFX_EFFECT_ROLL4_T_R_R_L | Roll4 top right right left
EFX_EFFECT_ROLL4_T_R_R_R | Roll4 top right right right
EFX_EFFECT_ROLL4_T_R_R_T | Roll4 top right right top
EFX_EFFECT_ROLL4_T_R_R_B | Roll4 top right right bottom
EFX_EFFECT_ROLL4_T_R_T_L | Roll4 top right top left
EFX_EFFECT_ROLL4_T_R_T_R | Roll4 top right top right
EFX_EFFECT_ROLL4_T_R_T_T | Roll4 top right top top
EFX_EFFECT_ROLL4_T_R_T_B | Roll4 top right top bottom
EFX_EFFECT_ROLL4_T_R_B_L | Roll4 top right bottom left
EFX_EFFECT_ROLL4_T_R_B_R | Roll4 top right bottom right
EFX_EFFECT_ROLL4_T_R_B_T | Roll4 top right bottom top
EFX_EFFECT_ROLL4_T_R_B_B | Roll4 top right bottom bottom
EFX_EFFECT_ROLL4_T_T_L_L | Roll4 top top left left
EFX_EFFECT_ROLL4_T_T_L_R | Roll4 top top left right
EFX_EFFECT_ROLL4_T_T_L_T | Roll4 top top left top
EFX_EFFECT_ROLL4_T_T_L_B | Roll4 top top left bottom
EFX_EFFECT_ROLL4_T_T_R_L | Roll4 top top right left
EFX_EFFECT_ROLL4_T_T_R_R | Roll4 top top right right
EFX_EFFECT_ROLL4_T_T_R_T | Roll4 top top right top
EFX_EFFECT_ROLL4_T_T_R_B | Roll4 top top right bottom
EFX_EFFECT_ROLL4_T_T_T_L | Roll4 top top top left
EFX_EFFECT_ROLL4_T_T_T_R | Roll4 top top top right
EFX_EFFECT_ROLL4_T_T_T_T | Roll4 top top top top
EFX_EFFECT_ROLL4_T_T_T_B | Roll4 top top top bottom
EFX_EFFECT_ROLL4_T_T_B_L | Roll4 top top bottom left
EFX_EFFECT_ROLL4_T_T_B_R | Roll4 top top bottom right
EFX_EFFECT_ROLL4_T_T_B_T | Roll4 top top bottom top
EFX_EFFECT_ROLL4_T_T_B_B | Roll4 top top bottom bottom
EFX_EFFECT_ROLL4_T_B_L_L | Roll4 top bottom left left
EFX_EFFECT_ROLL4_T_B_L_R | Roll4 top bottom left right
EFX_EFFECT_ROLL4_T_B_L_T | Roll4 top bottom left top
EFX_EFFECT_ROLL4_T_B_L_B | Roll4 top bottom left bottom
EFX_EFFECT_ROLL4_T_B_R_L | Roll4 top bottom right left
EFX_EFFECT_ROLL4_T_B_R_R | Roll4 top bottom right right
EFX_EFFECT_ROLL4_T_B_R_T | Roll4 top bottom right top
EFX_EFFECT_ROLL4_T_B_R_B | Roll4 top bottom right bottom
EFX_EFFECT_ROLL4_T_B_T_L | Roll4 top bottom top left
EFX_EFFECT_ROLL4_T_B_T_R | Roll4 top bottom top right
EFX_EFFECT_ROLL4_T_B_T_T | Roll4 top bottom top top
EFX_EFFECT_ROLL4_T_B_T_B | Roll4 top bottom top bottom
EFX_EFFECT_ROLL4_T_B_B_L | Roll4 top bottom bottom left
EFX_EFFECT_ROLL4_T_B_B_R | Roll4 top bottom bottom right
EFX_EFFECT_ROLL4_T_B_B_T | Roll4 top bottom bottom top
EFX_EFFECT_ROLL4_T_B_B_B | Roll4 top bottom bottom bottom
EFX_EFFECT_ROLL4_B_L_L_L | Roll4 bottom left left left
EFX_EFFECT_ROLL4_B_L_L_R | Roll4 bottom left left right
EFX_EFFECT_ROLL4_B_L_L_T | Roll4 bottom left left top
EFX_EFFECT_ROLL4_B_L_L_B | Roll4 bottom left left bottom
EFX_EFFECT_ROLL4_B_L_R_L | Roll4 bottom left right left
EFX_EFFECT_ROLL4_B_L_R_R | Roll4 bottom left right right
EFX_EFFECT_ROLL4_B_L_R_T | Roll4 bottom left right top
EFX_EFFECT_ROLL4_B_L_R_B | Roll4 bottom left right bottom
EFX_EFFECT_ROLL4_B_L_T_L | Roll4 bottom left top left
EFX_EFFECT_ROLL4_B_L_T_R | Roll4 bottom left top right
EFX_EFFECT_ROLL4_B_L_T_T | Roll4 bottom left top top
EFX_EFFECT_ROLL4_B_L_T_B | Roll4 bottom left top bottom
EFX_EFFECT_ROLL4_B_L_B_L | Roll4 bottom left bottom left
EFX_EFFECT_ROLL4_B_L_B_R | Roll4 bottom left bottom right
EFX_EFFECT_ROLL4_B_L_B_T | Roll4 bottom left bottom top
EFX_EFFECT_ROLL4_B_L_B_B | Roll4 bottom left bottom bottom
EFX_EFFECT_ROLL4_B_R_L_L | Roll4 bottom right left left
EFX_EFFECT_ROLL4_B_R_L_R | Roll4 bottom right left right
EFX_EFFECT_ROLL4_B_R_L_T | Roll4 bottom right left top
EFX_EFFECT_ROLL4_B_R_L_B | Roll4 bottom right left bottom
EFX_EFFECT_ROLL4_B_R_R_L | Roll4 bottom right right left
EFX_EFFECT_ROLL4_B_R_R_R | Roll4 bottom right right right
EFX_EFFECT_ROLL4_B_R_R_T | Roll4 bottom right right top
EFX_EFFECT_ROLL4_B_R_R_B | Roll4 bottom right right bottom
EFX_EFFECT_ROLL4_B_R_T_L | Roll4 bottom right top left
EFX_EFFECT_ROLL4_B_R_T_R | Roll4 bottom right top right
EFX_EFFECT_ROLL4_B_R_T_T | Roll4 bottom right top top
EFX_EFFECT_ROLL4_B_R_T_B | Roll4 bottom right top bottom
EFX_EFFECT_ROLL4_B_R_B_L | Roll4 bottom right bottom left
EFX_EFFECT_ROLL4_B_R_B_R | Roll4 bottom right bottom right
EFX_EFFECT_ROLL4_B_R_B_T | Roll4 bottom right bottom top
EFX_EFFECT_ROLL4_B_R_B_B | Roll4 bottom right bottom bottom
EFX_EFFECT_ROLL4_B_T_L_L | Roll4 bottom top left left
EFX_EFFECT_ROLL4_B_T_L_R | Roll4 bottom top left right
EFX_EFFECT_ROLL4_B_T_L_T | Roll4 bottom top left top
EFX_EFFECT_ROLL4_B_T_L_B | Roll4 bottom top left bottom
EFX_EFFECT_ROLL4_B_T_R_L | Roll4 bottom top right left
EFX_EFFECT_ROLL4_B_T_R_R | Roll4 bottom top right right
EFX_EFFECT_ROLL4_B_T_R_T | Roll4 bottom top right top
EFX_EFFECT_ROLL4_B_T_R_B | Roll4 bottom top right bottom
EFX_EFFECT_ROLL4_B_T_T_L | Roll4 bottom top top left
EFX_EFFECT_ROLL4_B_T_T_R | Roll4 bottom top top right
EFX_EFFECT_ROLL4_B_T_T_T | Roll4 bottom top top top
EFX_EFFECT_ROLL4_B_T_T_B | Roll4 bottom top top bottom
EFX_EFFECT_ROLL4_B_T_B_L | Roll4 bottom top bottom left
EFX_EFFECT_ROLL4_B_T_B_R | Roll4 bottom top bottom right
EFX_EFFECT_ROLL4_B_T_B_T | Roll4 bottom top bottom top
EFX_EFFECT_ROLL4_B_T_B_B | Roll4 bottom top bottom bottom
EFX_EFFECT_ROLL4_B_B_L_L | Roll4 bottom bottom left left
EFX_EFFECT_ROLL4_B_B_L_R | Roll4 bottom bottom left right
EFX_EFFECT_ROLL4_B_B_L_T | Roll4 bottom bottom left top
EFX_EFFECT_ROLL4_B_B_L_B | Roll4 bottom bottom left bottom
EFX_EFFECT_ROLL4_B_B_R_L | Roll4 bottom bottom right left
EFX_EFFECT_ROLL4_B_B_R_R | Roll4 bottom bottom right right
EFX_EFFECT_ROLL4_B_B_R_T | Roll4 bottom bottom right top
EFX_EFFECT_ROLL4_B_B_R_B | Roll4 bottom bottom right bottom
EFX_EFFECT_ROLL4_B_B_T_L | Roll4 bottom bottom top left
EFX_EFFECT_ROLL4_B_B_T_R | Roll4 bottom bottom top right
EFX_EFFECT_ROLL4_B_B_T_T | Roll4 bottom bottom top top
EFX_EFFECT_ROLL4_B_B_T_B | Roll4 bottom bottom top bottom
EFX_EFFECT_ROLL4_B_B_B_L | Roll4 bottom bottom bottom left
EFX_EFFECT_ROLL4_B_B_B_R | Roll4 bottom bottom bottom right
EFX_EFFECT_ROLL4_B_B_B_T | Roll4 bottom bottom bottom top
EFX_EFFECT_ROLL4_B_B_B_B | Roll4 bottom bottom bottom bottom
EFX_EFFECT_ROLL_MAX | Number of effects in this class.
Rotate class |
EFX_EFFECT_ROTATE_L_TO_R | Rotate left to right
EFX_EFFECT_ROTATE_R_TO_L | Rotate right to left
EFX_EFFECT_ROTATE_T_TO_B | Rotate top to bottom
EFX_EFFECT_ROTATE_B_TO_T | Rotate bottom to top
EFX_EFFECT_ROTATE4_L_L_L_L | Rotate4 left left left left
EFX_EFFECT_ROTATE4_L_L_L_R | Rotate4 left left left right
EFX_EFFECT_ROTATE4_L_L_L_T | Rotate4 left left left top
EFX_EFFECT_ROTATE4_L_L_L_B | Rotate4 left left left bottom
EFX_EFFECT_ROTATE4_L_L_R_L | Rotate4 left left right left
EFX_EFFECT_ROTATE4_L_L_R_R | Rotate4 left left right right
EFX_EFFECT_ROTATE4_L_L_R_T | Rotate4 left left right top
EFX_EFFECT_ROTATE4_L_L_R_B | Rotate4 left left right bottom
EFX_EFFECT_ROTATE4_L_L_T_L | Rotate4 left left top left
EFX_EFFECT_ROTATE4_L_L_T_R | Rotate4 left left top right
EFX_EFFECT_ROTATE4_L_L_T_T | Rotate4 left left top top
EFX_EFFECT_ROTATE4_L_L_T_B | Rotate4 left left top bottom
EFX_EFFECT_ROTATE4_L_L_B_L | Rotate4 left left bottom left
EFX_EFFECT_ROTATE4_L_L_B_R | Rotate4 left left bottom right
EFX_EFFECT_ROTATE4_L_L_B_T | Rotate4 left left bottom top
EFX_EFFECT_ROTATE4_L_L_B_B | Rotate4 left left bottom bottom
EFX_EFFECT_ROTATE4_L_R_L_L | Rotate4 left right left left
EFX_EFFECT_ROTATE4_L_R_L_R | Rotate4 left right left right
EFX_EFFECT_ROTATE4_L_R_L_T | Rotate4 left right left top
EFX_EFFECT_ROTATE4_L_R_L_B | Rotate4 left right left bottom
EFX_EFFECT_ROTATE4_L_R_R_L | Rotate4 left right right left
EFX_EFFECT_ROTATE4_L_R_R_R | Rotate4 left right right right
EFX_EFFECT_ROTATE4_L_R_R_T | Rotate4 left right right top
EFX_EFFECT_ROTATE4_L_R_R_B | Rotate4 left right right bottom
EFX_EFFECT_ROTATE4_L_R_T_L | Rotate4 left right top left
EFX_EFFECT_ROTATE4_L_R_T_R | Rotate4 left right top right
EFX_EFFECT_ROTATE4_L_R_T_T | Rotate4 left right top top
EFX_EFFECT_ROTATE4_L_R_T_B | Rotate4 left right top bottom
EFX_EFFECT_ROTATE4_L_R_B_L | Rotate4 left right bottom left
EFX_EFFECT_ROTATE4_L_R_B_R | Rotate4 left right bottom right
EFX_EFFECT_ROTATE4_L_R_B_T | Rotate4 left right bottom top
EFX_EFFECT_ROTATE4_L_R_B_B | Rotate4 left right bottom bottom
EFX_EFFECT_ROTATE4_L_T_L_L | Rotate4 left top left left
EFX_EFFECT_ROTATE4_L_T_L_R | Rotate4 left top left right
EFX_EFFECT_ROTATE4_L_T_L_T | Rotate4 left top left top
EFX_EFFECT_ROTATE4_L_T_L_B | Rotate4 left top left bottom
EFX_EFFECT_ROTATE4_L_T_R_L | Rotate4 left top right left
EFX_EFFECT_ROTATE4_L_T_R_R | Rotate4 left top right right
EFX_EFFECT_ROTATE4_L_T_R_T | Rotate4 left top right top
EFX_EFFECT_ROTATE4_L_T_R_B | Rotate4 left top right bottom
EFX_EFFECT_ROTATE4_L_T_T_L | Rotate4 left top top left
EFX_EFFECT_ROTATE4_L_T_T_R | Rotate4 left top top right
EFX_EFFECT_ROTATE4_L_T_T_T | Rotate4 left top top top
EFX_EFFECT_ROTATE4_L_T_T_B | Rotate4 left top top bottom
EFX_EFFECT_ROTATE4_L_T_B_L | Rotate4 left top bottom left
EFX_EFFECT_ROTATE4_L_T_B_R | Rotate4 left top bottom right
EFX_EFFECT_ROTATE4_L_T_B_T | Rotate4 left top bottom top
EFX_EFFECT_ROTATE4_L_T_B_B | Rotate4 left top bottom bottom
EFX_EFFECT_ROTATE4_L_B_L_L | Rotate4 left bottom left left
EFX_EFFECT_ROTATE4_L_B_L_R | Rotate4 left bottom left right
EFX_EFFECT_ROTATE4_L_B_L_T | Rotate4 left bottom left top
EFX_EFFECT_ROTATE4_L_B_L_B | Rotate4 left bottom left bottom
EFX_EFFECT_ROTATE4_L_B_R_L | Rotate4 left bottom right left
EFX_EFFECT_ROTATE4_L_B_R_R | Rotate4 left bottom right right
EFX_EFFECT_ROTATE4_L_B_R_T | Rotate4 left bottom right top
EFX_EFFECT_ROTATE4_L_B_R_B | Rotate4 left bottom right bottom
EFX_EFFECT_ROTATE4_L_B_T_L | Rotate4 left bottom top left
EFX_EFFECT_ROTATE4_L_B_T_R | Rotate4 left bottom top right
EFX_EFFECT_ROTATE4_L_B_T_T | Rotate4 left bottom top top
EFX_EFFECT_ROTATE4_L_B_T_B | Rotate4 left bottom top bottom
EFX_EFFECT_ROTATE4_L_B_B_L | Rotate4 left bottom bottom left
EFX_EFFECT_ROTATE4_L_B_B_R | Rotate4 left bottom bottom right
EFX_EFFECT_ROTATE4_L_B_B_T | Rotate4 left bottom bottom top
EFX_EFFECT_ROTATE4_L_B_B_B | Rotate4 left bottom bottom bottom
EFX_EFFECT_ROTATE4_R_L_L_L | Rotate4 right left left left
EFX_EFFECT_ROTATE4_R_L_L_R | Rotate4 right left left right
EFX_EFFECT_ROTATE4_R_L_L_T | Rotate4 right left left top
EFX_EFFECT_ROTATE4_R_L_L_B | Rotate4 right left left bottom
EFX_EFFECT_ROTATE4_R_L_R_L | Rotate4 right left right left
EFX_EFFECT_ROTATE4_R_L_R_R | Rotate4 right left right right
EFX_EFFECT_ROTATE4_R_L_R_T | Rotate4 right left right top
EFX_EFFECT_ROTATE4_R_L_R_B | Rotate4 right left right bottom
EFX_EFFECT_ROTATE4_R_L_T_L | Rotate4 right left top left
EFX_EFFECT_ROTATE4_R_L_T_R | Rotate4 right left top right
EFX_EFFECT_ROTATE4_R_L_T_T | Rotate4 right left top top
EFX_EFFECT_ROTATE4_R_L_T_B | Rotate4 right left top bottom
EFX_EFFECT_ROTATE4_R_L_B_L | Rotate4 right left bottom left
EFX_EFFECT_ROTATE4_R_L_B_R | Rotate4 right left bottom right
EFX_EFFECT_ROTATE4_R_L_B_T | Rotate4 right left bottom top
EFX_EFFECT_ROTATE4_R_L_B_B | Rotate4 right left bottom bottom
EFX_EFFECT_ROTATE4_R_R_L_L | Rotate4 right right left left
EFX_EFFECT_ROTATE4_R_R_L_R | Rotate4 right right left right
EFX_EFFECT_ROTATE4_R_R_L_T | Rotate4 right right left top
EFX_EFFECT_ROTATE4_R_R_L_B | Rotate4 right right left bottom
EFX_EFFECT_ROTATE4_R_R_R_L | Rotate4 right right right left
EFX_EFFECT_ROTATE4_R_R_R_R | Rotate4 right right right right
EFX_EFFECT_ROTATE4_R_R_R_T | Rotate4 right right right top
EFX_EFFECT_ROTATE4_R_R_R_B | Rotate4 right right right bottom
EFX_EFFECT_ROTATE4_R_R_T_L | Rotate4 right right top left
EFX_EFFECT_ROTATE4_R_R_T_R | Rotate4 right right top right
EFX_EFFECT_ROTATE4_R_R_T_T | Rotate4 right right top top
EFX_EFFECT_ROTATE4_R_R_T_B | Rotate4 right right top bottom
EFX_EFFECT_ROTATE4_R_R_B_L | Rotate4 right right bottom left
EFX_EFFECT_ROTATE4_R_R_B_R | Rotate4 right right bottom right
EFX_EFFECT_ROTATE4_R_R_B_T | Rotate4 right right bottom top
EFX_EFFECT_ROTATE4_R_R_B_B | Rotate4 right right bottom bottom
EFX_EFFECT_ROTATE4_R_T_L_L | Rotate4 right top left left
EFX_EFFECT_ROTATE4_R_T_L_R | Rotate4 right top left right
EFX_EFFECT_ROTATE4_R_T_L_T | Rotate4 right top left top
EFX_EFFECT_ROTATE4_R_T_L_B | Rotate4 right top left bottom
EFX_EFFECT_ROTATE4_R_T_R_L | Rotate4 right top right left
EFX_EFFECT_ROTATE4_R_T_R_R | Rotate4 right top right right
EFX_EFFECT_ROTATE4_R_T_R_T | Rotate4 right top right top
EFX_EFFECT_ROTATE4_R_T_R_B | Rotate4 right top right bottom
EFX_EFFECT_ROTATE4_R_T_T_L | Rotate4 right top top left
EFX_EFFECT_ROTATE4_R_T_T_R | Rotate4 right top top right
EFX_EFFECT_ROTATE4_R_T_T_T | Rotate4 right top top top
EFX_EFFECT_ROTATE4_R_T_T_B | Rotate4 right top top bottom
EFX_EFFECT_ROTATE4_R_T_B_L | Rotate4 right top bottom left
EFX_EFFECT_ROTATE4_R_T_B_R | Rotate4 right top bottom right
EFX_EFFECT_ROTATE4_R_T_B_T | Rotate4 right top bottom top
EFX_EFFECT_ROTATE4_R_T_B_B | Rotate4 right top bottom bottom
EFX_EFFECT_ROTATE4_R_B_L_L | Rotate4 right bottom left left
EFX_EFFECT_ROTATE4_R_B_L_R | Rotate4 right bottom left right
EFX_EFFECT_ROTATE4_R_B_L_T | Rotate4 right bottom left top
EFX_EFFECT_ROTATE4_R_B_L_B | Rotate4 right bottom left bottom
EFX_EFFECT_ROTATE4_R_B_R_L | Rotate4 right bottom right left
EFX_EFFECT_ROTATE4_R_B_R_R | Rotate4 right bottom right right
EFX_EFFECT_ROTATE4_R_B_R_T | Rotate4 right bottom right top
EFX_EFFECT_ROTATE4_R_B_R_B | Rotate4 right bottom right bottom
EFX_EFFECT_ROTATE4_R_B_T_L | Rotate4 right bottom top left
EFX_EFFECT_ROTATE4_R_B_T_R | Rotate4 right bottom top right
EFX_EFFECT_ROTATE4_R_B_T_T | Rotate4 right bottom top top
EFX_EFFECT_ROTATE4_R_B_T_B | Rotate4 right bottom top bottom
EFX_EFFECT_ROTATE4_R_B_B_L | Rotate4 right bottom bottom left
EFX_EFFECT_ROTATE4_R_B_B_R | Rotate4 right bottom bottom right
EFX_EFFECT_ROTATE4_R_B_B_T | Rotate4 right bottom bottom top
EFX_EFFECT_ROTATE4_R_B_B_B | Rotate4 right bottom bottom bottom
EFX_EFFECT_ROTATE4_T_L_L_L | Rotate4 top left left left
EFX_EFFECT_ROTATE4_T_L_L_R | Rotate4 top left left right
EFX_EFFECT_ROTATE4_T_L_L_T | Rotate4 top left left top
EFX_EFFECT_ROTATE4_T_L_L_B | Rotate4 top left left bottom
EFX_EFFECT_ROTATE4_T_L_R_L | Rotate4 top left right left
EFX_EFFECT_ROTATE4_T_L_R_R | Rotate4 top left right right
EFX_EFFECT_ROTATE4_T_L_R_T | Rotate4 top left right top
EFX_EFFECT_ROTATE4_T_L_R_B | Rotate4 top left right bottom
EFX_EFFECT_ROTATE4_T_L_T_L | Rotate4 top left top left
EFX_EFFECT_ROTATE4_T_L_T_R | Rotate4 top left top right
EFX_EFFECT_ROTATE4_T_L_T_T | Rotate4 top left top top
EFX_EFFECT_ROTATE4_T_L_T_B | Rotate4 top left top bottom
EFX_EFFECT_ROTATE4_T_L_B_L | Rotate4 top left bottom left
EFX_EFFECT_ROTATE4_T_L_B_R | Rotate4 top left bottom right
EFX_EFFECT_ROTATE4_T_L_B_T | Rotate4 top left bottom top
EFX_EFFECT_ROTATE4_T_L_B_B | Rotate4 top left bottom bottom
EFX_EFFECT_ROTATE4_T_R_L_L | Rotate4 top right left left
EFX_EFFECT_ROTATE4_T_R_L_R | Rotate4 top right left right
EFX_EFFECT_ROTATE4_T_R_L_T | Rotate4 top right left top
EFX_EFFECT_ROTATE4_T_R_L_B | Rotate4 top right left bottom
EFX_EFFECT_ROTATE4_T_R_R_L | Rotate4 top right right left
EFX_EFFECT_ROTATE4_T_R_R_R | Rotate4 top right right right
EFX_EFFECT_ROTATE4_T_R_R_T | Rotate4 top right right top
EFX_EFFECT_ROTATE4_T_R_R_B | Rotate4 top right right bottom
EFX_EFFECT_ROTATE4_T_R_T_L | Rotate4 top right top left
EFX_EFFECT_ROTATE4_T_R_T_R | Rotate4 top right top right
EFX_EFFECT_ROTATE4_T_R_T_T | Rotate4 top right top top
EFX_EFFECT_ROTATE4_T_R_T_B | Rotate4 top right top bottom
EFX_EFFECT_ROTATE4_T_R_B_L | Rotate4 top right bottom left
EFX_EFFECT_ROTATE4_T_R_B_R | Rotate4 top right bottom right
EFX_EFFECT_ROTATE4_T_R_B_T | Rotate4 top right bottom top
EFX_EFFECT_ROTATE4_T_R_B_B | Rotate4 top right bottom bottom
EFX_EFFECT_ROTATE4_T_T_L_L | Rotate4 top top left left
EFX_EFFECT_ROTATE4_T_T_L_R | Rotate4 top top left right
EFX_EFFECT_ROTATE4_T_T_L_T | Rotate4 top top left top
EFX_EFFECT_ROTATE4_T_T_L_B | Rotate4 top top left bottom
EFX_EFFECT_ROTATE4_T_T_R_L | Rotate4 top top right left
EFX_EFFECT_ROTATE4_T_T_R_R | Rotate4 top top right right
EFX_EFFECT_ROTATE4_T_T_R_T | Rotate4 top top right top
EFX_EFFECT_ROTATE4_T_T_R_B | Rotate4 top top right bottom
EFX_EFFECT_ROTATE4_T_T_T_L | Rotate4 top top top left
EFX_EFFECT_ROTATE4_T_T_T_R | Rotate4 top top top right
EFX_EFFECT_ROTATE4_T_T_T_T | Rotate4 top top top top
EFX_EFFECT_ROTATE4_T_T_T_B | Rotate4 top top top bottom
EFX_EFFECT_ROTATE4_T_T_B_L | Rotate4 top top bottom left
EFX_EFFECT_ROTATE4_T_T_B_R | Rotate4 top top bottom right
EFX_EFFECT_ROTATE4_T_T_B_T | Rotate4 top top bottom top
EFX_EFFECT_ROTATE4_T_T_B_B | Rotate4 top top bottom bottom
EFX_EFFECT_ROTATE4_T_B_L_L | Rotate4 top bottom left left
EFX_EFFECT_ROTATE4_T_B_L_R | Rotate4 top bottom left right
EFX_EFFECT_ROTATE4_T_B_L_T | Rotate4 top bottom left top
EFX_EFFECT_ROTATE4_T_B_L_B | Rotate4 top bottom left bottom
EFX_EFFECT_ROTATE4_T_B_R_L | Rotate4 top bottom right left
EFX_EFFECT_ROTATE4_T_B_R_R | Rotate4 top bottom right right
EFX_EFFECT_ROTATE4_T_B_R_T | Rotate4 top bottom right top
EFX_EFFECT_ROTATE4_T_B_R_B | Rotate4 top bottom right bottom
EFX_EFFECT_ROTATE4_T_B_T_L | Rotate4 top bottom top left
EFX_EFFECT_ROTATE4_T_B_T_R | Rotate4 top bottom top right
EFX_EFFECT_ROTATE4_T_B_T_T | Rotate4 top bottom top top
EFX_EFFECT_ROTATE4_T_B_T_B | Rotate4 top bottom top bottom
EFX_EFFECT_ROTATE4_T_B_B_L | Rotate4 top bottom bottom left
EFX_EFFECT_ROTATE4_T_B_B_R | Rotate4 top bottom bottom right
EFX_EFFECT_ROTATE4_T_B_B_T | Rotate4 top bottom bottom top
EFX_EFFECT_ROTATE4_T_B_B_B | Rotate4 top bottom bottom bottom
EFX_EFFECT_ROTATE4_B_L_L_L | Rotate4 bottom left left left
EFX_EFFECT_ROTATE4_B_L_L_R | Rotate4 bottom left left right
EFX_EFFECT_ROTATE4_B_L_L_T | Rotate4 bottom left left top
EFX_EFFECT_ROTATE4_B_L_L_B | Rotate4 bottom left left bottom
EFX_EFFECT_ROTATE4_B_L_R_L | Rotate4 bottom left right left
EFX_EFFECT_ROTATE4_B_L_R_R | Rotate4 bottom left right right
EFX_EFFECT_ROTATE4_B_L_R_T | Rotate4 bottom left right top
EFX_EFFECT_ROTATE4_B_L_R_B | Rotate4 bottom left right bottom
EFX_EFFECT_ROTATE4_B_L_T_L | Rotate4 bottom left top left
EFX_EFFECT_ROTATE4_B_L_T_R | Rotate4 bottom left top right
EFX_EFFECT_ROTATE4_B_L_T_T | Rotate4 bottom left top top
EFX_EFFECT_ROTATE4_B_L_T_B | Rotate4 bottom left top bottom
EFX_EFFECT_ROTATE4_B_L_B_L | Rotate4 bottom left bottom left
EFX_EFFECT_ROTATE4_B_L_B_R | Rotate4 bottom left bottom right
EFX_EFFECT_ROTATE4_B_L_B_T | Rotate4 bottom left bottom top
EFX_EFFECT_ROTATE4_B_L_B_B | Rotate4 bottom left bottom bottom
EFX_EFFECT_ROTATE4_B_R_L_L | Rotate4 bottom right left left
EFX_EFFECT_ROTATE4_B_R_L_R | Rotate4 bottom right left right
EFX_EFFECT_ROTATE4_B_R_L_T | Rotate4 bottom right left top
EFX_EFFECT_ROTATE4_B_R_L_B | Rotate4 bottom right left bottom
EFX_EFFECT_ROTATE4_B_R_R_L | Rotate4 bottom right right left
EFX_EFFECT_ROTATE4_B_R_R_R | Rotate4 bottom right right right
EFX_EFFECT_ROTATE4_B_R_R_T | Rotate4 bottom right right top
EFX_EFFECT_ROTATE4_B_R_R_B | Rotate4 bottom right right bottom
EFX_EFFECT_ROTATE4_B_R_T_L | Rotate4 bottom right top left
EFX_EFFECT_ROTATE4_B_R_T_R | Rotate4 bottom right top right
EFX_EFFECT_ROTATE4_B_R_T_T | Rotate4 bottom right top top
EFX_EFFECT_ROTATE4_B_R_T_B | Rotate4 bottom right top bottom
EFX_EFFECT_ROTATE4_B_R_B_L | Rotate4 bottom right bottom left
EFX_EFFECT_ROTATE4_B_R_B_R | Rotate4 bottom right bottom right
EFX_EFFECT_ROTATE4_B_R_B_T | Rotate4 bottom right bottom top
EFX_EFFECT_ROTATE4_B_R_B_B | Rotate4 bottom right bottom bottom
EFX_EFFECT_ROTATE4_B_T_L_L | Rotate4 bottom top left left
EFX_EFFECT_ROTATE4_B_T_L_R | Rotate4 bottom top left right
EFX_EFFECT_ROTATE4_B_T_L_T | Rotate4 bottom top left top
EFX_EFFECT_ROTATE4_B_T_L_B | Rotate4 bottom top left bottom
EFX_EFFECT_ROTATE4_B_T_R_L | Rotate4 bottom top right left
EFX_EFFECT_ROTATE4_B_T_R_R | Rotate4 bottom top right right
EFX_EFFECT_ROTATE4_B_T_R_T | Rotate4 bottom top right top
EFX_EFFECT_ROTATE4_B_T_R_B | Rotate4 bottom top right bottom
EFX_EFFECT_ROTATE4_B_T_T_L | Rotate4 bottom top top left
EFX_EFFECT_ROTATE4_B_T_T_R | Rotate4 bottom top top right
EFX_EFFECT_ROTATE4_B_T_T_T | Rotate4 bottom top top top
EFX_EFFECT_ROTATE4_B_T_T_B | Rotate4 bottom top top bottom
EFX_EFFECT_ROTATE4_B_T_B_L | Rotate4 bottom top bottom left
EFX_EFFECT_ROTATE4_B_T_B_R | Rotate4 bottom top bottom right
EFX_EFFECT_ROTATE4_B_T_B_T | Rotate4 bottom top bottom top
EFX_EFFECT_ROTATE4_B_T_B_B | Rotate4 bottom top bottom bottom
EFX_EFFECT_ROTATE4_B_B_L_L | Rotate4 bottom bottom left left
EFX_EFFECT_ROTATE4_B_B_L_R | Rotate4 bottom bottom left right
EFX_EFFECT_ROTATE4_B_B_L_T | Rotate4 bottom bottom left top
EFX_EFFECT_ROTATE4_B_B_L_B | Rotate4 bottom bottom left bottom
EFX_EFFECT_ROTATE4_B_B_R_L | Rotate4 bottom bottom right left
EFX_EFFECT_ROTATE4_B_B_R_R | Rotate4 bottom bottom right right
EFX_EFFECT_ROTATE4_B_B_R_T | Rotate4 bottom bottom right top
EFX_EFFECT_ROTATE4_B_B_R_B | Rotate4 bottom bottom right bottom
EFX_EFFECT_ROTATE4_B_B_T_L | Rotate4 bottom bottom top left
EFX_EFFECT_ROTATE4_B_B_T_R | Rotate4 bottom bottom top right
EFX_EFFECT_ROTATE4_B_B_T_T | Rotate4 bottom bottom top top
EFX_EFFECT_ROTATE4_B_B_T_B | Rotate4 bottom bottom top bottom
EFX_EFFECT_ROTATE4_B_B_B_L | Rotate4 bottom bottom bottom left
EFX_EFFECT_ROTATE4_B_B_B_R | Rotate4 bottom bottom bottom right
EFX_EFFECT_ROTATE4_B_B_B_T | Rotate4 bottom bottom bottom top
EFX_EFFECT_ROTATE4_B_B_B_B | Rotate4 bottom bottom bottom bottom
EFX_EFFECT_ROTATE_MAX | Number of effects in this class.
Zoom class |
EFX_EFFECT_ZOOM_TO_C | Zoom to center
EFX_EFFECT_ZOOM_FROM_C | Zoom from center
EFX_EFFECT_ZOOM_MAX | Number of effects in this class.
Drip class |
EFX_EFFECT_DRIP_T_TO_B | Drip top to bottom
EFX_EFFECT_DRIP_B_TO_T | Drip bottom to top
EFX_EFFECT_DRIP_L_TO_R | Drip left to right
EFX_EFFECT_DRIP_R_TO_L | Drip right to left
EFX_EFFECT_DRIP_MAX | Number of effects in this class.
Blind class |
EFX_EFFECT_BLIND_T_TO_B | Blind top to bottom
EFX_EFFECT_BLIND_L_TO_R | Blind left to right
EFX_EFFECT_BLIND_GROWING_L_TO_R | Blind growing left to right
EFX_EFFECT_BLIND_GROWING_R_TO_L | Blind growing right to left
EFX_EFFECT_BLIND_GROWING_T_TO_B | Blind growing top to bottom
EFX_EFFECT_BLIND_GROWING_B_TO_T | Blind growing bottom to top
EFX_EFFECT_BLIND2_T_TO_B_AND_L_TO_R | Blind2 top to bottom and left to right
EFX_EFFECT_BLIND_MAX | Number of effects in this class.
Random class |
EFX_EFFECT_RANDOM_BARS_R_TO_L | Random bars right to left
EFX_EFFECT_RANDOM_BARS_L_TO_R | Random bars left to right
EFX_EFFECT_RANDOM_BARS_B_TO_T | Random bars bottom to top
EFX_EFFECT_RANDOM_BARS_T_TO_B | Random bars top to bottom
EFX_EFFECT_RANDOM_LINES | Random lines
EFX_EFFECT_RANDOM_BLOCKS | Random blocks
EFX_EFFECT_RANDOM_BLOCKS_R_TO_L | Random blocks right to left
EFX_EFFECT_RANDOM_BLOCKS_L_TO_R | Random blocks left to right
EFX_EFFECT_RANDOM_BLOCKS_B_TO_T | Random blocks bottom to top
EFX_EFFECT_RANDOM_BLOCKS_T_TO_B | Random blocks top to bottom
EFX_EFFECT_RANDOM_MAX | Number of effects in this class.
Checkerboard class |
EFX_EFFECT_CHECKERBOARD_T_TO_B_THEN_T_TO_B | Checkerboard top to bottom then top to bottom
EFX_EFFECT_CHECKERBOARD_B_TO_T_THEN_B_TO_T | Checkerboard bottom to top then bottom to top
EFX_EFFECT_CHECKERBOARD_L_TO_R_THEN_L_TO_R | Checkerboard left to right then left to right
EFX_EFFECT_CHECKERBOARD_R_TO_L_THEN_R_TO_L | Checkerboard right to left then right to left
EFX_EFFECT_CHECKERBOARD_T_TO_B_THEN_B_TO_T | Checkerboard top to bottom then bottom to top
EFX_EFFECT_CHECKERBOARD_B_TO_T_THEN_T_TO_B | Checkerboard bottom to top then top to bottom
EFX_EFFECT_CHECKERBOARD_L_TO_R_THEN_R_TO_L | Checkerboard left to right then right to left
EFX_EFFECT_CHECKERBOARD_R_TO_L_THEN_L_TO_R | Checkerboard right to left then left to right
EFX_EFFECT_CHECKERBOARD_MAX | Number of effects in this class.
Blocks class |
EFX_EFFECT_BLOCKS_T_TO_B | Blocks top to bottom
EFX_EFFECT_BLOCKS_B_TO_T | Blocks bottom to top
EFX_EFFECT_BLOCKS_L_TO_R | Blocks left to right
EFX_EFFECT_BLOCKS_R_TO_L | Blocks right to left
EFX_EFFECT_BLOCKS_SWIRL_CW_TO_C | Blocks swirl CW to center
EFX_EFFECT_BLOCKS_SWIRL_CW_FROM_C | Blocks swirl CW from center
EFX_EFFECT_BLOCKS_SWIRL_CCW_TO_C | Blocks swirl CCW to center
EFX_EFFECT_BLOCKS_SWIRL_CCW_FROM_C | Blocks swirl CCW from center
EFX_EFFECT_BLOCKS_MAX | Number of effects in this class.
Circle class |
EFX_EFFECT_CIRCLE_C_IN | Circle center in
EFX_EFFECT_CIRCLE_C_OUT | Circle center out
EFX_EFFECT_CIRCLE_L_IN | Circle left in
EFX_EFFECT_CIRCLE_L_OUT | Circle left out
EFX_EFFECT_CIRCLE_R_IN | Circle right in
EFX_EFFECT_CIRCLE_R_OUT | Circle right out
EFX_EFFECT_CIRCLE_T_IN | Circle top in
EFX_EFFECT_CIRCLE_T_OUT | Circle top out
EFX_EFFECT_CIRCLE_B_IN | Circle bottom in
EFX_EFFECT_CIRCLE_B_OUT | Circle bottom out
EFX_EFFECT_CIRCLE_C_INTER_IN_THEN_IN | Circle center interlace in then in
EFX_EFFECT_CIRCLE_C_INTER_OUT_THEN_OUT | Circle center interlace out then out
EFX_EFFECT_CIRCLE_C_INTER_IN_THEN_OUT | Circle center interlace in then out
EFX_EFFECT_CIRCLE_C_INTER_OUT_THEN_IN | Circle center interlace out then in
EFX_EFFECT_CIRCLE_L_INTER_IN_THEN_IN | Circle left interlace in then in
EFX_EFFECT_CIRCLE_L_INTER_OUT_THEN_OUT | Circle left interlace out then out
EFX_EFFECT_CIRCLE_L_INTER_IN_THEN_OUT | Circle left interlace in then out
EFX_EFFECT_CIRCLE_L_INTER_OUT_THEN_IN | Circle left interlace out then in
EFX_EFFECT_CIRCLE_R_INTER_IN_THEN_IN | Circle right interlace in then in
EFX_EFFECT_CIRCLE_R_INTER_OUT_THEN_OUT | Circle right interlace out then out
EFX_EFFECT_CIRCLE_R_INTER_IN_THEN_OUT | Circle right interlace in then out
EFX_EFFECT_CIRCLE_R_INTER_OUT_THEN_IN | Circle right interlace out then in
EFX_EFFECT_CIRCLE_T_INTER_IN_THEN_IN | Circle top interlace in then in
EFX_EFFECT_CIRCLE_T_INTER_OUT_THEN_OUT | Circle top interlace out then out
EFX_EFFECT_CIRCLE_T_INTER_IN_THEN_OUT | Circle top interlace in then out
EFX_EFFECT_CIRCLE_T_INTER_OUT_THEN_IN | Circle top interlace out then in
EFX_EFFECT_CIRCLE_B_INTER_IN_THEN_IN | Circle bottom interlace in then in
EFX_EFFECT_CIRCLE_B_INTER_OUT_THEN_OUT | Circle bottom interlace out then out
EFX_EFFECT_CIRCLE_B_INTER_IN_THEN_OUT | Circle bottom interlace in then out
EFX_EFFECT_CIRCLE_B_INTER_OUT_THEN_IN | Circle bottom interlace out then in
EFX_EFFECT_CIRCLE_L_R_INTER | Circle left right interlace
EFX_EFFECT_CIRCLE_T_B_INTER | Circle top bottom interlace
EFX_EFFECT_CIRCLE2_L_R_OUT | Circle2 left right out
EFX_EFFECT_CIRCLE2_L_R_IN | Circle2 left right in
EFX_EFFECT_CIRCLE2_T_B_OUT | Circle2 top bottom out
EFX_EFFECT_CIRCLE2_T_B_IN | Circle2 top bottom in
EFX_EFFECT_CIRCLE_MAX | Number of effects in this class.
Ellipse class |
EFX_EFFECT_ELLIPSE_C_IN | Ellipse center in
EFX_EFFECT_ELLIPSE_C_OUT | Ellipse center out
EFX_EFFECT_ELLIPSE_L_IN | Ellipse left in
EFX_EFFECT_ELLIPSE_L_OUT | Ellipse left out
EFX_EFFECT_ELLIPSE_R_IN | Ellipse right in
EFX_EFFECT_ELLIPSE_R_OUT | Ellipse right out
EFX_EFFECT_ELLIPSE_T_IN | Ellipse top in
EFX_EFFECT_ELLIPSE_T_OUT | Ellipse top out
EFX_EFFECT_ELLIPSE_B_IN | Ellipse bottom in
EFX_EFFECT_ELLIPSE_B_OUT | Ellipse bottom out
EFX_EFFECT_ELLIPSE_C_INTER_IN_THEN_IN | Ellipse center interlace in then in
EFX_EFFECT_ELLIPSE_C_INTER_OUT_THEN_OUT | Ellipse center interlace out then out
EFX_EFFECT_ELLIPSE_C_INTER_IN_THEN_OUT | Ellipse center interlace in then out
EFX_EFFECT_ELLIPSE_C_INTER_OUT_THEN_IN | Ellipse center interlace out then in
EFX_EFFECT_ELLIPSE_L_INTER_IN_THEN_IN | Ellipse left interlace in then in
EFX_EFFECT_ELLIPSE_L_INTER_OUT_THEN_OUT | Ellipse left interlace out then out
EFX_EFFECT_ELLIPSE_L_INTER_IN_THEN_OUT | Ellipse left interlace in then out
EFX_EFFECT_ELLIPSE_L_INTER_OUT_THEN_IN | Ellipse left interlace out then in
EFX_EFFECT_ELLIPSE_R_INTER_IN_THEN_IN | Ellipse right interlace in then in
EFX_EFFECT_ELLIPSE_R_INTER_OUT_THEN_OUT | Ellipse right interlace out then out
EFX_EFFECT_ELLIPSE_R_INTER_IN_THEN_OUT | Ellipse right interlace in then out
EFX_EFFECT_ELLIPSE_R_INTER_OUT_THEN_IN | Ellipse right interlace out then in
EFX_EFFECT_ELLIPSE_T_INTER_IN_THEN_IN | Ellipse top interlace in then in
EFX_EFFECT_ELLIPSE_T_INTER_OUT_THEN_OUT | Ellipse top interlace out then out
EFX_EFFECT_ELLIPSE_T_INTER_IN_THEN_OUT | Ellipse top interlace in then out
EFX_EFFECT_ELLIPSE_T_INTER_OUT_THEN_IN | Ellipse top interlace out then in
EFX_EFFECT_ELLIPSE_B_INTER_IN_THEN_IN | Ellipse bottom interlace in then in
EFX_EFFECT_ELLIPSE_B_INTER_OUT_THEN_OUT | Ellipse bottom interlace out then out
EFX_EFFECT_ELLIPSE_B_INTER_IN_THEN_OUT | Ellipse bottom interlace in then out
EFX_EFFECT_ELLIPSE_B_INTER_OUT_THEN_IN | Ellipse bottom interlace out then in
EFX_EFFECT_ELLIPSE_L_R_INTER | Ellipse left right interlace
EFX_EFFECT_ELLIPSE_T_B_INTER | Ellipse top bottom interlace
EFX_EFFECT_ELLIPSE2_L_R_OUT | Ellipse2 left right out
EFX_EFFECT_ELLIPSE2_L_R_IN | Ellipse2 left right in
EFX_EFFECT_ELLIPSE2_T_B_OUT | Ellipse2 top bottom out
EFX_EFFECT_ELLIPSE2_T_B_IN | Ellipse2 top bottom in
EFX_EFFECT_ELLIPSE_MAX | Number of effects in this class.


Gradients

The following values may be used for the GradientStyle property.

Value | Meaning
Linear gradient class |
EFX_GRADIENT_LINE_L_TO_R | Line left to right
EFX_GRADIENT_LINE_R_TO_L | Line right to left
EFX_GRADIENT_LINE_T_TO_B | Line top to bottom
EFX_GRADIENT_LINE_B_TO_T | Line bottom to top
EFX_GRADIENT_LINE_LT_TO_RB | Line left-top to right-bottom
EFX_GRADIENT_LINE_LB_TO_RT | Line left-bottom to right-top
EFX_GRADIENT_LINE_RT_TO_LB | Line right-top to left-bottom
EFX_GRADIENT_LINE_RB_TO_LT | Line right-bottom to left-top
EFX_GRADIENT_LINE2_L_AND_R_TO_C | Line2 left and right to center
EFX_GRADIENT_LINE2_C_TO_L_AND_R | Line2 center to left and right
EFX_GRADIENT_LINE2_T_AND_B_TO_C | Line2 top and bottom to center
EFX_GRADIENT_LINE2_C_TO_T_AND_B | Line2 center to top and bottom
EFX_GRADIENT_LINE2_LT_AND_RB_TO_C | Line2 left-top and right-bottom to center
EFX_GRADIENT_LINE2_C_TO_LT_AND_RB | Line2 center to left-top and right-bottom
EFX_GRADIENT_LINE2_RT_AND_LB_TO_C | Line2 right-top and left-bottom to center
EFX_GRADIENT_LINE2_C_TO_RT_AND_LB | Line2 center to right-top and left-bottom
EFX_GRADIENT_LINE_MAX | Number of gradients in this class.
Angular gradient class |
EFX_GRADIENT_ANGLE_TO_LT | Angle to left-top
EFX_GRADIENT_ANGLE_TO_LB | Angle to left-bottom
EFX_GRADIENT_ANGLE_TO_RT | Angle to right-top
EFX_GRADIENT_ANGLE_TO_RB | Angle to right-bottom
EFX_GRADIENT_ANGLE_FROM_LT | Angle from left-top
EFX_GRADIENT_ANGLE_FROM_LB | Angle from left-bottom
EFX_GRADIENT_ANGLE_FROM_RT | Angle from right-top
EFX_GRADIENT_ANGLE_FROM_RB | Angle from right-bottom
EFX_GRADIENT_ANGLE_MAX | Number of gradients in this class.
Rectangular gradient class |
EFX_GRADIENT_RECTANGLE_TO_C | Rectangle to center
EFX_GRADIENT_RECTANGLE_FROM_C | Rectangle from center
EFX_GRADIENT_RECTANGLE_MAX | Number of gradients in this class.
Elliptical gradient class |
EFX_GRADIENT_ELLIPSE_TO_C | Ellipse to center
EFX_GRADIENT_ELLIPSE_FROM_C | Ellipse from center
EFX_GRADIENT_ELLIPSE_MAX | Number of gradients in this class.
Conical gradient class |
EFX_GRADIENT_CONE_FROM_L | Cone from left
EFX_GRADIENT_CONE_FROM_R | Cone from right
EFX_GRADIENT_CONE_FROM_T | Cone from top
EFX_GRADIENT_CONE_FROM_B | Cone from bottom
EFX_GRADIENT_CONE_FROM_LT | Cone from left-top
EFX_GRADIENT_CONE_FROM_LB | Cone from left-bottom
EFX_GRADIENT_CONE_FROM_RT | Cone from right-top
EFX_GRADIENT_CONE_FROM_RB | Cone from right-bottom
EFX_GRADIENT_CONE_MAX | Number of gradients in this class.


PatternStyles

Value | Meaning
epsSolid | Solid filling
epsTransparent | Transparent filling (not valid for transitions)
epsHorzLine | Horizontal lines (==)
epsVertLine | Vertical lines (||)
epsDownwarDiag | Downward diagonal lines (//)
epsUpwardDiag | Upward diagonal lines (\\)
epsCross | Cross line (++)
epsDiagCross | Diagonal cross lines (XX)


ShapeInnerStyles

The following values may be used for the ShapeInnerBandStyle property (Main Control).

Value | Meaning
sibNone | No inner band
sibInset | Inner band inset
sibRaised | Inner band raised


ShapeOuterStyles

The following values may be used for the ShapeOuterBandStyle property (Main Control).

Value | Meaning
sobNone | No outer band
sobInset | Outer band inset
sobRaised | Outer band raised


Shapes

The following values may be used for the DrawShape method.

Value | Meaning
Rectangle class |
EFX_SHAPE_RECTANGLE | Rectangle
EFX_SHAPE_RECTANGLE_ROUNDED | Rounded rectangle
EFX_SHAPE_RECTANGLE_MAX | Number of shapes in this class.
Square class |
EFX_SHAPE_SQUARE | Square
EFX_SHAPE_SQUARE_ROUNDED | Rounded square
EFX_SHAPE_SQUARE_MAX | Number of shapes in this class.
Parallelogram class |
EFX_SHAPE_PARALLELOGRAM_L | Parallelogram left
EFX_SHAPE_PARALLELOGRAM_R | Parallelogram right
EFX_SHAPE_PARALLELOGRAM_T | Parallelogram top
EFX_SHAPE_PARALLELOGRAM_B | Parallelogram bottom
EFX_SHAPE_PARALLELOGRAM_MAX | Number of shapes in this class.
Trapezoid class |
EFX_SHAPE_TRAPEZOID_L | Trapezoid left
EFX_SHAPE_TRAPEZOID_R | Trapezoid right
EFX_SHAPE_TRAPEZOID_T | Trapezoid top
EFX_SHAPE_TRAPEZOID_B | Trapezoid bottom
EFX_SHAPE_TRAPEZOID_MAX | Number of shapes in this class.
Circle class |
EFX_SHAPE_CIRCLE | Circle
EFX_SHAPE_CIRCLE_90_LT | Circle 90° left-top
EFX_SHAPE_CIRCLE_90_LB | Circle 90° left-bottom
EFX_SHAPE_CIRCLE_90_RT | Circle 90° right-top
EFX_SHAPE_CIRCLE_90_RB | Circle 90° right-bottom
EFX_SHAPE_CIRCLE_180_L | Circle 180° left
EFX_SHAPE_CIRCLE_180_R | Circle 180° right
EFX_SHAPE_CIRCLE_180_T | Circle 180° top
EFX_SHAPE_CIRCLE_180_B | Circle 180° bottom
EFX_SHAPE_CIRCLE_270_LT | Circle 270° left-top
EFX_SHAPE_CIRCLE_270_LB | Circle 270° left-bottom
EFX_SHAPE_CIRCLE_270_RT | Circle 270° right-top
EFX_SHAPE_CIRCLE_270_RB | Circle 270° right-bottom
EFX_SHAPE_CIRCLE_MAX | Number of shapes in this class.
Ellipse class |
EFX_SHAPE_ELLIPSE | Ellipse
EFX_SHAPE_ELLIPSE_90_LT | Ellipse 90° left-top
EFX_SHAPE_ELLIPSE_90_LB | Ellipse 90° left-bottom
EFX_SHAPE_ELLIPSE_90_RT | Ellipse 90° right-top
EFX_SHAPE_ELLIPSE_90_RB | Ellipse 90° right-bottom
EFX_SHAPE_ELLIPSE_180_L | Ellipse 180° left
EFX_SHAPE_ELLIPSE_180_R | Ellipse 180° right
EFX_SHAPE_ELLIPSE_180_T | Ellipse 180° top
EFX_SHAPE_ELLIPSE_180_B | Ellipse 180° bottom
EFX_SHAPE_ELLIPSE_270_LT | Ellipse 270° left-top
EFX_SHAPE_ELLIPSE_270_LB | Ellipse 270° left-bottom
EFX_SHAPE_ELLIPSE_270_RT | Ellipse 270° right-top
EFX_SHAPE_ELLIPSE_270_RB | Ellipse 270° right-bottom
EFX_SHAPE_ELLIPSE_MAX | Number of shapes in this class.
Triangle class |
EFX_SHAPE_TRIANGLE_EQUILATERAL_L | Equilateral triangle left
EFX_SHAPE_TRIANGLE_EQUILATERAL_R | Equilateral triangle right
EFX_SHAPE_TRIANGLE_EQUILATERAL_T | Equilateral triangle top
EFX_SHAPE_TRIANGLE_EQUILATERAL_B | Equilateral triangle bottom
EFX_SHAPE_TRIANGLE_ISOSCELES_L | Isosceles triangle left
EFX_SHAPE_TRIANGLE_ISOSCELES_R | Isosceles triangle right
EFX_SHAPE_TRIANGLE_ISOSCELES_T | Isosceles triangle top
EFX_SHAPE_TRIANGLE_ISOSCELES_B | Isosceles triangle bottom
EFX_SHAPE_TRIANGLE_RIGHT_LT | Right triangle left-top
EFX_SHAPE_TRIANGLE_RIGHT_LB | Right triangle left-bottom
EFX_SHAPE_TRIANGLE_RIGHT_RT | Right triangle right-top
EFX_SHAPE_TRIANGLE_RIGHT_RB | Right triangle right-bottom
EFX_SHAPE_TRIANGLE_MAX | Number of shapes in this class.
Other polygons class |
EFX_SHAPE_OCTAGON | Octagon
EFX_SHAPE_DIAMOND | Diamond
EFX_SHAPE_PENTAGON | Pentagon
EFX_SHAPE_HEXAGON | Hexagon
EFX_SHAPE_LINE | Line
EFX_SHAPE_REGION | Region
EFX_SHAPE_OTHER_MAX | Number of shapes in this class.
Star class |
EFX_SHAPE_STAR4 | Star 4 points
EFX_SHAPE_STAR5 | Star 5 points
EFX_SHAPE_STAR8 | Star 8 points
EFX_SHAPE_STAR16 | Star 16 points
EFX_SHAPE_STAR24 | Star 24 points
EFX_SHAPE_STAR32 | Star 36 points
EFX_SHAPE_STAR_MAX | Number of shapes in this class.
Cross class |
EFX_SHAPE_CROSS_SMALL | Cross small
EFX_SHAPE_CROSS_MEDIUM | Cross medium
EFX_SHAPE_CROSS_LARGE | Cross large
EFX_SHAPE_CROSS_MAX | Number of shapes in this class.
Arrow class |
EFX_SHAPE_ARROW_L | Arrow left
EFX_SHAPE_ARROW_R | Arrow right
EFX_SHAPE_ARROW_T | Arrow top
EFX_SHAPE_ARROW_B | Arrow bottom
EFX_SHAPE_ARROW2_L_AND_R | Arrow2 left and right
EFX_SHAPE_ARROW2_T_AND_B | Arrow2 top and bottom
EFX_SHAPE_ARROW2_L_AND_T | Arrow2 left and top
EFX_SHAPE_ARROW2_L_AND_B | Arrow2 left and bottom
EFX_SHAPE_ARROW2_R_AND_T | Arrow2 right and top
EFX_SHAPE_ARROW2_R_AND_B | Arrow2 right and bottom
EFX_SHAPE_ARROW3_L_AND_T_AND_R | Arrow3 left and top and right
EFX_SHAPE_ARROW3_T_AND_R_AND_B | Arrow3 top and right and bottom
EFX_SHAPE_ARROW3_L_AND_B_AND_R | Arrow3 left and bottom and right
EFX_SHAPE_ARROW3_L_AND_T_AND_B | Arrow3 left and top and bottom
EFX_SHAPE_ARROW4_L_AND_T_AND_R_AND_B | Arrow4 left and top and right and bottom
EFX_SHAPE_ARROW_MAX | Number of shapes in this class.


TextAlign Effects

The following values may be used for TextAlign property (Main Control).

Value | Meaning
etaLeftTop | Left, top
etaLeftVcenter | Left, vertical center
etaLeftBottom | Left, bottom
etaHcenterTop | Top, horizontal center
etaHcenterVcenter | Vertical and horizontal center
etaHcenterBottom | Bottom, horizontal center
etaRightTop | Right, top
etaRightVcenter | Right, vertical center
etaRightBottom | Right, bottom


TextStyle Effects

The following values may be used for the TextStyle property (Main Control).

Value | Meaning
etsNormal | No three-dimensional effect
etsInsetLight | Inset light text
etsInsetExtraLight | Inset extra light text
etsInsetHeavy | Inset heavy text
etsInsetExtraHeavy | Inset extra heavy text
etsRaisedLight | Raised light text
etsRaisedHeavy | Raised heavy text
etsDropShadow | Drop shadow text
etsBlockShadow | Block shadow text
etsOutLineBlock | Outline block text
etsRaisedExtraHeavy | Raised extra heavy text
etsRaisedExtraLight | Raised extra light text


Compression Using LEAD and JPEG Formats

Compression of color and grayscale graphic image files is useful because the files are big. They can range from 100 kilobytes to more than 200 megabytes. Compressing the image files does the following:

Dramatically decreases the storage requirements

Improves the input and output speed within a system

Improves the transmission speed over networks or phone lines

By incorporating the LEAD and JPEG image compression, you can develop applications that would be impractical otherwise. Image files can be reduced to 200 times smaller than their original size.

The LEAD CMP compression format was created by LEAD Technologies, Inc., and it delivers a much smaller file size and better image quality than other compression techniques, including JPEG.

LEAD's CMP file format allows for decompression to a 24-bit medium at 24-bit color and to an 8-bit medium at 8-bit color without sacrificing image quality. This eliminates the need to convert all images to 8 bits in order to support the low end users or to save one 8-bit file and one 24-bit file. The result is one much smaller file size that can be viewed on a 24-bit video card at 24-bit true color, as well as on an 8-bit VGA card at 256 colors.

LEAD's CMW format uses Wavelet CMP compression. Currently, 24 color images and 8, 12 and 16-bit grayscale images are supported in this format. (This is available only in the LEADTOOLS CMW Plug in. 12 and 16-bit formats also require the Document/Medical capabilities)

Summary of All Supported Image File Formats describes the LEAD and JPEG compression formats, in addition to other formats that LEADTOOLS supports.

The amount of compression is controllable, allowing the compressed image quality to match the needs of your application. Compression Quality Factors describes how the quality factors are used.

JPEG Compliant

LEADTOOLS VCL is fully JPEG compliant. Any file using compression that is compliant with the JPEG Interchange File Format can be viewed and converted.

However, some images that are not fully compliant with the JPEG specification will be displayed upside-down. (The JPEG Interchange File Format specifies that all images must be stored top-down.) You can change the orientation of an image by modifying the ViewPerspective flag in the LEAD bitmap handle.

JPEG 2000 Compliant

LEADTOOLS VCL can load and save JPEG 2000 files. You can load 24-48 bit color images (images with 25-47 bits/pixel will be loaded as 48-bit). You can load 8-16 bit grayscale images. Images with 9-11 bits/pixel will be loaded as 12-bit while images with 13-15 bit are loaded as 16 bits/pixel.

You can save 24 and 48-bit color images and 8, 12 and 16-bit grayscale images.

LEADTOOLS supports JPEG2000 stream (J2K) and JP2 format files. LEADTOOLS supports the mandatory boxes of the JP2 format only.

4 and 1-bit Images

JPEG and LEAD CMP compression are intended for use with high resolution images, and they are impractical for use with 4- or 1-bit images.

You can use the CCITT, LEAD 1-bit, RLE, LZW, and ZIPLib compression methods available in many of LEADTOOLS supported formats.

8 and 24-bit Images

Using JPEG, JPEG2000 and LEAD CMP or CMW compression, color images are 24 bits per pixel, and grayscale images are 8 bits per pixel. Therefore, to compress an 8-bit color image, the internal JPEG, JPEG2000 and LEAD CMP or CMW compression functions must convert the 8-bit data into raw RGB 24-bit before compressing it as a color image.

Compressing the original 24-bit image will result in a smaller file size and higher quality than compressing an optimized 8-bit color image.

LEADTOOLS functions compress 8-bit grayscale as 8-bit grayscale JPEG or CMP images.

You can use RLE, LZW and ZIPLib (PNG) compression methods available in many of LEADTOOLS supported formats.


Compression Quality Factors

You can specify a quality factor when saving an image file to LEAD, JFIF, LEAD2JFIF, LEAD2JFIF, JTIF, LEAD1JTIF, and LEAD2JTIF. The quality factor (Q factor) is a number that determines the degree of loss in the compression process. You can set a value from 2 to 255, where 2 is the highest quality and 255 is the most compression.

For JFIF and JTIF compression only, you can also use a factor of 0 to produce lossless JPEG files

For LEAD CMP compression (8-bit, 12-bit and 24-bit only), you can also use one of the following enhanced options:

Q Factor | Predefined options for LEAD CMP only
PQ1 | Perfect quality 1 This option compresses all colors of a 24-bit file and maintains the quality of the original image at a smaller file size. As the name suggests, there is no visual loss of color at this setting.
PQ2 | Perfect quality 2 This will produce a smaller file size than PQ1 while maintaining similar quality.
QFS | Quality far more important than size This option removes colors not noticed by the human eye. Most viewers cannot tell the difference between an image compressed at this level and the original image.
QMS | Quality more important than size While more colors are removed, most of them are colors or shades that are close to one another. The compressed image will appear very much like the original image. It will take some study to see the difference.
QS | Quality and size equally important This option provides the highest compression while maintaining good image quality. Try this option first, then move up or down the list accordingly to obtain acceptable compression size and image quality.
SQS | Size more important that quality (sharp) This option is recommended for images that have sharp edges. For example, an image that has a text overlay or an image with many straight lines. While it creates a larger file than the next option, it retains better edges.
SQT | Size more important than quality (less tiling) This option produces less tiling in the image than the previous options. However, it may distort text or straight lines. It is a good option for image database applications.
MCQ | Maximum compression keeping quality This option provides maximum compression while maintaining as high as possible image quality.
MC | Maximum compression This option gives maximum compression. It is equivalent to a Q factor of 255.

For the PNG format, the qFactor can be a value between 0 and 9. 0 = (default compression), 1 (fastest compression) ... 9 (highest compression ratio)

Note:

For JP2 and J2K files, the Qfactor can be a value between –1 and 255. –1, and 0 represent lossless compression, while all the values between 1 and 255 are considered as compression ratios. For example a Qfactor of 10 is a compression ratio of 10. A Qfactor of 1 gives the best lossy quality, while a Qfactor of 255 gives the highest compression. If the compression control used by the toolkit when saving J2K files is J2K_COMPRESSION_QFACTOR, then the compression used is based on the Qfactor passed to the SaveXXX method. For more information about setting the options for saving J2K files, refer to the J2KXXX properties of the Main Control.

For the ABC compression (FILE_ABC and FILE_TIF_ABC), the qFactor can be one of the following values:

Q Factor | Predefined options for LEAD only
ABCQ_LOSSLESS | [0] Lossless compression. This option compresses a 1-bit file and maintains image data unchanged. Highest quality.
ABCQ_VIRTUALLOSSLESS | [1] Lossy compression. This option removes the image's noisy pixels and compresses it to a smaller file size than ABCQ_LOSSLESS.
ABCQ_REMOVEBORDER | [2] Lossy compression. This option removes the image's border, if it exists, and compresses it to a smaller file size than ABCQ_ VIRTUALLOSSLESS.
ABCQ_ENHANCE | [3] Lossy compression. This option cleans up the image, removes its border if it exists, and compresses it to a smaller file size than ABCQ_REMOVEBORDER.
ABCQ_MODIFIED1 | [4] Lossy compression. This option cleans up the image, removes its border if it exists, and compresses it to a smaller file size than ABCQ_ENHANCE. However, it may distort text or straight lines.
ABCQ_MODIFIED1_FAST | [5] Same as ABCQ_MODIFIED1 without the border remove or image clean processes.
ABCQ_MODIFIED2 | [6] Lossy compression. This option cleans up the image, removes its border if it exists, and compresses it to a smaller file size than ABCQ_MODIFIED1. However, it may distort text or straight lines. Maximum compression.
ABCQ_MODIFIED2_FAST | [7] Same as ABCQ_MODIFIED2 without the border remove or image clean processes.
ABCQ_MODIFIED3 | [8] Lossy compression. Provides faster encode and decode speed than ABCQ_MODIFIED1 or ABCQ_MODIFIED2. Provides the maximum compression.
ABCQ_MODIFIED3_FAST | [9] Same as ABCQ_MODIFIED3 without the border remove or image clean processes.
ABCQ_LOSSLESS_FAST | [10] Faster lossless compression than ABCQ_LOSSLESS. This option compresses a 1-bit file and maintains image data unchanged. Highest quality. Does not produce compression ratios as high as ABCQ_LOSSLESS.
ABCQ_LOSSY_FAST | [11] Lossy compression. This is the fastest ABC lossy compression option. Does not produce compression ratios as high as the other lossy options.


Super Compressed Bitmaps

(Document/Medical only) Super compressed bitmaps are kept compressed in memory. Only 24-bit, 8-bit grayscale, or 1-bit bitmaps can be kept super compressed. The memory requirements for super compressed bitmaps are greatly reduced compared to uncompressed bitmaps or RLE-compressed bitmaps.

The data access for super compressed bitmaps is usually slower, compared to uncompressed bitmaps. The compression used for 24-bit and 8-bit bitmaps is lossy, which means multiple changes to the bitmap can produce some visual loss.

The data access is usually slower for super compressed bitmaps, but there are situations in which the data access is faster than for uncompressed bitmaps. When dealing with very large bitmaps, the O/S might swap to disk the bitmap data. In this case, the access for uncompressed bitmaps can be a lot slower than for super compressed bitmaps.

Any application that deals with large bitmaps of tens or hundreds of MB should consider using super compressed bitmaps.

The BitmapCompression property can be read to determine the current bitmap's current compression. Setting this property will change the compression of the bitmap to super compress 1-bit, 8-bit, or 24-bit bitmaps, as well as, uncompress bitmaps and compress 1-bit bitmaps using RLE compression.

The size of the bitmap, in bytes, can be determined by reading the BitmapSize property.


Using ISIS to Scan Images

Using ISIS to Scan Images (Document/Medical only)

IMPORTANT NOTICE CONCERNING SUPPORT FOR ISIS DRIVERS:

LEADTOOLS TOOLKITS CONTAIN SUPPORT FOR ISIS® DRIVERS USING PIXEL TRANSLATIONS RUNTIME (PIXDFLTN. DLL) VERSION NUMBER 55.1.260.832 OR EARLIER ALLOWING LEADTOOLS TO DIRECTLY INTERFACE WITH THE ISIS DRIVERS.

LEADTOOLS TOOLKITS DO NOT DIRECTLY COMMUNICATE WITH ISIS ® DRIVERS USING PIXEL TRANSLATIONS RUNTIME (PIXDFLTN) VERSION NUMBER 56.*.*.* OR HIGHER. A LEADTOOLS APPLICATION WHICH OPERATES PROPERLY WITH THE EARLIER VINTAGE ISIS DRIVERS WILL CEASE TO OPERATE PROPERLY IF THE OLDER ISIS DRIVER IS REPLACED WITH A NEWER ISIS DRIVER REQUIRING THE PIXEL TRANSLATIONS RUNTIME DLL VERSION NUMBER 56.*.*.* OR HIGHER.

ISIS is a standard used with certain scanners. The software includes support for ISIS scanning one or more images through its LEADTOOLS ISISAcquire method and ISISAcquireMulti method, provided an ISIS driver is present. (The LEADTOOLS software does not include ISIS Drivers). Prior to scanning however, other methods, properties and events must be used to prepare for scanning. The IsISISAvailable property indicates whether ISIS support DLLs are even available for use. If so, load the ISIS Scanner Driver using the ISISLoadDriver method. ISISSelect method displays a dialog box for selecting the desired ISIS driver, if there is more than one. New ISIS drivers can also be added using this dialog box. To set scanner options, use ISISSetScanOptions. The current driver is set in the DriverName property.

LEADTOOLS also provides the ISISGetTag method, ISISSetTag method, ISISGetASCIITag method and ISISSetASCIITag method to help determine the current settings for the scanner and set new values for certain tags. ISIS tags can have multiple values, also called choices. LEADTOOLS provides the ISISGetASCIITagChoice method, ISISGetASCIITagChoiceCount method, ISISGetTagChoice method and ISISGetTagChoiceCount method for determining the number of values or choices available for a specific tag and retrieving individual values/choices for a specific tag.

To scan a single image, use the ISISAcquire method. This will set the Bitmap property with the bitmap created when the image was scanned. If you wish to scan more than one image, you may wish to set EnableISISEvent property to True so the OnISISPage event will be called after each page is scanned. To scan more than one image use ISISAcquireMulti method. If you set the ScanAhead tag prior to scanning multiple images, PagesDiscarded will contain the number of pages discarded if scanning is canceled by setting EnableISISEvent to False. Once you have finished with ISIS support, unload the ISIS driver using ISISUnloadDriver method.

For more information, refer to the individual entries for the properties, methods and events. You may also refer to ISIS Tags to learn more about the scanner settings and scanning options.

Note:

Please note that you must get the ISIS driver from the scanner manufacturer or from Pixel Translations. The .chn or .chw file must be in your path for ISIS scanning to work.


Image Processing

The following topics describe the kinds of image processing:

Examining and Altering Bitmaps

Managing Color Separations

Combining Images

Using the Windows API

Using Histograms

Working with the Alpha Channel


Examining and Altering Bitmaps

You can make many changes to the bitmap in memory, but keep in mind that the changes do not appear on the screen until the image repaints.

Getting Bitmap Information

Get information about the bitmap from the following properties and method:

BitmapBits property

BitmapHeight property

BitmapWidth property

BitmapXRes property

BitmapYRes property

BitmapOrder property

BitmapBytesPerLine property

ColorCount property

ConvertToColoredGray method

GrayscaleExt method

IsGrayscale property

IsSigned property

Getting and Setting Pixel Values

Use the following method to get and set the values of individual pixels:

Pixel property

Fill method

GetBitmapRow method

GetBitmapRowCol method

GetPixelData method

PutPixelData method

PutBitmapRow method

PutBitmapRowCol method

Changing the Data Format

Use the following methods to change the bits per pixel and palette of a bitmap or bitmap list:

ColorRes method

ColorResList method

Use the following methods to change a bitmap to 8-bit grayscale or to a 1-bit halftone:

Grayscale method

Halftone method

Bitmap data can be signed or unsigned. If the bitmap data is signed, image processing and paint functions may not work correctly. A bitmap will not be loaded signed unless the LoadSigned property is set to TRUE before loading the image. To determine whether the bitmap loaded into the control is signed or not, check the IsSigned property. If this property is TRUE, the bitmap data is signed and should be converted to unsigned by calling the ConvertSignedToUnsigned method.

To convert unsigned bitmap data to signed bitmap data, use the ConvertUnsignedToSigned method.

Windows always uses the RGB color-space model, and when loading or saving a file, LEADTOOLS converts image data to or from RGB, as necessary. Nevertheless, LEADTOOLS lets you create and merge color separations using a number of color-space models, including RGB, CMYK, CMY, HSV, and HLS. Use the ColorSeparate method to create separations, use the ColorMerge method to merge separations, and use the ColorPlanes property to access the separated planes.

Updating the Line Profiles

LineProfile method

Doing Geometric Transformations

Geometric transformations include resizing, trimming, rotating, shearing, flipping, or reversing a bitmap. The following geometric transformation methods are designed mainly for document imaging:

AutoTrim method

Deskew method ( Document/Medical only)

FastRotate method ( Document/Medical only)

Use the following method to resize the bitmap. Keep in mind that this changes the amount of memory required for the bitmap, and it is not necessary to do this for zooming in or out.

Size method

Use the following methods to alter a bitmap in various ways:

Trim method

Rotate method

Shear method

Flip method

Reverse method

LEADTOOLS also provides the TransformFile method for performing lossless flips, rotations and reversals. However, only certain file formats are supported at this time. This method provides better results than loading an image, transforming it using the Rotate method, Flip method or Reverse method and then resaving it. For each marker that the TransformFile method encounters within a file, the OnTransformMarker event is triggered. Within this event the user sets the WriteMarkerAction property to indicate what action to take with the marker. If the marker is to be written to the output file, the user calls the WriteMarker method.

Lightening, Darkening, Filtering, and So Forth

A number of image processing methods let you change the values of pixels across a bitmap (or a region in the bitmap) using various algorithms and filters. You might do this to improve the appearance of the image, to analyze details in the image, or to apply artistic effects. The following topics provide details:

Changing Brightness and Contrast

Removing Noise

Detecting and Enhancing Edges and Lines

Applying Artistic Effects

Correcting Colors

Adding Another Image to a Bitmap

The Combine method lets you add all or part of another bitmap to the target bitmap. You can pass flags to control whether the new pixels simply replace the old ones or are combined with the old ones in a specified way. You can also define a region in the target bitmap, and if you do, the method affects only the specified region. For information about regions, refer to Creating and Using a Bitmap Region.

To combine image data from the source bitmap (the slave) into the destination bitmap (master) using a perspective warp, use the CombineWarp method. If you want to specify the areas to be combined, the operations to be performed when combining the data, and which color planes (R or G or B or R, G, and B) are used, use the CombineExt method.

The Underlay method also combines images, but it has a much more specific purpose. It combines two bitmaps so that one appears to be an underlying texture for the other.

Treating the bitmap as a device context opens up many possibilities. You can set the DrawPersistence property to TRUE to draw text or objects on the bitmap. For details, refer to Drawing Simple Objects and Drawing Three-Dimensional Shapes and Text.

Also, the GetBitmapDC method lets you access the bitmap as a device context. You can then use Windows GDI functions to draw lines, text, or images on the bitmap. For more information, refer to Using the Windows API.

To replace an image with an image created from images in a specified directory, use the Picturize method.

Subtracting One Bitmap From Another

The DigitalSubtract method does not combine images, but subtracts the live (destination) bitmap from the mask (source) bitmap to show the differences between the two bitmaps.

Window leveling (Medical only)

Window leveling is only valid for 12 and 16-bit grayscale images and is used to map grayscale intensities by specifying the bit range and/or a user defined color map. The bit range is specified by LevelLowBit property and LevelHighBit property. The user defined color map is defined by LevelLUT property. The LevelLUT property is filled by calling the WindowLevelFillLUT method. LevelLowBit property, LevelHighBit property and LevelLUT property will only affect the way the image is painted and will not affect the image data. To affect the image data, you must call the WindowLevel method. The WindowLevelBitmap property determines whether the WindowLevel method creates a new 8 or 24-bit bitmap, or leaves the bitmap as a 12 or 16-bit grayscale. The WindowLevel method applies window leveling to the bitmap, and resets LevelLowBit property, LevelHighBit property, LevelLUTLength property and LevelLUT property if a new 8 or 24-bit bitmap is created. LevelLowBit property and LevelHighBit property indicate which bits are considered image data. LevelLUT is a remapping palette that provides the colors to use when remapping the image. MinBit property, MaxBit property, MinVal property and MaxVal property can aid in setting up the LevelLUT by providing information concerning the bitmap. These values are retrieved using GetMinMaxBits method and GetMinMaxVal method. For more information, refer to the individual entries for the properties and methods.


Changing Brightness and Contrast

Basic Brightness and Contrast methods

With the basic brightness and contrast methods you can change the intensity or contrast using a flat scale, or you can adjust the gamma correction. Gamma correction changes brightness using a logarithmic scale to account for visual perception. You can apply the basic brightness and contrast methods either to the display or to a bitmap.

To adjust the display, use the PaintGamma, PaintIntensity, PaintContrast properties. These properties affect the display of all bitmaps. They are not really part of the image processing group, because they do not affect the bitmap. Nevertheless, these properties can be useful when the need for brightness and contrast improvement is device-specific, rather than image-specific.

To change the brightness and contrast of a bitmap, use the following methods:

GammaCorrect method

Intensity method

Contrast method

The AddWeightedBitmaps method can be used to improve the brightness of an image by adding bitmaps within a bitmap list. Typically, you would call this method for a series of images taken for the same object at short intervals. This method can also be used to obtain an image as the sum of several weighted images.

The Multiply method can be used to increase or decrease the brightness in the bitmap, by multiplying the colors in the specified bitmap by a value equal to the uFactor value divided by 100. For example, if uFactor is 131 the colors in the specified bitmap will be multiplied by 1.31.

The ChangeHueSatInt method can be used to change the hue, saturation and brightness of all or specified colors in the image. This method combines the functionality found in the Hue, Saturation, and Intensity methods and allows you to change the overall hue, saturation and intensity all at one time, or adjust the parameters separately, or make adjustments in successive passes.

The MathFunction method can be used to adjust the hue, saturation and brightness of an image by applying one of five mathematical functions to a bitmap’s pixel values: square, square root, log, sine, and cosine and then multiplying the results by specified factor.

The AdaptiveContrast method performs adaptive contrast enhancement (ACE) to areas that are originally low in contrast.

The ColorIntensityBalance method changes the distribution of the red, green, or blue channels.

The ContrastBrightIntensity method applies brightness, contrast and intensity adjustments to enhance the image tonal range.

(Medical only) When working with DICOM files, you can remap pixel values using a lookup table, or by applying a linear transformation using the ApplyModalityLUT method or the ApplyLinearModalityLUT method, respectively. You can also set up window leveling options for a bitmap using a lookup table or a linear transformation using the ApplyVOILUT method or the ApplyLinearVOILUT method, respectively. To get the number of colors in a LUT between the starting color and the ending color use the CountLUTColors method. If the LUT stored inside a bitmap is linear, you can get the width of the window of interest and the center of that window using the GetLinearVOILUT method.

Histogram-Based Contrast methods

Some image processing methods use an internally generated histogram for more sophisticated contrast improvements. The histogram is a table that reflects how many times each intensity value occurs in the bitmap.

The following high-level methods are based on histograms:

HistoContrast method

StretchIntensity method

HistoEqualize method

The HistoContrast method is similar to the ordinary Contrast method, except that it uses a bitmap-specific middle value. The ordinary contrast method raises all intensity values above 128 and lowers all values below 128. The HistoContrast method first finds the median intensity value in the bitmap. It then uses that median value, instead of 128, as the middle value. With either of these methods, you pass a parameter to indicate how much to increase the contrast.

The StretchIntensity method improves the contrast of a flat image, while preserving the original number of different intensity values. Other contrast methods, where you specify the increase, can lose values at the top and bottom of the scale. This method, instead, sets the lowest intensity value to 0 and the highest to 255, then remaps the original values proportionally. If the original values already range from 0 to 255, this method has no effect.

The HistoEqualize method is often the most effective method for bringing out hidden details through contrast improvement. Like the StretchIntensity method, it remaps the intensity values to use the full range of 0 to 255. But instead of remapping the values proportionally, it uniformly redistributes the values to balance the number of pixels across the range of intensities. Thus, clusters of similar intensity values in the original image are spread out, enabling you to see differences that were too subtle in the original.

The following elements let you create your own histogram-based methods:

GetHistogram method

HistogramTable property

RemapIntensity method

RemapTable property

You can use the GetHistogram method to get a bitmap's histogram. You can then create a lookup table (RemapTable) based on the entries in the HistogramTable and call the RemapIntensity method to change the bitmap's intensities through the lookup table.

The intensity values are gray-level values. When changing the intensity values of a color image, the LEADTOOLS functions are actually changing the value of each color plane. The high-level methods automatically change the values of all planes, but if you create your own method, the decision is up to you. With the GetHistogram and RemapIntensity methods, you can manipulate an individual color plane, or you can manipulate all color planes by specifying the master channel.

With color images, you can preserve more natural colors by first using the ColorSeparate method to do an HSV separation. You can then manipulate the value plane and recombine the color planes with the ColorMerge method.

In HSV color space, a color is represented by a hue, saturation (amount of white) and a value (amount of darkness). These can be remapped using the RemapHue method. This method uses several tables in the remapping process. These are the HTable property, the MaskTable property, the STable property and the VTable property. To get or set the length of these tables used in the remapping process, use the RemapHueTablesSize property. To convert between the HSV and RGB color space, use the following:

HSV_HfromRGB method

HSV_SfromRGB method

HSV_VfromRGB method

RGBfromHSV method

The LocalHistoEqualize method linearizes the number of pixels locally in a bitmap, based on the specified color space. This can be used to bring out the detail in dark areas of an image, and smooth the edges between blocks.

The LightControl method lightens or darkens all or part of a bitmap by remapping the pixel values. This method remaps the pixel values of the bitmap across the full range of available pixel values, in order to achieve the specified new average values.

The AutoColorLevel method darkens dark values and lightens light values, enhancing shadows and brightening the image automatically.

The ColorLevel method applies color leveling to an image. It changes the image's shadows, midtones and highlights.

Special Functions

The SubtractBackground method is useful, especially with medical images and grayscale bitmaps, in correcting non-uniform brightness. This method uses a rolling ball algorithm to determine what points are background points. A small rolling ball radius identifies small objects and a larger radius identifies both large and small objects. Because frequently the resulting image is dim, this method includes the functionality similar to that of the Multiply method in order to include the capability for increasing the brightness of the final image.

The DynamicBinary method converts a bitmap into a black and white image without changing its bits per pixel by using a local threshold value for each pixel of the image.

The MultiScaleEnhancement method wraps techniques of image enhancements, such as contrast enhancement, edge enhancement and latitude reduction, for Computed Radiography (CR).


Removing Noise

One-Step Noise Removal

The following methods let you remove noise in one step:

Despeckle method ( Document/Medical only)

Median method

Average method

The Despeckle method is designed specifically for removing specks from 1-bit images, such as FAX transmissions or scanned documents.

The Median method is an effective general method for removing salt-and-pepper noise from any kind of image. You control the strength of the method by specifying the size of the neighborhood (the surrounding pixels used for calculating the median value). This method causes minimal blurring of the image.

The Average method can be used to remove uniform and Gaussian noise, but there is more blurring of the image than with the median filter. You control the strength of the method by specifying the size of the neighborhood (the surrounding pixels used for calculating the arithmetic mean).

The AddWeightedBitmaps method can be used to average the bitmaps in a list, eliminating random noise contained in the images. Typically, you would call this method for a series of images taken for the same object at short intervals. This method can eliminate random noise by performing a weighted average.

The GaussianFilter method smoothes or blurs an image by applying a Gaussian filter to each pixel of the bitmap. The amount of blur is determined by the size of the neighborhood used by the method.

Creating Your Own Noise Removal Function

The following methods let you create your own function for noise removal:

BinaryFilter method (Document/Medical only)

MaxFilter method ( Document/Medical only)

MinFilter method ( Document/Medical only)

The binary filters (for erosion and dilation of black objects) can be used for noise removal. The BinaryFilter method applies directional binary filters. The MaxFilter and MinFilter methods let you control the neighborhood size for erosion or dilation. One noise removal technique with these methods is to create two copies of a bitmap, apply a dilation filter to one of them and an erosion filter to the other, then combine the two using Combine with the CB_OP_AVG (averaging) flag. To combine image data from the source bitmap (the slave) into the destination bitmap (master) using a perspective warp, use the CombineWarp method. If you want to specify the areas to be combined, the operations to be performed when combining the data, and which color planes (R or G or B or R, G, and B) are used, use the CombineExt method.

[Document/Medical only] The AutoBinary method transforms the bitmap into a binary image using a threshold calculated automatically based on statistical features of the bitmap. Best results are obtained with grayscale bitmaps.

[The Deinterlace method deinterlaces video source images by removing the black lines. It proceeds by merging lines in the image together and/or blending them together.

The SmoothEdges method smoothes the edges of a bitmap.

Fourier Transforms

Fourier Transforms are useful in removing harmonic noise like:

Herringbone patterns seen in video images

Sine wave patterns

Moiré patterns

Halftone patterns

Interference patterns

Fourier Transforms are also useful in removing noise from video signals and CCDs.

Fourier transforms convert an image from one where intensity varies over space into one where the intensity varies with frequency. After an image has been described (transformed) as a series of frequencies and phase, that information can then be analyzed using a power spectrum. The power spectrum is a two-dimensional map that plots the frequency of pixel intensity values. Low frequencies lie close to the origin and high frequencies close to the edges. From the analysis suitable filters can be applied to remove those parts of the image that correspond to the noise in the image. The image can then be retransformed back into the original image, only without the noise.

A Discrete Fourier Transform is a Fourier transform that uses a series which has values that have both a real and an imaginary component. Discrete Fourier transforms reveal periodicities in the data as well as the relative strengths of those periodicities.

Discrete Fourier Transforms can take a long time to compute. To reduce computing time, Fast Fourier Transforms can be used, which reduce the number of computations from 2N2 to 2N Lg N. However, using a Fast Fourier Transform requires that the number of points in the series be a power of 2.

The following functions provide Fourier transform capabilities:

InitFourierTransformationData method | Initialize Fourier Transform coefficients.
DiscreteFourierTransformation | Computes the Discrete Fourier Transform of an image or the Inverse Discrete Fourier Transform, whichever is specified.
FastFourierTransformation | Computes the Fast Fourier Transform of an image or the Inverse Fast Fourier Transform, whichever is specified.
FreeFourierTransformationData method | Frees the storage that was allocated by InitFourierTransformation
DisplayFourierTransformation | Converts the frequency harmonics amplitude or phase to a bitmap. It allows displaying the results of FFT and DFT as a bitmap.
FrequencyFilter | Filters the frequency harmonics according to the range rectangle.
FrequencyFilterMask | Creates a mask filter for use in removing specific frequency components from a bitmap.

The DynamicBinary method converts a bitmap into a black and white image without changing its bits per pixel.


Detecting and Enhancing Edges and Lines

The following methods let you detect and enhance edges and lines:

EdgeDetector method

Sharpen method

SpatialFilter method

IntensityDetect method

UnsharpMask method

EdgeDetectEffect method can be used to detect the edges in a bitmap and then replace the values of the edges with calculated values.

The Sharpen method is designed specifically to emphasize the edges (shifts in intensity) in a bitmap. It is a high-level method that can be used alone for the desired effect.

The SpatialFilter method provides several predefined filters for detecting edges or lines. These filters can be used alone in applications, such as industrial inspection systems, that analyze images. They can also be used to create an image that is combined with the original to change the appearance of lines or edges.

Choosing a filter is a subjective, application-specific decision. The filters use standard algorithms, some of which have similar purposes. You may need to experiment with them to choose the appropriate filter for your application. The following is a summary of the available filters:

Filter | Purpose
Emboss | Creates an image with an embossed appearance. (This is used for artistic effect, but is listed here because it is one of the predefined filters.)
Gradient directional | Detects edges, starting from any of eight specified directions. All pixels not on the detected edges are changed to black.
Prewitt | Detects horizontal or vertical edges. All pixels not on the detected edges are changed to black.
Sobel | Detects horizontal or vertical edges. All pixels not on the detected edges are changed to black. (The usage is the same as Prewitt, but the algorithm is different.)
Shift-and-difference | Detects horizontal, vertical, or diagonal edges. All pixels not on the detected edges are changed to black.
Laplacian | Detects lines. There are three omnidirectional filters and three bi-directional ones. All pixels not on the detected lines are changed to black.
Line-segment | Detects line segments. Possible directions are horizontal, vertical, left-to-right diagonal, and right-to-left diagonal. You can use this filter to find line discontinuities in an image. All pixels not on the detected line segments are changed to black.

To overcome the directional limitations of these filters, you can combine images that have been filtered in different ways. For example, you could make three copies of a bitmap, filter each one with a different Laplacian directional filter, and use the Combine method to create a bitmap with all of the detected lines. You could then combine this resulting bitmap with the original to enhance the lines in the original.

To combine image data from the source bitmap (the slave) into the destination bitmap (master) using a perspective warp, use the CombineWarp method. If you want to specify the areas to be combined, the operations to be performed when combining the data, and which color planes (R or G or B or R, G, and B) are used, use the CombineExt method.

The IntensityDetect method does not use a filter to detect edges or lines, but for some images it is more effective than the filters in detecting lines that are lighter or darker than other parts of the image.

The Skeleton method can be used to find the skeleton of regions or objects in a binary bitmap. The white color represents the objects and the black color represents the background. If the bitmap is not 1-bit image, the threshold will be used to transform the bitmap into a binary image before finding the skeleton.

The UnsharpMask sharpens an image by first creating a blurred version of the image. For each pixel in the bitmap, the difference between the original pixel value and the blurred pixel value is determined. If the difference in pixel values exceeds a threshold value, the original pixel value is modified, sharpening the image.

The EdgeDetectStatistical method can be used to detect the edges in a bitmap by applying a statistical filter that analyzes the variations of colors in all directions around each pixel.

The GlowFilter method can be used to make the colored edges in a bitmap shine with a neon-like glow.

The SmoothEdges method can be used to smooth the rough edges in a bitmap.

The DirectionEdgeStatistical method can be used to detect the variation of colors in the specified direction using statistical indices. It is similar to EdgeDetectStatistical method, but this method allows you to specify the direction angle.

The EdgeDetectEffect method performs edge detection on the image.


Applying Artistic Effects

The following methods are designed specifically for artistic effects:

Method | Purpose
AddNoise | Adds random pixels to a bitmap, letting you specify the percentage of coverage and the color plane.
AddShadow method | Adds shadows to a bitmap, letting you specify the threshold value, the direction of the light source, and whether the shadows are colored or grayscale.
Aging method | Adds effects that simulate random color changes, scratches, dust and pits, making a bitmap look like it was made from an old film.
Bending method | Wraps the bitmap along the inside or outside of an arc pattern.
Cylindrical method | Warps the bitmap to a cylindrical shape.
DiceEffect method | Splits the image into square or rectangular blocks. If the blocks are square, rotates each block by 0, 90, 180, or 270 degrees. If the blocks are rectangular, flips the blocks around the X-axis and Y-axis.
Emboss method | Applies an emboss effect to a bitmap, letting you specify the depth and direction of the effect.
FreeHandShear method | Shears the bitmap by the wave drawn using amplitude values obtained from GetCurvePoints.
FreeHandWave method | Distorts the bitmap by the wave drawn using amplitude values obtained from GetCurvePoints and a specified angle.
FunctionalLight method | Adds light to the bitmap according to a function-based distribution. This functional light will be generated by one of the following methods: linear, quadratic, sine, cosine, or using freehand points.
Impressionist method | Makes a bitmap look like it was painted by an impressionist painter.
Mosaic method | Imposes a mosaic effect on a bitmap by dividing the bitmap into tiles of a specified size and changing the color of all pixels in each tile to the average color of pixels within the tile.
MotionBlur method | Applies a filter, which creates the illusion of movement in an image.
Oilify method | Applies an oil-painting effect to a bitmap.
Pixelate method | Divides the bitmap into rectangular or circular cells and then recreates the image using those cells filled with the minimum, maximum, or average pixel value, depending upon the effect that was set.
Polar method | Converts the bitmap from rectangular to polar coordinates and vice versa.
Posterize method | Imposes a poster effect on a bitmap by quantizing the bitmap's colors to a specified number of color levels per plane. For example, two levels means two of red, two of green, and two of blue.
Punch method | Warps the bitmap by pinching it toward the center or expanding the bitmap away from its center.
PuzzleEffect method | Splits the image into square blocks and randomizes these blocks inside the image.
RingEffect method | Divides the image into a certain number of rings. Each ring is rotated according to a rotate angle. The rotate angle for each ring will be chosen randomly by the function or can be passed to the function.
RadialBlur method | Rotates the bitmap pixels around a center point.
RadWave method | Distorts a bitmap using a wave radiating from the specified center.
RevEffect method | Adds a pseudo-3D wave effect to the bitmap by drawing horizontal lines across the bitmap and basing each line’s height at each point on its brightness at that point.
RemoveRedeye method | Replaces the red component of the pixels with the specified color. To replace only the red component for those pixels in the eyes of the bitmap, select a small region around the eye(s).
Ripple method | Warps the image in concentric rings.
Segment method | Divides the bitmap into segments where each segment’s pixels have approximately the same color (homogenous color).
Spherize method | Warps the image around a 3D spherical shape.
Swirl method | Produces a swirl pattern by rotating the bitmap the specified number of degrees about the specified point.
Solarize method | Applies an effect that mimics the accidental exposure of photographic film to light.
TextureAlphaBlend method | Combines image data from a mask bitmap and an underlay bitmap with an underlay effect. The result is used as a fade mask that will be used to combine a source bitmap and a destination bitmap with variable opacity. The result is combined again with the destination bitmap using a constant opacity.
Underlay | Combines two bitmaps so that one appears to be an underlying texture for the other.
Wave method | Distorts the bitmap with two perpendicular waves at the specified angle and with the specified wave type.
Wind method | Creates thin lines, directed along the specified angle, on the specified bitmap.
ZoomBlur method | Blurs the bitmap along radial lines starting from the specified center point.
ZoomWave method | Distorts the bitmap with a wave zoomed from the specified center.
BumpMap method | Adds a three-dimensional texture pattern by applying the bump image to the destination image.
Cubism method | Remaps the bitmap into a collection of rotated rectangles (cubic faces), in the Cubist style.
DrawStar method | Draws a star on the bitmap.
Dry method | Simulates painting an image with the watercolor dry brush technique.
FreePlaneBend method | Wraps the bitmap onto a 3D plane shaped by pnCurve.
FreeRadBend method | Wraps the bitmap along its radius on a 3D surface shaped by pnCurve.
GlassEffect method | Divides the image into cells and makes it look as if it is being viewed through glass blocks.
GlowFilter method | Makes colored edges shine with a neon-like glow.
LensFlare method | Simulates the secondary reflections caused when bright lights are facing the camera lens.
Light method | Adds many spots of directed light sources to the bitmap.
LightControl method | Lightens or darkens all or part of a bitmap by remapping the pixel values.
Ocean method | Reflects the bitmap on an ocean surface.
PlaneBend method | Places the bitmap on parallel planes along the Z-axis bent towards a center point.
Plane method | Places the bitmap on parallel planes along the Z-axis.
SampleTarget method | Corrects color values by shifting the sample colors to the target colors.
SmoothEdges method | Smoothes the rough edges in the bitmap.
Tunnel method | Places the bitmap inside a tunnel along the Z-axis.

With any of these methods, except Underlay, you can limit the effect to a specified region of interest. For information about regions, refer to Creating and Using a Bitmap Region.


Correcting Colors

The following methods are designed specifically for adjusting colors in an image:

AntiAlias method

ApplyMathLogic method

AutoColorLevel method

BalanceColors method

ChangeHueSatInt method

ChannelMix method

ColorIntensityBalance method

ColorizeGray method

ColorLevel method

ColorReplace method

ColorThreshold method

Hue method

Invert method

SampleTarget method

Saturation method

SelectData method

SelectiveColor method

ShiftData method

SwapColors method


Grayscale Images

LEADTOOLS provides a number of methods for working with grayscale images. Many of these methods work on either grayscale images or color images. Some of the LEADTOOLS methods however, are designed specifically for use with grayscale images, either creating a grayscale image, getting information about a grayscale image, or window leveling.

Creating and working with grayscale images

A color image can be converted to a grayscale image using the GrayScale method. The GrayScaleExt method converts an image to a grayscale image, but provides the user the ability to control the calculation of the grayscale pixel value by giving the R, G and B components different "weights" when calculating the grayscale value.

LEADTOOLS also provides the ConvertToColoredGray method which converts a bitmap into a grayscale bitmap, while allowing the user to add color effects. This creates an image with an "old-fashioned" look. An 8, 12 or 16-bit grayscale can also be colorized using ColorizeGray method.

(Medical only) The ShiftData method selects a specified number of bits from an 8, 12 or 16-bit grayscale bitmap into a mask and places the mask in a new 8, 12 or 16-bit grayscale bitmap. The SelectData method selects a specified number of bits of an 8, 12 or 16-bit grayscale bitmap and puts them into a mask, then colors the bitmap depending on the mask. This can show bitmap variances depending on user-defined conditions.

The BitmapAlpha property lets you get or set the alpha channel information of an image.

The GrayScaleToDuotone method converts a grayscale bitmap into a colored one by mixing or replacing the original values of the pixels with new colors.

The GrayScaleToMultitone method converts a grayscale bitmap into a colored one by mixing or replacing the original values of the pixels with one or more new colors.

The Desaturate method converts the image to a grayscale level by reducing the saturation of each color to zero. The conversion will not change the color resolution.

When working with grayscale images, a LookUp Table (LUT) may be used to remap pixel values. The UseLUT property determines when the LUT is used. If the UseLUT property is TRUE, then the LUT is used in all image processing methods and when saving an image. If the UseLUT property is FALSE, the LUT is used only when painting the image. The UseLUT property is used primarily with 12 and 16-bit grayscale images, and may be used in association with window leveling. For more information on window leveling, refer to the "Window Leveling" section given below.

Changing the Highlight pen and Cursor Style (Document/Medical only)

When working with grayscale images containing many midrange grays, the highlight pen and the cursor may be difficult to see properly. When working with automation objects, change the color of the pen that is used for highlighting and selecting by calling the AnnAutoHilightPen property for the automation object. Change the cursor used by an automation object by calling the AnnAutoCursor propertyfor the automation object. By changing the highlight pen color and the cursor style, highlight and cursor visibility can be improved.

Getting information about grayscale images

LEADTOOLS also provides method for getting information about grayscale images. The GetMinMaxBits method provides information on the minimum and maximum bit set in a 12 or 16 - bit grayscale image. The GetMinMaxVal method gets the minimum and maximum intensity values present in a 12 or 16-bit grayscale image. Please note that support for 12 and 16-bit grayscale images is only available in Document/Medical toolkits.

To determine the kind of grayscale palette associated with a bitmap, if any, check the IsGrayScale property.

Window leveling (Medical only)

Window leveling is only valid for 12 and 16-bit grayscale images, and is used to map grayscale intensities by specifying the bit range and/or a user defined color map. WindowLevel converts the image to a window leveled 8 or 24 bit RGB bitmap. The bit range is passed to the functions through the LevelLowBit and LevelHighBit properties and the user defined color map is set using the LevelLUT and LevelLUTLength properties. To help set up a bit range and a color map, use GetMinMaxBits and GetMinMaxVal. GetMinMaxBits gets the minimum and maximum bits of the values present in a 12 or 16-bit grayscale image. GetMinMaxVal gets the minimum and maximum intensity values of the image. WindowLevelFillLUT fills the user-allocated LUT with a color gradient based on the specified values. For more information, refer to the individual entries for the functions. To set the window level options and process the image using a dialog, call ShowWindowLevelDlg method .


Converting 16-bit Grayscale Values

If you want to use a 16-bit grayscale value in a non LEADTOOLS procedure, you need to convert the value as follows:

Var
color: TColorRef;
gray: Cardinal;

begin
color := Lead1.Pixel[X, Y];
if (color AND COLORREF_GRAY16) <> 0 then
begin
{non standard colorref value, convert it to a windows COLORREF}
{get an 8 bit gray value corresponding to the 16 bit gray value}
gray := (color AND $FFFF) shr 8;
{ use the standard windows RGB macro to get a windows COLORREF }
color := RGB(gray, gray, gray);
end;
end;


Cleaning Up 1-Bit Images

(Document/Medical) Scanned documents often contain a number of undesirable elements, including dots, blobs, lines, borders and hole punches. LEADTOOLS provides a number of properties, methods and events that will improve the appearance of scanned documents by removing dots, blobs, lines, borders, hole punches, inverted text, bumps and nicks. The properties and methods are listed below:

BorderRemove method

DocCleanBitmap property

DocCleanSuccess property

hDocCleanRgn property

DotRemove method

HolePunchRemove method

InvertedText method

LineRemove method

Smooth method

Each method listed above takes a number of parameters that control the performance of the corresponding removal process. Included in the parameters is a set of flags that allows you to obtain a LEAD region or a Windows region that contains all the elements removed from a document. For each element found by one of the removal methods, a corresponding event is triggered. These events provide a means of customizing the removal process, as well as creating your composite of the removed regions. These events are given below:

OnBorderRemove event

OnDotRemove event

OnHolePunchRemove event

OnInvertedText event

OnLineRemove event

OnSmooth event


Detecting Registration Marks

When a user scans a form, perturbations or transformations are added to the image such as rotation, zooming, reduction, and translation (shifting in position). These effects make it difficult to identify the different parts of the form, complicating the detection and recognition phases.

Registration marks can be used to help identify and localize the different parts of the form. Registration marks are predefined shapes that are added to the original form in specific locations. These marks can then be used to identify the transformations or deformation added to the original form, and then to correct a scanned form’s orientation and resize it to its original size.

Currently, there is only one type of registration mark that has been defined for use with scanned forms (more are to be added later). The valid registration mark is a T-shaped figure as shown in the following figure. It is a "T" rotated by 90 degrees counter clockwise. The P4 point must be on the center point of Line P1P2 (that is, the distance from P1 to P4 equals the distance from P2 to P4). The line width should be greater than 2 pixels(preferably 3 pixels). There are no conditions on line lengths since you provide the values for uWidth, uHeight, uMaxScale, and uMinScale. Use the IsRegMark method to ensure the selected mark is a valid registration mark.

Currently, to be used with the registration marks methods a document image must consist of white objects on a black background.

To use the registration methods, begin with creating the reference document that contains the registration marks in the exact positions on the form that will be used for scanning. The registration marks should be placed in different areas of the form far enough apart on the form that good triangulation can be performed – but not where they would not always appear on the form in their entirety when the form is scanned. The registration methods are designed to use three designated registration marks as reference points. A sample reference form (reduced in size) is shown in the following figure:

After creating the reference document, scan it to obtain a document image. The reference document must be scanned in perfectly: any documents using the reference document for registration will be transformed to match its size, shifting, and rotation exactly.

The registration methods work by finding the (X, Y) positions of three labeled points and comparing them with the positions of these points on the scanned image. With that information it is possible to determine the shifting, rotation and scaling of the scanned image (6 equations with 5 unknowns). The unknowns are:

Shifting along the X-axis

Shifting along the Y-axis

Scaling on the X-axis

Scaling on the Y-axis

Rotation angle.

On the example form, registration marks have been placed in five locations on the form. Three of these marks are to be selected and the other two ignored (the registration functions use the three locations on the form in order to solve the equations). Select three registration marks.

For each registration mark, designate the searching area for that mark, and specify the maximum allowable shift, rotation and scaling. Each searching area should contain only one registration mark and it is preferable that the mark be located in an otherwise blank portion of the form. This information is designated using the members of the REGMARKS record(structure).

With the information in the REGMARKS record(structure) you can use the GetMarksCenterMass method to compute the center of mass for each of these marks.

Now you can scan forms and correct their orientation and size. The figure below shows a sample scanned form (reduced in size) with noticeable skew:

The next step is to search for the registration marks in the scanned image. Use the SearchRegMarks method on the scanned image to find the registration marks. If all of the registration marks were detected then use the GetMarksCenterMass method to compute the center of mass for each registration mark.

The next step is to determine the shifting, scaling and rotation necessary to re-orient the scanned image. To do this, keep track of the reference points and the transformed points obtained using the GetMarksCenterMass method, before calling the GetTransformationParameters method.

To re-orient and resize the scanned image so it is like the reference image, use the values obtained by the GetTransformationParameters method in the ApplyTransformationParameters method. This is equivalent to shifting the image using CombineExt, rotating the image using Rotate, and scaling the image using Size.(Note: It is important to do the operations in this order. You will get an incorrect result if you change the order.) The following figure (reduced in size) shows the scanned form after it has been re-oriented and re-sized:


Drawing Shapes and Text

You can draw simple lines, rectangles, or ellipses using methods and properties that implement standard Windows drawing functions. The available drawing modes, pen styles, and fill styles make it easy to use these methods and properties with the MouseMove event for interactive drawing. For these methods and properties, refer to Drawing Simple Objects.

You can also draw more sophisticated three-dimensional shapes and text. However, it is not a good idea to draw these shapes and text objects in the MouseMove event, because they do not support the inverted draw mode that lets you effectively erase an old object before drawing a new one. For these methods and properties, refer to Drawing Three-Dimensional Shapes and Text.

You can draw any of the shapes or text objects in the client area of the control or directly on the bitmap.


Drawing Simple Objects

You can draw a line, rectangle, or ellipse on the current bitmap or on the screen. Whether you draw to the bitmap or to the screen, drawing objects and text strings are always positioned in the LEAD control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

Use the following property to specify whether to draw on the bitmap or the screen:

DrawPersistence property

Use the following properties to specify object styles and colors:

DrawMode property

DrawPenColor property

DrawPenStyle property

DrawPenWidth property

DrawFillColor property

DrawFillStyle property

(Document/Medical only) AnnSetROP2 method

(Document/Medical only) AnnGetROP2 method

Use the following methods to draw objects:

DrawLine method

DrawRectangle method

DrawEllipse method


Drawing Three-Dimensional Shapes and Text

You can draw a variety of three-dimensional shapes and text objects in the LEAD control's client area or directly on the bitmap. Possible shapes are stars, rectangles, triangles, and so forth. For a complete list, refer to the DrawShape method. The text objects can be rotated to any angle, specified in tenths of degrees.

For shapes and text:

The following property determines whether the shape or text object is drawn to the control's client area or to the bitmap:

DrawPersistence property

The following properties specify the color and offsets that apply a drop shadow to the shape or text object:

ShadowColor property

ShadowXDepth property

ShadowYDepth property

To turn off the shadow, set the X and Y depths to 0.

With text objects, the drop shadow is disabled with some styles, as shown in the following examples: Style with a Shadow and Style without a Shadow.

For shapes only:

Use the following method (with related properties) to draw a specified shape.

DrawShape method

The following properties specify the position and size of the shape:

ShapeLeft property

ShapeTop property

ShapeWidth property

ShapeHeight property

The following property specifies the background style of the shape:

ShapeBackgroundStyle property

For foreground patterns and colors, use the pattern properties described in to Gradients and Patterns. The following example shows how a fill pattern can be implemented: Shape with a Fill Pattern and Drop Shadow.

If the shape uses an image as its background, the following properties specify the source rectangle that defines which part of the bitmap to use for the background:

BackgroundImageHeight property

BackgroundImageLeft property

BackgroundImageTop property

BackgroundImageWidth property

The following properties specify the primary lines of the shape:

ShapeBorderColor property

ShapeBorderStyle property

ShapeBorderThickness property

The following properties specify the inner and outer bands that give the lines of the shape a three-dimensional appearance:

ShapeInnerBandHiliteColor property

ShapeInnerBandShadowColor property

ShapeInnerBandStyle property

ShapeInnerBandThickness property

ShapeOuterBandHiliteColor property

ShapeOuterBandShadowColor property

ShapeOuterBandStyle property

ShapeOuterBandThickness property

Inner bands apply only to rectangles and squares (not other shapes). The three-dimensional effects are most effective when you specify the inner band or outer band (but not both), as shown in the following examples: Inner band raised, Inner band inset, Outer band raised, and Outer band inset.

For text only:

Use the following method (with related properties) to draw a text object:

DrawTextStr method

You can create an image that consists of a pattern or gradient color to use as a foreground of the text. Refer to Gradients and Patterns for related properties.

The following properties specify the bounding rectangle for the text object and the alignment of the text object in the rectangle:

TextLeft property

TextTop property

TextWidth property

TextHeight property

TextAlign property

The following properties specify the font and style of the text object:

TextFont property

TextStyle property

TextWordWrap property

TextAngle property

TextHiliteColor property

Use the following methods to get the width and height that are required for a specified text string using the current property settings for text objects:

DrawTextHeight method

DrawTextWidth method

These methods measure a single line of text (rotated or unrotated). They disregard the TextWordWrap property.


Combining Images

Use the following methods to combine images from two bitmaps:

AlphaBlend method

Combine method

CombineWarp method

CombineExt method

FeatherAlphaBlend method

Underlay method

Use the following methods to add or average the bitmaps:

AddBitmaps method

Use the following method to create a fade mask bitmap:

CreateFadedMask method

Use the following methods to picturize the bitmap:

PicturizeBitmapList method

PicturizeSingle method

Use the following method to replace an image with an image created from images present in a specific directory:

Picturize method

TextureAlphaBlend combines image data from a mask bitmap and an underlay bitmap with an underlay effect. The result is used as a fade mask that will be used to combine a source bitmap and a destination bitmap with variable opacity. The result is combined again with the destination bitmap using a constant opacity.


Flags for the Combine Method

The following are the flags that define treatment of the source rectangle:

Value | Meaning
CB_SRC_NOP | No change.
CB_SRC_NOT | Invert the color, resulting in its complement.
CB_SRC_0 | Change all bits to 0.
CB_SRC_1 | Change all bits to 1.

The following are the flags that define treatment of the destination rectangle:

Value | Meaning
CB_DST_NOP | No change.
CB_DST_NOT | Invert the color, resulting in its complement.
CB_DST_0 | Change all bits to 0.
CB_DST_1 | Change all bits to 1.

The following are the flags that define the operation to use when combining the data:

Value | Meaning
CB_OP_AND | Combine each set of bytes using a bitwise AND (&).
CB_OP_OR | Combine each set of bytes using a bitwise OR ( | ).
CB_OP_XOR | Combine each set of bytes using a bitwise exclusive OR (^).
CB_OP_ADD | Add the byte values, allowing a maximum of 255.
CB_OP_SUBSRC | Subtract the source from the destination, allowing a minimum of 0.
CB_OP_SUBDST | Subtract the destination from the source, allowing a minimum of 0.
CB_OP_MUL | Multiply the byte values, allowing a maximum of 255. The result is calculated as follows: result = (source * dest) / 255.
CB_OP_DIVSRC | Divide the destination by the source. If source > 0, then the result is calculated as follows: result = min( (dest / source) * 255, 255 ). Otherwise, if source = 0, then result = 255.
CB_OP_DIVDST | Divide the source by the destination. If dest > 0, then the result is calculated as follows: result = min( (source / dest) * 255, 255 ). Otherwise, if dest = 0, then result = 255.
CB_OP_AVG | Use the average of the two values.
CB_OP_MIN | Use the lesser of the two values.
CB_OP_MAX | Use the greater of the two values.

The following are the flags that define treatment of the resulting image rectangle:

Value | Meaning
CB_RES_NOP | No change.
CB_RES_NOT | Invert the color, resulting in its complement.
CB_RES_0 | Change all bits to 0.
CB_RES_1 | Change all bits to 1.


Flags for the CombineExt Method

Flags for the CombineExt method

Note:

Arithmetic calculations in this table assume 24-bit image data.

The following are the flags that define treatment of the source rectangle:

Value | Meaning
CB_SRC_NOP | [0x00000000] No change.
CB_SRC_NOT | [0x00000001] Invert the color, resulting in its complement.
CB_SRC_0 | [0x00000002] Change all bits to 0.
CB_SRC_1 | [0x00000003] Change all bits to 1.

The following are the flags that define treatment of the destination rectangle:

Value | Meaning
CB_DST_NOP | [0x00000000] No change.
CB_DST_NOT | [0x00000010] Invert the color, resulting in its complement.
CB_DST_0 | [0x00000020] Change all bits to 0.
CB_DST_1 | [0x00000030] Change all bits to 1.

The following are the flags that define the operation to use when combining the data:

Value | Meaning
CB_OP_AND | [0x00000000] Combine each set of bytes using a bitwise AND (&).
CB_OP_OR | [0x00000100] Combine each set of bytes using a bitwise OR ( | ).
CB_OP_XOR | [0x00000200] Combine each set of bytes using a bitwise exclusive OR (^).
CB_OP_ADD | [0x00000300] Add the byte values, allowing a maximum of 255.
CB_OP_SUBSRC | [0x00000400] Subtract the source from the destination, allowing a minimum of 0.
CB_OP_SUBDST | [0x00000500] Subtract the destination from the source, allowing a minimum of 0.
CB_OP_MUL | [0x00000600] Multiply the byte values, allowing a maximum of 255. The result is calculated as follows: result = (source * dest) / 255.
CB_OP_DIVSRC | [0x00000700] Divide the destination by the source. If source > 0, then the result is calculated as follows: result = min( (dest / source) * 255, 255 ). Otherwise, if source = 0, then result = 255.
CB_OP_DIVDST | [0x00000800] Divide the source by the destination. If dest > 0, then the result is calculated as follows: result = min( (source / dest) * 255, 255 ). Otherwise, if dest = 0, then result = 255.
CB_OP_AVG | [0x00000900] Use the average of the two values.
CB_OP_MIN | [0x00000A00] Use the lesser of the two values.
CB_OP_MAX | [0x00000B00] Use the greater of the two values.
CB_OP_DIF | [0x00000C00] calculate the absolute difference between two values of the two values.

The following are the flags that define treatment of the resulting image rectangle:

Value | Meaning
CB_RES_NOP | [0x00000000] No change.
CB_RES_NOT | [0x00001000] Invert the color, resulting in its complement.
CB_RES_0 | [0x00002000] Change all bits to 0.
CB_RES_1 | [0x00003000] Change all bits to 1.

The following are the flags that define the channel of the source image rectangle:

Value | Meaning
CB_SRC_MASTER | [0x00000000] perform operation on all Channels.
CB_SRC_RED | [0x00010000] perform operation on Red Channel.
CB_SRC_GREEN | [0x00020000] perform operation on Green Channel.
CB_SRC_BLUE | [0x00030000] perform operation on Blue Channel.

The following are the flags that define the channel of the destination image rectangle:

Value | Meaning
CB_DST_MASTER | [0x00000000] perform operation on all Channels.
CB_DST_RED | [0x00100000] perform operation on Red Channel.
CB_DST_GREEN | [0x00200000] perform operation on Green Channel.
CB_DST_BLUE | [0x00300000] perform operation on Blue Channel.

The following are the flags that define the channel of the resulting image rectangle:

Value | Meaning
CB_RES_MASTER | [0x00000000] perform operation on all Channels.
CB_RES_RED | [0x01000000] perform operation on Red Channel.
CB_RES_GREEN | [0x02000000] perform operation on Green Channel.
CB_RES_BLUE | [0x03000000] perform operation on Blue Channel.


Flags for the ApplyMathLogic method

The following flags indicate the channel that will be used:

Value | Meaning
CHANNEL_MASTER | [$00000000] All channels.
CHANNEL_RED | [$00000001] Red channel only.
CHANNEL_GREEN | [$00000002] Green channel only.
CHANNEL_BLUE | [$00000003] Blue channel only.

The following flags indicate how to treat the color value:

Value | Meaning
AML_VALUE_NOP | [$00000000] No change.
AML_VALUE_NOT | [$00000010] Invert the color, resulting in its complement.
AML_VALUE_0 | [$00000020] Change all bits to 0.
AML_VALUE_1 | [$00000030] Change all bits to 1.

The following flags indicate the mathematical operation to use. The operations are performed between each component (R, G and B) and nFactor:

Value | Meaning
AML_OP_AND | [$00000000] Combine each pixel component value and nFactor using a bitwise AND (&).
 | (pixel = pixel & nFactor)
AML_OP_OR | [$00000100] Combine each pixel component value and nFactor using a bitwise OR (|).
 | (pixel = pixel | nFactor)
AML_OP_XOR | [$00000200] Combine each pixel component value and nFactor using a bitwise XOR (^).
 | (pixel = pixel ^ nFactor)
AML_OP_ADD | [$00000300] Add pixel component value to the nFactor clamping the result to the maximum allowed pixel value.
 | (pixel = min(pixel + nFactor, MAX_PIXEL_VALUE) )
AML_OP_SUBFACT | [$00000400] Subtract each pixel component value from the nFactor, clamping the result to the allowed pixel range.
 | (pixel = min(max(nFactor - pixel, MIN_PIXEL_VALUE), MAX_PIXEL_VALUE) )
AML_OP_SUBVALUE | [$00000500] Subtract nFactor from each pixel component value, clamping the result to the allowed pixel range
 | (pixel = min(max(pixel – nFactor), MIN_PIXEL_VALUE, MAX_PIXEL_VALUE) )
AML_OP_ABSDIF | [$00000600] Calculate the absolute difference between nFactor and each pixel component value.
 | (pixel = abs(pixel – nFactor))
AML_OP_MUL | [$00000700] Multiply each pixel component value by nFactor/100.
 | (pixel = pixel * nFactor / 100)
AML_OP_DIVFACT | [$00000800] Divide each pixel component value by nFactor/100. An error will be returned if nFactor = 0.
 | (pixel = pixel * 100 / nFactor)
AML_OP_DIVVALUE | [$00000900] Divide nFactor by each pixel values. If the pixel values are 0, the result set to maximum allowed pixel value. (pixel = pixel ? min(nFactor / pixel, MAX_PIXEL_VALUE) : MAX_PIXEL_VALUE)
AML_OP_AVG | [$00000A00] Use the average of the each pixel component value and
 | nFactor.
 | (pixel = (pixel+nFactor) / 2).
AML_OP_MIN | [$00000B00] Use the lesser of the pixel component values and nFactor:
 | (pixel = min(pixel, nFactor) )
AML_OP_MAX | [$00000C00] Use the greater of the pixel component values and nFactor:
 | (pixel = max(pixel, nFactor) )

The way MIN_PIXEL_VALUE and MAX_PIXEL_VALUE are calculated depends on the bits per pixel and whether the bitmap is signed or unsigned:

if bitmap is unsigned (most common):

MAX_PIXEL_VALUE will be : 255 (8-bit), 4095 (12-bit) or 65535 (16-bit)

MIN_PIXEL_VALUE = 0

if the bitmap is signed (rare case):

MAX_PIXEL_VALUE will be : 127 (8-bit), 2047 (12-bit) or 32767 (16-bit)

MIN_PIXEL_VALUE will be -128 (8-bit), -2048 (12-bit) or -32768 (16-bit)

The following flags indicate how to treat the output value:

Value | Meaning
AML_RES_NOP | [$00000000] No change.
AML_RES _NOT | [$00001000] Invert the color, resulting in its complement.
AML_RES _0 | [$00002000] Change all bits to 0.
AML_RES _1 | [$00003000] Change all bits to 1.

If the lFlags is AML_OP_AND, AML_OP_OR, AML_OP_XOR, AML_OP_ADD, AML_OP_MIN, AML_OP_MUL, AML_OP_MAX, AML_OP_DIVVALUE , or AML_OP_SUBVALUE, the valid range of nFactor is:

From MIN_PIXEL_VALUE to MAX_PIXEL_VALUE.

For uFlags equal to AML_OP_SUBFACT, AML_OP_DIF, AML_OP_AVG, the valid range of nFactor is:

From 2 * MIN_PIXEL_VALUE to 2 * MAX_PIXEL_VALUE.


List of Spatial Filters

The following is a list of the predefined spatial filters that can be applied using the SpatialFilter method:

Value | Meaning
FLT_EMBOSS_N FLT_EMBOSS_NE FLT_EMBOSS_E FLT_EMBOSS_SE FLT_EMBOSS_S FLT_EMBOSS_SW FLT_EMBOSS_W FLT_EMBOSS_NW | Creates an image with an embossed appearance. (This is used for artistic effect, but is listed here because it is one of the predefined filters.) Choose the appropriate value for the direction of the effect.
FLT_GRADIENT_N FLT_GRADIENT_NE FLT_GRADIENT_E FLT_GRADIENT_SE FLT_GRADIENT_S FLT_GRADIENT_SW FLT_GRADIENT_W FLT_GRADIENT_NW | Detects edges using a Gradient directional filter. All pixels not on the detected edges are changed to black. Choose the appropriate value for the direction of the effect.
FLT_LAPLACE_1 FLT_LAPLACE_2 FLT_LAPLACE_3 FLT_LAPLACE_DIAG FLT_LAPLACE_HORZ FLT_LAPLACE_VERT | Applies Laplacian line detection. There are three omnidirectional filters and three bi-directional ones. All pixels not on the detected lines are changed to black.
FLT_SOBEL_HORZ FLT_SOBEL_VERT | Applies Sobel edge detection. All pixels not on the detected edges are changed to black. (The usage is the same as Prewitt, but the algorithm is different.) Choose the appropriate value for horizontal or vertical detection.
FLT_PREWITT_HORZ FLT_PREWITT_VERT | Applies Prewitt edge detection. All pixels not on the detected edges are changed to black. (The usage is the same as Sobel, but the algorithm is different.) Choose the appropriate value for horizontal or vertical detection.
FLT_SHIFTDIFF_DIAG FLT_SHIFTDIFF_HORZ FLT_SHIFTDIFF_VERT | Applies shift-and-difference edge detection. All pixels not on the detected edges are changed to black. Choose the appropriate value for diagonal, horizontal, or vertical detection.
FLT_LINESEG_HORZ FLT_LINESEG_VERT FLT_LINESEG_LTOR FLT_LINESEG_RTOL | Applies line segment line detection. You can use this filter to find line discontinuities in an image. All pixels not on the detected line segments are changed to black. Choose the appropriate value for horizontal, vertical, left-to-right diagonal, or right-to-left diagonal detection.


Managing Color Separations

Use the following methods to create color separations or to combine existing color separations:

ColorSeparate method

ColorMerge method

Use the following property to access the color separations:

ColorPlanes property


Printing a Bitmap

Printing an Image

Use the following method to print an image in any device context:

Render method

The RenderCenter property lets you center an image, horizontally, vertically, or both, when printing.

To center the image horizontally, set the RenderCenter property to TRUE, then call the Render method with the iLeft parameter set to 0.

To center the image vertically, set the RenderCenter property to TRUE, then call the Render method with the iTop parameter set to 0.

To center an image both horizontally and vertically when printing, set the RenderCenter property to TRUE, then call the Render method with both iLeft and iTop set to 0.


Using Histograms

The following elements let you create and use a histogram, which charts the intensity levels in a bitmap:

GetHistogram method

HistogramTable property

When working with 12 or 16-bit grayscale images, use the following to create a histogram and to determine the size of the histogram:

GetHistogramGray method

HistogramGrayTable property

HistogramGrayTableSize property

Please note that support for 12 and 16-bit grayscale images is only available in the Document/Medical toolkits.


Using the Windows API

You can get the device context for the LEAD control's client area or for the bitmap in memory. Thus, you can use Windows API functions that require a device context. For example, you can use GDI drawing functions to add lines, shapes, or text to the bitmap.

Use the following methods to create and release a device context for the bitmap in memory:

GetBitmapDC method

ReleaseBitmapDC method

Use the following methods to create and release a device context for the LEAD control's client area:

GetClientDC method

ReleaseClientDC method


Creating and Using a Bitmap Region

A bitmap region is an area of interest within a bitmap. A bitmap can have only one region at a time, but the region can be complex, including, for example, multiple noncontiguous shapes.

When a bitmap has a region, the LEADTOOLS methods that modify the pixel values (for example Posterize method) act on the region, rather than the whole bitmap. For a list of these methods, refer to Raster Images: Where the Region Preempts the Bitmap.

In addition, the LEADTOOLS methods that flip, reverse, rotate, shear, or resize a bitmap also transform the region to match the bitmap. For example, if you were to shear a bitmap that had a rectangular region, the region would become a parallelogram. For a list of these methods, refer to Raster Images: Methods That Transform the Region and the Bitmap.

By default, a bitmap does not have a region. You can create a simple bitmap region using the RgnMarkingMode property, which automates region creation. You can create a more complex bitmap region by calling one or more of the SetRgn... methods. Each time you call one of these methods, you specify how the new region is to be added to the existing bitmap region (if there is one). For a description of the possibilities, refer to Flags for Setting a Region.

To create a new region, or update an existing region, based on either an HSV range or an RGB range, use the SetRgnColorHSVRange method or the SetRgnColorRGBRange method. To convert between HSV and RGB color space, use the following:

HSV_HfromRGB method

HSV_SfromRGB method

HSV_VfromRGB method

RGBfromHSV method

To create a new region, or update an existing region, based on either an HSV range or an RGB range, use SetRgnColorHSVRange method or the SetRgnColorRGBRange method. To convert between HSV and RGB color space, use the following:

HSV_HfromRGB method

HSV_SfromRGB method

HSV_VfromRGB method

RGBfromHSV method

Automatic Creation of a Region

Use the RgnMarkingMode property to enable automatic creation of a region, based on OnMouseDown, OnMouseMove, and OnMouseUp events. This method supports creation of a rectangle, rounded rectangle, ellipse, or freehand region. It automatically handles scaling differences between the displayed image and the bitmap. On the OnMouseDown event, it begins outlining where the region will appear on the screen. It updates the outline on each OnMouseMove event. Then, on the OnMouseUp event, it deletes the displayed outline and creates the bitmap region. To make an outline of the region visible at that point, you must set the RgnFrameType property.

RgnMarkingMode property

The following event occurs each time the bitmap region is created or updated. It is especially useful with the RgnMarkingMode property, which automates the creation of regions.

OnRgnChange event

Use the following property to display an outline of the current region:

RgnFrameType property

Creating and Using a Floater

A floater is an additional bitmap that is associated with the LEAD Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control’s bitmap. There are two modes of floater creation: Automatic and Manual.

Automatic Creation of a Floater

To create a floater automatically set the AutoFloater property to True, define a region in the Main Control's bitmap and set the EnableFloater property to True. If the mouse is clicked anywhere inside the region, a floater is created from this region. It can then be dragged to another location inside the bitmap. Clicking inside the bitmap and outside the region causes the floater to be pasted and a new region to be created.

Manual Creation and Manipulation of a Floater

The following property lets you create the floater bitmap by assigning the LEAD control's Bitmap property to it. The floater bitmap that this creates is the size of the bounding rectangle of the main bitmap's region, and it contains the same region as the main bitmap.

Floater property

The following property lets you display or hide the floater:

FloaterVisible property

If you want to paste a floater into a new position, you must assign the floater to a second LEAD control, move the first LEAD control's region to the floater's position, then use the Combine method to paste the second control's bitmap at that position. The region acts as a mask with the combine operation.

The following method lets you see whether a point in the LEAD control's client area is in the floater. It is commonly used in the OnMouseDown event to test whether the mouse click selects the floater.

IsPtInFloater method

Use the following methods to position and size the display of the floater by setting destination rectangles. These methods are commonly used in the OnMouseMove event to reposition the floater in the LEAD control's client area. If the floater is visible, its region is automatically repainted when you set the destination rectangle. If the AutoSetRects property is set to True, the destination rectangle defaults to the size of the floater bitmap, and the clipping rectangle defaults to the size of the LEAD control's client area. Therefore, you must set the destination rectangle to the desired position, but you do not have to set the clipping rectangle unless you want to display only part of the floater.

SetFloaterDstRect method

SetFloaterDstClipRect method

Use the following properties to get the current destination rectangles of the floater. (You can also set these properties, but the floater will repaint each time you set one of the properties.)

FloaterDstHeight property

FloaterDstLeft property

FloaterDstTop property

FloaterDstWidth property

FloaterDstClipHeight property

FloaterDstClipLeft property

FloaterDstClipTop property

FloaterDstClipWidth property

Use the following read-only properties to get the size of the floater bitmap:

FloaterHeight property

FloaterWidth property

If you want to paste a floater into a new position, you must assign the floater to a second LEAD control, move the first LEAD control's region to the floater's position, then use the Combine method to paste the second control's bitmap at that position. The region acts as a mask with the combine operation.

Storing, Retrieving, and Deleting Regions

Use the following methods to store a copy of the region from the floater or main bitmap, and to delete the stored region when you no longer need it. Keep in mind that the region data contains only positioning information, not the bitmap's pixel values.

GetRgnHandle method

DeleteRgnHandle method

Use the following method to remove the current bitmap region and free the region data from memory:

FreeRgn method

Use the following method to add a stored region to the current bitmap region. You can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region.

SetRgnHandle method

Getting Region Information

Use the following methods and properties to get information about the current bitmap region.

HasRgn property

IsPtInRgn method

GetRgnArea method

RgnHeight property

RgnLeft property

RgnTop property

RgnWidth property

Rows within a region can have 0, 1, or more segments per row. To get the segments contained within the region for a particular row, call the GetBitmapClipSegments and GetBitmapClipSegmentsMax methods.

Low-Level Methods for Creating Regions

Use the following methods to add a new region to the bitmap. You can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For a description of the possibilities, refer to Flags for Setting a Region.

The coordinates that you use with these methods are relative to the LEAD bitmap in memory, not to the client area.

These methods are for a new region with a simple shape:

SetRgnEllipse method

SetRgnRect method

SetRgnRoundRect method

This method is for a new region that consists of all pixels of a specified color:

SetRgnColor method

Use SetRgnMagicWand to set a region based on the color of a specified point. To create a region based on the color of a specified point and a range of tolerance values, use the SetRgnBorder method.

These methods are for a new polygonal region. You build an ordered array of points for the vertices of the polygon; then create the region based on the array. The PolygonSize property specifies the size of the array. You can either specify a large array to start with, or you can increase the size of the array when necessary (without losing the existing points).

PolygonSize property

PolygonPoint property

SetRgnPolygon method

LEADTOOLS also provides a number of methods and properties for creating a curve region or adding a curve region to an existing bitmap region. To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

A standard curve can be converted to a series of Bezier points using the CurveToBezier method. This method updates the following properties with information about the Bezier points created:

BezierSize property

BezierX property

BezierY property

Manipulating a Region

Use the following method to move the current bitmap region. The values that you use are relative to the LEAD bitmap in memory, not to the client area.

OffsetRgn method

Set the RgnFrameColor property to display a filled, color representation of a region.

To resize a bitmap region a specific number of pixels, use the ResizeRgn method.

Use the HolesRemovalRgn method to remove holes from a bitmap region.

Regions and Masks

The CreateMaskFromBitmapRgn method creates a 1-bit mask image from the region defined in the Bitmap property, and updates the MaskBitmap property with it. In this 1-bit mask image, pixels from the region are white, and all others are black.

Use the SetRgnFromMask method to create or update a bitmap region present in the Bitmap property, by adding the region specified in the MaskBitmap property. The region in the MaskBitmap property consists of all the white pixels in the 1-bit image.

Working with the Current Region

The GetRgnContourPoints method is used to get the contour points for a region within a bitmap. The parameters of the method are updated with the points found and with the number of contour points found. These points can then be used by the GetFeretsDiameter method to determine the maximum distance between two points on the perimeter of the region. The GetFeretsDiameter method in turn updates its parameters with information about the Feret's diameter.


Flags for Setting a Region

By default, a bitmap does not have a region. You create a bitmap region by calling one or more of the SetRgn... methods. Each time you call one of these methods, you specify how the new region is to be added to the existing bitmap region (if there is one). The following is a list of the options:

L_RGN_AND | The resulting region includes only the intersection of the existing region and the new one. The following example shows the result, where the rectangles represent the existing region, the ellipse represents the new one, and the shaded area represents the resulting region.
L_RGN_SET | The resulting region includes only the new region. The existing region, if any, is discarded. The following example shows the result, where the ellipse is the new region and the shaded area is the resulting region.
L_RGN_SETNOT | The resulting region includes everything in the bitmap, except the new region. The existing region, if any, is discarded. The following example shows the result, where the ellipse is the new region and the shaded area is the resulting region.
L_RGN_ANDNOTBITMAP | The resulting region includes the intersection of the area outside the existing region and the area inside the new region. The following example shows the result, where the rectangle is the existing region, the ellipse is the new one, and the shaded area is the resulting region.
L_RGN_ANDNOTRGN | The resulting region includes the intersection of the area inside the existing region and the area outside the new region. The following example shows the result, where the rectangle is the existing region, the ellipse is the new one, and the shaded area is the resulting region.
L_RGN_OR | The resulting region includes the area inside the existing region and the area inside the new region. The following example shows the result, where the rectangle is the existing region, the ellipse is the new one, and the shaded area is the resulting region.
L_RGN_XOR | The resulting region includes the area inside the existing region and the area inside the new region, except for any areas where the two intersect. The following example shows the result, where the rectangle is the existing region, the ellipse is the new one, and the shaded area is the resulting region.


Working with the Alpha Channel

Use the following property to work with a bitmap's alpha channel:

BitmapAlpha property

Typically, an alpha channel contains a mask that is used for transparency. This property, used with the region processing methods, lets you implement transparency in saved images.


Implementing Annotations

Note:

This topic is for Document/Medical only.

LEADTOOLS maintains annotations separately from bitmaps. Annotations, which are based on vector drawing functions, are associated with a bitmap only as an overlay of the displayed image. Ordinarily, your application code is responsible for maintaining the relationships between images and annotations. For example, the annotation example that ships with LEADTOOLS creates an annotation file that has the same name as its associated image file, but with a different extension. When the image file is loaded, the program looks for an associated annotation file and loads it as well.

The LEAD control implements annotations by turning on automated features. You can set the following property to let a user add annotations (in design mode) or view annotations (in run mode). You can also use this property to make the annotations invisible.

AnnUserMode property

The following property lets you automatically rotate annotations to match the bitmap's rotation:

AnnAutoRotate property

The following property lets you automatically resize annotations to match the bitmap, after the bitmap has been resized:

AnnAutoResize property

In design mode, the following property lets you select an annotation tool:

AnnTool property

Run mode activation of a hot spot or button annotation generates the following event where you can add your own code:

OnAnnClicked event

If your application requires you to uniquely identify an annotation object, you can use the following methods to maintain numeric tags, and retrieve an object based on that tag:

AnnSetTag method

AnnGetTag method

AnnGetObjectFromTag method

The following method lets you identify the type of the specified annotation object:

AnnGetType method

To determine the number of items present in an object, use the following:

OnAnnEnumerate event

AnnEnumerate method

The following events let you add code to adapt your application to the automated annotation features:

OnAnnCreate event

OnAnnDestroy event

OnAnnDrawn event

OnAnnChange event

OnAnnSelect event

The AnnGetItemHandle method accesses a specific handle from an array of handles. The array of handles can be obtained from the following:

AnnGetSelectList method

OnAnnSelect event

OnAnnHyperlinkMenu event

The following methods let you flip, reverse, rotate, or move annotations programmatically:

AnnFlip method

AnnReverse method

AnnRotate method

AnnMove method

AnnRectHeight property

AnnRectLeft property

AnnRectTop property

AnnRectWidth property

The following properties and methods let you create and manipulate annotation objects:

AnnAutoCursor property

AnnAutoHilightPen property

AnnCreateItem method

AnnCreate method

AnnInsert method

AnnSetAutoDefaults method

AnnRectLeft property

AnnRectHeight property

AnnRectTop property

AnnRectWidth property

AnnGetROP2 method

AnnSetROP2 method

AnnSetVisible method

AnnGetVisible method

AnnSetSelected method

AnnGetSelected method

AnnSetShowFlags method

AnnGetShowFlags method

AnnSetTransparent method

AnnGetTransparent method

AnnSetTransparentColor method

AnnGetTransparentColor method

AnnGetNodes method

AnnGetProtractorOptions method

AnnSetNodes method

AnnSetProtractorOptions method

AnnGetAutoBackColor method

AnnSetAutoBackColor method

AnnGetAngle method

The following methods and property let you get and set image files associated with annotation objects:

AnnSetBitmap method

AnnGetBitmap method

AnnSetMetafile method

AnnGetMetafile method

AnnSetSecondaryBitmap method

AnnGetSecondaryBitmap method

AnnPredefinedBitmap property

AnnGetSecondaryMetafile method

AnnSetPredefinedMetafile method

AnnGetPredefinedMetafile method

The following properties let you get the boundaries of the bounding rectangle of the specified annotation object:

AnnBoundingRectHeight property

AnnBoundingRectLeft property

AnnBoundingRectTop property

AnnBoundingRectWidth property

The following methods let you group or ungroup annotations:

AnnGetGrouping method

AnnGroup method

AnnSetGrouping method

AnnUngroup method

For more information on grouping and ungrouping annotations, refer to Grouping and Ungrouping Annotation Objects.

The following methods provide selection capabilities:

AnnGetSelected method

AnnRemove method

AnnSelectPoint method

AnnSelectRect method

AnnGetSelectRect method

AnnGetContainer method

AnnGetTopContainer method

AnnCut method

AnnHitTestExt method

AnnGetType methode

AnnShowLockedIcon property

AnnGetSelectCount method

AnnSetSelected method

AnnInsert method

You can manipulate the mouse when working with annotations using the following:

OnAnnMouseDown event

OnAnnMouseMove event

OnAnnMouseUp event

SetMousePos method

The following method lets you apply annotations to the bitmap, itself.

AnnRealize method

The following method lets you restore the background of redact objects.

AnnUnrealize method

The following methods let you load annotations from a file or save them to a file:

AnnLoad method

AnnDataPath property

AnnLoadMemory method

AnnSave method

AnnSaveMemory method

The following method lets you save annotations in a Wang compatible TIFF tag:

AnnSaveTag method

The following methods and property support Windows clipboard operations:

AnnCopy method

AnnPasteReady property

AnnPaste method

The following properties and methods let you control and customize the menus and other text strings that appear in automation mode:

AnnAutoDialogFontSize property

AnnAutoMenuEnable property

AnnAutoDrawEnable property

AnnGetAutoText method

AnnSetAutoText method

AnnGetAutoMenuItemEnable method

AnnSetAutoMenuItemEnable method

For information on modifying the annotation automation menu through the AnnMenu object, refer to Annotation Menu.

To undo changes made to objects or automation operations, use the following methods and properties:

AnnAddUndoNode method

AnnUndo method

AnnUndoDepth property

AnnUndoEnable property

For more information on undoing operations, refer to Undoing Automation Operations.

You can use LEADTOOLS DLL functions to further customize the automated annotation features. Keep in mind, however, that the VCL relies on particular ways of identifying, and positioning annotation objects. Modifying the behavior with DLL functions can break the automated features. The following methods, properties, and events can be helpful when using DLL functions:

AnnContainer property

AnnAutomation property

AnnGetSelectCount method

AnnGetSelectList method

OnAnnSelect event

AnnGetPointCount method

AnnGetPointX method

AnnGetPointY method

AnnGetSelected method

AnnRemove method

AnnCut method

AnnGetTopContainer method

AnnGetContainer method

User Interface for Annotations

In design mode, you can select tools using the AnnTool property and draw annotation objects over the image in the window. You can then use the right mouse button to get a pop-up menu that is tailored to each object type. You can include the Annotation Toolbar to make tool selection easier. The toolbar and the pop-up menu appear as shown in the following example:

The popup menu is context sensitive. It lists only the properties that can be changed on the selected object or objects. If you use the popup menu to change a property, the value that you specify is applied to the current selection, and it becomes the default for the next object.

The following topics describe the automated annotation features for particular objects and tools:

Setting Defaults

Selection Pointer Tool

Line Tool

Rectangle Tool

Ellipse Tool

Polyline Tool

Polygon Tool

Pointer Tool

Freehand Line Tool

Highlight Tool

Redaction Tool

Text Tool

Note Tool

Stamp Tool

Hot spot Tool

Button Tool

Audio Clip Tool

Ruler Tool

Cross product Tool

Point Tool

Protractor Tool

Video Tool

PushPin Tool

Freehand Hot Spot Tool

Rubber Stamp Tools

Curve Tool

Closed Curve Tool

RTF Tool

PolyRuler Tool

Encrypt Tool

Text Pointer Tool

See Also

Grouping and Ungrouping Annotation Objects

Annotation Toolbar

Annotation Menu

Annotation Point

ANNPOINT record


Annotation Files

Note:

This topic is for Document/Medical only.

LEADTOOLS maintains annotations separately from bitmaps. The user's application code is responsible for maintaining the relationships between images and annotations. For example, the annotation example that ships with LEADTOOLS creates an annotation file that has the same name as its associated image file, but with a different extension. When the image file is loaded, the program looks for an associated annotation file and loads it as well.

LEADTOOLS provides several properties and methods for handling annotation files. Annotation files can be stored on a disk, in memory or they may be embedded in another file. To load annotation files in these varied locations, LEAD provides the following:

AnnLoad method

AnnLoadMemory method

Each annotation file contains information about the annotations stored in that file. This information can be obtained using the following methods:

AnnFileInfo method

AnnFileInfoMemory method

These methods each update the following properties:

AnnInfoFormat property

AnnInfoTotalPages property

AnnInfoVersion property

Annotation files may contain a single page, or they may be multi-page. In a multi-page file, pages may be deleted using the following methods:

AnnDeletePage method

AnnDeletePageMemory method

Finally, annotation files may be saved to disk, to memory, or embedded within another file, using the following methods:

AnnSave method

AnnSaveMemory method


Annotation Menu

Note:

This topic is for Document/Medical only.

LEADTOOLS provides an AnnMenu object, accessible through the OnAnnMenu event, which lets you modify the annotation automation menu. A pointer to an AnnMenu object is passed to the AnnMenu event. At this point, you can modify this object using the following methods and properties:

AddItem method

Count property

DeleteItem method

GetSubMenu method

ItemChecked property

ItemEnabled property

ItemID property

ItemString property

ItemType property

When a user-defined annotation automation menu item is clicked, an OnAnnUserMenu event is fired. If the user-defined menu item was added using the AddItem method, then the OnAnnUserMenu event receives the same item ID that was passed to the AddItem method.


Annotation Points

Note:

This topic is for Document/Medical only.

LEADTOOLS provides a TAnnPoints class, accessible through the AnnGetPointX method, and AnnGetPointY method, which lets you access the points that make up an annotation object.

Each point in this class can be accessed through the Point property, which is a pointer to an ANNPOINT record.


Annotation Toolbar

Note:

This topic is for Document/Medical only.

LEADTOOLS provides properties, methods, and events for creating and modifying an annotation toolbar.

To create the toolbar call the CreateTB method.

To make the toolbar visible or invisible, set the Visible property.

For determining the number of toolbar buttons present and the orientation, use the following:

ButtonCount property

ButtonColumns property

ButtonRows property

To modify individual buttons on the toolbar, use the following:

ButtonTool property

ButtonToolCount property

ButtonMenuTool property

ButtonMenuText property

ButtonMenuTextID property

ButtonBitmapDown property

ButtonBitmapUp property

ButtonToolTipText property

ButtonToolTipTextID property

ButtonVisible property

Events associated with the toolbar:

OnAnnToolChecked event

OnAnnToolDestroy event


Annotation Toolbar Buttons

The following are constants for the available Annotation Toolbar Buttons.

Value | Meaning
ANN_TOOL_SELECT | [0] Selection Pointer Tool
ANN_TOOL_LINE | [1] Line Tool
ANN_TOOL_RECT | [2] Rectangle Tool
ANN_TOOL_ELLIPSE | [3] Ellipse Tool
ANN_TOOL_POLYLINE | [4] Polyline Tool
ANN_TOOL_POLYGON | [5] Polygon Tool
ANN_TOOL_POINTER | [6] Pointer Tool
ANN_TOOL_FREEHAND | [7] Freehand Line Tool
ANN_TOOL_HILITE | [8] Highlight Tool
ANN_TOOL_REDACT | [9] Redaction Tool
ANN_TOOL_TEXT | [10] Text Tool
ANN_TOOL_NOTE | [11] Note Tool
ANN_TOOL_STAMP | [12] Stamp Tool
ANN_TOOL_BUTTON | [13] Button Tool
ANN_TOOL_HOTSPOT | [14] Hot spot Tool
ANN_TOOL_AUDIO | [15] Audio Clip Tool
ANN_TOOL_RULER | [16] Ruler Tool
ANN_TOOL_CROSSPRODUCT | [17] Cross product Tool
ANN_TOOL_POINT | [18] Point Tool
ANN_TOOL_PROTRACTOR | [19] Protractor Tool
ANN_TOOL_PUSHPIN | [21] PushPin Tool
ANN_TOOL_FREEHANDHOTSPOT | [22] Freehand Hot Spot Tool
ANN_TOOL_CURVE | [23] Curve Tool
ANN_TOOL_CURVECLOSED | [24] Closed Curve Tool
ANN_TOOL_ENCRYPT | [25] Encrypt Tool
ANN_TOOL_TEXTPOINTER | [26] Text Pointer Tool
ANN_TOOL_POLYRULER | [27] Polyruler Tool
ANN_TOOL_RTF | [28] Rich Text Tool
ANN_TOOL_STAMP_FIRST | [29] First Stamp /* define that marks the first rubber stamp */
ANNTOOL_STAMP_APPROVED | [29] Approved Stamp
ANNTOOL_STAMP_ASSIGNED | [30] Assigned Stamp
ANNTOOL_STAMP_CHECKED | [31] Checked Stamp
ANNTOOL_STAMP_CLATPRV | [32] Client Attorney Privilege
ANNTOOL_STAMP_COPY | [33] Copy Stamp
ANNTOOL_STAMP_DRAFT | [34] Draft Stamp
ANNTOOL_STAMP_EXTENDED | [35] Extended Stamp
ANNTOOL_STAMP_FAX | [36] Fax Stamp
ANNTOOL_STAMP_FAXED | [37] Faxed Stamp
ANNTOOL_STAMP_IMPORTANT | [38] Important Stamp
ANNTOOL_STAMP_INVOICE | [39] Invoice Stamp
ANNTOOL_STAMP_NOTICE | [40] Notice Stamp
ANNTOOL_STAMP_OFFICIAL | [41] Official Stamp
ANNTOOL_STAMP_ONFILE | [42] On File Stamp
ANNTOOL_STAMP_PAID | [43] Paid Stamp
ANNTOOL_STAMP_PASSED | [44] Passed Stamp
ANNTOOL_STAMP_PENDING | [45] Pending Stamp
ANNTOOL_STAMP_PROCESSED | [46] Processed Stamp
ANNTOOL_STAMP_RECEIVED | [47] Received Stamp
ANNTOOL_STAMP_REJECTED | [48] Rejected Stamp
ANNTOOL_STAMP_RELEASE | [49] Release Stamp
ANNTOOL_STAMP_SENT | [50] Sent Stamp
ANNTOOL_STAMP_SHIPPED | [51] Shipped Stamp
ANNTOOL_STAMP_TOPSECRET | [52] Top Secret Stamp
ANNTOOL_STAMP_URGENT | [53] Urgent Stamp
ANNTOOL_STAMP_VOID | [54] Void Stamp
ANNTOOL_STAMP_LAST | [55] /* define that marks the last rubber stamp */
ANNTOOL_LAST | [56]
ANN_TOOL_USER | [0x0100] First user defined tool
ANN_TOOL_USERLAST | [0x0200] Last allowed user defined tools


Converting Annotation Automation Dialogs to other Languages

Note:

This topic is for Document/Medical only.

The annotation DLL provided with the English version of LEADTOOLS produces annotation automation dialogs with English strings. To convert the annotation automation dialogs to other languages, it is necessary to modify the dialog strings and, depending on the language, the font size and name. For languages that use English characters, the dialogs can be translated by just changing the dialog strings. This can be done as follows:

LEAD1.AnnAutoDialogFontSize = 15

For some languages, such as Japanese and Chinese, special fonts are required to display the characters of that language. These characters are often larger than English characters. Consequently, it is necessary to change the dialog strings, the font name and the font size. For example, to use Japanese strings with the English annotation DLL, the following must be done:

1.

Change the font size and name for the automation dialogs as follows:

// Change the font size.
// The English version uses 8 as a default.
// The Japanese version uses 9.
LEAD1.AnnAutoDialogFontSize
 = 9;
//Change the font name.
AnnSetAutoText ANNAUTOTEXT_DIALOG_FONT, "Japanese Font Name"

2.

Change all the automation strings as follows:

AnnSetAutoText ANNAUTOTEXT_XXX, "New Japanese String."


Grouping and Ungrouping Annotation Objects

Note:

This topic is for Document/Medical only.

Note:

This topic only applies for annotation automation mode.

If more than one object is selected when the right mouse button is pressed, the "Group" menu option appears and lets you groups the selected objects. From that moment on, all the grouped objects are acted on as one in automation mode. When you select one object, all objects become selected. When you unselect an object belonging to a group, all objects in that group are unselected.

To select only one object in a group, you must ungroup them. When you select a "grouped" set of objects and press the right mouse button, the "Ungroup" option appears in the menu. Selecting that option "ungroup" the objects. After that, objects are independent (you can select one without selecting the others).

Each container has a "Grouping" feature, which determines whether the objects contained in that container are treated as a group by the automation. If the "Grouping" feature is TRUE, then all the objects in the container should be treated as a group. If the "Grouping" feature is FALSE, then the objects in the container can be selected and changed independently. The "Grouping" feature of a container can be set using the AnnSetGrouping method. To determine the status of the "Grouping" feature of a container, call the AnnGetGrouping method.

The AnnGroup method does the following:

creates a sub-container

moves the objects to this sub-container

sets the Grouping feature for the sub-container to TRUE

Setting the Grouping feature to FALSE by calling the AnnSetGrouping method with bAutoGroup set to FALSE is similar to calling the AnnUngroup method.

To change only one object within a group, do the following:

find the object's container.

set the grouping property to FALSE for the container.

change the object.

set the grouping feature to TRUE for the container.

To programmatically move all the objects belonging to a group you have two choices:

1. | Move the sub-container, which contains all the objects (not the best solution)
2. | Move all the objects present in that container (the better solution).

The problem with moving the container is that objects are clipped to their container. So if the sub-container has an offset of 100 and you try to move the objects in the automated mode, then you cannot move the objects all the way to the left. You will be able to move the objects in the automated mode, but their left side will disappear.

This means that if you are going to use sub-containers and automated mode at the same time, then you should create the sub-containers so that they have the same size as the main container. Or, you can keep track of the mouse notifications. And move the sub-container whenever the mouse moves.

To create a group of objects, you can create a container, insert all the objects in it and insert that container in the main container (without stripping the container).


Low-Level Coordinates System for annotation

Low-Level Coordinate System for Annotations

Note:

This topic is for Document/Medical only.

The coordinates for defining and positioning LEADTOOLS annotations are stored in floating point values that are translated to device coordinates only when the annotations are displayed. Each annotation object is defined and positioned relative to its container. The root container sets the frame of reference.

At the time of display, the coordinates are first multiplied by the values of the X and Y scalar properties (scaling factors), and are then offset by the values of the X and Y offset properties. Thus, the scaling factors translate the internal values to the coordinate system of the display space, and the offsets position the scaled object in the display space.

The LEADTOOLS automated annotation functions use this system to match annotations to a displayed image as follows:

1. | The root container's coordinates are set as follows: 0, 0, bitmap width -1, bitmap height -1.
2. | The X and Y scaling factors of the root container are set using the source and destination rectangles of the LEADTOOLS painting function. For example, the X scaling factor would be calculated by dividing the width of the destination rectangle by the width of the source rectangle. For an explanation of the source and destination rectangles, refer to Concepts and Definitions.
3. | The X and Y offsets of the root container are set to the same values as the left and top fields of the painting function's destination rectangle.
4. | Each time the image is zoomed or scrolled, the scaling factors and offsets of the root container are updated, and annotation objects are redrawn in the window.

This system provides flexibility in storing and transporting annotations. You can adapt the annotations to any unit of measure, such as twips or millimeters. You can also set the root container's width and height to arbitrary measurements, such as 1000 by 1000, that you adjust when applying the container's annotations to a bitmap image.

Note:

Scaling factors and offsets can be applied to objects other than the root container, but that is not necessary for matching the annotations to the displayed image. The scaling factors and offsets of a container apply to all objects within the container.

Scaling factors:

AnnSetScalarX method

AnnSetScalarY method

AnnGetScalarX method

AnnGetScalarY method

Offsets:

AnnGetOffsetX method

AnnGetOffsetY method

AnnSetOffsetX method

AnnSetOffsetY method

Related topics:

Implementing Annotations

Types of Annotations


New Annotation Features of Version 14.5

Note:

This topic is for Document/Medical only.

With this release of LEADTOOLS version 14.5, many new features are being introduced to the annotations. Some of these features alter the way annotations are displayed. Other features change or enhance the user interface. To maintain backward compatibility within version 14, most of these features must be enabled by setting the AnnOptions property. In LEADTOOLS version 15, these options will be enabled by default.

The following features are being introduced:

New Rubber Stamp Display Style

New XP Style Annotation Toolbar

New Alpha Background Fill Option

New Annotation Rotate Option

New Annotation Side Handles

New Annotation Multi-select

New Annotation Cursors

New ESC to Cancel

New Calibrate Ruler Feature

New Dot Dash Lines

New XML Format

New Text Annotation Options

The following paragraphs describe each feature in more detail.

New Rubber Stamp Display Style

In previous versions of LEADTOOLS, you could draw any of 26 predefined rubber stamp annotations. While any of these metafiles can be changed, users have asked for more contemporary-looking defaults. LEADTOOLS has responded and developed new default images. The following figure displays a sample of the original style and the new style:

The new rubber stamp style can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_STAMP_METAFILES;

end;

New XP Style Annotation Toolbar

The annotation toolbar has been updated to have a Windows-XP look and feel. As with previous versions of LEADTOOLS, the annotation toolbar can be customized with your own images.

The following figure displays a sample of the original style and the new style:

For more information on toolbars, see the documentation for CreateTB method.

The new XP-style annotation toolbar can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_TOOLBAR;

end;

New Alpha Background Fill Option:

Previous versions of LEADTOOLS supported annotations with translucent backgrounds. With version 14.5, there is an alpha option that allows you to specify an alpha value from 0 (completely transparent background) to 255 (completely opaque background) inclusive.

The new alpha background fill option can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_ALPHA;

end;

When enabled, you can right-click an annotation object to display the Fill dialog with the new alpha option. Here you can enter an alpha value from 0 – 255 inclusive. The following figure displays the Fill dialog for the Stamp object:

The following figure displays rectangle annotation objects using different alpha values:

New Annotation Rotate Option

In previous versions of LEADTOOLS, annotation objects could be rotated by holding the <SHIFT> key while dragging a handle. With the new rotate options, two rotate handles are displayed on a selected object. One of the handles is the “gripper” handle, which rotates the object when dragged. The other handle is the “center” handle, which determines the center of rotation. The center of rotation can be moved by dragging. The gripper handle can be moved anywhere by dragging.

The following figure illustrates a rotate by dragging the “gripper” handle:

The following figure illustrates moving the “center” handle:

The rotate handles can be reset to a default location by right-clicking the annotation object, and selecting the Reset Rotate Handles option, as shown in the following figure:

The rotate handles can be globally hidden or displayed by right-clicking on the image (not an annotation object), and selecting the Hide Rotate Handles For All Objects option, as shown in the following figure:

The new annotation rotate object can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_ROTATE;

end;

New Annotation Side Handles

In previous versions of LEADTOOLS, rectangular annotation objects were displayed with four handles to manipulate the object. With this new feature, rectangular objects are displayed with four additional side handles. Dragging the side handles resizes the annotation object only in one dimension. Dragging the corner handles resizes the object in two dimensions, preserving the aspect ratio.

The new annotation side handles can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_ SIDE_HANDLES;

end;

The following figure displays a sample of the original style and the new style:

New Annotation Multi-select

In previous versions of LEADTOOLS, you could select multiple objects and manipulate the objects by dragging any handle of any object. When moving a handle, the results were often not intuitive. With the new multi-select option, all selected objects are outlined with a multi-select border. The multi-select border has eight resize handles, and two rotate handles. Now, moving, resizing, and rotating multiply select objects is clear and easy to do.

The new annotation multi-select feature can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_ MULTI_SELECT;

end;

The following figure displays a sample of the original style and the new style:

New Annotation Cursors

This new feature displays different cursors for many tasks in automated annotation mode. This feature displays unique annotation cursors in the following situations:

When hovering over a rotation gripper handle

When hovering over a rotation center handle

When hovering over any of the eight size handles—an appropriate arrow cursor is displayed depending on the handle and the rotation of the annotation object.

When dragging a selection

When using any of the 30 annotation tools.

All annotation cursors can be changed to your own custom cursors by using the AnnAutoCursor property.

The new annotation cursors can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_ CURSORS;

end;

The following figure displays some of the new cursors:

New ESC to Cancel

In previous versions of LEADTOOLS, the ESC key was not set to cancel actions in annotation automation mode. With this new feature, a user can press the ESC key to cancel many actions in annotation automation mode. For example, when drawing an annotation, pressing ESC will cancel the annotation completely. When rotating, resizing, or moving an annotation, pressing ESC will cancel the action leaving the annotation unchanged.

The new ESC to Cancel feature can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_ ESC_CANCEL;

end;

New Calibrate Ruler Feature

With this feature, a user can automatically calibrate a ruler to the desired size. This is useful when a user wants to interactively measure something in an image. Note that there are four annotations objects used for measuring:

ANNOBJECT_RULER

ANNOBJECT_POLYRULER

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_PROTRACTOR

Any of these objects can be calibrated. To calibrate a ruler:

1. | Load desired image
2. | Draw an ANNOBJECT_RULER object and size to desired size. In this example, we will calibrate the diagonal to be 2 feet. The following figure displays an uncalibrated ruler:

3.

Right-click the ANNOBJECT_RULER object and select Ruler Properties, and then Ruler, as shown in the following figure:

The following figure appears:

4.

Click the Calibrate button to open the Calibrate Ruler dialog. The following figure displays:

 | In the Calibrate dialog, set the Ruler Length to 2 and the Ruler Measurement to feet. Select the Apply to Newly Created Rulers check box. Click the OK button to close the Calibrate dialog. Click the OK button to save your selections and close the Ruler Properties dialog.
5. | Draw a new ruler to measure any part of the image, as shown in the following figure:

The new calibrate ruler feature can be enabled using the following code snippet:

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_CALIBRATE_RULER;

end;

New Dot Dash Lines

Most of the LEAD annotation objects have a Line Width and Line Style option. This can be used to draw the annotations with thick lines, and change the line style from solid to dashed or dotted. In previous versions of LEADTOOLS, drawing annotations with thick lines (line width more than 1 pixel) required that the line style be Solid. This is due to a limitation of Windows GDI. In version 14.5, this limitation has been removed. Now annotation objects can be drawn with thick lines of any style. The following example illustrates this:

This feature can be enabled using the following code snippet.

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_DOT_DASH_LINES;

end;

New XML Format

Prior to version 14.5, annotations could be saved in one of two formats:

ANNFMT_NATIVE – a text based file format for storing annotations

ANNFMT_ENCODED – a binary file format for storing annotations

In version 14.5, there is a new text-based format for annotations – ANNFMT_XML. This is a new text based format for storing LEAD annotations that follows the XML (Extensible Markup Language) format.

There are many advantages of using the ANNFMT_XML format:

Unlike the ANNFMT_NATIVE, ANNFMT_XML is both forward and backward compatible.

It is human readable

Files using the ANNFMT_XML format can be easily modified using a standard text editor (i.e. notepad.exe)

It can be easily parsed using any standard XML parser

It can be used with any of the growing number of utilities that work with XML

This option does not need to be enabled using AnnOptions. To use this feature, simply pass the flag ANNFMT_XML to the annotation save functions. For more information, see the documentation for AnnSave, AnnSaveMemory, AnnLoad, AnnLoadMemory.

New Text Annotation Options

For the following text based annotations, you can now change the text color so that it is different from the border color. Also, you can optionally show or hide the text.

ANNOBJECT_TEXT

ANNOBJECT_TEXTPOINTER

ANNOBJECT_STAMP

ANNOBJECT_NOTE

ANNOBJECT_PUSHPIN

For the following text based annotations, you can now optionally show or hide the border.

ANNOBJECT_TEXT

ANNOBJECT_STAMP

To see these new features:

1. | Draw an ANNOBJECT_TEXT object
2. | Right-click the object
3. | Select Text Properties and then Text
4. | In the Text dialog, select the Show Border check box
5. | Click the Text Color button to change the color to blue. The following figure displays the Text dialog:

6.

The following figure displays the original text object before and after changing the text color to blue:

This feature can be enabled using the following code snippet.

Procedure TForm1.ExampleEnableOption();

begin

LEADAnn1.AnnOptions:= LEADAnn1.AnnOptions + OPTIONS_NEW_TEXT_OPTIONS;

end;


Illustration of Fill Options for Annotations

Note:

This topic is for Document/Medical only.

The following rectangle annotation objects illustrate the available fill modes and patterns. The foreground and background colors help to illustrate the effects.

Back row:

Fill mode: Opaque
Fill pattern: Solid
Fore color: Black
Back color: Yellow

Fill mode: Opaque
Fill pattern: Cross
Fore color: Black
Back color: Yellow

Fill mode: Opaque
Fill pattern: Backward diagonal
Fore color: Black
Back color: Yellow

Fill mode: Opaque
Fill pattern: Vertical
Fore color: Black
Back color: Yellow

Front row:

Fill mode: Translucent
Fill pattern: Forward diagonal
Fore color: Black
Back color: Green

Fill mode: Transparent
Fill pattern: Diagonal cross
Fore color: Black
Back color: Green

Fill mode: Opaque
Fill pattern: Horizontal
Fore color: Red
Back color: Green


Illustration of Line Styles for Annotations

Note:

This topic is for Document/Medical only.

The following rectangle annotation objects illustrate the available line styles. Note that Windows displays all lines greater than 1 pixel as solid.

Back row: | Solid | Dash | Dot
Front row: | Dash-dot | Dash-dot-dot | Null


Illustration of the Polygon Fill Mode for Annotations

Note:

This topic is for Document/Medical only.

The following polygon annotation objects illustrate the available polygon fill modes.

Winding | The area inside the resulting exterior lines is filled.
Alternate | The filled area includes the area between odd-numbered and even-numbered polygon sides on each scan line.


Implementing Annotation Hyperlinks

Note:

This topic is for Document/Medical only.

LEADTOOLS provides several properties, methods and events for hyperlinking annotations. Annotations may be hyperlinked to run a program, access a Web page, or send a user-defined message. Hyperlinks that run a program or access a Web page are generated using AnnSetHyperlinkString method. AnnSetHyperlinkMsg method creates a hyperlink to send a user-defined message to the OnAnnHyperlink event. To determine the type of hyperlink associated with an annotation use AnnGetHyperlinkType method. If the hyperlink runs a program or accesses a Web page, the name of the program and all required command line parameters, or the URL of the Web page can be retrieved using the AnnGetHyperlinkString method. Hyperlinks to the OnAnnHyperlink event may have parameters. AnnGetHyperlinkParam method retrieves the parameters. AnnHyperlinkMenuEnable property enables or disables the hyperlink menu item for automated annotations. OnAnnHyperlinkMenu event occurs when the user selects the hyperlink menu item for automated annotations.


Implementing Annotation Security

Note:

This topic is for Document/Medical only.

LEADTOOLS provides annotation security through a number of properties, methods and events. AnnLock method and AnnUnlock method lock and unlock annotations using a key. Locking an object through the automated mode generates an OnAnnLocked event and unlocking an object through the automated mode generates an OnAnnUnlocked event. If AnnShowLockedIcon property is set to True, any locked object will be drawn with a padlock icon on top of it. AnnGetLocked method also provides a means of determining if an object is locked.

Annotations can also be secured by using the AnnSetUser method. By setting the user for an annotation, modification to the annotation cannot be made unless the correct user is known.

Related topics:

Redaction Annotation Object

Encrypt Annotation Object


Moving the Name of an Annotation

LEADTOOLS provides a number of properties and methods for positioning the name of an annotation object. First, the name may be restricted. If a name is restricted, then it will fully appear on the bitmap. By restricting the name, the offsets used to position the name are therefore limited, based on the name of the annotation object and the font used.

To get the current restriction status for an annotation object, call the AnnGetNameRestrict method. To change the restriction status of an annotation object, call the AnnSetNameRestrict method.

The annotation name can be positioned by setting its offset values. These values are relative to the upper left corner of the bounding box of the annotation object. To get the current offset values of the name of an annotation object call the AnnGetNameOffsetX method and the AnnGetNameOffsetY method. To change the position of the name of the annotation object, call the AnnSetNameOffsetX method and the AnnSetNameOffsetY method.

The name of an annotation has both a defining rectangle and a bounding rectangle. The defining rectangle is specified by the following read only properties:

AnnNameRectHeight property

AnnNameRectLeft property

AnnNameRectTop property

AnnNameRectWidth property

The bounding rectangle is specified by the following read only properties:

AnnNameBoundingRectHeight property

AnnNameBoundingRectLeft property

AnnNameBoundingRectTop property

AnnNameBoundingRectWidth property

For an explanation of the difference between the defining rectangle and the bounding rectangle, refer to any of the AnnNameBoundingRectXXX properties.


Setting Defaults

Note:

This topic is for Document/Medical only.

When using annotations in design mode, you can change the default properties by clicking with the right mouse button on an empty spot (a place on the image without any annotations). The popup menu lets you do the following:

Undo the last user action.

Cut, copy and paste objects using the Windows clipboard.

Delete all selected objects.

Select all annotation objects in the container.

Arrange the layering of an object or group of objects.

Lock or unlock objects. See Password Dialog Box for Annotations.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the default line width and style properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations.

Change whether transparency is used.

Change the transparent color. See Color Dialog Box for Annotations.

Change the default fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the polygonal fill mode, which controls which areas are filled when lines cross. See Fill Dialog Box for Annotations.

Change the default foreground and background colors. See Color Dialog Box for Annotations.

Change the background color used by Note, Redact, or Hilite objects. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Change the Button font selection and font characteristics. See Font Dialog Box for Annotations.

Change the metafile to be used by Hotspot objects. See Hotspot Metafile Dialog Box for Annotations.

Change the metafile to be used by Encrypt objects. See Encrypt Metafile Dialog Box for Annotations.

Change the metafile to be used by Decrypt objects. See Decrypt Metafile Dialog Box for Annotations.

Change the default Ruler properties (length, gauge, tic marks, measurement units, precision). See Ruler Dialog Box for Annotations.

Change the node properties for objects that have nodes (whether to display the nodes and which nodes to display). See Nodes Dialog Box for Annotations.

Change the default Protractor properties (whether to draw the inside or outside angle, how far out to draw the angle, whether to use radians or degrees, which unit abbreviation, and precision). See Protractor Dialog Box for Annotations.

Change the default Point properties (whether to use a bitmap, whether to use transparency, transparent color, border color, radius, fill color, fixed size). See Point File Dialog Box for Annotations.

Change the default Encrypt properties (key, type (encryptor or decryptor), and location). See Encrypt Dialog Box for Annotations.

Change the default Fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

The default background color does not affect highlight, redaction, and note objects. To change the default background color for these objects, you have to use the appropriate menu item, such as Redact Background Color.


Undoing Automation Operations

The LEADTOOLS OCX features include an Undo engine for undoing annotation automation operations. The undo depth determines the number of operations that can be undone. There is only one undo depth value per root container. Subcontainers do not have their own separate values.

LEADTOOLS provides a number of methods and properties for handling the undo capabilities.

The undo depth for the automation handle is contained in the AnnUndoDepth property.

The AnnUndo method undoes the last automation operation performed, including changes made to object properties.

Generally, operations are undone one operation at a time. If the last operation performed cut several objects from a container, undoing that operation would return the objects to the container. Occasionally, it may be best to group several operations, such as object additions or property changes, together so that calling AnnUndo undoes the whole group of operations and not just the last operation performed. This can be accomplished by:

1. | Setting the number of undo actions that can take place using the AnnUndoDepth property. This property defaults to 5.
2. | Calling the AnnAddUndoNode method to add an undo node to the automation object.
3. | Disabling the undo feature by setting the AnnUndoEnable property to FALSE.
4. | Performing the operations or changes to be combined into one undo.
5. | Re-enabling the undo feature by setting the AnnUndoEnable property to TRUE.

Now, all the operations can be undone with one call to the AnnUndo method instead of several calls to the AnnUndo method.


The Annotation Text Token Table

This feature applies to the text annotation objects that support tokens, namely the following:

ANN_OBJECT_AUTOMATION,

ANN_OBJECT_BUTTON,

ANN_OBJECT_NOTE,

ANN_OBJECT_TEXT,

ANN_OBJECT_TEXTPOINTER,

ANN_OBJECT_STAMP,

A token is a special text string that can be translated into another more meaningful text string. For example, a user may wish to display the current date or the name of their company in their text annotations. Rather than type out the date or the name of the company, a text token can be typed instead.

Tokens are two-character strings of the form:

#{any character}

Any token (except for ##) can be defined to mean anything. LEAD defines the following set of constants to represent functions that can be mapped to any token.

[0] ANN_TOKEN_NONE | String not treated as a token
[1] ANN_TOKEN_SEPARATOR | Add a separator to the automation token menu
[2] ANN_TOKEN_TEXT | A text string
[3] ANN_TOKEN_DATE_YYYY | Current four digit year
[4] ANN_TOKEN_DATE_YY | Current two digit year
[5] ANN_TOKEN_DATE_MM | Two digit representation of current month
[6] ANN_TOKEN_DATE_DD | Two digit representation of current day
[7] ANN_TOKEN_DATE_MONTH_NAME | Current month name (for example, January)
[8] ANN_TOKEN_DATE_DAY_OF_WEEK | Current day of week (for example, Monday)
[9] ANN_TOKEN_TIME_HH_12 | Current hour,using a 12 hour clock
[10] ANN_TOKEN_TIME_HH_24 | Current hour, using a 24 hour clock
[11] ANN_TOKEN_TIME_MM | Current minute (00-59)
[12] ANN_TOKEN_TIME_SS | Current second (00-59)
[13] ANN_TOKEN_TIME_MILLISECONDS | Current milliseconds (000-999)
[14] ANN_TOKEN_AM_PM | Time of day indicator (AM or PM)

LEAD defines a predefined text token table that you can use, or you can define your own. The predefined text tokens table is listed below.

Default Text Token Table

#Y | "Four digit year"
#y | "Two digit year"
#M | "Two digit month"
#d | "Two digit day"
#N | "Month Name"
#D | "Day of week name"
#h | "Current time: 12-Hour (01-12),
#H | "Current time: 24-Hour (00-23),
#m | "Current time: minutes"
#s | "Current time: seconds"
#f | "Current time: milliseconds "
#t | "Current time: AM or PM"
## | "#"

The text token table is displayed in the automation text dialog. The following figure displays the default text token table.

The default annotation text token table can be easily changed using the following:

AnnClearTextTokenTable

AnnDeleteTextTokenTable

OnAnnEnumerateTextTokenTable

AnnTextExpandTokens

AnnInsertTextTokenTable

AnnClearTextTokenTable to remove all tokens from the text token table.

AnnDeleteTextTokenTable to delete a text token from the annotation text token table.

AnnEnumerateTextToken to enumerate the text tokens in the text token table.

AnnTextExpandTokens to get and set the text expand token property of an annotation.

AnnInsertTextTokenTable to insert a text token into the text token table.

Additionally, you can define your own user-defined text tokens. User-defined text tokens can consist of new text strings, or any combination of existing text tokens. The following figure displays a user-defined text token table.


Fixed Annotations

Most annotation objects can be "fixed". When an annotation is ‘fixed’, it gets painted using a default annotation container transform. The container transform is manipulated using the following methods

Scaling factors:

AnnSetScalarX

AnnSetScalarY

AnnGetScalarX

AnnGetScalarY

Offsets:

AnnSetOffsetX

AnnSetOffsetY

AnnGetOffsetX

AnnGetOffsetY

Changing the container transform is primarily used for scrolling and zooming annotations on an image.

The effect of fixing an annotation is that it is frozen on the window. Zooming and scrolling will move the underlying image and non-fixed annotations, but fixed annotations will not move. The annotation can still be moved by selecting and dragging the annotation with the mouse.

Fixing an annotation is easily accomplished using automation. Right-click the annotation, select the Fixed menu item, and the following dialog appears:

Select the Fixed check box, and click OK. Now when you zoom or scroll the underlying image, the fixed annotation stays in place. Again, the Fixed option works best when double buffering is enabled.

Leave the Adjust check box selected. This automatically adjusts the size and location of the object before fixing or un-fixing the annotation object. The result is the annotation object will not jump around as you change its fixed state.

Fixing an annotation programmatically is accomplished using the following:

AnnFixed property

AnnPushFixedState method

AnnPopFixedState method

AnnIsFixedRect method

Fixing an annotation can be very useful. For example, a physician might want the patient information displayed using a text annotation in the upper right hand corner of the window, regardless of how the image is scrolled or zoomed. Or you might want a button that never moves out of view even when the image is scrolled. Fixing a ruler or polyruler annotation is very useful because the ruler can be used to measure any part of an image. The tic marks and displayed units of the ruler will automatically adjust based on the zoom factor.

The following annotations cannot be fixed:

ANN_OBJECT_CONTAINER

ANN_OBJECT_REDACT

ANN_OBJECT_ENCRYPT


Obtaining Annotation Object Information

Note:

This topic is for Document/Medical only.

LEADTOOLS provides many functions that allow the user to extract information from annotation objects. Once that information has been extracted, it can be modified using any of a number of functions provided by LEADTOOLS.

The AnnEnumerate method is a special method that processes each object in a specified container using the OnAnnEnumerate event. Once an object is obtained, many of the methods listed below can be called to obtain the desired information.

The following functions are general in nature and apply to the majority of annotation objects. For more information, refer to the individual function's documentation.

AnnGetBackColor method

AnnGetFillMode method

AnnGetFillPattern method

AnnGetFontBold method

AnnGetFontItalic method

AnnGetFontName method

AnnGetFontSize method

AnnGetFontStrikeThrough method

AnnGetFontUnderline method

AnnGetForeColor method

AnnGetItemHandle method

AnnGetLineStyle method

AnnGetLineWidth method

AnnGetNameOptions method

AnnGetObjectFromTag method

AnnGetOffsetX method

AnnGetOffsetY method

AnnGetSecondaryMetafile method

AnnGetSelectCount method

AnnGetSelectList method

AnnGetTag method

AnnGetText method

AnnGetType method

AnnGetUnit method

AnnGetUserHandle method

AnnGetUserHandles method

AnnGetVisible method

AnnGetWnd method

The next set of methods is more specialized, applying only to certain annotation objects. For more information, refer to the individual function's documentation.

AnnGetBitmapDpiX method

AnnGetBitmapDpiY method

AnnGetDistance method

AnnGetDistance2 method

AnnGetEncryptOptions method

AnnGetGaugeLength method

AnnGetPointCount method

AnnGetPointOptions method

AnnGetPointX method

AnnGetPointY method

AnnGetPolyFillMode method

AnnGetAngle method

AnnGetAutoBackColor method

AnnGetBitmap method

AnnGetContainer method

AnnGetMetafile

AnnGetNodes method

AnnGetPredefinedMetafile method

AnnGetProtractorOptions method

AnnGetROP2 method

AnnGetSecondaryBitmap method

AnnGetSelected method

AnnGetSelectRect method

AnnGetShowFlags method

AnnGetTopContainer method

AnnGetTransparent method

AnnGetTransparentColor method


Altering Annotation Object Settings

Note:

This topic is for Document/Medical only.

LEADTOOLS provides many methods for altering the settings of annotation objects. Each of these annotation methods has a corresponding method that retrieves information about a specific annotation object.

The following methods are general in nature and apply to the majority of annotation objects. For more information, refer to the individual method's documentation.

AnnSetAutoDefaults

AnnSetAutoMenuItemEnable

AnnSetAutoText

AnnSetBackColor

AnnSetFillMode

AnnSetFillPattern

AnnSetFontBold

AnnSetFontItalic

AnnSetFontName

AnnSetFontSize

AnnSetFontStrikeThrough

AnnSetFontUnderline

AnnSetForeColor

AnnSetLineStyle

AnnSetLineWidth

AnnSetNameOptions

AnnSetOffsetX

AnnSetOffsetY

AnnSetSelected

AnnSetTag

AnnSetText

AnnSetUnit

AnnSetVisible

AnnSetWnd

AnnOptions property

This next set of methods is more specialized in terms of which annotation objects they apply to. For more information, refer to the individual method's documentation.

AnnSetBitmap

AnnSetBitmapDpiX

AnnSetBitmapDpiY

AnnSetEncryptOptions

AnnSetGaugeLength

AnnSetHyperlinkMsg

AnnSetHyperlinkString

AnnSetMetafile

AnnSetPointOptions

AnnSetPoints

AnnSetPolyFillMode

AnnSetROP2

AnnSetSecondaryBitmap

AnnSetShowFlags

AnnSetTransparent

AnnSetTransparentColor

AnnSetNodes

AnnSetPredefinedMetafile

AnnSetProtractorOptions

AnnSetAutoBackColor


Using Rulers in Annotation Objects

Note:

This topic is for Document/Medical only.

The following annotation objects use one or more rulers as part of the annotation:

ANNOBJECT_RULER

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_CROSSPRODUCT

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores default ruler settings along with the other object default settings

To determine the unit of measure for each ruler, check the AnnRulerUnit property and the AnnSmartUnit property. The default unit of measure for ruler, polyruler, and crossproduct objects is smart English. With the smart units, the unit changes with the length. For example, if the length is 11 inches (assuming the default precision of 2 is being used), "11.00 in" displays whereas if the length is 15 inches, "1 ft 3.00 in" displays. Use the AnnSetUnit method to set the unit of measurement and its precision for the ruler. The precision indicates how many digits to display to the right of the decimal point in the length. Use the AnnGetUnit method to get the unit of measurement and its precision for the ruler.

Use the AnnDistance property to get an array of values that represents the length of each ruler contained in the annotation object specified in the AnnGetDistance2 method.

Use the AnnTotalDistance property to obtain the total length of the ruler(s). To determine the unit of measure for the ruler, check the AnnTotalRulerUnit property and the AnnTotalSmartUnit property. To get information on individual rulers in an annotation object, check the following properties:

AnnDistance property

AnnDistanceCount property

AnnRulerUnit property

AnnSmartUnit property

The AnnTotalDistance property and the properties listed above are updated by the AnnGetDistance2 method.

There are two methods that can be used to get the length of the ruler: the AnnGetDistance method and the AnnGetDistance2 method. The AnnGetDistance method can be used with up to 2 rulers, whereas the AnnGetDistance2 method can be used on any of the ruler objects. Use the AnnGetDistance2 method to get the length of all the rulers in a Polyruler object. If the annotation object is type ANNOBJECT_CROSSPRODUCT, ANNOBJECT_PROTRACTOR or ANNOBJECT_POLYRULER, the AnnGetDistance2 method provides more information on the length of each ruler, the number of rulers, the unit of measure of each ruler and the total length of all rulers. The AnnGetDistance2 method is meant to replace the AnnGetDistance method, which is being phased out. The AnnGetDistance2 method updates the following properties with information about the ruler(s) contained in the specified object:

AnnTotalDistance

AnnTotalRulerUnit

AnnTotalSmartUnit

AnnDistance

AnnRulerUnit

AnnSmartUnit

AnnDistanceCount

At each end of the ruler is a perpendicular line called a gauge. Use the AnnSetGaugeLength method to set the length of the gauge. The length is expressed in pixels, not in points. The length extends from one end point of the gauge, through the end point of the ruler, to the other end point of the gauge. Use the AnnGetGaugeLength method to get the length of the gauge.

Along the length of the ruler are tic marks. The tic marks are the perpendicular lines that measure the units. The length of these tick marks can be set using the AnnTicMarkLength property. The length of the tic mark is expressed in pixels, not in points. Use the AnnGetShowFlags method to determine how the rulers are being displayed. Use the AnnSetShowFlags method to set whether ruler length, gauge and tic marks will be displayed.

Please note that when loading objects or pasting them from the clipboard to containers other than the Main Control's container object (accessed through the AnnContainer property), call the AnnSetBitmapDpiY method and set the vertical Bitmap DPI value to the bitmap's Y resolution, found in the BitmapYRes property. Likewise, call the AnnSetBitmapDpiX meethod and set the horizontal Bitmap DPI value to the bitmap's X resolution, found in the BitmapXRes property. Doing so will ensure that the distances shown by the ruler objects will be accurate.


Displaying and Manipulating Annotation Objects

Note:

This topic is for Document/Medical only.

The AnnAutoDrawEnable property enables or disables the default use of the left mouse button to draw an annotation object in design mode. To implement the automated design mode for annotations, this property must be set to True, and the AnnUserMode property property must be set to ANNUSERMODE_DESIGN.

Call the AnnBringToFront method or the AnnSendToBack method to alter the object’s display order within the container.

To apply an annotation object to the bitmap itself, call the AnnRealize method. This application is permanent, except when realizing a redact object. Realized redact objects store the background behind them within the object. Call the AnnUnrealize method to restore the background hidden by the redact object.

Use the AnnSetVisible method to make an object visible. When an object is not visible, it cannot be displayed. Some objects (notably containers) may be transparent, but if their visible-object property is True, a user can select them with a mouse. Use the AnnGetVisible method to determine whether the specified object is visible.

Use the AnnContainer property to obtain the handle to the (root) annotation container for objects in the current window. Other functions for working with containers include:

AnnContainerPointX property

AnnContainerPointY property

AnnGetContainer method

AnnGetTopContainer method

The following functions may be used to select annotation objects for manipulation:

AnnGetGrouping method

AnnGetSelectList method

AnnGroup method

AnnHandle property

AnnHandleID property

AnnHandleIndex property

AnnHitTestExt method

AnnObjectHitHandle property

AnnPositionResult property

AnnSelectPoint method

AnnSelectRect method

AnnSetGrouping method

AnnSetSelected method

AnnUngroup method

If the annotation object(s) are Stamp or Point objects and are using a bitmap, it is possible to call the following methods to set up bitmap transparency:

AnnGetTransparent method

AnnGetTransparentColor method

AnnSetTransparent method

AnnSetTransparentColor method

Use the AnnOptions property to control the following features:

Rubber Stamp Display Style

XP Style Annotation Toolbar

Alpha Background Fill Option

Annotation Rotate Option

Annotation Side Handles

Annotation Multiselect

Annotation Cursors

ESC to Cancel

Calibrate Ruler Feature

Dot Dash Lines

XML Format

Text Annotation Options

For more information about these features, refer to New Annotation Features of Version 14.5.

Use the AnnGetROP2 and AnnSetROP2 methods to manipulate the color display options for the following objects:

ANNOBJECT_AUTOMATION

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_CURVE

ANNOBJECT_CURVECLOSED

ANNOBJECT_ELLIPSE

ANNOBJECT_FREEHAND

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_LINE

ANNOBJECT_POINT

ANNOBJECT_POINTER

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_RECT

ANNOBJECT_RULER

ANNOBJECT_STAMP

ANNOBJECT_TEXTPOINTER

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores default color display options along with the other object default settings

Perform geometric transformations on an annotation object by calling the following functions:

AnnDefine method

AnnDefine2 method

AnnBringToFront method

AnnFlip method

AnnMove method

AnnAutoResize property

AnnAutoRotate property

AnnReverse method

AnnRotate method

AnnSendToBack method

AnnCut method

AnnRemove method

AnnPaste method


Using Annotation Object Bitmaps

Note:

This topic is for Document/Medical only.

The following annotation objects utilize bitmaps or metafiles as part of the annotation:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_POINT

ANNOBJECT_PUSHPIN

ANNOBJECT_STAMP

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores bitmap or metafile settings along with the other object default settings.

LEADTOOLS provides the following functions to work with bitmaps or metafiles:

AnnSetBitmap method - Use this method with the ANNOBJECT_STAMP, ANNOBJECT_POINT, and ANNOBJECT_PUSHPIN, objects to set the bitmap for the object. The ANNOBJECT_STAMP (including the Rubber Stamp) objects can display text, a bitmap, or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two. Initially, the ANNOBJECT_STAMP displays text. In automation, there are different Rubber Stamp tools available, which are ANNOBJECT_STAMP objects set up to use the different metafiles for each rubber stamp selection instead of text. The ANNOBJECT_PUSHPIN object displays a bitmap in design mode and a secondary bitmap in run mode.

AnnGetBitmap method - Use this method with the ANNOBJECT_STAMP, ANNOBJECT_POINT, and ANNOBJECT_PUSHPIN, objects to get the handle for bitmap being used for the object. The ANNOBJECT_STAMP (including the Rubber Stamp) objects can display text, a bitmap, or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two. Initially, the ANNOBJECT_STAMP displays text. In automation, there are different Rubber Stamp tools available, which are ANNOBJECT_STAMP objects set up to use the different metafiles for each rubber stamp selection instead of text. The ANNOBJECT_PUSHPIN object displays a bitmap in design mode and a secondary bitmap in run mode.

AnnSetMetafile method – Use this method with the ANNOBJECT_STAMP (including the Rubber Stamp tools), ANNOBJECT_HOTSPOT, ANNOBJECT_FREEHANDHOTSPOT, and ANNOBJECT_ENCRYPT objects to change the metafile for the selected objects. This method changes the metafile for the specified objects, but any new objects will still use the default metafiles. To reset a metafile to its original metafile, call the AnnSetPredefinedMetafile method and pass 0 to hMetafile.

AnnGetMetafile method – Use this method with the ANNOBJECT_STAMP, ANNOBJECT_HOTSPOT, ANNOBJECT_FREEHANDHOTSPOT, and ANNOBJECT_ENCRYPT objects and the Rubber Stamp tools to retrieve the metafile for the selected objects.

AnnSetSecondaryBitmap method - Sets the secondary bitmap used by the specified annotation object. Only PushPin objects (ANNOBJECT_POINT) use a secondary bitmap. A PushPin object has a primary bitmap, (manipulated using the AnnSetBitmap and AnnGetBitmap methods) which displays whenever the text is shown, and a secondary bitmap, changed using the AnnSetSecondaryBitmap. The primary bitmap is shown with the note text. The secondary bitmap is shown by itself when the note is minimized. In design mode, the ANNOBJECT_PUSHPIN object shows the text and displays the primary bitmap. In the run mode the object shows or hides the text when clicked.

AnnGetSecondaryBitmap method - Gets the secondary bitmap used by the specified annotation object. Only PushPin objects (ANNOBJECT_POINT) use a secondary bitmap. A PushPin object has a primary bitmap, (manipulated using the AnnSetBitmap and AnnGetBitmap methods) which displays whenever the text is shown, and a secondary bitmap, changed using the AnnSetSecondaryBitmap. The primary bitmap is shown with the note text. The secondary bitmap is shown by itself when the note is minimized. In design mode, the ANNOBJECT_PUSHPIN object shows the text and displays the primary bitmap. In the run mode the object shows or hides the text when clicked.

AnnPredefinedBitmap property - Gets or sets a copy of the specified predefined bitmap, used for the annotation Point object (ANNOBJECT_POINT).

AnnGetSecondaryMetafile method - Gets the metafile handle associated with an ANNOBJECT_ENCRYPT object when it is in the ‘decryptor’ state. The encrypt object has two states: Encryptor and Decryptor. Each state is displayed with its own metafile.

AnnSetPredefinedMetafile method - Sets the default metafiles used by the following object types:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

Rubber Stamp Tools

AnnGetPredefinedMetafile method – Gets the default metafiles used by the following object types:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

Rubber Stamp Tools


Changing the Annotation Automation Pen Highlight Color

(Document/Medical only) The default highlight pen has a COLORREF value of 0xFFFFFF (white). This color will not work well with images that have many mid-range gray colors. A better selection for such cases would be 0xC0C0C0 (silver).

When working with automated annotations, change the color of the pen that is used for highlighting and selecting by setting the AnnAutoHilightPen property for that automation object.

To change the highlight color back to the default color after changing the highlight color, you must set the AnnAutoHilightPen property, using a COLORREF value of 0xFFFFFF.


Flipping, Reversing, and Rotating Annotation Objects

Note:

This topic is for Document/Medical only.

LEADTOOLS provides several methods for manipulating annotation objects so they are flipped, reversed, or rotated.

Use the AnnFlip method to flip one or more annotation objects, top to bottom. Objects that contain text cannot be flipped or reversed. If a group of objects is flipped or reversed on a common axis, the text will move to the new position, but will retain its orientation.

Use the AnnReverse method to reverse one or more annotation objects, left to right. Objects that contain text cannot be flipped or reversed. If a group of objects is flipped or reversed on a common axis, the text will move to the new position, but will retain its orientation.

Use the AnnRotate method to rotate one or more annotation objects. Certain objects cannot be rotated (see the following list). If a group of objects is rotated around a common center, these objects will move to new positions, but will retain their orientation.

Flipping and Reversing:

All annotation objects flip or reverse with the following notes:

ANNOBJECT_TEXT - text itself does not flip/reverse

ANNOBJECT_PUSHPIN - text itself does not flip/reverse

ANNOBJECT_RTF - text itself does not flip/reverse

ANNOBJECT_NOTE - text itself does not flip/reverse

ANNOBJECT_HOTSPOT - metafile does not flip/reverse

ANNOBJECT_BUTTON - text itself does not flip/reverse

ANNOBJECT_POINT - if the point uses an image, the image does not flip/reverse

ANNOBJECT_ENCRYPT - metafile does not flip/reverse

ANNOBJECT_AUDIO - metafile does not flip/reverse

ANNOBJECT_VIDEO - metafile does not flip/reverse

ANNOBJECT_TEXTPOINTER - the tail flips, but the text does not flip/reverse

ANNOBJECT_STAMP – the text flips/reverses, but the image and metafile do not flip/reverse

ANNOBJECT_FREEHANDHOTSPOT -- metafile does not flip/reverse

Rotating:

All objects rotate EXCEPT for the following objects:

ANNOBJECT_NOTE

ANNOBJECT_RTF

ANNOBJECT_TEXTPOINTER

ANNOBJECT_PUSHPIN

ANNOBJECT_POINT

ANNOBJECT_BUTTON

ANNOBJECT_HOTSPOT

ANNOBJECT_ENCRYPT

ANNOBJECT_AUDIO

ANNOBJECT_VIDEO

ANNOBJECT_FREEHANDHOTSPOT – the object rotates, but not the metafile

See Also

Annotations (Document/Medical only): Object Manipulation


Audio Clip Tool

Note:

This topic is for Document/Medical only.

The audio clip annotation object is a rectangle containing a scaled image that can be activated to play a WAV file. In design mode, click and drag to specify the rectangle in the current window. Then, specify the WAV file in the dialog box. Holding down the Shift key while drawing the audio clip will make the audio clip annotation square. In run mode, clicking on the icon plays the WAV file.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Select a WAV file to load into the object. See Audio File Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

When you save this type of annotation, the WAV file is not saved. Only its path is saved.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Audio Clip Annotation Object.


Button Tool

Note:

This topic is for Document/Medical only.

The button annotation object is an image of a standard Windows button that can be activated. In design mode, click and drag to specify the size of the button in the current window. Holding down the Shift key while drawing the button will make the button annotation square. A dialog box then lets the user enter the text for the button. In run mode, clicking on the button triggers an OnAnnClicked event. The user can add code to process the event. (The example program merely pops up a message box.)

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Edit the text. See Text Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Button Annotation Object.


Crossproduct Tool

Note:

This topic is for Document/Medical only.

The cross-product annotation object (ANNOBJECT_CROSSPRODUCT) consists of two simple lines intersecting at right angles. With the automated methods, the cross product is started on a mouse-down event and completed on a mouse-up event. Holding down the Shift key while drawing the cross product will make the cross product annotation square.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations.

Change the fill mode. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Change the measurement units, precision and gauge length. Set show flags See Ruler Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to CrossProduct Annotation Object.


Closed Curve Tool

Note: This topic is for Document/Medical only.

The closed curve annotation object (ANNOBJECT_CURVECLOSED) is a sequence of points that are joined by cubic polynomials such that adjacent polynomials are continuous at the first and second derivates. Unlike the curve annotation object, the first and last endpoints are also joined by a curve. The result is a smooth, continuous closed curve going through all the points.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations

(If the object has multiple nodes) Add or delete nodes. Add a node by clicking on the spot where you wish to add a node, then select Add Node. To delete a node, click on the node you wish to delete and select Delete Node.

Change the name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations.

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the polygonal fill mode, which controls which areas are filled when lines cross. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the node properties. See Nodes Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Curve Annotation Object.


Curve Tool

Note: This topic is for Document/Medical only.

The curve annotation object (ANNOBJECT_CURVE) is a sequence of points that are joined by cubic polynomials such that adjacent polynomials are continuous at the first and second derivates. The result is a smooth, continuous curve going through all the points.

In design mode, each curve is formed with a mouse click, and the object is completed on a double click.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations

(If the object has multiple nodes) Add or delete nodes. Add a node by clicking on the spot where you wish to add a node, then select Add Node. To delete a node, click on the node you wish to delete and select Delete Node.

Change the name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations

Change the foreground color. See Color Dialog Box for Annotations.

Change the node properties. See Nodes Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Curve Annotation Object.


Ellipse Tool

Note:

This topic is for Document/Medical only.

The ellipse annotation object is a simple ellipse. In design mode, click and drag to specify the ellipse in the current window. Holding down the Shift key while drawing the ellipse will make the ellipse annotation circular.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Ellipse Annotation Object.


Freehand Hot Spot Tool

Note:

This topic is for Document/Medical only.

The freehand hot spot annotation object (ANNOBJECT_FREEHANDHOTSPOT) is an array of points that create a sequence of joined lines. With the automated methods, in design mode, each line segment is formed with a mouse move event when the left button is down, and the object is completed on a mouse up event. In run mode, the object is transparent, but the mouse pointer changes to a hand when it is over the object. Clicking on the button triggers an OnAnnClicked event.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Add or delete nodes. Add a node by clicking on the spot where you wish to add a node, then select Add Node. To delete a node, click on the node you wish to delete and select Delete Node.

Change the name. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations.

Change the node properties. See Nodes Dialog Box for Annotations.

Set options for displaying nodes. See NodesDialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Freehand Annotation Object.


Freehand Line Tool

Note:

This topic is for Document/Medical only.

The freehand line annotation object is an array of points that create a sequence of joined lines. In design mode, each line segment is formed with a mouse move event when the left button is down, and the object is completed on a mouse up event.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

(If the object has multiple nodes) Add or delete nodes. Add a node by clicking on the spot where you wish to add a node, then select Add Node. To delete a node, click on the node you wish to delete and select Delete Node.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations.

Change the foreground color. See Color Dialog Box for Annotations.

Change the node properties. See Nodes Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Freehand Line Annotation Object.


Highlight Tool

Note:

This topic is for Document/Medical only.

The highlight annotation object is a rectangle with default properties that are appropriate for highlighting an area. In design mode, click and drag to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the highlight annotation square.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the background color. See Color Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Hilite Annotation Object.


Hot Spot Tool

Note:

This topic is for Document/Medical only.

The hot spot annotation object is a rectangle that can be activated for an application-defined purpose. In design mode, the rectangle contains a scaled image. Click and drag to specify the rectangle. Holding down the Shift key while drawing the hotspot will make the hotspot annotation square. In run mode, the object is transparent, but the mouse pointer changes to a hand when it is over the object. In run mode, clicking on the button triggers an OnAnnClicked event. Code can be added to process the event. (The example program merely pops up a message box.)

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Select a metafile to load into the Hotspot. See Metafile Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to HotSpot Annotation Object.


Line Tool

Note:

This topic is for Document/Medical only.

The line annotation object is a simple line. In design mode, the line is started on a mouse-down event and completed on a mouse-up event. Holding down the Shift key while drawing the line will draw the line at an angle that is a multiple of 45 degrees.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations

Change the foreground color. See Color Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Line Annotation Object.


Note Tool

Note:

This topic is for Document/Medical only.

The note annotation object is a rectangle with a shadow border and color background (yellow by default). It contains a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. In design mode, click and drag to specify the rectangle in the current window. Holding down the Shift key while drawing the note will make the note annotation square. A dialog box then lets the user enter the text.

As soon as the Note object is created, the text will be highlighted. The text may be edited immediately. While in design mode double click on a note object to edit the text.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Bring the object to the front or send it to the back.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Edit the text .See Text Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

You cannot flip, reverse, or rotate a note. If you flip, reverse, or rotate a container that includes a note, the note will move to the new position, but will retain its orientation.


Point Tool

Note:

This topic is for Document/Medical only.

The hot spot annotation object (ANNOBJECT_POINT) is single point. With the automated functions, in design mode, each point is formed with a mouse click.

In design mode, you can click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Paste the object.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations

Change the name properties. See Name Dialog Box for Annotations.

Change the line properties. See Line Dialog Box for Annotations.

Change the ROP2 properties. See ROP2 Dialog Box for Annotations.

Make the point transparent or not transparent.

Change the transparent color. See Color Dialog Box for Annotations.

Select a bitmap file. See Point File Dialog Box for Annotations.

Change the point properties. See Point Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Point Annotation Object.


Pointer Tool

Note:

This topic is for Document/Medical only.

The pointer annotation, object is defined by two points, with an arrow at the first point. In design mode, click and drag to specify the points in the current window. Holding down the Shift key while drawing the pointer will draw the pointer annotation object at an angle that is a multiple of 45 degrees.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations

Change the foreground color. See Color Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Pointer Annotation Object.


Polygon Tool

Note:

This topic is for Document/Medical only.

The polygon annotation object is an array of points that define the vertices of a polygon. In design mode, each line segment is formed with a mouse click, and the object is completed on a double click, which closes the polygon with a line from the last point to the first point.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy or paste the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

(If the object has multiple nodes) Add or delete nodes. Add a node by clicking on the spot where you wish to add a node, then select Add Node. To delete a node, click on the node you wish to delete and select Delete Node.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the polygonal fill mode, which controls which areas are filled when lines cross. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the node properties. See Nodes Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Polygon Annotation Object.


Polyline Tool

Note:

This topic is for Document/Medical only.

The polyline annotation object is an array of points that create a sequence of joined lines. In design mode, each line segment is formed with a mouse click, and the object is completed on a double click.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy or paste the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

(If the object has multiple nodes) Add or delete nodes. Add a node by clicking on the spot where you wish to add a node, then select Add Node. To delete a node, click on the node you wish to delete and select Delete Node.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations

Change the foreground color. See Color Dialog Box for Annotations.

Change the node properties. See Nodes Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Polyline Annotation Object.


Protractor Tool

Note:

This topic is for Document/Medical only.

The protractor annotation object (ANNOBJECT_PROTRACTOR) consists of two simple lines joined at a vertex to create an angle. With the automated methods, the first line of the protractor is started on a mouse-down event and completed on a second mouse-down event. The second line is completed on a third mouse-down event. Holding down the Shift key while drawing either of the two lines will draw the line at an angle that is a multiple of 45 degrees.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations.

Change the fill mode. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the measurement units, precision and gauge length. Set show flags. See Ruler Dialog Box for Annotations.

Set the protractor options. See Protractor Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Protractor Annotation Object.


Video Tool

Note:

This topic is for Document/Medical only.

The video annotation object (ANNOBJECT_VIDEO) is a rectangle containing a scaled image that can be activated to play an AVI file or capture a multimedia file. With the automated methods, in design mode, the user clicks and drags to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the video annotation square. A dialog box then lets the user specify the preferred options. In run mode, clicking on the icon plays the AVI file.

For playing the video, DirectX must be installed.

To capture an AVI file from a video card, LTCAP14N.DLL is required.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Lock and unlock annotation objects. See Password Dialog Box for Annotations

Set and manage hyperlink properties for an object or group of objects. Note: The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

Bring the object to the front or send it to the back.

Change the name. See Name Dialog Box for Annotations.

Change the fill mode. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Set the video file. See Video File Dialog Box for Annotations.

Perform a capture. See Capture Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.


Push Pin Tool

Note:

This topic is for Document/Medical only.

The PushPin annotation object (ANNOBJECT_PUSHPIN) is a rectangle containing a scaled image that can be activated to show a hidden note. With the automated methods, in design mode, the user clicks and drags to specify the rectangle in the current window. Holding down the Shift key while drawing the pushpin will make the pushpin annotation square. A dialog box then lets the user specify the preferred options. In run mode, clicking on the icon display the hidden note.

A pushpin object has a primary bitmap and a secondary bitmap. The primary bitmap is shown with the note text. The secondary bitmap is shown by itself when the note is minimized.

In design mode, the PushPin object shows the text and displays the primary bitmap. In run mode, the object shows/hides the text when clicked

As soon as the PushPin object is created, the text will be highlighted. The text may be edited immediately. While in design mode double click on a push pin object to edit the text. To get out of edit mode:

Press Escape. This cancels the changes.

Press Ctrl-Enter. This accepts the changes.

Click outside the edit box. This accepts the changes.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Edit the text. See Text Dialog Box for Annotations.

Set the primary and secondary bitmaps. See Push pin Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to PushPin Annotation Object.


Rectangle Tool

Note:

This topic is for Document/Medical only.

The rectangle annotation object is a simple rectangle. In design mode, click and drag to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the rectangle annotation square.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the default Name properties. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Rectangle Annotation Object.


Redaction Tool

Note:

This topic is for Document/Medical only.

The redaction annotation object is a rectangle with default properties that are appropriate for blacking out an area. In design mode, click and drag to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the redact annotation square.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the background color. See Color Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Redaction Annotation Object.


Rubber Stamp Tool

Note:

This topic is for Document/Medical only.

The rubber stamp tool is a stamp object that uses a predefined metafile. For more information about the stamp tool, refer to Stamp Tool.

For each Rubber Stamp, there is a corresponding tool that can be set using the AnnTool property. The Rubber Stamp tools use the ANNTOOL_STAMP_XXX values.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.


Ruler Tool

Note:

This topic is for Document/Medical only.

The ruler annotation object is a line that can be used to measure the distance between two points of the original image. Holding down the Shift key while drawing the ruler will draw the ruler annotation object at an angle that is a multiple of 45 degrees.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations.

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Change the measurement units, precision and gauge length. Set show flags. See Ruler Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Ruler Annotation Object.


Selection Pointer Tool

Note:

This topic is for Document/Medical only.

The selection pointer is the mouse pointer for selecting and manipulating annotation objects in design mode.

With the selection pointer, you can select one or more objects as follows:

You can select a single object by clicking on the object.

You can click and drag to form a rectangular selection area that will select all objects that are completely contained within it.

You can hold down the shift key and click on several objects one-at-a-time to select them all.

Change the fixed properties. See Fixed Dialog Box for Annotations.

When an object is selected, handles appear on the corners of its bounding rectangle. You can click on the body of the object and drag it to another position. You can click on a handle and drag to resize the object. If more than one object is selected, all of them are moved or resized.

In addition, you can use this pointer to rotate an object. If you hold down the shift key, click on a handle, and drag the mouse, the object rotates. If more than one object is selected, all of them are rotated, using the center of the group as the center of rotation. You cannot rotate a note, button, or audio clip. If you rotate a group that includes one of these objects, the object will move to the new position, but will retain its orientation.

The popup menu is also affected if more than one object is selected. In that case, when you click the right mouse button, the popup menu lets you change the properties of all the selected objects, and it lets you delete all the selected objects.


Stamp Tool

Note:

This topic is for Document/Medical only.

The stamp annotation object can be a bitmap image or a text string in a rectangular frame. In design mode, click and drag to specify a rectangle. Holding down the Shift key while drawing the rectangle will make the stamp annotation square. Then, if a text string is specified, the text is centered in the rectangle. If a bitmap is specified, the bitmap is scaled to fit the rectangle.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the frame's line width and style properties. See Line Dialog Box for Annotations.

Change the binary raster operations (ROP2) code. See ROP2 Dialog Box for Annotations.

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Edit the text.See Text Dialog Box for Annotations.

Select an image file to load into the stamp. See Stamp Bitmap Dialog Box for Annotations.

Select a metafile to load into the stamp. See Stamp Metafile Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Stamp Annotation Object.

On a device that displays 256 colors or less, you should use a fixed palette when displaying bitmaps. Otherwise, a palette shift will occur on stamp objects that contain bitmaps.


Text Tool

Note:

This topic is for Document/Medical only.

The text annotation object is a rectangle containing a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. In design mode, click and drag to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the text annotation square. A dialog box then lets the user enter the text.

As soon as the Text object is created, the text will be highlighted. The text may be edited immediately. While in design mode double click on a text object to edit the text.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See Name Dialog Box for Annotations.

Change the fill mode. (You can make it transparent or opaque, but not translucent). See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Edit the text. See Text Dialog Box for Annotations.

Change the fixed properties. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Text Annotation Object.


Text Pointer Tool

Note: This topic is for Document/Medical only.

The text pointer annotation object (ANNOBJECT_TEXTPOINTER) is a rectangle with a line that starts from one of the four corners. The other endpoint of the line can be moved to point to anything on the underlying image. The rectangle contains a character string with font properties. The text will wrap on word breaks within the object's specified rectangle.

In design mode, click and drag to specify the rectangle in the current window. After letting up on the mouse button, the rectangle is specified. Moving the mouse now specifies the line, with a final mouse click defining the line.

Holding down the Shift key while drawing the rectangle will make the text annotation square. Holding down the Shift Key will snap the line to angles of 45 degrees.

After the text pointer is defined, a dialog box then lets the user enter the text. As soon as the Text object is created, the text will be highlighted. The text may be edited immediately. While in design mode double-click on a text object to edit the text.

When moving a text pointer, the pointer endpoint of the line can remain fixed, or move with the rest of the text pointer. To change this setting in automation mode, select or deselect the Fixed Pointer check box on the Text Dialog Box for Annotations.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Move the object to the front of the Z-order.

Move the object to the back of the Z-order.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name properties. See Name Dialog Box for Annotations.

Change the line properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations.

Change the fill mode. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Edit the text. See Text Dialog Box for Annotations.

Change the fixed state. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Text Pointer Annotation Object.


Rich Text Tool

Note: This topic is for Document/Medical only.

The Rich Text annotation object is a rectangle containing containing text that supports Rich Text Format (RTF).

In design mode, click and drag to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the text annotation square. A dialog box then lets the user enter the text. A menu also appears to allow further formatting of text. Formatting support includes:

Font

Font size

Bold

Italic

Underline

Foreground Color

Background Color

Bullets

Numbering

Indenting

Alignment

As soon as the Text object is created, the text will be highlighted. The text may be edited immediately. While in design mode double click on a text object to edit the text.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name. See the Name Dialog Box for Annotations.

Change the foreground color. See Color Dialog Box for Annotations.

Change the fixed state. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Rich Text Annotation Object.


Polyruler Tool

Note: This topic is for Document/Medical only.

The polyruler annotation object is an array of points that create a sequence of joined rulers. In design mode, each line segment is formed with a mouse click, and the object is completed on a double click.

The polyruler can be used to measure the distance of an irregularly shaped object. As ruler segments are added, removed, or changed in length, a running total of the total distance is displayed.

Holding down the Shift key while drawing the rulers will draw the rulers at an angle that is a multiple of 45 degrees.

In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

(If the object has multiple nodes) Add or delete nodes. Add a node by clicking on the spot where you wish to add a node, then select Add Node. To delete a node, click on the node you wish to delete and select Delete Node.

Change the name. See the Name Dialog Box for Annotations.

Change the line width and style properties. See Line Dialog Box for Annotations.

Change the ROP2 code. See ROP2 Dialog Box for Annotations.

Change the fill mode (transparent, translucent, or opaque) and the fill pattern. See Fill Dialog Box for Annotations.

Change the foreground and background colors. See Color Dialog Box for Annotations.

Change the font selection and font characteristics. See Font Dialog Box for Annotations.

Change the measurement units, precision and gauge length. See Ruler Dialog Box for Annotations

Change the node properties. See Nodes Dialog Box for Annotations.

Change the fixed state. See Fixed Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Polyruler Annotation Object.


Encrypt Tool

Note: This topic is for Document/Medical only.

The encrypt annotation object (ANNOBJECT_ENCRYPT) is a rectangular object that is used to encrypt rectangular portions of a bitmap. It can also be used to encrypt the entire bitmap.

In design mode, the encrypt object is created by selecting the Encrypt tool and then clicking and dragging the mouse to create the rectangular encrypt object. Then while the object is selected, right-click the object and select the Encrypt item on the Encrypt Properties menu, enter the key in the Encrypt Properties dialog that appears, and then click Apply. After creating the encrypt object it is necessary to call AnnEncryptApply to scramble the pixels underneath the object. In design mode, the encrypt object is visible but partially transparent to show the part of the bitmap that it covers.

In run mode, the encrypt object is invisible. In run mode, if an encrypt object (state encryptor) has been applied to the bitmap, the pixels underneath the encryptor’s location are physically scrambled in a manner that depends upon the key used when the encrypt object was created.

An encrypt annotation has two metafiles--one for when it is an encryptor, and one for when it is a decryptor.

The encryptor metafile is changed with the Metafile option (in automation) or the AnnSetMetafile method. The default image is shown in the figure below:

The decryptor metafile is changed with the Secondary Metafile option (in automation) or the AnnSetMetafile method. The default image is shown in the figure below:

If you have one or more encrypt objects selected and you change the "Metafile" then the encryptor metafile changes for all of the selected encrypt objects.

You can also change the metafile and secondary metafiles for all newly created encrypt objects by right-clicking on the image (but not on an annotation), selecting Default Properties and changing the primary/secondary metafiles, or by using the AnnSetPredefinedMetafile method.

Overlapping regions can be encrypted. When encrypting overlapping regions, note the following points:

All annotation objects have an order in which they are drawn (the Z-order).

The encryptors are encrypted from the front of the Z-order to the back.

Those that are drawn first are encrypted first. Those that are drawn last ("on top" of other encryptors) are encrypted last.

The Z-order can be changed through automation by right-clicking and choosing "Send To Front" or "Send To Back".

The decryptors are decrypted in reverse order of the encryptors.

After creating an encrypt object by designating its key and location, you must call AnnEncryptApply to apply the encrypt object. Once applied, the portion of the bitmap under the encrypt object becomes scrambled, and the encrypt object changes state to become a decryptor. Using different keys before calling this function gives different scrambling patterns The decryptor state differs from the encryptor state in that a decryptor cannot be moved, and cannot be changed to an encryptor. The scrambling can be removed by calling AnnEncryptApply on the decryptor with the appropriate arguments. If successful, the decryptor state changes to encryptor. An encrypt object in that encryptor state can be moved, can have its key changed, and can be changed to a decryptor.

The encrypt object is useful for encrypting portions of a bitmap. After encrypting, the scrambled bitmap cannot easily be unscrambled without the associated annotation file. The scrambling can be removed by using the associated annotation file, or by using automation mode to manually change the encryptor to a decryptor, position it correctly, and setting the key appropriately.

When a bitmap that has had portion(s) of the bitmap encrypted is saved, the encryption information is saved with the rest of the annotation information in the associated annotation information file.

With low-level functions, you must define the size and position of the rectangle. In design mode, click on the object with the right mouse button to do the following:

Undo the last user action.

Cut or copy the object to the clipboard.

Delete the object.

Select all objects.

Bring the object to the front or send it to the back.

Lock and unlock annotation objects. See Password Dialog Box for Annotations.

Change the name properties. See Name Dialog Box for Annotations.

Select a metafile or secondary metafile to load into the object. See Encrypt Metafile Dialog Box for Annotations.

Change the Encrypt properties. See Encrypt Dialog Box for Annotations.

Set and manage hyperlink properties for an object or group of objects.

Note:

The actual management of a hyperlink must be done through low-level implementation. Only the Menu Item "Hyperlink" and an associated event are provided through the automation object. For more information, refer to Implementing Annotation Hyperlinks.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

For low-level implementation details, refer to Encrypt Annotation Object.


Types of Annotations

Note:

This topic is for Document/Medical only.

LEADTOOLS supports the following types of annotation objects:

Constant | Meaning
ANNOBJECT_CONTAINER | [0] Container Annotation
ANNOBJECT_TEXT | [15] Text Annotation
ANNOBJECT_NOTE | [9] Note Annotation
ANNOBJECT_LINE | [8] Line Annotation
ANNOBJECT_POLYLINE | [11] Polyline Annotation
ANNOBJECT_FREEHAND | [5] Freehand Line Annotation
ANNOBJECT_RECT | [12] Rectangle Annotation
ANNOBJECT_ELLIPSE | [4] Ellipse Annotation
ANNOBJECT_POLYGON | [10] Polygon Annotation
ANNOBJECT_POINTER | [1] Pointer Annotation
ANNOBJECT_BUTTON | [3] Button Annotation
ANNOBJECT_STAMP | [14] Stamp Annotation
ANNOBJECT_HILITE | [6] Highlight Annotation
ANNOBJECT_REDACT | [13] Redaction Annotation
ANNOBJECT_AUDIO | [2] Audio Clip Annotation
ANNOBJECT_HOTSPOT | [7] Hot Spot Annotation
ANNOBJECT_AUTOMATION | [16] Annotation Automation
ANNOBJECT_RULER | [17] Ruler Annotation
ANNOBJECT_CROSSPRODUCT | [18] Cross Product Annotation
ANNOBJECT_POINT | [19] Point Annotation
ANNOBJECT_PROTRACTOR | [20] Protractor Annotation
ANNOBJECT_VIDEO | [21] Video Annotation
ANNOBJECT_PUSHPIN | [22] PushPin Annotation
ANNOBJECT_FREEHANDHOTSPOT | [23] Freehand Hotspot Annotation
ANNOBJECT_ALL | [-1] All annotation object types
ANNOBJECT_CURVE | [24] Curve Annotation Object
ANNOBJECT_CURVECLOSED | [25] Closed Curve Annotation Object
ANNOBJECT_ENCRYPT | [26] Encrypt Annotation Object
ANNOBJECT_TEXTPOINTER | [27] Text Pointer Annotation Object
ANNOBJECT_POLYRULER | [28] Polyruler Annotation Object
ANNOBJECT_RTF | [29] Rich Text Annotation Object


Annotation Automation Object

Note:

This topic is for Document/Medical only.

The annotation automation object (ANNOBJECT_AUTOMATION) is an object that lets you maintain default properties when using the automated annotation functions. This object has no position or dimensions. It is never placed in a container, but is associated with a root container accessed through the AnnContainer property.

Any properties that you set in the automation object become the default values for any new objects that are inserted into the associated container. In addition to the properties of other object types, the automation object also has properties, such as the default toolbar selection, that control the automated user interface.

This object has an automation tool property that you can use without implementing the toolbar. For example, if you want to supply your own toolbar or menu options, you can use the automation object alone to keep track of the tool selection.

Applicable properties have the following defaults, which you can change:

Automation tool | Defaults to the selection pointer. It can be changed using the AnnTool property.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Transparent option | Defaults To Do Not Use Transparent Color. It can be changed using the AnnSetTransparent method.
Transparent Color | Defaults to White. It can be changed using the AnnSetTransparentColor method.
Fill pattern | Defaults to solid. It can be changed using the AnnSetFillPattern method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Polygon fill mode | Defaults to winding. It can be changed using the AnnSetPolyFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method. The default does not affect highlight, redaction, or note objects.
Note Background Color | Defaults to yellow. It can be changed using the AnnSetAutoBackColor method.
Redact Background Color | Defaults to black. It can be changed using the AnnSetAutoBackColor method.
Hilite Background Color | Defaults to yellow. It can be changed using the AnnSetAutoBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikeThrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Button Font | Defaults to a regular MS Sans Serif red font at 10 points.
Hotspot Metafile | Defaults to a campfire graphic. It can be changed using the AnnSetPredefinedMetafile method.
Encrypt Metafile | Defaults to an image of a black skeleton key. It can be changed using the AnnSetPredefinedMetafile method.
Decrypt Metafile | Defaults to an image of a red skeleton key. It can be changed using the AnnSetPredefinedMetafile method.
Ruler | Defaults to Show Length and Show Tic Marks, using smart English as the measurement unit with a precision of 2, and a tic mark length of 30. These options can be changed using the AnnSetShowFlags method, the AnnSetGaugeLength method, and the AnnSetUnit method.
Nodes | Defaults to displaying every node. It can be changed using the AnnSetNodes method.
Protractor | Defaults to drawing the inside angle in degrees with a precision of 2 and at an arc radius of 30. These options can be changed using the AnnSetProtractorOptions method and the AnnSetShowFlags method.
Point | Defaults to using a bitmap and not using transparent color. These options can be changed using the AnnSetTransparent method, AnnSetTransparentColor method, the AnnPredefinedBitmap property and the AnnSetBitmap method.
Encrypt | Defaults to Encryptor. Set encryption options using the AnnSetEncryptOptions.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Menus enabled | Defaults to TRUE. It can be changed using the AnnAutoMenuEnable property.
Automation text strings | Default to hard-coded strings for menus and dialog boxes. Strings can be changed using the AnnSetAutoText method.

Use the AnnOptions property to control the following features:

Rubber Stamp Display Style

XP Style Annotation Toolbar

Alpha Background Fill Option

Annotation Rotate Option

Annotation Side Handles

Annotation Multiselect

Annotation Cursors

ESC to Cancel

Calibrate Ruler Feature

Dot Dash Lines

XML Format

Text Annotation Options

For more information about these features, refer to New Annotation Features of Version 14.5.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations.

Using Annotation Object Bitmaps

Setting Defaults

Using Rulers in Annotation Objects

Displaying and Manipulating Annotation Objects


Audio Clip Annotation Object

Note:

This topic is for Document/Medical only.

The audio clip annotation object (ANNOBJECT_AUDIO) is a rectangle containing a scaled image that can be activated to play a WAV file. With the automated functions, in design mode, the user clicks and drags to specify the rectangle in the current window. A dialog box then lets the user specify the WAV file. In run mode, clicking on the icon plays the WAV file.

When you save this type of annotation, the WAV file is not saved. Only its path, specified in the text property, is saved.

You cannot flip, reverse, or rotate an audio clip. If you flip, reverse, or rotate a container that includes an audio clip, the object will move to the new position, but will retain its orientation.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Name | Defaults to empty string. It can be changed using AnnSetNameOptions.
Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Text | Defaults to an empty string. It can be changed to the path of the WAV file using the AnnSetText method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.


Button Annotation Object

Note:

This topic is for Document/Medical only.

The button annotation object (ANNOBJECT_BUTTON) is an image of a standard Windows button that can be activated. With the automated functions, the user clicks and drags to specify the rectangle in the current window. A dialog box then lets the user enter the text for the button. In run mode, clicking on the button triggers an AnnClicked event.

You cannot flip, reverse, or rotate a button. If you flip, reverse, or rotate a container that includes a button, the button will move to the new position, but will retain its orientation.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Font | Defaults to a regular MS Sans Serif red font at 10 points. It can be changed using the AnnSetFontSize method, the AnnSetFontUnderline method, the AnnSetFontStrikeThrough method, the AnnSetFontItalic method, the AnnSetFontBold method, and the AnnSetFontName method.
Text | Defaults to "AaBbYyZz". It can be changed using the AnnSetText method.
Expand Tokens | Defaults to expand tokens. It can be changed using the AnnTextExpandTokens property.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.


Closed Curve Annotation Object

The closed curve annotation object (ANNOBJECT_CURVECLOSED) is a sequence of points that are joined by cubic polynomials such that adjacent polynomials are continuous at the first and second derivates. Unlike the curve curve annotation object, the first and last endpoints are also joined by a curve. The result is a smooth, continuous closed curve going through all the points.

With the automated functions, each curve is formed with a mouse click, and the object is completed on a double click.

The points can be changed using the AnnGetPointX method, AnnGetPointY method and AnnSetPoints method.

With low-level functions, you must provide the points that define the shape of the object. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Fill pattern | Defaults to solid. It can be changed using the AnnSetFillPattern method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Polygon fill mode | Defaults to winding. It can be changed using the AnnSetPolyFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Nodes | Defaults to displaying every node. It can be changed using the AnnSetNodes method.
Fixed State. | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations

Displaying and Manipulating Annotation Objects


Container Annotation Object

Note:

This topic is for Document/Medical only.

The container annotation object (ANNOBJECT_CONTAINER) is a rectangle that is normally transparent, with a NULL line style. With the automated functions, its only purpose is to group other objects, including other container objects.

With low-level functions, you can insert and remove objects from a container, and you must specify the coordinates of an object relative to the container that it is in. The outermost (root) container establishes the frame of reference for all other objects, as explained in Low-Level Coordinate System for Annotations.

With low-level functions, you must specify the defining rectangle. Other applicable properties for the container have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method .
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method .
Foreground color | Defaults to black. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Name | Defaults to empty string. It can be changed using AnnSetNameOptions.
Line width | Defaults to 1. It can be changed using the AnnSetLineWidth method. (Values equate to a minimum of 1 pixel when displayed.)
Line style | Defaults to NULL. It can be changed using the AnnSetLineStyle method .
Fill pattern | Defaults to solid. It can be changed using the AnnSetFillPattern method .
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method. To retrieve its value, use the AnnGetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property .
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property

Use the AnnOptions property to control the following features:

Rubber Stamp Display Style

XP Style Annotation Toolbar

Alpha Background Fill Option

Annotation Rotate Option

Annotation Side Handles

Annotation Multiselect

Annotation Cursors

ESC to Cancel

Calibrate Ruler Feature

Dot Dash Lines

XML Format

Text Annotation Options

For more information about these features, refer to New Annotation Features of Version 14.5.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations


Crossproduct Annotation Object

Note:

This topic is for Document/Medical only.

The cross-product annotation object (ANNOBJECT_CROSSPRODUCT) consists of two rulers intersecting at right angles. With the automated functions, the cross product is started on a mouse-down event and completed on a mouse-up event.

With low-level functions, the points must be defined by calling the AnnSetPoints method . The points are ordered as follows:

Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Foreground color | Defaults to black. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikethrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Ruler | Defaults to ANNSHOW_LENGTH + ANNSHOW_TICMARKS. It can be changed using the AnnSetShowFlags method. To retrieve the current values, use the AnnGetShowFlags method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations

Using Rulers in Annotation Objects

Displaying and Manipulating Annotation Objects

New Annotation Features of Version 14.5


Curve Annotation Object

The curve annotation object (ANNOBJECT_CURVE) is a sequence of points that are joined by cubic polynomials such that adjacent polynomials are continuous at the first and second derivates. The result is a smooth, continuous curve going through all the points.

With the automated functions, each curve is formed with a mouse click, and the object is completed on a double click.

The points can be changed using the AnnGetPointX method, AnnGetPointY method and AnnSetPoints method.

With low-level functions, you must provide the points that define the shape of the object. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Nodes | Defaults to displaying every node. It can be changed using the AnnSetNodes method.
Fixed State. | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations

Displaying and Manipulating Annotation Objects


Ellipse Annotation Object

Note:

This topic is for Document/Medical only.

The ellipse annotation object (ANNOBJECT_ELLIPSE) is a simple ellipse. With the automated functions, the user clicks and drags to specify the ellipse in the current window.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Fill pattern | Defaults to solid. It can be changed using the AnnSetFillPattern method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects


Encrypt Annotation Object

The encrypt annotation object (ANNOBJECT_ENCRYPT) is a rectangular object that is used to encrypt rectangular portions of a bitmap.

It can also be used to encrypt the entire bitmap. In automated mode, the encrypt object is created by clicking and dragging the mouse to create the rectangular encrypt object. In design mode, the encrypt object is visible but partially transparent to show the part of the image that it covers. In run mode, the encrypt object is invisible.

You must call AnnEncryptApply method to apply the encrypt object. Once applied, the portion of the bitmap under the encrypt object becomes scrambled, and the encrypt object state changes to decryptor. Using different keys before calling this function gives different scrambling patterns The decryptor state differs from the encryptor state in that a decryptor cannot be moved, and cannot be changed to an encryptor. The scrambling can be removed by calling AnnEncryptApply on the decrypt object with the appropriate arguments. If successful, the decryptor state changes to encryptor. An encrypt object in the encryptor state can be moved, can have its key changed, and can be changed to a decrypt object.

The encrypt object is useful for encrypting portions of a bitmap. After encrypting, the scrambled bitmap cannot easily be unscrambled without the associated annotation file. The scrambling can be removed by using the associated annotation file, or by using automation mode to manually change the state from encryptor to a decryptor, position it correctly, and setting the key appropriately.

Overlapping regions can be encrypted. When encrypting overlapping regions, note the following points:

All annotation objects have an order in which they are drawn (the Z-order).

The encryptors are encrypted from the front of the Z-order to the back.

Those that are drawn first are encrypted first. Those that are drawn last ("on top" of other encryptors) are encrypted last.

The Z-order can be changed through automation by right-clicking and choosing "Send To Front" or "Send To Back".

The decrypt objects are decrypted in reverse order of the encrypt objects.

Use the AnnGetEncryptOptions method to get the encrypt options of an encrypt or a decrypt object. These options are in an ILEADRasterAnnotation Interface, TAnnEncryptOptions.

Use the AnnSetEncryptOptions method to set the encrypt options of an encrypt or a decrypt object. These options are in an ILEADRasterAnnotation Interface, TAnnEncryptOptions.

Use the AnnGetSecondaryMetafile method to retrieve the current metafile for an encrypt object in a ‘decryptor’ state.

With low-level functions, you must define the size and position of the rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Metafile | Defaults to a black skeleton key. It can be changed using the AnnSetMetafile method.
Secondary Metafile | Defaults to a red skeleton key. It can be changed using the AnnSetMetafile method.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

AnnGetEncryptOptions

AnnSetEncryptOptions

AnnEncryptApply

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations

Using Annotation Object Bitmaps


Freehand Hot Spot Annotation Object

Note:

This topic is for Document/Medical only.

The freehand hot spot annotation object (ANNOBJECT_FREEHANDHOTSPOT) is an array of points that create a sequence of joined lines. With the automated functions, in design mode, each line segment is formed with a mouse move event when the left button is down, and the object is completed on a mouse up event. In run mode, the object is transparent, but the mouse pointer changes to a hand when it is over the object. Clicking on the button triggers an AnnClicked event.

You cannot flip, reverse, or rotate a hot spot. If you flip, reverse, or rotate a container that includes a hot spot, the object will move to the new position, but will retain its orientation.

The points can be changed using the AnnGetPointX method, AnnGetPointY method and AnnSetPoints method.

With low-level functions, you must define the size and position of the rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Nodes | Defaults to displaying all nodes. It can be changed using the AnnSetNodes method.
Metafile | Defaults to a campfire graphic. It can be changed using the AnnSetMetafile method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects

Using Annotation Object Bitmaps


Freehand Line Annotation Object

Note:

This topic is for Document/Medical only.

The freehand annotation object (ANNOBJECT_FREEHAND) is an array of points that create a sequence of joined lines. With the automated functions, each line segment is formed with a mouse move event when the left button is down, and the object is completed on a mouse up event.

The points can be changed using the AnnGetPointX method, AnnGetPointY method and AnnSetPoints method.

With low-level functions, you must provide the points that define the shape of the object. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Nodes | Defaults to displaying every node. It can be changed using the AnnSetNodes method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects


Highlight Annotation Object

Note:

This topic is for Document/Medical only.

The highlight annotation object (ANNOBJECT_HILITE) is a rectangle with default properties that are appropriate for highlighting an area. With the automated functions, the user clicks and drags to specify the rectangle in the current window.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Background color | Defaults to Yellow - RGB(255, 255, 0). It can be changed using the AnnSetBackColor method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.


Hot Spot Annotation Object

Note:

This topic is for Document/Medical only.

The hot spot annotation object (ANNOBJECT_HOTSPOT) is a rectangle that can be activated for an application-defined purpose. With the automated functions, in design mode, the rectangle contains a scaled image. The user clicks and drags to specify the rectangle in the current window. In run mode, the object is transparent, but the mouse pointer changes to a hand when it is over the object. Clicking on the button triggers an AnnClicked event.

You cannot flip, reverse, or rotate a hot spot. If you flip, reverse, or rotate a container that includes a hot spot, the object will move to the new position, but will retain its orientation.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Metafile | Defaults to a campfire graphic. It can be changed using the AnnSetMetafile method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Using Annotation Object Bitmaps


Line Annotation Object

Note:

This topic is for Document/Medical only.

The line annotation object (ANNOBJECT_LINE) is a simple line. With the automated functions, the line is started on a mouse-down event and completed on a mouse-up event.

With low-level functions, you must provide the points that define the line. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects


Note Annotation Object

Note:

This topic is for Document/Medical only.

The note annotation object (ANNOBJECT_NOTE) is a rectangle with a shadow border and color background (yellow by default). It contains a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. With the automated functions, the user clicks and drags to specify the rectangle in the current window. A dialog box then lets the user enter the text.

You cannot flip, reverse, or rotate a note. If you flip, reverse, or rotate a container that includes a note, the note will move to the new position, but will retain its orientation.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to yellow - RGB(255, 555, 0). It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikeThrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Text | Defaults to "AaBbYyZz". It can be changed using the AnnSetText method.
Text Alignment | Defaults to left alignment. It can be changed using AnnTextAlign.
Text Rotate | Defaults to no rotation. It can be changed using AnnTextRotate.
Expand Tokens | Defaults to expand tokens. It can be changed using AnnTextExpandTokens.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.


Point Annotation Object

Note:

This topic is for Document/Medical only.

The point annotation object (ANNOBJECT_POINT) is single point. With the automated functions, in design mode, each point is formed with a mouse click event.

With low-level functions, the point must be defined by calling the AnnSetPoints method. Other applicable properties have the following defaults, which can be changed:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Transparent | Defaults to transparent. It can be changed using the AnnSetTransparent method.
Transparent Color | Defaults to white. It can be changed using the AnnSetTransparentColor method.
Bitmap | Defaults to NULL. It can be changed using the AnnSetBitmap method.
Point | Defaults to the bitmap of the AnnPredefinedBitmap property. It can be changed using the AnnSetBitmap method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations

Displaying and Manipulating Annotation Objects

Using Annotation Object Bitmaps


Pointer Annotation Object

Note:

This topic is for Document/Medical only.

The pointer annotation object (ANNOBJECT_POINTER) is defined by two points, with an arrow at the first point. With the automated functions, the user clicks and drags to specify the points in the current window.

With low-level functions, you must provide the points that define the points of the object. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects


Polygon Annotation Object

Note:

This topic is for Document/Medical only.

The polygon annotation object (ANNOBJECT_POLYGON) is an array of points that define the vertices of a polygon. With the automated functions, each line segment is formed with a mouse click, and the object is completed on a double click, which closes the polygon with a line from the last point to the first point.

The points can be changed using the AnnGetPointX method, AnnGetPointY method and AnnSetPoints method.

With low-level functions, you must provide the points that define the shape of the object. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Fill pattern | Defaults to solid. It can be changed using the AnnSetFillPattern method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Polygon fill mode | Defaults to winding. It can be changed using the AnnSetPolyFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Nodes | Defaults to displaying every node. It can be changed using the AnnSetNodes method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects


Polyline Annotation Object

Note:

This topic is for Document/Medical only.

The polyline annotation object (ANNOBJECT_POLYLINE) is an array of points that create a sequence of joined lines. With the automated functions, each line segment is formed with a mouse click, and the object is completed on a double click.

The points can be changed using the AnnGetPointX method, AnnGetPointY method and AnnSetPoints method.

With low-level functions, you must provide the points that define the shape of the object. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Nodes | Defaults to displaying every node. It can be changed using the AnnSetNodes method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects


Polyruler Annotation Object

Note: This topic is for Document/Medical only.

The polyruler annotation object (ANNOBJECT_POLYRULER) is an array of points that create a sequence of joined rulers. In design mode, each line segment is formed with a mouse click, and the object is completed on a double click.

The polyruler can be used to measure the distance of an irregularly shaped object. As ruler segments are added, removed, or changed in length, a running total of the total distance is displayed.

The points can be changed using the AnnGetPointX method, AnnGetPointY method and AnnSetPoints method.

With low-level functions, you must provide the points that define the shape of the object. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikethrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.

Ruler show flags

Defaults to ANNSHOW_LENGTH + ANNSHOW_TICMARKS., using smart English as the measurement unit with a precision of 2, and a tic mark length of 30. These options can be changed using the AnnSetShowFlags method, the AnnSetGaugeLength method, and the AnnSetUnit method.

Gauge length

Defaults to 30. It can be changed using AnnSetGaugeLength.

Unit | Defaults to ANNUNIT_SMART_ENGLISH. It can be changed using the AnnSetUnit method.
Unit abbreviation | Varies depending on the length shown. It can be changed using the AnnSetUnit method.
Precision | Defaults to 2. It can be changed using the AnnSetUnit method.
Tic Marks | Defaults to Show Tic Marks. It can be changed using the AnnSetUnit method.
Tic Mark Length | Defaults to 30. Can be changed using the AnnTicMarkLength property.
Fixed State. | Defaults to not fixed. It can be changed using the AnnFixed property.

Hyperlink

Defaults to None. It can be changed using the AnnSetHyperlinkString method.

Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container.
User mode | Defaults to design mode or the mode inherited from the container.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations

Using Rulers in Annotation Objects

Displaying and Manipulating Annotation Objects

New Annotation Features of Version 14.5


Protractor Annotation Object

Note:

This topic is for Document/Medical only.

The protractor annotation object (ANNOBJECT_PROTRACTOR) consists of two simple lines joined at a vertex to create an angle. With the automated functions, the first line of the protractor is started on a mouse-down event and completed on a second mouse-down event. The second line is completed on a third mouse-down event.

With low-level functions, you must define the size and position of the rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Ruler | Defaults to not showing the length, gauge, or tic marks. It can be changed using the AnnSetShowFlags method.
Protractor | Defaults to the acute angle, measured in degrees, to a precision of two places right of the decimal, and an arc radius of 30. These can be changed using the AnnSetProtractorOptions method. To retrieve the currently set values, ues the AnnGetProtractorOptions method
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations

Using Rulers in Annotation Objects

Displaying and Manipulating Annotation Objects

New Annotation Features of Version 14.5


PushPin Annotation Object

Note:

This topic is for Document/Medical only.

The PushPin annotation object (ANNOBJECT_PUSHPIN) is a rectangle containing a scaled image that can be activated to show a hidden note. With the automated functions, in design mode, the user clicks and drags to specify the rectangle in the current window. A dialog box then lets the user specify the preferred options. In run mode, clicking on the icon display the hidden note.

In design mode, the PushPin object shows the text and displays the primary bitmap. In run mode, the object shows/hides the text when clicked.

When the mode is ANNACTIVE_DISABLED, the text is hidden and the secondary bitmap is displayed.

With low-level functions, you must define the size and position of the rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using AnnSetNameOptions.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to yellow. It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikethrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Text | Defaults to "AaBbYyZz". It can be changed using the AnnSetText method.
Bitmap | Defaults to the PushPin bitmap of the AnnPredefinedBitmap property. It can be changed using the AnnSetBitmap method.
SecondaryBitmap | Defaults to a PushPin bitmap. It can be changed using the AnnSetSecondaryBitmap method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations

Using Annotation Object Bitmaps


Rectangle Annotation Object

Note:

This topic is for Document/Medical only.

The rectangle annotation object (ANNOBJECT_RECT) is a simple rectangle. With the automated functions, the user clicks and drags to specify the rectangle in the current window.

With low-level functions, you must define the size and position of the rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Fill pattern | Defaults to solid. It can be changed using the AnnSetFillPattern method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects


Redaction Annotation Object

Note:

This topic is for Document/Medical only.

The redaction annotation object (ANNOBJECT_REDACT) is a rectangle with default properties that are appropriate for blacking out an area. With the automated functions, the user clicks and drags to specify the rectangle in the current window.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Background color | Defaults to Black. It can be changed using the AnnSetBackColor method.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.


Rich Text Annotation Object

Note: This topic is for Document/Medical only.

The Rich Text annotation object (ANNOBJECT_RTF) is a rectangle containing text that supports the Rich Text Format (RTF) file format.

In design mode, click and drag to specify the rectangle in the current window. Holding down the Shift key while drawing the rectangle will make the text annotation square. A dialog box then lets the user enter the text. A menu also appears for further formatting of text. Formatting support includes:

Font

Font size

Bold

Italic

Underline

Foreground Color

Background Color

Bullets

Numbering

Indenting

Alignment

With low-level functions, you must specify the rectangle that contains the text. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Text | Defaults to an "AaBbCcZz". It can be changed using the AnnRTFText property.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.

Hyperlink

Defaults to None. It can be changed using the AnnSetHyperlinkString method.

Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations


Rubber Stamp Annotation Object

Note:

This topic is for Document/Medical only.

The rubber stamp annotation object is a stamp object that has a metafile. For information on creating a stamp annotation object, refer to Stamp Annotation Object.

Related topics:

Using Annotation Object Bitmaps


Ruler Annotation Object

Note:

This topic is for Document/Medical only.

The ruler annotation object (ANNOBJECT_RULER) is a simple line with gauges on both ends for measuring distance. With the automated functions, the ruler is started on a mouse-down event and completed on a mouse-up event.

With low-level functions, you must provide the points that define the ruler. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikethrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Ruler show flags | Defaults to ANNSHOW_LENGTH + ANNSHOW_TICMARKS., using smart English as the measurement unit with a precision of 2, and a tic mark length of 30. These options can be changed using the AnnSetShowFlags method, the AnnSetGaugeLength method, and the AnnSetUnit method.
Gauge length | Defaults to 30. It can be changed using the AnnSetGaugeLength method.
Unit | Defaults to ANNUNIT_SMART_ENGLISH. It can be changed using the AnnSetUnit method.
Unit abbreviation | Varies depending on the length shown. It can be changed using the AnnSetUnit method.
Precision | Defaults to 2. It can be changed using the AnnSetUnit method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container.
User mode | Defaults to design mode or the mode inherited from the container.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations

Types of Annotations

Low-Level Coordinate System for Annotations

Using Rulers in Annotation Objects

Displaying and Manipulating Annotation Objects

New Annotation Features of Version 14.5


Stamp Annotation Object

Note:

This topic is for Document/Medical only.

The stamp annotation object (ANNOBJECT_STAMP) can be a bitmap image, a metafile, or a text string in a rectangular frame. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two. Initially, the ANNOBJECT_STAMP displays text. With the automated functions, the user clicks and drags to specify a rectangle. Then, if the user specifies a text string, the text is centered in the rectangle. If the user specifies a bitmap, the bitmap is scaled to fit the rectangle.

On a device that displays 256 colors or less, you should use a fixed palette when displaying bitmaps. Otherwise, a palette shift will occur on stamp objects containing bitmaps.

You cannot flip or reverse a stamp object. If you flip or reverse a container that includes a stamp, the object will move to the new position, but will retain its orientation.

With low-level functions, you must specify the defining rectangle. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to an empty string. It can be changed using the AnnSetNameOptions method.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Transparent option | Defaults To Do Not Use Transparent Color. It can be changed using the AnnSetTransparent method.
Transparent Color | Defaults to White. It can be changed using the AnnSetTransparentColor method.
Fill pattern | Defaults to solid. It can be changed using the AnnSetFillPattern method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikeThrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Text | Defaults to an empty string. It can be changed using the AnnSetText method.
Expand Tokens | Defaults to expand tokens. It can be changed using AnnTextExpandTokens.
Bitmap | Defaults to Empty. It can be changed using the AnnSetBitmap method.
Metafile | Defaults to Empty. It can be changed using the AnnSetMetafile method.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.

Displaying and Manipulating Annotation Objects

Using Annotation Object Bitmaps


Text Annotation Object

Note:

This topic is for Document/Medical only.

The text annotation object (ANNOBJECT_TEXT) is a rectangle containing a character string with font properties. The text will wrap on word breaks within the object's specified rectangle. With the automated functions, the user clicks and drags to specify the rectangle in the current window. A dialog box then lets the user enter the text.

You cannot flip or reverse a text object. If you flip or reverse a container that includes a text object, the text will move to the new position, but will retain its orientation.

With low-level functions, you must specify the rectangle that contains the text. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using the AnnSetVisible method.
Selected | Defaults to FALSE. It can be changed using the AnnSetSelected method.
Name | Defaults to empty string. It can be changed using the AnnSetNameOptions method.
Fill mode | Defaults to transparent. It can be changed to opaque using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikethrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Text | Defaults to an "AaBbYyZz". It can be changed using the AnnSetText method.
Text Alignment | Defaults to left alignment. It can be changed using the AnnTextAlign property.
Expand Tokens | Defaults to expand tokens. It can be changed using the AnnTextExpandTokens property.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.

Hyperlink

Defaults to None. It can be changed using the AnnSetHyperlinkString method.

Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations.


Text Pointer Annotation Object

Note: This topic is for Document/Medical only.

The text pointer annotation object (ANNOBJECT_TEXTPOINTER) is a rectangle with a line that starts from one of the four corners. The other endpoint of the line can be moved to point to anything on the underlying image. The rectangle contains a character string with font properties. The text will wrap on word breaks within the object's specified rectangle.

With the automated functions, the user clicks and drag to specify the rectangle in the current window. After letting up on the mouse button, the rectangle is specified. Moving the mouse now specifies the line, with a final mouse click defining the line.

You can flip or reverse a text pointer object, but you cannot rotate it. If you flip or reverse the text pointer object, the text orientation does not change. To change the text orientation, see Text Dialog Box for Annotations.

With low-level functions, you must specify the rectangle that contains the text, and the pointer endpoint of the line. See AnnSetPoints for more details. Other applicable properties have the following defaults, which you can change:

Visible | Defaults to FALSE. It can be changed using AnnSetVisible.
Selected | Defaults to FALSE. It can be changed using AnnSetSelected.
Name | Defaults to empty string. It can be changed using AnnSetNameOptions.
Line width | Defaults to 0.75 points. It can be changed using the AnnSetLineWidth method. (Note that when displayed, the line must have a minimum width of 1 pixel.)
Line style | Defaults to solid. It can be changed using the AnnSetLineStyle method.
ROP2 code | Defaults to Copy. It can be changed using the AnnSetROP2 method.
Fill mode | Defaults to transparent. It can be changed using the AnnSetFillMode method.
Foreground color | Defaults to red. It can be changed using the AnnSetForeColor method.
Background color | Defaults to white. It can be changed using the AnnSetBackColor method.
Font size | Defaults to 10 point, translated with a scaling factor of 1. It can be changed using the AnnSetFontSize method.
Font underline | Defaults to FALSE. It can be changed using the AnnSetFontUnderline method.
Font strikethrough | Defaults to FALSE. It can be changed using the AnnSetFontStrikethrough method.
Font italic | Defaults to FALSE. It can be changed using the AnnSetFontItalic method.
Font bold | Defaults to FALSE. It can be changed using the AnnSetFontBold method.
Font name | Defaults to "Arial". It can be changed using the AnnSetFontName method.
Text | Defaults to "AaBbYyZz". It can be changed using the AnnSetText method.
Text Alignment | Defaults to left alignment. It can be changed using the AnnTextAlign property.
Text Rotate | Defaults to no rotation. It can be changed using the AnnTextRotate property.
Text Pointer | The pointer part of the text pointer does not move when the object moves. It can be changed using the AnnTextPointerFixed property.
Expand Tokens | Defaults to expand tokens. It can be changed using the AnnTextExpandTokens property.
Fixed State | Defaults to not fixed. It can be changed using the AnnFixed property.
Hyperlink | Defaults to None. It can be changed using the AnnSetHyperlinkString method.
Tag (identifier) | Defaults to 0. It can be changed using the AnnSetTag method.
Window handle | Defaults to NULL or the handle inherited from the container. It can be changed for all objects using the AnnSetWnd method.
User mode | Defaults to design mode or the mode inherited from the container. It can be changed for all objects using the AnnUserMode property.

For information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

Related topics:

Implementing Annotations.

Types of Annotations.

Low-Level Coordinate System for Annotations

Displaying and Manipulating Annotation Objects


Audio File Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you specify the WAV file for an audio clip annotation object. It is implemented using the Windows common dialog box.


Capture Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Capture on the Video properties menu of a video annotation object.


Color Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you change the foreground or background color property of an annotation object. It is implemented using the Windows common dialog box. To see how the foreground and background colors affect the appearance of an object, refer to Illustration of Fill Options for Annotations.


Decrypt Metafile Dialog Box For Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when the Decrypt Metafile item on the Default Properties menu is selected. It is implemented using the Windows common dialog box.


Encrypt Dialog Box For Annotations

Note: This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Encrypt on the Encrypt properties menu of an Encrypt annotation object. This dialog is used to set the key, type (encryptor or decryptor), and location of the encrypt object.


Encrypt Metafile Dialog Box For Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you specify the metafile or secondary metafile for an encryptor or decryptor annotation object. It is implemented using the Windows common dialog box.


Fill Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you change the fill properties of an annotation object. To see the possible modes and patterns, refer to Illustration of Fill Options for Annotations. For possible polygon fill modes, refer to Illustration of the Polygon Fill Mode for Annotations.


Fixed Dialog Box for Annotations

Note: This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Fixed on the Properties menu of an annotation object that can be Fixed.


Font Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you change the font properties of an annotation object. It is implemented using the Windows common dialog box. The font size is based on the associated bitmap's physical resolution (DPI), so that it matches the scale of the original scanned image.


Hotspot Metafile Dialog Box For Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you update the metafile property of a Hotspot or Freehand Hotspot annotation object. It is implemented using the Windows common dialog box.


Line Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you change the line properties of an annotation object. The line width is based on the associated bitmap's physical resolution (DPI), so that it matches the scale of the original scanned image. Setting the width to a small number will not make the line disappear. On any output device, lines will always be at least one pixel wide. To see the possible line styles, refer to Illustration of Line Styles for Annotations.


Name Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you change the name properties of an annotation object.


Nodes Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Nodes on the automation menu of an annotation object. This dialog is used to set the options displaying nodes for the object.


Password Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in Automation mode when you lock or unlock an object or group of objects.


Point Dialog Box for Annotations

Note: This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Point on the Point Properties menu of a point annotation object.


Point File Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Bitmap on the Point Properties menu of a point annotation object. It is implemented using the Windows common dialog box.


Point Properties Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode under the following condtions:

Right-click on an image with no objects selected, and select Point in the Default Properties menu

Right-click on a point object and select Point in the Point Properties menu


Protractor Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Protractor on the Protractor properties menu of a protractor annotation object. This dialog is used to set the protractor options for the object.


Push pin File Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select Bitmap on the Pushpin Properties menu of a Pushpin annotation object. This dialog is used to set the primary bitmap for the object, which displays in the top-left corner of the note along with the text when in design mode.

The following dialog box appears in automation mode when you select Secondary Bitmap on the Push pin properties menu of a push pin annotation object. This dialog is used for setting the secondary bitmap for the object.


ROP2 Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in Automation mode when you select the ROP2 option on the "Default properties" menu item.

Selecting "Copy" draws the object using the object's color.

Selecting "And" draws the object, performing an AND between the object's color and the background color. This creates a highlight effect. White objects become transparent.

Selecting "XOR" draws the object, performing an XOR between the object's color and the background color. This creates an inverted effect. Black objects become transparent.


Ruler Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in Automation mode when you select the Ruler option on the "Default properties" menu item.


Stamp Bitmap Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you update the Bitmap property of a Stamp (including the Rubber Stamp) annotation object or one of the Rubber Stamp tools. It is implemented using the Windows common dialog box.

Note that Stamp (including the Rubber Stamp) objects can display text, a bitmap or a metafile. Setting an object to display one of these destroys any settings that exist for the other two.


Stamp Metafile Dialog Box For Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you update the metafile property of a Stamp or Rubber Stamp annotation object. It is implemented using the Windows common dialog box.

Note that these objects can display text, a bitmap or a metafile (only one of these can be displayed at any time). Setting an object to display one of these destroys any settings that exist for the other two.


Text Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you change the text property of an annotation object. Word wrap is implemented in the dialog box and in the rectangle that defines the annotation object.


Video File Dialog Box for Annotations

Note:

This topic is for Document/Medical only.

The following dialog box appears in automation mode when you select File on the Video properties menu of a video annotation object.


Annotation Automation Strings

Note:

This topic is for Document/Medical only.

This is a list of the available Annotation Automation Dialog Strings. These strings are used in association with the AnnSetAutoText method, AnnGetAutoText method, ButtonMenuTextID property, and ButtonToolTipTextID property.

Annotation Automation Menu Strings

Annotation Automation Line Dialog Strings

Annotation Automation Fill Dialog Strings

Annotation Automation Text Dialog Strings

Annotation Automation Audio Dialog Strings

Annotation Automation Stamp Dialog Strings

Annotation Automation ROP2 Dialog Strings

Annotation Automation Lock/Unlock Dialog Strings

Annotation Automation Miscellaneous Dialog Strings

Annotation Automation Ruler Dialog Strings

Annotation Automation Point Dialog Strings

Annotation Automation Video Dialog Strings

Annotation Automation Push Pin Dialog Strings

Annotation Automation Nodes Dialog Strings

Annotation Automation Protractor Dialog Strings

Annotation Automation Name Dialog Strings

Annotation Automation Play Video Dialog Strings

Annotation Automation Stamp Metafile Dialog Strings

Annotation Automation ToolTip Dialog Strings

Annotation Automation Transparent Color Dialog Strings

Annotation Automation Capture Dialog Strings


Annotation Automation Audio Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_AUDIOFILE_CAPTION | "Audio File"
ANNAUTOTEXT_AUDIOFILE_FILTER | "Wave Files (*.wav)|*.wav|All Files (*.*)|*.*|"


Annotation Automation Capture Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_CAPTUREFILE_CAPTION | "Choose a File Name"
ANNAUTOTEXT_CAPTUREFILE_FILTER | "AVI Files (*.AVI)\0*.avi\0All Files (*.*)\0*.*\0\0"
ANNAUTOTEXT_CAPTUREWINDOW_CAPTION | "Capture Window"
ANNAUTOTEXT_CAPTURE_CAPTION | "Capture Dialog"
ANNAUTOTEXT_CAPTURE_CAPTUREDRIVERS | "Capture Drivers"
ANNAUTOTEXT_CAPTURE_VIDEODIALOGS | "Capture Driver Dialogs"
ANNAUTOTEXT_CAPTURE_VIDEOFORMAT | "Video Format"
ANNAUTOTEXT_CAPTURE_VIDEODISPLAY | "Video Display"
ANNAUTOTEXT_CAPTURE_VIDEOSOURCE | "Video Source"
ANNAUTOTEXT_CAPTURE_VIDEOCOMPRESSION | "Video Compression"
ANNAUTOTEXT_CAPTURE_DISPLAYMODE | "Display Mode"
ANNAUTOTEXT_CAPTURE_NONE | "None"
ANNAUTOTEXT_CAPTURE_NONEOVERLAY | "Overlay"
ANNAUTOTEXT_CAPTURE_PREVIEW | "Preview"
ANNAUTOTEXT_CAPTURE_PREVIEWFRAMESPERSEC | "Frames Per Sec"
ANNAUTOTEXT_CAPTURE_OPTIONS | "Capture Options"
ANNAUTOTEXT_CAPTURE_TIMELIMIT | "Time Limit (sec)"
ANNAUTOTEXT_CAPTURE_CAPTUREFRAMESPERSEC | "Frames Per Sec"
ANNAUTOTEXT_CAPTURE_STARTCAPTURE | "Start Capture"
ANNAUTOTEXT_CAPTURE_ENDCAPTURE | "End Capture"
ANNAUTOTEXT_CAPTURE_FRAMESCAPTURED | "Frames Captured"
ANNAUTOTEXT_CAPTURE_AUDIOOPTIONS | "Audio Options"
ANNAUTOTEXT_CAPTURE_CAPTUREAUDIO | "Capture Audio"
ANNAUTOTEXT_CAPTURE_SYNCAUDIO | "Sync Audio to Video"
ANNAUTOTEXT_CAPTURE_CAPTUREFILE | "Capture File"
ANNAUTOTEXT_CAPTURE_BROWSE | "Browse..."
ANNAUTOTEXT_CAPTURE_FILESIZE | "File Size (bytes)"
ANNAUTOTEXT_CAPTURE_OK | "OK"
ANNAUTOTEXT_CAPTURE_CANCEL | "Cancel"
ANNAUTOTEXT_CAPTURE_WAV_1M08 | "11.025 kHz, Mono, 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_1S08 | "11.025 kHz, Stereo, 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_1M16 | "11.025 kHz, Mono, 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_1S16 | "11.025 kHz, Stereo, 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_2M08 | "22.050 kHz, Mono, 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_2S08 | "22.050 kHz, Stereo, 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_2M16 | "22.050 kHz, Mono, 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_2S16 | "22.050 kHz, Stereo, 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_4M08 | "44.100 kHz, Mono, 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_4S08 | "44.100 kHz, Stereo, 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_4M16 | "44.100 kHz, Mono, 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_4S16 | "44.100 kHz, Stereo, 16-bit"
ANNAUTOTEXT_CAPTURE_DEFAULTNAME | "c:\\capture.avi"
ANNAUTOTEXT_CAPTURE_NODRIVERS | "No Capture Drivers Available"


Annotation Automation Encrypt Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText methods. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_ENCRYPT_CAPTION | "Encrypt"
ANNAUTOTEXT_ENCRYPT_KEY | "&Key"
ANNAUTOTEXT_ENCRYPT_TYPE | "Ty&pe"
ANNAUTOTEXT_ENCRYPT_RADIO_ENCRYPTOR | "&Encryptor"
ANNAUTOTEXT_ENCRYPT_RADIO_DECRYPTOR | "&Decryptor"
ANNAUTOTEXT_ENCRYPT_LOCATION | "&Location"
ANNAUTOTEXT_ENCRYPT_LOCATION_LEFT | "&Left"
ANNAUTOTEXT_ENCRYPT_LOCATION_TOP | "&Top"
ANNAUTOTEXT_ENCRYPT_LOCATION_RIGHT | "&Right"
ANNAUTOTEXT_ENCRYPT_LOCATION_BOTTOM | "&Bottom"
ANNAUTOTEXT_ENCRYPT_OK | "OK"
ANNAUTOTEXT_ENCRYPT_CANCEL | "Cancel"


Annotation Automation Encrypt Metafile Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText methods. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_ENCRYPTMETAFILE_CAPTION | "Encrypt Metafile"
ANNAUTOTEXT_ENCRYPTMETAFILE_FILTER | "All metafiles (*.wmf;*.emf|*.wmf;*.emf|WMF files (*.wmf)|*.wmf|EMF files (*.emf)|*.emf|All Files (*.*)|*.*|")
ANNAUTOTEXT_DECRYPTMETAFILE_CAPTION | "Decrypt Metafile"
ANNAUTOTEXT_DECRYPTMETAFILE_FILTER | "All metafiles (*.wmf;*.emf|*.wmf;*.emf|WMF files (*.wmf)|*.wmf|EMF files (*.emf)|*.emf|All Files (*.*)|*.*|")


Annotation Automation Fill Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_FILL_CAPTION | "Fill"
ANNAUTOTEXT_FILL_MODE | "&Mode"
ANNAUTOTEXT_FILL_PATTERNS | "&Patterns"
ANNAUTOTEXT_FILL_POLYGON | "Pol&ygon"
ANNAUTOTEXT_FILL_OK | "OK"
ANNAUTOTEXT_FILL_CANCEL | "Cancel"
ANNAUTOTEXT_FILL_APPLY | "Apply"
ANNAUTOTEXT_FILL_TRANSPARENT | "Transparent"
ANNAUTOTEXT_FILL_TRANSLUCENT | "Translucent"
ANNAUTOTEXT_FILL_OPAQUE | "Opaque"
ANNAUTOTEXT_FILL_SOLID | "Solid"
ANNAUTOTEXT_FILL_BACKWARDDIAGONAL | "Backward Diagonal"
ANNAUTOTEXT_FILL_CROSS | "Cross"
ANNAUTOTEXT_FILL_DIAGONALCROSS | "Diagonal Cross"
ANNAUTOTEXT_FILL_FORWARDDIAGONAL | "Forward Diagonal"
ANNAUTOTEXT_FILL_HORIZONTAL | "Horizontal"
ANNAUTOTEXT_FILL_VERTICAL | "Vertical"
ANNAUTOTEXT_FILL_WINDING | "Winding"
ANNAUTOTEXT_FILL_ALTERNATE | "Alternate"


Annotation Automation Fixed Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText methods. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_FIXED_CAPTION | "Fixed"
ANNAUTOTEXT_FIXED_FIXED | "&Fixed"
ANNAUTOTEXT_FIXED_ADJUST | "&Adjust"
ANNAUTOTEXT_FIXED_OK | "OK"
ANNAUTOTEXT_FIXED_CANCEL | "Cancel"
ANNAUTOTEXT_TOOLTIP_SELECT | "Select"
ANNAUTOTEXT_TOOLTIP_LINE | "Line"
ANNAUTOTEXT_TOOLTIP_RECT | "Rect"
ANNAUTOTEXT_TOOLTIP_ELLIPSE | "Ellipse"
ANNAUTOTEXT_TOOLTIP_POLYLINE | "Polyline"
ANNAUTOTEXT_TOOLTIP_POLYGON | "Polygon"
ANNAUTOTEXT_TOOLTIP_POINTER | "Pointer"
ANNAUTOTEXT_TOOLTIP_FREEHAND | "Freehand"
ANNAUTOTEXT_TOOLTIP_HILITE | "Hilite"
ANNAUTOTEXT_TOOLTIP_REDACT | "Redact"
ANNAUTOTEXT_TOOLTIP_TEXT | "Text"
ANNAUTOTEXT_TOOLTIP_NOTE | "Note"
ANNAUTOTEXT_TOOLTIP_STAMP | "Stamp"
ANNAUTOTEXT_TOOLTIP_RUBBERSTAMP | "Rubber Stamp"
ANNAUTOTEXT_TOOLTIP_HOTSPOT | "Hotspot"
ANNAUTOTEXT_TOOLTIP_FREEHANDHOTSPOT | "Freehand Hotspot"
ANNAUTOTEXT_TOOLTIP_AUDIO | "Audio"
ANNAUTOTEXT_TOOLTIP_BUTTON | "Button"
ANNAUTOTEXT_TOOLTIP_RULER | "Ruler"
ANNAUTOTEXT_TOOLTIP_CROSSPRODUCT | "Crossproduct"
ANNAUTOTEXT_TOOLTIP_POINT | "Point"
ANNAUTOTEXT_TOOLTIP_PROTRACTOR | "Protractor"
ANNAUTOTEXT_TOOLTIP_VIDEO | "Video"
ANNAUTOTEXT_TOOLTIP_PUSHPIN | "Pushpin"
ANNAUTOTEXT_TOOLTIP_CURVE | "Curve"
ANNAUTOTEXT_TOOLTIP_CURVECLOSED | "Closed Curve"
ANNAUTOTEXT_TOOLTIP_ENCRYPT | "Encrypt"
ANNAUTOTEXT_TOOLTIP_TEXTPOINTER | "Text Pointer"
ANNAUTOTEXT_TOOLTIP_POLYRULER | "Poly Ruler"
ANNAUTOTEXT_TOOLTIP_RTF | "RTF"
ANNAUTOTEXT_TRANSPARENTCOLOR_CAPTION | "Pick transparent color"
ANNAUTOTEXT_TRANSPARENTCOLOR_ARRAYFRAME | "Bitmap colors"
ANNAUTOTEXT_TRANSPARENTCOLOR_CURRENTCOLORFRAME | "Current color"
ANNAUTOTEXT_TRANSPARENTCOLOR_COLOR | "Color:"
ANNAUTOTEXT_TRANSPARENTCOLOR_RED | "Red:"
ANNAUTOTEXT_TRANSPARENTCOLOR_GREEN | "Green:"
ANNAUTOTEXT_TRANSPARENTCOLOR_BLUE | "Blue:"
ANNAUTOTEXT_TRANSPARENTCOLOR_OK | "OK"
ANNAUTOTEXT_TRANSPARENTCOLOR_CANCEL | "Cancel"
ANNAUTOTEXT_CAPTUREFILE_CAPTION | "Choose a File Name"
ANNAUTOTEXT_CAPTUREFILE_FILTER | "AVI Files (*.AVI\0*.avi\0All Files (*.*)\0*.*\0\0")
ANNAUTOTEXT_CAPTUREWINDOW_CAPTION | "Capture Window"
ANNAUTOTEXT_CAPTURE_CAPTION | "Capture Dialog"
ANNAUTOTEXT_CAPTURE_CAPTUREDRIVERS | "Capture Drivers"
ANNAUTOTEXT_CAPTURE_VIDEODIALOGS | "Capture Driver Dialogs"
ANNAUTOTEXT_CAPTURE_VIDEOFORMAT | "Video Format"
ANNAUTOTEXT_CAPTURE_VIDEODISPLAY | "Video Display"
ANNAUTOTEXT_CAPTURE_VIDEOSOURCE | "Video Source"
ANNAUTOTEXT_CAPTURE_VIDEOCOMPRESSION | "Video Compression"
ANNAUTOTEXT_CAPTURE_DISPLAYMODE | "Display Mode"
ANNAUTOTEXT_CAPTURE_NONE | "None"
ANNAUTOTEXT_CAPTURE_NONEOVERLAY | "Overlay"
ANNAUTOTEXT_CAPTURE_PREVIEW | "Preview"
ANNAUTOTEXT_CAPTURE_PREVIEWFRAMESPERSEC | "Frames Per Sec"
ANNAUTOTEXT_CAPTURE_OPTIONS | "Capture Options"
ANNAUTOTEXT_CAPTURE_TIMELIMIT | "Time Limit (sec")
ANNAUTOTEXT_CAPTURE_CAPTUREFRAMESPERSEC | "Frames Per Sec"
ANNAUTOTEXT_CAPTURE_STARTCAPTURE | "Start Capture"
ANNAUTOTEXT_CAPTURE_ENDCAPTURE | "End Capture"
ANNAUTOTEXT_CAPTURE_FRAMESCAPTURED | "Frames Captured"
ANNAUTOTEXT_CAPTURE_AUDIOOPTIONS | "Audio Options"
ANNAUTOTEXT_CAPTURE_CAPTUREAUDIO | "Capture Audio"
ANNAUTOTEXT_CAPTURE_SYNCAUDIO | "Sync Audio to Video"
ANNAUTOTEXT_CAPTURE_CAPTUREFILE | "Capture File"
ANNAUTOTEXT_CAPTURE_BROWSE | "Browse..."
ANNAUTOTEXT_CAPTURE_FILESIZE | "File Size (bytes")
ANNAUTOTEXT_CAPTURE_OK | "OK"
ANNAUTOTEXT_CAPTURE_CANCEL | "Cancel"
ANNAUTOTEXT_CAPTURE_WAV_1M08 | "11.025 kHz Mono 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_1S08 | "11.025 kHz Stereo 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_1M16 | "11.025 kHz Mono 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_1S16 | "11.025 kHz Stereo 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_2M08 | "22.050 kHz Mono 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_2S08 | "22.050 kHz Stereo 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_2M16 | "22.050 kHz Mono 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_2S16 | "22.050 kHz Stereo 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_4M08 | "44.100 kHz Mono 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_4S08 | "44.100 kHz Stereo 8-bit"
ANNAUTOTEXT_CAPTURE_WAV_4M16 | "44.100 kHz Mono 16-bit"
ANNAUTOTEXT_CAPTURE_WAV_4S16 | "44.100 kHz Stereo 16-bit"
ANNAUTOTEXT_CAPTURE_DEFAULTNAME | "c:\\capture.avi"
ANNAUTOTEXT_CAPTURE_NODRIVERS | "No Capture Drivers Available"
ANNAUTOTEXT_DIALOG_FONT | "MS Sans Serif"


Annotation Automation Hotspot Metafile Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_HOTSPOTMETAFILE_CAPTION | "Hotspot Metafile"
ANNAUTOTEXT_HOTSPOTMETAFILE_FILTER | "All metafiles (*.wmf;*.emf|*.wmf;*.emf|WMF files (*.wmf)|*.wmf|EMF files (*.emf)|*.emf|All Files (*.*)|*.*|")


Annotation Automation Line Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_LINE_CAPTION | "Line"
ANNAUTOTEXT_LINE_WIDTH | "&Width (points)"
ANNAUTOTEXT_LINE_STYLE | "&Style"
ANNAUTOTEXT_LINE_OK | "OK"
ANNAUTOTEXT_LINE_CANCEL | "Cancel"
ANNAUTOTEXT_LINE_APPLY | "Apply"
ANNAUTOTEXT_LINE_SOLID | "Solid"
ANNAUTOTEXT_LINE_DASH | "Dash"
ANNAUTOTEXT_LINE_DOT | "Dot"
ANNAUTOTEXT_LINE_DASHDOT | "Dash-Dot"
ANNAUTOTEXT_LINE_DASHDOTDOT | "Dash-Dot-Dot"
ANNAUTOTEXT_LINE_NULL | "Null"


Annotation Automation Lock/Unlock Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_LOCK_CAPTION | "Password"
ANNAUTOTEXT_LOCK_TEXT | "&Password"
ANNAUTOTEXT_LOCK_OK | "OK"
ANNAUTOTEXT_LOCK_CANCEL | "Cancel"
ANNAUTOTEXT_UNLOCK_CAPTION | "Password"
ANNAUTOTEXT_UNLOCK_TEXT | "&Password"
ANNAUTOTEXT_UNLOCK_OK | "OK"
ANNAUTOTEXT_UNLOCK_CANCEL | "Cancel"


Annotation Automation Menu Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_MENU_UNDO | "&Undo"
ANNAUTOTEXT_MENU_CUT | "Cu&t"
ANNAUTOTEXT_MENU_COPY | "&Copy"
ANNAUTOTEXT_MENU_PASTE | "&Paste"
ANNAUTOTEXT_MENU_DELETE | "&Delete"
ANNAUTOTEXT_MENU_SELECTALL | "Select &All"
ANNAUTOTEXT_MENU_BRINGTOFRONT | "Bring to &Front"
ANNAUTOTEXT_MENU_SENDTOBACK | "Send to &Back"
ANNAUTOTEXT_MENU_DEFAULTPROPERTIES | "Default Pr&operties"
ANNAUTOTEXT_MENU_SELECTEDPROPERTIES | "Selected Pr&operties"
ANNAUTOTEXT_MENU_CONTAINERPROPERTIES | "Container Pr&operties"
ANNAUTOTEXT_MENU_POINTERPROPERTIES | "Pointer Pr&operties"
ANNAUTOTEXT_MENU_AUDIOPROPERTIES | "Audio Pr&operties"
ANNAUTOTEXT_MENU_BUTTONPROPERTIES | "Button Pr&operties"
ANNAUTOTEXT_MENU_ELLIPSEPROPERTIES | "Ellipse Pr&operties"
ANNAUTOTEXT_MENU_FREEHANDPROPERTIES | "Freehand Pr&operties"
ANNAUTOTEXT_MENU_HILITEPROPERTIES | "Hilite Pr&operties"
ANNAUTOTEXT_MENU_HOTSPOTPROPERTIES | "Hotspot Pr&operties"
ANNAUTOTEXT_MENU_LINEPROPERTIES | "Line Pr&operties"
ANNAUTOTEXT_MENU_NOTEPROPERTIES | "Note Pr&operties"
ANNAUTOTEXT_MENU_POLYGONPROPERTIES | "Polygon Pr&operties"
ANNAUTOTEXT_MENU_POLYLINEPROPERTIES | "Polyline Pr&operties"
ANNAUTOTEXT_MENU_RECTANGLEPROPERTIES | "Rectangle Pr&operties"
ANNAUTOTEXT_MENU_REDACTPROPERTIES | "Redact Pr&operties"
ANNAUTOTEXT_MENU_STAMPPROPERTIES | "Stamp Pr&operties"
ANNAUTOTEXT_MENU_TEXTPROPERTIES | "Text Pr&operties"
ANNAUTOTEXT_MENU_AUTOMATIONPROPERTIES | "Automation Pr&operties"
ANNAUTOTEXT_MENU_RULERPROPERTIES | "Ruler Pr&operties"
ANNAUTOTEXT_MENU_CROSSPRODUCTPROPERTIES | "Cross-Product Pr&operties"
ANNAUTOTEXT_MENU_POINTPROPERTIES | "Point Pr&operties"
ANNAUTOTEXT_MENU_PROTRACTORPROPERTIES | "Protractor Pr&operties"
ANNAUTOTEXT_MENU_VIDEOPROPERTIES | "Video Pr&operties"
ANNAUTOTEXT_MENU_PUSHPINPROPERTIES | "PushPin Pr&operties"
ANNAUTOTEXT_MENU_FREEHANDHOSPOTPROPERTIES | "Freehand Hotspot Pr&operties"
ANN_AUTOTEXT_MENU_CURVEPROPERTIES | "Curve Pr&operties"
ANN_AUTOTEXT_MENU_CURVECLOSEDPROPERTIES | "Closed Curve Pr&operties"
ANN_AUTOTEXT_MENU_ENCRYPTPROPERTIES | "Encrypt Pr&operties"
ANN_AUTOTEXT_MENU_TEXTPOINTERPROPERTIES | "Text Pointer Pr&operties"
ANN_AUTOTEXT_MENU_POLYRULERPROPERTIES | "Polyruler Pr&operties"
ANN_AUTOTEXT_MENU_RTFPROPERTIES | "Rich Text Pr&operties"
ANNAUTOTEXT_MENU_LINE | "&Line..."
ANNAUTOTEXT_MENU_FILL | "&Fill..."
ANNAUTOTEXT_MENU_FOREGROUNDCOLOR | "F&oreground Color..."
ANNAUTOTEXT_MENU_BACKGROUNDCOLOR | "&Background Color..."
ANNAUTOTEXT_MENU_FONT | "Fo&nt..."
ANNAUTOTEXT_MENU_BITMAP | "&Bitmap..."
ANNAUTOTEXT_MENU_TEXT | "&Text..."
ANNAUTOTEXT_MENU_FILE | "F&ile..."
ANNAUTOTEXT_MENU_ROP2 | "ROP&2..."
ANNAUTOTEXT_MENU_TRANSPARENT | "Tr&ansparent"
ANNAUTOTEXT_MENU_LOCK | "&Lock..."
ANNAUTOTEXT_MENU_UNLOCK | "&Unlock..."
ANNAUTOTEXT_MENU_LOCKALL | "&Lock All..."
ANNAUTOTEXT_MENU_UNLOCKALL | "&Unlock All..."
ANNAUTOTEXT_MENU_HYPERLINK | "&Hyperlink..."
ANNAUTOTEXT_MENU_NOTEBACKGROUNDCOLOR | "No&te Background Color..."
ANNAUTOTEXT_MENU_REDACTBACKGROUNDCOLOR | "&Hilite Background Color..."
ANNAUTOTEXT_MENU_HILITEBACKGROUNDCOLOR | "&Redact Background Color..."
ANNAUTOTEXT_MENU_HOTSPOTMETAFILE | "&Hotspot Metafile..."
ANNAUTOTEXT_MENU_ENCRYPTMETAFILE | "Encrypt Metafile..."
ANNAUTOTEXT_MENU_DECRYPTMETAFILE | "Decrypt Metafile..."
ANNAUTOTEXT_MENU_RULER | "&Ruler... "
ANNAUTOTEXT_MENU_RULERPROPERTIES | "Ruler Pr&operties"
ANNAUTOTEXT_MENU_BUTTONFONT | "B&utton Font"
ANNAUTOTEXT_MENU_GROUP | "&Group"
ANNAUTOTEXT_MENU_UNGROUP | "U&ngroup"
ANNAUTOTEXT_MENU_NODES | "No&des..."
ANNAUTOTEXT_MENU_SHOWRULER | "&Show Rulers"
ANNAUTOTEXT_MENU_PROTRACTOR | "&Protractor …"
ANNAUTOTEXT_MENU_NAME | "Name…"
ANNAUTOTEXT_MENU_ENCRYPT | "Encrypt..."
ANNAUTOTEXT_MENU_POINT | "Point..."
ANNAUTOTEXT_MENU_METAFILE | "&Metafile..."
ANNAUTOTEXT_MENU_SECONDARYMETAFILE | "S&econdary Metafile..."
ANNAUTOTEXT_MENU_SECONDARYFILE | "&Secondary Bitmap..."
ANNAUTOTEXT_MENU_TRANSPARENTCOLOR | "&Transparent Color..."
ANNAUTOTEXT_MENU_DELETENODE | "D&elete node"
ANNAUTOTEXT_MENU_ADDNODE | "Add &node"
ANNAUTOTEXT_MENU_CAPTURE | "Capture..."
ANNAUTOTEXT_MENU_FIXED | "Fi&xed..."
ANNAUTOTEXT_MENU_STAMP_APPROVED | "Approved"
ANNAUTOTEXT_MENU_STAMP_ASSIGNED | "Assigned"
ANNAUTOTEXT_MENU_STAMP_CHECKED | "Checked"
ANNAUTOTEXT_MENU_STAMP_CLATPRV | "Client Attorney Privilege"
ANNAUTOTEXT_MENU_STAMP_COPY | "Copy"
ANNAUTOTEXT_MENU_STAMP_DRAFT | "Draft"
ANNAUTOTEXT_MENU_STAMP_EXTENDED | "Extended"
ANNAUTOTEXT_MENU_STAMP_FAX | "Fax"
ANNAUTOTEXT_MENU_STAMP_FAXED | "Faxed"
ANNAUTOTEXT_MENU_STAMP_IMPORTANT | "Important"
ANNAUTOTEXT_MENU_STAMP_INVOICE | "Invoice"
ANNAUTOTEXT_MENU_STAMP_NOTICE | "Notice"
ANNAUTOTEXT_MENU_STAMP_OFFICIAL | "Official"
ANNAUTOTEXT_MENU_STAMP_ONFILE | "On File"
ANNAUTOTEXT_MENU_STAMP_PAID | "Paid"
ANNAUTOTEXT_MENU_STAMP_PASSED | "Passed"
ANNAUTOTEXT_MENU_STAMP_PENDING | "Pending"
ANNAUTOTEXT_MENU_STAMP_PROCESSED | "Processed"
ANNAUTOTEXT_MENU_STAMP_RECEIVED | "Received"
ANNAUTOTEXT_MENU_STAMP_REJECTED | "Rejected"
ANNAUTOTEXT_MENU_STAMP_RELEASE | "Release"
ANNAUTOTEXT_MENU_STAMP_SENT | "Sent"
ANNAUTOTEXT_MENU_STAMP_SHIPPED | "Shipped"
ANNAUTOTEXT_MENU_STAMP_TOPSECRET | "Top Secret"
ANNAUTOTEXT_MENU_STAMP_URGENT | "Urgent"
ANNAUTOTEXT_MENU_STAMP_VOID | "Void"


Annotation Automation Miscellaneous Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_ITEM_DEFAULTTEXT | "AaBbYyZz"
ANNAUTOTEXT_ITEM_DEFAULTNAME | ""
ANNAUTOTEXT_DIALOG_FONT | ""


Annotation Automation Name Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_NAME_CAPTION | "Name"
ANNAUTOTEXT_NAME_SHOW | "&Show Name"
ANNAUTOTEXT_NAME_OFFSET | "Name &Offset"
ANNAUTOTEXT_NAME_OFFSET_X | "X"
ANNAUTOTEXT_NAME_OFFSET_Y | "Y"
ANNAUTOTEXT_NAME_RESTRICT | "Name &Restrict"
ANNAUTOTEXT_NAME_OK | "OK"
ANNAUTOTEXT_NAME_CANCEL | "Cancel"
ANNAUTOTEXT_NAME_APPLY | "Apply"


Annotation Automation Nodes Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_NODES_CAPTION | "Nodes"
ANNAUTOTEXT_NODES_DISPLAYNODES | "&Display Nodes"
ANNAUTOTEXT_NODES_GAP | "&Gap between nodes:"
ANNAUTOTEXT_NODES_OK | "OK"
ANNAUTOTEXT_NODES_CANCEL | "Cancel"
ANNAUTOTEXT_NODES_APPLY | "Apply"


Annotation Automation Play Video Dialog Strings

For playing the video, you must have DirectX installed.

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_PLAYVIDEO_CAPTION | "Play video"
ANNAUTOTEXT_PLAYVIDEO_BALANCE | "Balance"
ANNAUTOTEXT_PLAYVIDEO_VOLUME | "Volume"
ANNAUTOTEXT_PLAYVIDEO_SPEED | "Speed"
ANNAUTOTEXT_PLAYVIDEO_TIP_PLAY | "Play"
ANNAUTOTEXT_PLAYVIDEO_TIP_PAUSE | "Pause"
ANNAUTOTEXT_PLAYVIDEO_TIP_STOP | "Stop"
ANNAUTOTEXT_PLAYVIDEO_TIP_REWIND | "Rewind"
ANNAUTOTEXT_PLAYVIDEO_TIP_FORWARD | "Forward"
ANNAUTOTEXT_PLAYVIDEO_TIP_PREVMARK | "Go to start of selection"
ANNAUTOTEXT_PLAYVIDEO_TIP_NEXTMARK | "Go to end of selection"
ANNAUTOTEXT_PLAYVIDEO_TIP_NEXTFRAME | "Next Frame"
ANNAUTOTEXT_PLAYVIDEO_TIP_PREVFRAME | "Previous Frame"
ANNAUTOTEXT_PLAYVIDEO_TIP_STARTSEL | "Set start of selection"
ANNAUTOTEXT_PLAYVIDEO_TIP_ENDSEL | "Set end of selection"


Annotation Automation Point Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_POINTFILE_CAPTION | "Point File"
ANNAUTOTEXT_POINTFILE_FILTER | "All Files (*.*)|*.*|"
ANNAUTOTEXT_POINT_CAPTION | "Point"
ANNAUTOTEXT_POINT_USE_BITMAP | "&Use Bitmap"
ANNAUTOTEXT_POINT_NO_BITMAP | "&No Bitmap"
ANNAUTOTEXT_POINT_BITMAP | "&Bitmap..."
ANNAUTOTEXT_POINT_TRANSPARENT_COLOR | "&Transparent Color"
ANNAUTOTEXT_POINT_RADIUS | "&Radius"
ANNAUTOTEXT_POINT_BORDER_COLOR | "Bor&der Color"
ANNAUTOTEXT_POINT_FILL_COLOR | "&Fill Color"
ANNAUTOTEXT_POINT_TRANSPARENT | "Trans&parent"
ANNAUTOTEXT_POINT_FIXED_SIZE | "Fixed &Size"


Annotation Automation Protractor Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_PROTRACTOR_CAPTION | "Protractor"
ANNAUTOTEXT_PROTRACTOR_ACUTE | "&Acute"
ANNAUTOTEXT_PROTRACTOR_UNITS | "&Measurement Units"
ANNAUTOTEXT_PROTRACTOR_ABBREV | "&Unit Abbreviation"
ANNAUTOTEXT_PROTRACTOR_PRECISION | "&Precision"
ANNAUTOTEXT_PROTRACTOR_ARCRADIUS | "Arc &radius"
ANNAUTOTEXT_PROTRACTOR_OK | "OK"
ANNAUTOTEXT_PROTRACTOR_CANCEL | "Cancel"
ANNAUTOTEXT_PROTRACTOR_APPLY | "Apply"
ANNAUTOTEXT_PROTRACTOR_DEGREES | "Degrees"
ANNAUTOTEXT_PROTRACTOR_RADIANS | "Radians"
ANNAUTOTEXT_NAME_CAPTION | "Name"
ANNAUTOTEXT_NAME_SHOW | "&Show Name"
ANNAUTOTEXT_NAME_LOCATION | "&Location"
ANNAUTOTEXT_NAME_OFFSET | "&Name Offset"
ANNAUTOTEXT_NAME_OFFSET_X | "&X"
ANNAUTOTEXT_NAME_OFFSET_Y | "&Y"
ANNAUTOTEXT_NAME_RESTRICT | "Name &Restrict"
ANNAUTOTEXT_NAME_FONT | "Fo&nt"
ANNAUTOTEXT_NAME_SAMPLE | "&Sample"
ANNAUTOTEXT_NAME_SAMPLE_TEXT | "AaBbZz"
ANNAUTOTEXT_NAME_COLORS | "&Colors"
ANNAUTOTEXT_NAME_FOREGROUNDCOLOR | "&Foreground Color"
ANNAUTOTEXT_NAME_BACKGROUNDCOLOR | "&Background Color"
ANNAUTOTEXT_NAME_TRANSPARENT | "&Transparent"
ANNAUTOTEXT_NAME_OK | "OK"
ANNAUTOTEXT_NAME_CANCEL | "Cancel"
ANNAUTOTEXT_NAME_APPLY | "Apply"


Annotation Automation Push pin Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_PUSHPINFILE_CAPTION | "Pushpin File"
ANNAUTOTEXT_PUSHPINFILE_FILTER | "All Files (*.*)|*.*|"
ANNAUTOTEXT_PUSHPINSECONDARYFILE_CAPTION | "Pushpin Secondary File"
ANNAUTOTEXT_PUSHPINSECONDARYFILE_FILTER | "All Files (*.*)|*.*|"


Annotation Automation ROP2 Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_ROP2_CAPTION | "ROP2"
ANNAUTOTEXT_ROP2_TEXT | "ROP2"
ANNAUTOTEXT_ROP2_OK | "OK"
ANNAUTOTEXT_ROP2_CANCEL | "Cancel"
ANNAUTOTEXT_ROP2_APPLY | "Apply"
ANNAUTOTEXT_ROP2_COPY | "Copy (normal)"
ANNAUTOTEXT_ROP2_AND | "And (highlight)"
ANNAUTOTEXT_ROP2_XOR | "XOR (invert)"


Annotation Automation Ruler Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_RULER_CAPTION | "Ruler"
ANNAUTOTEXT_RULER_UNITS | "&Measurement units"
ANNAUTOTEXT_RULER_ABBREV | "&Unit abbreviation"
ANNAUTOTEXT_RULER_PRECISION | "Precision",
ANNAUTOTEXT_RULER_LENGTH | "&Gauge length"
ANNAUTOTEXT_RULER_OK | "OK"
ANNAUTOTEXT_RULER_CANCEL, | "Cancel"
ANNAUTOTEXT_RULER_APPLY | "Apply"
ANNAUTOTEXT_RULER_INCHES | "inches"
ANNAUTOTEXT_RULER_FEET | "feet"
ANNAUTOTEXT_RULER_YARDS | "yards"
ANNAUTOTEXT_RULER_MICROMETERS | "micrometers"
ANNAUTOTEXT_RULER_MILLIMETERS | "milimeters"
ANNAUTOTEXT_RULER_CENTIMETERS | "centimeters"
ANNAUTOTEXT_RULER_METERS | "meters"
ANNAUTOTEXT_RULER_TWIPS | "twips"
ANNAUTOTEXT_RULER_POINTS | "points"
ANNAUTOTEXT_RULER_PIXELS | "pixels"
ANNAUTOTEXT_RULER_SMART_METRIC | "smart metric"
ANNAUTOTEXT_RULER_SMART_ENGLISH | "smart english"
ANNAUTOTEXT_RULER_SHOWLENGTH | "&Show Length"
ANNAUTOTEXT_RULER_SHOWGAUGE | "S&how Gauge"
ANNAUTOTEXT_RULER_SHOWTICMARKS | "Show &Tic Marks"


Annotation Automation Stamp Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_STAMPFILE_CAPTION | "Stamp File"
ANNAUTOTEXT_STAMPFILE_FILTER | "All Files (*.*)|*.*|"


Annotation Automation Stamp Metafile Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_STAMPMETAFILE_CAPTION | "Stamp Metafile"
ANNAUTOTEXT_STAMPMETAFILE_FILTER | "All metafiles (*.wmf;*.emf)|*.wmf;*.emf|WMF files (*.wmf)|*.wmf|EMF files (*.emf)|*.emf|All Files (*.*)|*.*|"


Annotation Automation Text Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_TEXT_IMPORT | "From &Text File..."
ANNAUTOTEXT_TEXT_CAPTION | "Text"
ANNAUTOTEXT_TEXT_FILE_CAPTION | "Import Text From File"
ANNAUTOTEXT_TEXT_FILE_FILTER | "Text files (*.txt|*.txt|All Files (*.*)|*.*|")
ANNAUTOTEXT_TEXT_INSERT_TOKEN | "&Insert Token >>"
ANNAUTOTEXT_TEXT_ALIGN | "&Alignment"
ANNAUTOTEXT_TEXT_ALIGN_LEFT | "&Left"
ANNAUTOTEXT_TEXT_ALIGN_CENTER | "&Center"
ANNAUTOTEXT_TEXT_ALIGN_RIGHT | "&Right"
ANNAUTOTEXT_TEXT_ROTATION | "R&otation (degrees")
ANNAUTOTEXT_TEXT_ROTATE_0 | "&None"
ANNAUTOTEXT_TEXT_ROTATE_90 | "&90 (Counter-clockwise")
ANNAUTOTEXT_TEXT_ROTATE_180 | "&180"
ANNAUTOTEXT_TEXT_ROTATE_270 | "&270 (Counter-clockwise")
ANNAUTOTEXT_TEXT_FIXED_POINTER | "&Fixed Pointer"
ANNAUTOTEXT_TEXT_EXPAND_TOKENS | "&Expand Tokens"
ANNAUTOTEXT_TEXT_OK | "OK"
ANNAUTOTEXT_TEXT_CANCEL | "Cancel"
ANNAUTOTEXT_TEXT_APPLY | "Apply"


Annotation Automation ToolTip Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_TOOLTIP_SELECT | "Select"
ANNAUTOTEXT_TOOLTIP_LINE | "Line"
ANNAUTOTEXT_TOOLTIP_RECT | "Rect"
ANNAUTOTEXT_TOOLTIP_ELLIPSE | "Ellipse"
ANNAUTOTEXT_TOOLTIP_POLYLINE | "Polyline"
ANNAUTOTEXT_TOOLTIP_POLYGON | "Polygon"
ANNAUTOTEXT_TOOLTIP_POINTER | "Pointer"
ANNAUTOTEXT_TOOLTIP_FREEHAND | "Freehand"
ANNAUTOTEXT_TOOLTIP_HILITE | "Hilite"
ANNAUTOTEXT_TOOLTIP_REDACT | "Redact"
ANNAUTOTEXT_TOOLTIP_TEXT | "Text"
ANNAUTOTEXT_TOOLTIP_NOTE | "Note"
ANNAUTOTEXT_TOOLTIP_STAMP | "Stamp"
ANNAUTOTEXT_TOOLTIP_RUBBERSTAMP | "Rubber Stamp"
ANNAUTOTEXT_TOOLTIP_HOTSPOT | "Hotspot"
ANNAUTOTEXT_TOOLTIP_FREEHANDHOTSPOT | "Freehand Hotspot"
ANNAUTOTEXT_TOOLTIP_AUDIO | "Audio"
ANNAUTOTEXT_TOOLTIP_BUTTON | "Button"
ANNAUTOTEXT_TOOLTIP_RULER | "Ruler"
ANNAUTOTEXT_TOOLTIP_CROSSPRODUCT | "Crossproduct"
ANNAUTOTEXT_TOOLTIP_POINT | "Point"
ANNAUTOTEXT_TOOLTIP_PROTRACTOR | "Protractor"
ANNAUTOTEXT_TOOLTIP_VIDEO | "Video"
ANNAUTOTEXT_TOOLTIP_PUSHPIN | "Pushpin"


Annotation Automation Transparent Color Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_TRANSPARENTCOLOR_CAPTION | "Pick transparent color"
ANNAUTOTEXT_TRANSPARENTCOLOR_COLORARRAYFRAME | "Bitmap colors"
ANNAUTOTEXT_TRANSPARENTCOLOR_CURRENTCOLORFRAME | "Current color"
ANNAUTOTEXT_TRANSPARENTCOLOR_COLOR | "Color:"
ANNAUTOTEXT_TRANSPARENTCOLOR_RED | "Red:"
ANNAUTOTEXT_TRANSPARENTCOLOR_GREEN | "Green:"
ANNAUTOTEXT_TRANSPARENTCOLOR_BLUE | "Blue:"
ANNAUTOTEXT_TRANSPARENTCOLOR_OK | "OK"
ANNAUTOTEXT_TRANSPARENTCOLOR_CANCEL | "Cancel"


Annotation Automation Video Dialog Strings

The following are constants and their default values. You can get the current value using the AnnGetAutoText method. You can modify the string using the AnnSetAutoText method.

Constant | Default String
ANNAUTOTEXT_VIDEOFILE_CAPTION | "Video File"
ANNAUTOTEXT_VIDEOFILE_FILTER | "AVI Files (*.avi)|*.avi|Wave Files (*.wav)|*.wav|All Files (*.*)|*.*|"


Implementing Markers

Some file formats (TIFF, GIF, PNG, Exif, DICOM, JPEG, LEAD, and IPTC) can contain metadata of various types. "Metadata" refers to extra information that is stored with an image, but is not necessary for decoding the image. For instance, metadata can contain information about the camera used to take the image, the author, date and time the image was taken, where the image was taken, whether the camera has GPS capabilities, etc. When an image is modified, you should preserve the original information, if possible. Metadata includes markers, tags and comments. This topic will deal primarily with markers. For more information on tags and comments, refer to the following topics:

Implementing TIFF Tags

Types of File Comments

JPEG files contain metadata information in user-defined markers. The user-defined markers are in the range $E0 to $FE. These markers can have a maximum size of $FFFD, or 65533 bytes. The markers below $E0 are reserved for the encoding of the image and inserting a reserved marker can make a file invalid. Therefore, you should not use reserved markers unless you are well acquainted with markers and image encoding in JPEG files.

TIFF files do not contain markers, however, LEADTOOLS provides a "workaround" for transferring Exif comments from JPEG files to TIFF files, and vice versa. The Exif metadata information from a TIFF file will be loaded as an APP1 marker. Therefore, you can load Exif metadata from an uncompressed file and store it in a compressed Exif file. You can also take metadata information from a compressed Exif file and store it in an uncompressed Exif file. Please note however, that some information cannot be stored inside uncompressed Exif files. For example, audio data is stored in APP2 markers and there is no built-in support for saving APP2 markers in TIFF files. However, you can still save the audio data yourself, using a custom tag. For more information on saving custom tags, refer to Implementing TIFF Tags.

Handling Markers

LEADTOOLS provides the LEADMarker control for loading, creating, setting, modifying, getting information from and freeing markers.

To load markers from an existing JPEG file, call the LoadMarkers method. Although TIFF files do not support markers, LEADTOOLS provides limited support through the use of APP1 Exif markers. When you call the LoadMarkers method for a TIFF file, an APP1 marker is created and all the TIFF, GPS and Exif comments will be stored in it. In addition, any other tag with an ID greater than $8000 (32768) will be stored in the APP1 marker. The other information will be considered as being useful only for the image and will not be loaded into the APP1 marker. The only exception is the resolution information, which will be loaded in the APP1 marker.

The CreateMarkers method lets you create a collection of markers from scratch. You can then insert markers with the InsertMarker method. After you call InsertMarker once, you can call EnumMarkers and insert markers using the OnEnumerateMarkers event.

Markers, like tags and comments can be set so that when a file is saved using the SaveXXX methods, the markers, tags and/or comments that have been set will be saved too. Set the markers to save using the SetMarkers method. Once the markers have been set using SetMarkers, all the save operations from the current thread will use these markers. If you do not want to save any markers, call SetMarkers with the Marker parameter set to NULL(Nil). To get the markers that were set by the last call to SetMarkers, call the GetMarkers method.

Please note that both the SetMarkers method and GetMarkers method use copies of the list of markers.

Markers set using SetMarkers can also be written to files using the WriteComment and WriteTag methods. The comments or tags being written by these two methods will overwrite any similar comments or tags contained in the markers. The WriteMetaData method can also be used to write markers, tags and comments to a file. The following is a summary of the methods and the type of data each method writes:

Method | Type of Data
WriteComment | Comments and Markers
WriteTag | Tags and Markers
WriteMetaData | Comments, Tags and Markers

Markers are generally modified by deleting all markers of a certain type. To delete all markers of a certain type, use the DeleteMarker method. To delete a marker at a specific index, use the DeleteMarkerAt method.

The EnumMarkers method can be used to enumerate and modify a marker collection. It is a powerful method, used internally by most marker manipulation methods. For each marker enumerated by EnumMarkers, an OnEnumerateMarkers event is fired. This event lets you delete markers from or insert markers to the marker collection being enumerated. This allows you to modify the marker collection enumerated by the EnumMarkers method. To insert a new marker in a marker collection, use InsertMarker. You can get a marker by index using the GetMarker method. You can also get individual markers using the EnumMarkers method and the OnEnumerateMarkers event.

Each marker may consist of one or more elements. When getting a marker using the GetMarker method, the ElementCount property is updated with the number of elements in the marker and the Element property is updated with the actual element(s) that make up that marker. The MarkerType property is updated with type of marker retrieved by the GetMarker method. When inserting a marker using the InsertMarker method, set the desired marker information in the ElementCount, Element and MarkerType properties before calling InsertMarker.

To determine how many markers are in a collection, see the Count property.

To specify whether LEADTOOLS generates system error events, set the MethodErrorsEnabled property.

To get the error code resulting from the last method called or property set, check the Error property.

Finally, to create a copy of a marker collection and obtain a handle to the new marker collection, use CopyMarkers method.


Implementing TIFF

Implementing TIFF Tags

The TIFF 6.0 Specification sets aside a range of private tags that developers can define. To avoid conflicts with files created by other developers, you can register your tag by contacting Adobe Developer Relations. (The E-Mail address posted on The Unofficial TIFF Home Page is gapdevsup@adobe.com.)

To define and set a tag, use the SetTag method.

To read tag data from a file, use the ReadTag method. To read tag data from a file in memory, use the ReadTagMemory method.

To get information about a tag, use the following:

GetTagData method

GetTagType method

GetTagCount method

To write tag(s) to a file, use the WriteTag method.


ISIS ASCII Tags

These ISIS Scanner Driver Tags are used to retrieve and set information concerning the scanner and scanning options. They are set using the ISISSetASCIITag method and retrieved using the ISISGetASCIITag method. Possible tags are given below. Not all tags are supported by all drivers and not all values are supported by all drivers. For more information, refer to Using ISIS to Scan Images.

Value | Meaning
TAG_PAGESIZE | [0x050e] Gets or sets the page size to scan.


ISIS Tags

These ISIS Scanner Driver Tags are used to retrieve and set information concerning the scanner and scanning options. They are set using the ISISSetTag method and retrieved using the ISISGetTag method. Possible tags are given below. Not all tags are supported by all drivers and not all values are supported by all drivers. For more information, refer to Using ISIS to Scan Images.

Value | Meaning
TAG_XRESOLUTION | [$011A] Gets or sets the horizontal resolution in PixelsPerInch.
TAG_YRESOLUTION | [$011B] Gets or sets the vertical resolution in PixelsPerInch.
TAG_FEEDER | [$0503] [Read Only] Gets information about the scanner's flatbed and/or feeder. Values may be:
 | TAG_FEEDER_FEED [$00000001] Scanner has feeder.
 | TAG_FEEDER_FLAT [$00000002] Scanner has flatbed.
 | TAG_FEEDER_TELLFLAT [$00020000] Can detect page on flatbed.
 | TAG_FEEDER_TELLFEED [$00010000] Can detect page in feeder.
 | TAG_FEEDER_TELLSCAN [$00040000] Can only detect by committing.
 | TAG_FEEDER_CENTERFEED [$00080000] Can center page in feeder.
 | TAG_FEEDER_CENTERFLAT [$00100000] Can detect if page is centered in flatbed.
TAG_XPOSITION | [$011E] Gets or sets distance from left edge of page to start of image in pixels.
TAG_YPOSITION | [$011F] Gets or sets distance from top edge of page to start of image in pixels.
TAG_IMAGELENGTH | [$0101] Gets or sets the number of rows (height) of the image in pixels.
TAG_IMAGEWIDTH | [$0100] Gets or sets the number of columns (width) of the image in pixels.
TAG_SAMPLESPERPIXEL | [$0115] Samples per pixel of the scanned image.
TAG_BITSPERSAMPLE | [$0102] Bits per pixel of the scanned image.
TAG_PHOTOMETRICINTERPRETATION | [$0106] Indicates whether the image should be interpreted as grayscale or color. Possible values are:
 | TAG_PHOTOMETRIC_WHITE0 [$0000] binary - 0 represents white
 | TAG_PHOTOMETRIC_WHITE1 [$0001] binary - 1 represents white
 | TAG_PHOTOMETRIC_RGB [$0002] RGB
 | TAG_PHOTOMETRIC_PALETTE [$0003] PALLETTE
 | TAG_PHOTOMETRIC_BGR [$0120] BGR

Settings for TAG_SAMPLESPERPIXEL, TAG_BITSPERSAMPLE and TAG_PHOTOMETRICINTERPRETATION, and the corresponding color format are given below.

TAG_SCANORIENTATION | [$0113] [Read Only] Orientation of the page in the scanner's feeder. Values can be:
 | TAG_SCANORIENTATION_PORT [$0001] portrait.
 | TAG_SCANORIENTATION_LAND [$0002] landscape.
 | TAG_SCANORIENTATION_180 [$0003] upside-down portrait.
 | TAG_SCANORIENTATION_270 [$0004] upside-down landscape.
 | TAG_SCANORIENTATION_PORTM [$0005] portrait mirrored.
 | TAG_SCANORIENTATION_LANDM [$0006] landscape mirrored.
 | TAG_SCANORIENTATION_180M [$0007] upside-down portrait mirrored.
 | TAG_SCANORIENTATION_270M [$0008] upside-down landscape mirrored.
TAG_SCANTYPE | [$0514] Specifies the scanning source. Possible values are:
 | TAG_SCANTYPE_AUTOMATIC [$0000] default - scan from ADF if pages are detected, otherwise scan from flatbed
 | TAG_SCANTYPE_TRANSPARENCY [$0001] scan from the transparency unit
 | TAG_SCANTYPE_FLATBED [$0002] scan from the flatbed
 | TAG_SCANTYPE_FEEDER [$0003] scan only the front side of the page from the feeder
 | TAG_SCANTYPE_FRONTONLY [$0003] scan only the front side of the page from the feeder
 | TAG_SCANTYPE_DUPLEX [$0004] scan in duplex mode from the feeder
 | TAG_SCANTYPE_FRONTBACK [$0004] scan in duplex mode from the feeder
 | TAG_SCANTYPE_BACKFRONT [$0005] scan in duplex and return back side of the page first from the feeder
 | TAG_SCANTYPE_BACKONLY [$0006] scan only the back side of the page from the feeder
TAG_SCANAHEAD | [$050d] State of the ScanAhead feature of the scanner. Possible values are:
 | TAG_SCANAHEAD_NO [$0000] ScanAhead not enabled.
 | TAG_SCANAHEAD_YES [$0001] ScanAhead enabled.
TAG_SCANAHEAD_MAXPAGES | [$057c] Gets or sets the number of pages to buffer.
TAG_MAXPAGES | [$0504] [Read Only] Gets the number of pages the ADF can hold.
TAG_COMPRESSION | [$0103] Gets or sets the type of compression to use, if the scanner supports compression. Possible values are:
 | TAG_COMPRESSION_NONE [$0001] No compression
 | TAG_COMPRESSION_MG3 [$0002] CCITT compression
 | TAG_COMPRESSION_G3 [$0003] CCITT G3 1-DIM
 | TAG_COMPRESSION_G4 [$0004] Standard G4
 | TAG_COMPRESSION_LZW [$0005] LZW compression
 | TAG_COMPRESSION_JPEG [$0006] JPEG compression, not supported by LEAD.
 | TAG_COMPRESSION_32771 [$8003] Packbits compression
 | TAG_COMPRESSION_PACK [$8005] Packbits compression, not supported by LEAD.
 | TAG_COMPRESSION_JBIG [$8765] JBIG compression.
 | TAG_COMPRESSION_PCX [$C350] PCX compression, not supported by LEAD.
 | TAG_COMPRESSION_4BYTE [$C351] No compression, not supported by LEAD.
 | TAG_COMPRESSION_GIF [$C355] GIF compression, not supported by LEAD.
 | TAG_COMPRESSION_BMP [$C356] BMP compression, not supported by LEAD.
TAG_CONTRAST | [$0501] Gets or sets the contrast value if scanner supports it. Possible values are:
 | TAG_CONTRAST_AUTO [$0000] AutoContrast or no support
 | > 0 Specific Contrast setting
TAG_BRIGHTNESS | [$0502] Gets or set the brightness value. Possible values are:
 | TAG_BRIGHTNESS_AUTO [$FFFFFFFD] AutoBrightness control
 | TAG_BRIGHTNESS_DARKEN [$FFFFFFFE] Lighten page relative to TAG_BRIGHTNESS_NORM
 | TAG_BRIGHTNESS_NORM [$FFFFFFFF] Selects "normal" brightness
 | TAG_BRIGHTNESS_LIGHTEN [$00000000] Darken page relative to TAG_BRIGHTNESS_NORM.
 | Some scanners also support values 1 - 127.
TAG_GAMMA | [$050f] Gets or sets the Gamma Curve Adjustment value. Possible values are:
 | TAG_GAMMA_AUTO [$0000] AutoGammaCorrection
 | TAG_GAMMA_DOWNLOAD1 [$0001] 1st gamma correction table
 | TAG_GAMMA_DOWNLOAD2 [$0002] 2nd gamma correction table
 | TAG_GAMMA_DOWNLOAD3 [$0003] 3rd gamma correction table
 | TAG_GAMMA_DOWNLOAD4 [$0004] 4th gamma correction table
 | TAG_GAMMA_DOWNLOAD5 [$0005] 5th gamma correction table
 | TAG_GAMMA_DOWNLOAD6 [$0006] 6th gamma correction table


Maintaining File Comments

Some file formats can contain comments, and some cannot, and each file format has its own set of comment types, as described in Types of File Comments.

An array of comments can be maintained in memory. These comments can be written to a file, along with the control's loaded bitmap, when the file is saved. The comments can also be written to an existing file, without overwriting the stored image. You can maintain an array of comments in memory, and when you save a file, the comments from the array are written to the file. There is only one array of comments for your application, regardless of how may LEAD controls your application contains. You control the contents of the array; loading or saving a file does not initialize the array. You can use the following property to get and set the value of any comment in the array:

Comment property

To read the existing comments from a file, use the following method:

ReadComment method

To write comments to an existing file, without overwriting the stored image with the control's loaded bitmap, use the following method:

WriteComment method


Types of File Comments

Some file formats can contain comments, and some cannot, and each file format has its own set of comment types. For applicable comment types, refer to the following:

TIFF File Comments

GIF File Comments

Exif File Comments

DICOM File Comments

PNG File Comments


GIF File Comments

When reading or updating GIF comments, you can specify only one type of comment.

Value | Meaning
CMNT_SZDESC | Description of the image. This a variable-length character string. The maximum length is 32K.


IPTC Comments

The IPTC-NAA comments are standardized by the International Press Telecommunications Council in collaboration with Newspaper Association of America. More information about these comments can be found on IPTC’s web site (http://www.iptc.org). Many comments have to follow a particular format, so refer to the IPTC documentation to make sure you are writing valid comments.

LEADTOOLS will verify that the size of the comment is within the limits specified by the standard. Comments with invalid length will NOT be written in the file. LEADTOOLS will NOT verify the contents of the data (it will not verify that the numerical comments contain only digits, etc.).

Some of these comments are repeatable (ie you can have more than one comment of this type). To write two or more values for a repeatable comment, concatenate the comments using the IPTC_SEPARATOR as the separator. IPTC_SEPARATOR has an Ascii code of 1 and cannot appear in any comment, so there is not a possibility of confusion about this character is the separator or part of the comment. Do not confuse this with the character ‘1’, whose Ascii code is 49!

When reading a repeatable comment with more than one value, LEADTOOLS will concatenate all the values and use the IPTC_SEPARATOR to separate the values. Therefore, when a comment that might be repeatable is retrieved, it is best to search for the separator.

CMNT_IPTC_KEYWORDS is the best example of a comment that is repeatable. If the file has three keywords (keyword1, keyword2 and keyword3), they will be returned as the following string:

"keyword1\001keyword2\001keyword3".

Every IPTC comment is identified by x:y, where x is the Record number and y is the DataSet number. For example, CMNT_IPTC_KEYWORDS is identified as 2:15. We will list the corresponding "x:y" identifier for every comment supported in LEADTOOLS, together with the length limits.

All the date comments use the format YYYYMMDD, so July 4, 2001 is "20010704".

All the time comments use the format HHMMSS±HHMM, following the ISO 8601 standard. The part after ± is the reference to the Universal Time Format. For example, 3PM Eastern USA time is "150000-0500".

Please note that the IPTC_SEPARATOR is not a comment, it is only a define used for the separator!

IPTC_SEPARATOR ‘\001’ A separator used for repeatable comments.

IPTC comments can be saved inside TIFF and JPEG files.

Value | Meaning
CMNT_IPTC_FIRST | [181] The first IPTC comment To get all IPTC comments, use the comment type constant as a loop counter. The first constant is CMNT_IPTC_FIRST and the last is CMNT_IPTC_ LAST.
CMNT_IPTC_LAST | [226] The last IPTC comment
CMNT_IPTC_VERSION | [181] 2:0, the version of IPTC comments (read-only). Non-repeatable, (min=2 bytes, max=2). This is the only comment that is binary. The first byte is the lower version number (usually 0) and the second byte is the high version number (the current version is 4 - binary 4, not ascii ‘4’). LEADTOOLS writes 4 here.
CMNT_IPTC_OBJECTTYPEREFERENCE | [182] 2:3, Object type reference. Non repeatable. Length = 3..67.
CMNT_IPTC_OBJECTATTRIBUTEREFERENCE | [183] 2:4, Object Attribute Reference. Repeatable. Length = 4..68.
CMNT_IPTC_OBJECTNAME | [184] 2:5, Object name. Non repeatable. Length = 1..64.
CMNT_IPTC_EDITSTATUS | [185] 2:7, Edit status. Non repeatable. Length = 1..64.
CMNT_IPTC_EDITORIALUPDATE | [186] 2:8, Editorial update. Non repeatable. Length = 2..2.
CMNT_IPTC_URGENCY | [187] 2:10, Urgency. Non repeatable. ‘1’ is most urgent, ‘5’ = Normal, ‘8’ is least urgent. Length = 1..1.
CMNT_IPTC_SUBJECTREFERENCE | [188] 2:12, Subject reference. Repeatable. Length = 13..236.
CMNT_IPTC_CATEGORY | [189] 2:15, Category. Non repeatable. Length = 1..3.
CMNT_IPTC_SUPPLEMENTALCATEGORY | [190] 2:20, Supplemental category. Repeatable. Length = 1..32.
CMNT_IPTC_FIXTUREIDENTIFIER | [191] 2:22, Fixture identifier. Non repeatable. Length = 1..32.
CMNT_IPTC_KEYWORDS | [192] 2:25, Keywords. Repeatable. Length = 1..64.
CMNT_IPTC_CONTENTLOCATIONCODE | [193] 2:26, Content location code. Repeatable. Length = 3..3.
CMNT_IPTC_CONTENTLOCATIONNAME | [194] 2:27, Content location name. Repeatable. Length = 1..64.
CMNT_IPTC_RELEASEDATE | [195] 2:30, Release date. Non repeatable. Length = 8..8.
CMNT_IPTC_RELEASETIME | [196] 2:35, Release time. Non repeatable. Length = 11..11.
CMNT_IPTC_EXPIRATIONDATE | [197] 2:37, Expiration date. Non repeatable. Length = 8..8.
CMNT_IPTC_EXPIRATIONTIME | [198] 2:38, Expiration time. Non repeatable. Length = 11..11.
CMNT_IPTC_SPECIALINSTRUCTIONS | [199] 2:40, Special instructions. Non repeatable. Length = 1..256.
CMNT_IPTC_ACTIONADVISED | [200] 2:42, Action advised. Non repeatable. Length = 2..2.
CMNT_IPTC_REFERENCESERVICE | [201] 2:45, Reference service. Repeatable. Length = 1..10.
CMNT_IPTC_REFERENCEDATE | [202] 2:47, Reference date. Repeatable. Length = 8..8.
CMNT_IPTC_REFERENCENUMBER | [203] 2:50, Reference number. Repeatable. Length = 8..8.
CMNT_IPTC_DATECREATED | [204] 2:55, Date created. Non repeatable. Length = 8..8.
CMNT_IPTC_TIMECREATED | [205] 2:60, Time created. Non repeatable. Length = 11..11.
CMNT_IPTC_DIGITALCREATIONDATE | [206] 2:62, Digital creation date. Non repeatable. Length = 8..8.
CMNT_IPTC_DIGITALCREATIONTIME | [207] 2:63, Digital creation time. Non repeatable. Length = 11..11.
CMNT_IPTC_ORIGINATINGPROGRAM | [208] 2:65, Originating program. Non repeatable. Length = 1..32.
CMNT_IPTC_PROGRAMVERSION | [209] 2:70, Program version. Non repeatable. Length = 1..10.
CMNT_IPTC_OBJECTCYCLE | [210] 2:75, Object cycle. Non repeatable. Length = 1..1.
CMNT_IPTC_BYLINE | [211] 2:80, By-line. Repeatable. Length = 1..32.
CMNT_IPTC_BYLINETITLE | [212] 2:85, By-line title. Repeatable. Length = 1..32.
CMNT_IPTC_CITY | [213] 2:90, City Non repeatable. Length = 1..32.
CMNT_IPTC_SUBLOCATION | [214] 2:92, Sub-location. Non repeatable. Length = 1..32.
CMNT_IPTC_PROVINCE_STATE | [215] 2:95, Province/State. Non repeatable. Length = 1..32.
CMNT_IPTC_PRIMARYLOCATIONCODE | [216] 2:100, Country/Primary location code. Non repeatable. Length = 3..3.
CMNT_IPTC_PRIMARYLOCATIONNAME | [217] 2:101, Country/Primary location name. Non repeatable. Length = 1..64.
CMNT_IPTC_ORIGINALTRANSMISSIONREFERENCE | [218] 2:103, Original transmission reference. Non repeatable. Length = 1..32.
CMNT_IPTC_HEADLINE | [219] 2:105, Headline. Non repeatable. Length = 1..256.
CMNT_IPTC_CREDIT | [220] 2:110, Credit. Non repeatable. Length = 1..32.
CMNT_IPTC_SOURCE | [221] 2:115, Source. Non repeatable. Length = 1..32.
CMNT_IPTC_COPYRIGHT | [222] 2:116, Copyright Notice. Non repeatable. Length = 1..128.
CMNT_IPTC_CONTACT | [223] 2:118, Contact. Repeatable. Length = 1..128.
CMNT_IPTC_CAPTION | [224] 2:120, Caption/Abstract. Non repeatable. Length = 1..2000.
CMNT_IPTC_AUTHOR | [225] 2:122, Writer/Editor. Repeatable. Length = 1..32.
CMNT_IPTC_LANGUAGEIDENTIFIER | [226] 2:135, Language identifier. Non repeatable. Length = 2..3.


JPEG, J2K and LEAD File Comments

You can save comments in JPEG files, J2K files and in progressive LEAD CMP files (but not in non-progressive CMP files). When reading or updating these comments, you can specify only one type of comment.

Please note that LEADTOOLS also supports IPTC Comments, which can be saved inside JPEG files. For more information, refer to IPTC Comments.

Value | Meaning
CMNT_SZDESC | [3] Description of the image. This a variable-length character string. The maximum length is 64K.

J2K Comments

CMNT_J2K_BINARY | [179] JPEG 2000 Binary comment
CMNT_J2K_LATIN | [180] JPEG 2000 Latin comment


PNG File Comments

PNG has MMX optimized code for load/save and supports comments as well. The following comments are supported:

Value | Meaning
CMNT_SZARTIST | [0] Person who created the image.
CMNT_SZCOPYRIGHT | [1] Copyright notice.
CMNT_SZDATETIME | [2] Date and time (YYYY:MM:DD HH:MM:SS). The field length is 20, counting the NULL terminator.
CMNT_SZDESC | [3] Description of the image.
CMNT_SZMAKE | [5] Manufacturer of the equipment used to create the image.
CMNT_SZTITLE | [175] Title of the image.
CMNT_SZSOFTWARE | [9] Name and version of software package used to create the image.
CMNT_SZDISCLAIMER | [176] String containing the disclaimer of the software used to create the image.
CMNT_SZWARNING | [177] Warning statement associated with the software that created the image.
CMNT_MISC | [178] Miscellaneous information.


TIFF File Comments

When reading or updating TIFF comments, you must specify the comment type using the following constants.

For a loop counter:

Value | Meaning
CMNT_LAST | Last defined number for comments. To get all comments, you can use the comment type constant as a loop counter. The first constant is 0 and the last is CMNT_LAST.

For TIFF files: Each comment field can contain a character string. The maximum field size is 32K, except for the date-time field, which is always 20.

Value | Meaning
CMNT_SZARTIST | Person who created the image.
CMNT_SZCOPYRIGHT | Copyright notice.
CMNT_SZDATETIME | Date and time (YYYY:MM:DD HH:MM:SS). The field length is 20, counting the NULL terminator.
CMNT_SZDESC | Description of the image.
CMNT_SZHOSTCOMP | Computer and operating system in use.
CMNT_SZMAKE | Manufacturer of the equipment used to create the image.
CMNT_SZMODEL | Model name and number of the equipment.
CMNT_SZNAMEOFDOC | Name of the document from which the image was scanned.
CMNT_SZNAMEOFPAGE | Page name from which the image was scanned.
CMNT_SZSOFTWARE | Name and version of the software package used to create the image.


DICOM File Comments

Note:

This topic is for the Medical toolkits only.

When reading or updating DICOM file comments, you must specify the comment type using one of the following constants.

For a loop counter:

Value | Meaning
CMNT_LAST | Last defined number for comments. To get all comments, you can use the comment type constant as a loop counter. The first constant is 0 and the last is CMNT_LAST.
For DICOM comments: |
Value | Meaning
CMNT_SZPATIENTNAME | Patient name.
CMNT_SZPATIENTID | Patient ID.
CMNT_SZPATIENTBIRTHDATE | Patient birth date.
CMNT_SZPATIENTSEX | Patient sex.
CMNT_SZSTUDYINSTANCE | Study instance ID.
CMNT_SZSTUDYDATE | Study date.
CMNT_SZSTUDYTIME | Study time.
CMNT_SZSTUDYREFERRINGPHYSICIAN | Referring physician.
CMNT_SZSERIESMODALITY | Series modality. This comment determines the type of DICOM file read, or the type of DICOM file to save. It is a NULL terminated string consisting of two bytes. For a list of possible values, refer to Modalities. If you set the comment to anything other than a value listed in Modalities, the DICOM filter will ignore the comment and write "OT" instead.
CMNT_SZSERIESID | Series ID.
CMNT_SZSERIESNUMBER | Series number.


Modalities

Value | Meaning
CR | computed radiography
CT | computed tomography
DS | digital subtraction angiography
MR | magnetic resonance
NM | nuclear medicine
US | ultrasound
OT | other
AS | angioscopy
BI | biomagnetic imaging
CD | color flow doppler
CF | cinefluorography
CP | culposcopy
CS | cystoscopy
DD | duplex doppler
DF | digital fluoroscopy
DG | diaphanography
DM | digital microscopy
EC | echocardiography
ES | endoscopy
FA | fluorescein angiography
FS | fundoscopy
LP | laparoscopy
LS | laser surface scan
MA | magnetic resonance angiography
MS | magnetic resonance spectroscopy
PT | positron emission tomography
RG | radiographic imaging
ST | single photon emission computed tomography
TG | thermography
VF | videofluorography


Exif File Comments

When reading or updating Exif comments, you must specify the comment type using the following constants.

For a loop counter:

Value | Meaning
CMNT_LAST | Last defined number for comments. To get all comments, you can use the comment type constant as a loop counter. The first constant is 0 and the last is CMNT_LAST.

TIFF comments in Exif files: All Exif files (TIFF and JPG) can contain the following TIFF comments. Each TIFF comment field can contain a character string. The maximum field size is 32K, except for the date-time field, which is always 20.

Value | Meaning
CMNT_SZARTIST | Person who created the image.
CMNT_SZCOPYRIGHT | Copyright notice.
CMNT_SZDATETIME | Date and time (YYYY:MM:DD HH:MM:SS). The field length is 20, counting the NULL terminator.
CMNT_SZDESC | Description of the image.
CMNT_SZHOSTCOMP | Computer and operating system in use.
CMNT_SZMAKE | Manufacturer of the equipment used to create the image.
CMNT_SZMODEL | Model name and number of the equipment.
CMNT_SZNAMEOFDOC | Name of the document from which the image was scanned.
CMNT_SZNAMEOFPAGE | Page name from which the image was scanned.
CMNT_SZSOFTWARE | Name and version of software package used to create the image.

General Exif comments: Exif files can contain the following general comments. Each comment field is constrained by its Exif data type.

Value | Meaning
CMNT_EXIFVERSION | Exif version. LEADTOOLS always writes this value as 0100, meaning version 1. Data type: UNDEFINED. Length: 4.
CMNT_SZSUBSECTIME | Decimal extension for seconds that are specified in the CMNT_SZDATETIME field. Data type: ASCII. Length: variable.
CMNT_SZDATETIMEORIGINAL | Date and time the original image is captured. The format is YYYY:MM:DD HH:MM:SS. The time is in a 24-hour format, and a blank space is left between the date and the time. Data type: ASCII. Length: 20.
CMNT_SZSUBSECTIMEORIGINAL | Decimal extension for seconds that are specified in the CMNT_SZDATETIMEORIGINAL field. Data type: ASCII. Length: variable.
CMNT_SZDATETIMEDIGITIZED | Date and time the file is generated. If the file is generated directly, as with a digital camera, this is the same as the time the original image is captured. Data type: ASCII. Length: 20.
CMNT_SZSUBSECTIMEDIGITIZED | Decimal extension for seconds that are specified in the CMNT_SZDATETIMEDIGITIZED field. Data type: ASCII. Length: variable.
CMNT_SHUTTERSPEEDVALUE | Shutter speed. The unit of measure is APEX. Data type: SRATIONAL. Length: 1.
CMNT_APERTURE | Aperture value. This is the ratio of lens aperture for the focal length. The unit of measure is APEX. Data type: RATIONAL. Length: 1.
CMNT_BRIGHTNESS | Brightness value. Data type: SRATIONAL. Length: 1.
CMNT_EXPOSUREBIAS | Exposure bias. This is the value for correcting a biased exposure. The unit of measure is APEX. Data type: SRATIONAL. Length: 1.
CMNT_MAXAPERTURE | Minimum lens f-number. Data type: RATIONAL. Length: 1.
CMNT_SUBJECTDISTANCE | Distance from lens to subject (in meters). Data type: RATIONAL. Length: 1.
CMNT_METERINGMODE | Photometry mode. Possible values are
 | 0 = Unidentified
 | 1 = Average
 | 2 = Center Weighted Average
 | 3 = Spot
 | 4 = MultiSpot
 | 5 = Pattern
 | 6 = Partial
 | 255 = Others
 | Data type: SHORT. Length: 1.
CMNT_LIGHTSOURCE | Light source. Possible values are
 | 0 = Unidentified
 | 1 = Daylight
 | 2 = Florescence light
 | 3 = Tungsten Lamp
 | 17 = Standard light source A
 | 18 = Standard light source B
 | 19 = Standard light source C
 | 20 = D55
 | 21 = D65
 | 22 = D75
 | 255 = Others
 | Data type: SHORT. Length: 1.
CMNT_FLASH | Flash On/Off. Possible values are 1 for on or 0 for off. Data type: SHORT. Length: 1.
CMNT_FOCALLENGTH | Focal length, measured in millimeters. Data type: RATIONAL. Length: 1.
CMNT_EXPOSURETIME | Exposure time, expressed as a fraction of a second. Data type: RATIONAL. Length: 1.
CMNT_FNUMBER | The actual lens F stop (ratio of lens aperture to focal length). Data type: RATIONAL. Length: 1.
CMNT_MAKERNOTE | Maker note. Data type: UNDEFINED. The creator of the file determines the data format.
CMNT_USERCOMMENT | User comment. Data type: UNDEFINED. Length: variable. The first eight bytes specify the data format, and the remainder of the comment is in the specified format. The first eight bytes can be any of the following:
 | 41 53 43 49 49 00 00 00 = ASCII
 | 4A 49 53 00 00 00 00 00 = JIS (Japanese)
 | 00 00 00 00 00 00 00 00 = Undefined
CMNT_SUPPORTEDFLASHPIXVERSION | Supported FlashPix version (Exif 2.0). LEADTOOLS always writes 0100 here. Data type: UNDEFINED. Length: 4
CMNT_COLORSPACE | Color space (Exif 2.0). Specifies whether the color is calibrated or not. LEADTOOLS always writes this value as 1. Data type: SHORT. Length: 1 Possible values are:
 | 1 = sRGB (PC monitor conditions)
 | 0xFFFF = Uncalibrated
 | Other = reserved
CMNT_EXPOSUREPROGRAM | Exposure program (Exif 2.0) The class of the program used by the camera to set exposure when the picture is taken. Data type: SHORT. Length = 1. Possible values are:
 | 0 = Not defined
 | 1 = Manual
 | 2 = Aperture priority
 | 4 = Shutter priority
 | 5 = Creative program (biased toward depth of field)
 | 6 = Action program (biased toward fast shutter speed)
 | 7 = Portrait mode (for closeup photos with the background out of focus)
 | Other = reserved
CMNT_SZSPECTRALSENSITIVITY | Spectral sensitivity (Exif) - The spectral sensitivity of each channel of the camera used. It is an ASCII string compatible with the standard developed by the ASTM technical committee. Data type: ASCII. Length: any
CMNT_ISOSPEEDRATINGS | ISO speed ratings (Exif) - the ISO speed and the ISO Latitude of the camera or input device as specified in ISO 12232 Data type: SHORT. Length: any
CMNT_OPTOELECTRICCOEFFICIENT | Optoelectric coefficient (Exif) - Opto-Electric Conversion function specified in ISO 14524. OECF is the relationship between the camera optical input and the image values. Data type: UNDEFINED. Length: ANY. This is an array of m rows and n columns. For information on how it is recorded, refer to OECF.
CMNT_SZRELATEDSOUNDFILE | Related audio file (Exif) - the name of an audio file related to the image data. The name should be 8 ASCII chars + '.' + 3 chars for extension + NULL. Data type: ASCII. Length: 13.
CMNT_FLASHENERGY | Flash energy (Exif) - the strobe energy at the time the image iscaptured, as measured in Beam Candle Power Seconds (BPCS) Data type: RATIONAL. Length: 1
CMNT_SPATIALFREQUENCYRESPONSE | Spatial frequency response (Exif) - the camera or input device spatial frequency table and SFR values in the direction of image width, image height and diagonal direction, as specified in ISO 12233. Data type: UNDEFINED. Length: ANY This is an array of m rows and n columns.For information on how this is recorded, refer to SFR.
CMNT_FOCALPLANEXRESOLUTION | Focal plane X Resolution (Exif) - the number of dots per inch on the camera focal plane in the image width (X) direction
CMNT_FOCALPLANEYRESOLUTION | Focal plane Y Resolution (Exif) - the number of dots per inch on the camera focal plane in the image height (Y) direction
CMNT_SUBJECTLOCATION | Subject location (Exif) - the location of the main subject in the scene. The first value is the X column number and the second is the Y row number. Data type: SHORT. Length: 2
CMNT_EXPOSUREINDEX | Exposure index (Exif) - the image sensor type on the camera or input device. Data type: SHORT. Length: 1
CMNT_SENSINGMETHOD | Sensing method (Exif) - the image sensor type on the camera or input device. Data type: SHORT. Length: 1 Possible values are:
 | 1 = not defined
 | 2 = one-chip color area sensor
 | 3 = two-chip color area sensor
 | 4 = three-chip color area sensor
 | 5 = color sequential area sensor
 | 7 = trilinear sensor
 | 8 = color sequential sensor
 | other = reserved
CMNT_FILESOURCE | File source (Exif) - the image source. If a digital camera recorded the image, the value will always be 3, to indicate that the image was recorded on a digital camera. Data type: SHORT. Length: 1 Possible values are:
 | 3 = image recorded on a DSC (Digital Still Camera)
 | other = reserved
CMNT_SCENETYPE | Scene type (Exif) - the type of scene. If a DSC recorded the image, this value will always be 1, indicating that the image was directly photographed. Data type: UNDEFINED. Length: 1 Possible values are:
 | 1 = a directly photographed image
 | other = reserved
CMNT_CFAPATTERN | CFA Pattern (Exif) - the color filter array (CFA) geometric pattern of the image sensor when a one-chip color sensor was applied. It does not apply to any other sensing methods. Data type: UNDEFINED. Length: ANY This is an array m x n (horz x vertical), where the pattern is repeated every m pixels on the horizontal and n pixels on the vertical. For a table of the layout, refer to CFA.
CMNT_SUBJECTAREA | Location and area of the main subject in the overall scene. Data type: SHORT. Count: 2 (Location of the subject is given in X, Y coordinates), 3 (Area of the main subject is given as a circle, X, Y, D, where X and Y are the center coordinates and D is the diameter.) and 4 (Area of the main subject is given as a rectangle, X, Y, W, H, where X and Y are the center coordinates, W is the width or the rectangle and H is the height of the rectangle.).
CMNT_CUSTOMRENDERED | Use of special processing on image data, such as rendering geared toward output. When special processing is performed, the reader is expected to disable or minimize any further processing. Data type: SHORT; Count: 1; Possible Values: 0 (Normal process), 1 (Custom process), Other (Reserved). Default: 0;
CMNT_EXPOSUREMODE | Exposure mode set when the image was shot. In auto-bracketing mode the camera shoots a series of frames of the same scene at different exposure settings. Tag: 41986; Data type: SHORT; Count: 1; Possible values are: 0 (Auto exposure), 1 (Manual exposure), 2 (Auto-bracket), Other (Reserved); Default: none.
CMNT_WHITEBALANCE | White balance mode set when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Auto white balance), 1 (Manual white balance), Other (Reserved); Default: none.
CMNT_DIGITALZOOMRATIO | Digital zoom ratio set when the image was shot. If the numerator of the recorded value is 0, the digital zoom was not used. Data type: RATIONAL; Count: 1; Default: none.
CMNT_FOCALLENGTHIN35MMFILM | Equivalent focal length, assuming a 35mm film camera, in mm. A value of 0 means the focal length is unknown. Note that this comment is different from the CMNT_FOCALLENGTH comment. Data type: SHORT; Count: 1; Default: none.
CMNT_SCENECAPTURETYPE | Type of scene that was shot. It can also be used to record the mode in which the image was shot. Note that this differs from the CMNT_SCENETYPE comment. Data type: SHORT; Count: 1; Possible values are: 0 (Standard), 1 (Landscape), 2 (Portrait), 3 (Night scene), Other (Reserved); Default: 0.
CMNT_GAINCONTROL | Degree of overall image gain adjustment. Data type: SHORT; Count: 1; Possible values are: 0 (None), 1 (Low gain up), 2 (High gain up), 3 (Low gain down), 4 (High gain down), Other (Reserved); Default: none.
CMNT_CONTRAST | Direction of contrast processing applied by the camera when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Normal), 1 (Soft), 2 (Hard), Other (Reserved); Default: 0.
CMNT_SATURATION | Direction of saturation processing applied by the camera when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Normal), 1 (Low saturation), 2 (High saturation), Other (Reserved); Default: 0.
CMNT_SHARPNESS | Direction of sharpness processing applied by the camera when the image was shot. Data type: SHORT; Count: 1; Possible values are: 0 (Normal), 1 (Soft), 2 (Hard), Other (Reserved); Default: 0.
CMNT_DEVICESETTINGSDESCRIPTION | Information on the picture-taking conditions of a particular camera model. Used only to indicate the picture-taking conditions in the reader. Data type: UNDEFINED; Count: Any; The data is recorded in Unicode using SHORT fro the number of display rows and columns and UNDEFINED for the camera settings. The Unicode (UCS –2) string including Signature is NULL terminated. The specifics of the Unicode string are as given in ISO/IEC 10464-1. Default: none.
CMNT_SUBJECTDISTANCERANGE | Distance to the subject. Data type: SHORT; Count: 1; Possible values are: 0 (Unknown), 1 (Macro), 2 (Close view), 3 (Distant view), Other (Reserved); Default: none.
CMNT_SZIMAGEUNIQUEID | Identifier assigned uniquely to each image. It is recorded as an ASCII string equivalent to hexadecimal notation and 128-bit fixed length. Tag: 42016; Data type: ASCII; Count: 33; Default: none

Exif GPS comments. Exif files can contain the following GPS (Global Positioning System) comments:

Value | Meaning
CMNT_GPSVERSIONID | Version number of the GPS image file directory (IFD). The current version is 2.0.0.0. This comment must be included when any GPS comments are used. Unlike the CMNT_EXIFVERSION comment, this comment is written in bytes. A version written as 2.0.0.0 is actually 0x02000000 when coded. Data type: BYTE. Length: 4.
CMNT_GPSLATITUDEREF | North or south latitude. Possible values are "N" for north and "S" for south. Data type: ASCII. Length: 2.
CMNT_GPSLATITUDE | Latitude, expressed as three RATIONAL values. When expressed in degrees, minutes, and seconds, latitude is written as dd/1,mm/1,ss/1. If degrees and minutes are used as the units, and minutes are written with fractions to two decimal places, then latitude is expressed as dd/1,mmmm/100,0/1. Data type: RATIONAL. Length: 3.
CMNT_GPSLONGITUDEREF | East or west longitude. Possible values are "E" for east and "W" for west. Data type: ASCII. Length: 2.
CMNT_GPSLONGITUDE | The longitude, expressed as three RATIONAL values. When expressed in degrees, minutes and seconds, longitude is written as ddd/1,mm/1,ss/1. If degrees and minutes are used as the units, and minutes are written with fractions to two decimal places, then longitude is expressed as dd/1,mmmm/100,0/1. Data type: RATIONAL. Length: 3.
CMNT_GPSALTITUDEREF | Reference altitude. In the current version, sea level is used as the reference, which must be zero. The reference unit is meters. Data type: BYTE. Length: 1.
CMNT_GPSALTITUDE | Altitude, in meters, relative to the reference altitude. Data type: RATIONAL. Length: 1.
CMNT_GPSTIMESTAMP | Time stamp in UTC (Coordinated Universal Time) time. The time is expressed as three RATIONAL values, for hours, minutes, and seconds. Data type: RATIONAL. Length: 3.
CMNT_GPSSATELLITES | GPS satellites used for measurement. The coding format is not stipulated. This comment can be used to code information such as the number of satellites, the satellite number, the satellite's angle of elevation, its azimuth, and its SNR. If the GPS receiver cannot make a measurement, this comment is NULL. Data type: ASCII. Length: variable.
CMNT_GPSSTATUS | Status of the GPS receiver at when the image is recorded. Possible values are "A" when measurement in progress and "V" when measurement is interrupted. Data type: ASCII. Length: 2.
CMNT_GPSMEASUREMODE | GPS measurement mode. A value of "2" denotes two-dimensional measurement, and "3" denotes three-dimensional measurement. Data type: ASCII. Length: 2.
CMNT_GPSDOP | DOP (data precision) value. This comment is an HDOP value during two-dimensional measurement and a PDOP value during three-dimensional measurement. Data type: RATIONAL. Length: 1.
CMNT_GPSSPEEDREF | Unit for measuring speed. Possible values are "K" for kilometers, "M" for miles, and "N" for knots. Data type: ASCII. Length: 2.
CMNT_GPSSPEED | Speed of the GPS receiver. Data type: RATIONAL. Length: 1.
CMNT_GPSTRACKREF | Reference for direction of movement. Possible values are "T" for a true direction and "M" for a magnetic. Data type: ASCII. Length: 2
CMNT_GPSTRACK | Direction of GPS receiver movement. The range of values is 0.00 to 359.00. Data type: RATIONAL. Length: 1.
CMNT_GPSIMGDIRECTIONREF | Reference for the direction of photography in the recorded image. Possible values are "T" for a true direction and "M" for a magnetic. Data type: ASCII. Length: 2.
CMNT_GPSIMGDIRECTION | Direction of photography in the recorded image. The range of values is 0.00 to 359.00. Data type: RATIONAL. Length: 1.
CMNT_GPSMAPDATUM | Geodetic survey data used by the receiver. If the geodetic survey data is restricted to Japan, this tag value is "TOKYO" or "WGS-84". Data type: ASCII. Length: variable.
CMNT_GPSDESTLATITUDEREF | North or south latitude for the destination point. Possible values are "N" for north and "S" for south. Data type: ASCII. Length: 2.
CMNT_GPSDESTLATITUDE | Latitude of the destination point. The latitude is expressed as three RATIONAL values, indicating degrees, minutes and seconds. Data type: RATIONAL. Length: 3.
CMNT_GPSDESTLONGITUDERE | East or west longitude for the destination point. Possible values are "E" for east and "W" for west. Data type: ASCII. Length: 2.
CMNT_GPSDESTLONGITUDE | Longitude of the destination point. The longitude is expressed as three RATIONAL values, indicating degrees, minutes and seconds. Data type: RATIONAL. Length: 3.
CMNT_GPSDESTBEARINGREF | Reference for the bearing to the destination point. Possible values are "T" for a true direction and "M" for a magnetic. Data type: ASCII. Length: 2.
CMNT_GPSDESTBEARING | Bearing to the destination point. The range of values is 0.00 to 359.00. Data type: RATIONAL. Length: 1.
CMNT_GPSDESTDISTANCEREF | Unit for measuring distance to the destination point. Possible values are "K" for kilometers, "M" for miles, and "N" for nautical miles. Data type: ASCII. Length: 2.
CMNT_GPSDESTDISTANCE | Distance to the destination point. Data type: RATIONAL. Length: 1.
CMNT_GPSPROCESSINGMETHOD | Processing method. Data type: Byte. Length: Any.
CMNT_GPSAREAINFORMATION | Area. Data type: Byte. Length: Any.
CMNT_GPSDATESTAMP | Date. Data type: SZ. Length: 11.
CMNT_GPSDIFFERENTIAL | Differential. Data type: Short. Length: 1.


CFA

Length(bytes) | Type | Meaning
2 | SHORT | Columns = n
2 | SHORT | Rows = m
1 | BYTE | CFA[0,0]
1 | BYTE | CFA[0,1]
: | : | :
1 | BYTE | CFA[0,n-1]
1 | BYTE | CFA[1,0]
: | : | :
1 | BYTE | CFA[1,n-1]
: | : | :
1 | BYTE | CFA[m-1,n-1]

where CFA[i,j] is the color filter value for row i, col j and can have one of these values:

CFA value | Filter color
0 | RED
1 | GREEN
2 | BLUE
3 | CYAN
4 | MAGENTA
5 | YELLOW
6 | WHITE


OECF

Length(bytes) | Type | Meaning
2 | SHORT | Columns = n
2 | SHORT | Rows = m
Any | ASCII | first column item name (NULL terminated)
: | : | :
Any | ASCII | last column item name (NULL terminated)
8 | SRATIONAL | OECF[0,0]
8 | SRATIONAL | OECF[0, 1]
: | : | :
8 | SRATIONAL | OECF[0,n-1]
: | : | :
8 | SRATIONAL | OECF[m-1,0]
8 | SRATIONAL | OECF[m-1,1]
: | : | :
8 | SRATIONAL | OECF[m-1,n-1]

where OECF[i,j] is the OECF coefficient for row i, column j


SFR

Length(bytes) | Type | Meaning
2 | SHORT | Columns = n
2 | SHORT | Rows = m
Any | ASCII | first column item name (NULL terminated)
: | : | :
Any | ASCII | last column item name (NULL terminated)
8 | RATIONAL | SFR[0, 0]
8 | RATIONAL | SFR[0, 1]
: | : | :
8 | RATIONAL | SFR[0, n-1]
: | : | :
8 | RATIONAL | SFR[m-1, 0]
8 | RATIONAL | SFR[m-1, 1]
: | : | :
8 | RATIONAL | SFR[m-1,n-1]

where SFR[i,j] is the SFR coefficient for row i, column j


Notes on Exif Data Types

The Exif standard defines the following data types for comments. Usage is dependent of your development system. To see the usage, refer to the code example for your system.

Data type | Description
UNDEFINED | The data type is determined by the field.
SHORT | Integer.
LONG | Long integer.
ASCII | Character string.
BYTE | Array of bytes.
RATIONAL | An array of two unsigned long integers that express a fraction. The first value is the numerator, and the second is the denominator. (Visual Basic does not recognize unsigned long integers and will interpret large values, as negative values.)
SRATIONAL | An array of two signed long integers that express a fraction. The first value is the numerator, and the second is the denominator.

The length of a comment is based on the data type. For example, an SRATIONAL with a length of 3 is an array of 6 long integers.

When you set a comment that requires an array, the array can be zero-based or 1-based (where the first element has an index of 1). When you get a comment that is an array, it will always be zero-based (where the first element has an index of 0).

When you assign comments, the VCL does data type conversions for you. For example, if a comment is a RATIONAL with a length of 3, you can assign an array of six integers. If you assign an invalid value, the value is ignored.


Files To Be Included With Your Application

Note: | 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: | You may not distribute the header files with your application, and you may not provide software development capabilities in your application. For information on where to find the redistributable files, refer to Installation Directory.

The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS functions. Most files in the table are optional. These files are referred to as "Redistributables" in the License Agreement.

Please note that LTKRN, LTDIS, LTEFX, LTIMG, and LTFIL are required for ALL VCL applications.

Note: All Unicode versions of LEADTOOLS require Microsoft Unicode Layer for Windows (UNICOWS.DLL) in order to function on Windows 95/98/Me. You can obtain MSUL from: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/anch_mslu.asp.

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:
LT14B5MN LT14B5AD LT14B5SN LT14B5DI LT14B5Nt | Borland C++ Builder 5.0 runtime files. Required for VCL applications that are built with Borland C++ Builder 5.0. LT14B5MN.BPL is the BPL file for the LEADTOOLS VCL Main Package; LT14B5AD.BPL is the BPL file for the LEADTOOLS VCL Additional Package; LT14B5SN.BPL is the BPL file for the LEADTOOLS VCL Scanning Package; LT14B5DI.BPL is the BPL file for the LEADTOOLS VCL DICOM Package; LT14B5Nt.BPL is the BPL file for the LEADTOOLS VCL Annotations Package. For more information about the controls included in each package, refer to the Introduction . For information about creating and distributing applications, refer to the Borland Builder documentation. | BPL: VCL50.BPL VCLDB50.BPL VCLBDE50.BPL LT14B5MN.BPL LT14B5AD.BPL LT14B5SN.BPL LT14B5DI.BPL LT14B5Nt.BPL DLL: BORLNDMM.DLL CC3250MT.DLL | BPL: VCL50.BPL VCLDB50.BPL VCLBDE50.BPL LT14B5MNe.BPL LT14B5ADe.BPL LT14B5SNe.BPL LT14B5DIe.BPL LT14B5Nte.BPL DLL: BORLNDMM.DLL CC3250MT.DLL
LT14B6MN LT14B6AD LT14B6SN LT14B6DI LT14B6Nt | Borland C++ Builder 6.0 runtime files. Required for VCL applications that are built with Borland C++ Builder 6.0. LT14B6MN.BPL is the BPL file for the LEADTOOLS VCL Main Package; LT14B6AD.BPL is the BPL file for the LEADTOOLS VCL Additional Package; LT14B6SN.BPL is the BPL file for the LEADTOOLS VCL Scanning Package; LT14B6DI.BPL is the BPL file for the LEADTOOLS VCL DICOM Package; LT14B6Nt.BPL is the BPL file for the LEADTOOLS VCL Annotations Package. For more information about the controls included in each package, refer to the Introduction . For information about creating and distributing applications, refer to the Borland Builder documentation. | BPL: VCL60.BPL VCLDB60.BPL LT14B6MN.BPL LT14B6AD.BPL LT14B6SN.BPL LT14B6DI.BPL LT14B6Nt.BPL DLL: BORLNDMM.DLL CC3260MT.DLL | BPL: VCL60.BPL VCLDB60.BPL LT14B6MNe.BPL LT14B6ADe.BPL LT14B6SNe.BPL LT14B6DIe.BPL LT14B6Nte.BPL DLL: BORLNDMM.DLL CC3260MT.DLL
LT14D6MN LT14D6AD LT14D6SN LT14D6DI LT14D6Nt | Borland Delphi 6.0 runtime files. Required for VCL applications that are built with Borland Delphi 6.0 and with RTP checked. LT14D6MN.BPL is the BPL file for the LEADTOOLS VCL Main Package; LT14D6AD.BPL is the BPL file for the LEADTOOLS VCL Additional Package; LT14D6SN.BPL is the BPL file for the LEADTOOLS VCL Scanning Package; LT14D6DI.BPL is the BPL file for the LEADTOOLS VCL DICOM Package; LT14D6Nt.BPL is the BPL file for the LEADTOOLS VCL Annotations Package. For more information about the controls included in each package, refer to the Introduction . For information about creating and distributing applications, refer to the Borland Delphi documentation. | BPL: VCLDB60.BPL VCL60.BPL LT14D6MN.BPL LT14D6AD.BPL LT14D6SN.BPL LT14D6DI.BPL LT14D6Nt.BPL | BPL: VCLDB60.BPL VCL60.BPL LT14D6MNe.BPL LT14D6ADe.BPL LT14D6SNe.BPL LT14D6DIe.BPL LT14D6Nte.BPL
LT14D7MN LT14D7AD LT14D7SN LT14D7DI LT14D7Nt | Borland Delphi 7.0 runtime files. Required for VCL applications that are built with Borland Delphi 7.0 and with RTP checked. LT14D7MN.BPL is the BPL file for the LEADTOOLS VCL Main Package; LT14D7AD.BPL is the BPL file for the LEADTOOLS VCL Additional Package; LT14D7SN.BPL is the BPL file for the LEADTOOLS VCL Scanning Package; LT14D7DI.BPL is the BPL file for the LEADTOOLS VCL DICOM Package; LT14D7Nt.BPL is the BPL file for the LEADTOOLS VCL Annotations Package. For more information about the controls included in each package, refer to the Introduction. For information about creating and distributing applications, refer to the Borland Delphi documentation. | BPL: VCLDB70.BPL VCL70.BPL LT14D7MN.BPL LT14D7AD.BPL LT14D7SN.BPL LT14D7DI.BPL LT14D7Nt.BPL | BPL: VCLDB70.BPL VCL70.BPL LT14D7MNe.BPL LT14D7ADe.BPL LT14D7SNe.BPL LT14D7DIe.BPL LT14D7Nte.BPL
LT14D9MN LT14D9AD LT14D9SN LT14D9DI LT14D9Nt | Borland Delphi 9.0 runtime files. Required for VCL applications that are built with Borland Delphi 9.0 and with RTP checked. LT14D9MN.BPL is the BPL file for the LEADTOOLS VCL Main Package; LT14D9AD.BPL is the BPL file for the LEADTOOLS VCL Additional Package; LT14D9SN.BPL is the BPL file for the LEADTOOLS VCL Scanning Package; LT14D9DI.BPL is the BPL file for the LEADTOOLS VCL DICOM Package; LT14D9Nt.BPL is the BPL file for the LEADTOOLS VCL Annotations Package. For more information about the controls included in each package, refer to the Introduction. For information about creating and distributing applications, refer to the Borland Delphi documentation. | BPL: VCLDB90.BPL VCL90.BPL LT14D9MN.BPL LT14D9AD.BPL LT14D9SN.BPL LT14D9DI.BPL LT14D9Nt.BPL | BPL: VCLDB90.BPL VCL90.BPL LT14D9MNe.BPL LT14D9ADe.BPL LT14D9SNe.BPL LT14D9DIe.BPL LT14D9Nte.BPL
LTANN | Annotation support. (Document/Medical only) The header file is LTANN.H. All functions with the L_Ann prefix are in this DLL. Also requires LTDIS, LTFIL, and LTEFX for WIN32. | DLL: LTANN14N.DLL | DLL: LTANN14E.DLL
LTCLR | LEADTOOLS Color Conversion. The Header File is LTCLR.H. This DLL is also required for loading JPEG CMYK images and for loading and saving JPEG LAB images. | DLL: LTCLR14N.DLL | DLL: LTCLR14E.DLL
LTDIC | (Medical Imaging editions only) DICOM file support. Note: LFDIC14N.DLL is no longer shipped. All 32-bit Dicom support is provided in the LTDIC DLL. | DLL: LTDIC14N.DLL | DLL: LTDIC14E.DLL
LTDIS | Display support, required for most applications. The header file is LTDIS.H. | DLL: LTDIS14N.DLL | DLL: LTDIS14E.DLL
LTEFX | Paint effects support. The header file is LTEFX.H. | DLL: LTEFX14N.DLL | DLL: LTEFX14E.DLL
LTFIL | File read and write support. The header file is LTFIL.H. | DLL: LTFIL14N.DLL | DLL: LTFIL14E.DLL
LTIMG | Image processing support. The header file is LTIMG.H. Also requires LTEFX, LTDIS and LTFIL for WIN32. | DLL: LTIMG14N.DLL | DLL: LTIMG14E.DLL
LTISI | ISIS support. (Document/Medical only) The header file is LTISI.H. The library file is LTISI_N.LIB. Note: Please note that you must get the ISIS driver from the scanner manufacturer or from Pixel Translations. The .chn or .chw file must be in your path for ISIS scanning to work. | DLL: LTISI14N.DLL | DLL: LTISI14E.DLL
LTKRN | LEADTOOLS kernel, required for all applications. The header file is LTKRN.H. This DLL is required for all applications. For information about the "nag" message and the "no-nag" LTKRN DLL, refer to LEADTOOLS Nag Message. | DLL: LTKRN14N.DLL | DLL: LTKRN14E.DLL
LTLST | ImageList Control. Also requires LTKRN and LTDIS. | DLL: LTLST14N.DLL | DLL: LTLST14E.DLL
LTNET | Internet support. LTNET is the LEADTOOLS Internet Support DLL. Also requires LTKRN, LTFIL and the LEAD file format DLLs. Additional required files are installed by ws2setup.exe (Winsock 2.0). | DLL: LTNET14N.DLL | DLL: LTNET14E.DLL
LTSCR | Screen Capture. The header file is LTSCR.H. | DLL: LTSCR14N.DLL | DLL: LTSCR14E.DLL
LTTMB | Thumbnail Browser Control. Also requires LTKRN, LTFIL, LTDIS, and LTIMG. | DLL: LTTMB14N.DLL | DLL: LTTMB14E.DLL
LTTWN | TWAIN support. The header file is LTTWN.H. | DLL: LTTWN14N.DLL | DLL: LTTWN14E.DLL
LTWND | Windows registered class support. The header file is LTWND.H. The only function in the DLL is L_UseBitmapClass. | DLL: LTWND14N.DLL | DLL: LTWND14E.DLL
LVKRN LVDLG LVGL | LVKRN is the Vector Kernal DLL. Required for all vector functionality. LVDLG is the Vector Common Dialog DLL LVGL is the Vector DLL, required for OpenGL support. | DLL: LVKRN14N.DLL LVDLG14N.DLL LVGL14N.DLL | DLL: LVKRN14E.DLL LVDLG14E.DLL LVGL14E.DLL
File Formats:
File Format Constant(s) | Description: | If you are using a standard release without Unicode, the files to use are: | If you are using an evaluation release without Unicode, the files to use are:
FILE_ABC | ABC Format | LFABC14N.DLL | LFABC14E.DLL
FILE_ABIC | ABIC Format | LFABI14N.DLL | LFABI14E.DLL
FILE_AFP | AFP F ile Format | LFAFP14N.DLL | LFAFP14E.DLL
FILE_AFPICA_IBM_MMR FILE_AFPICA_UNCOMPRESSED FILE_AFP_G3_1D FILE_AFP_G3_2D FILE_AFP_G4 | Image Object Content Architecture Format | LFICA14N.DLL | LFICA14E.DLL
FILE_ANI | Windows Animated Cursor | LFANI14N.DLL | LFANI14E.DLL
FILE_AVI | Windows AVI File Format (read only) | LFAVI14N.DLL | LFAVI14E.DLL
FILE_AWD | Windows FAX Fromat (AWD) | LFAWD14N.DLL AWVIEW32.DLL AWDENC32.DLL AWDCXC32.DLL AWCODC32.DLL AWRESX32.DLL | LFAWD14E.DLL AWVIEW32.DLL AWDENC32.DLL AWDCXC32.DLL AWCODC32.DLL AWRESX32.DLL
FILE_BMP FILE_BMP_RLE | Windows Bitmap Format | LFBMP14N.DLL | LFBMP14E.DLL
FILE_CALS FILE_CALS2 FILE_CALS3 FILE_CALS4 | CALS Raster File Format | LFCAL14N.DLL LFFAX14N.DLL | LFCAL14E.DLL LFFAX14E.DLL
FILE_CCITT FILE_CCITT_GROUP3_1DIM FILE_CCITT_GROUP3_2DIM FILE_CCITT_GROUP4 | TIFF Tagged Image File Format | LFTIF14N.DLL LFFAX14N.DLL | LFTIF14E.DLL LFFAX14E.DLL
FILE_CGM | Computer Graphics Metafile | LFCGM14N.DLL LVKRN14N.DLL | LFCGM14E.DLL LVKRN14E.DLL
FILE_CIN | KODAK Cineon Format | LFCIN14N.DLL LVKRN14N.DLL | LFCIN14E.DLL LVKRN14E.DLL
FILE_CLP FILE_CLP_RLE | Windows Clipboard Format | LFCLP14N.DLL | LFCLP14E.DLL
FILE_CMP | LEAD CMP Format | LFCMP14N.DLL | LFCMP14E.DLL
FILE_CMW | LEAD Wavelet Format | LFCMW14N.DLL | LFCMW14E.DLL
FILE_CMX | Corel Presentation Exchange Format | LFCMX14N.DLL LVKRN14N.DLL | LFCMX14E.DLL LVKRN14E.DLL
FILE_CRW | Canon Raw Format | LFCRW14N.DLL LFCMP14N.DLL Canon Runtime Files | LFCRW14E.DLL LFCMP14E.DLL Canon Runtime Files
FILE_CUT | Dr. Halo Format | LFCUT14N.DLL | LFCUT14E.DLL
FILE_DCR | Kodak Professional Digital Camera Format | LFDCR14N.DLL DCSPROBACK.DLL DCSPRO3SLR.DLL DCSProductLook.icm sRGB Color Space.icm | LFDCR14E.DLL DCSPROBACK.DLL DCSPRO3SLR.DLL DCSProductLook.icm sRGB Color Space.icm
FILE_DCS | Kodak Professional Digital Camera Format | LFDCS14N.DLL PDC_SDK.DLL EKFPIXJPEG140.DLL ProFire.DLL | LFDCS14E.DLL PDC_SDK.DLL EKFPIXJPEG140.DLL ProFire.DLL
FILE_DICOM_GRAY FILE_DICOM_COLOR FILE_DICOM_RLE_GRAY FILE_DICOM_RLE_COLOR | DICOM Format | LTDIC14N.DLL | LTDIC14E.DLL
FILE_DICOM_JPEG_GRAY FILE_DICOM_JPEG_COLOR | DICOM Format | LTDIC14N.DLL LFCMP14N.DLL | LTDIC14E.DLL LFCMP14E.DLL
FILE_DICOM_J2K_GRAY FILE_DICOM_J2K_COLOR | DICOM Format | LTDIC14N.DLL LFJ2K14N.DLL | LTDIC14E.DLL LFJ2K14E.DLL
FILE_DJVU | DjVu Format | LFDJV14N.DLL | LFDJV14E.DLL
FILE_DRW | Micrografx Designer DRaWing | LFDRW14N.DLL LVKRN14N.DLL | LFDRW14E.DLL LVKRN14E.DLL
FILE_DWF FILE_DWF_TEXT_AS_POLYLINE | AutoCAD DWF Format | LFDWF14N.DLL LVKRN14N.DLL | LFDWF14E.DLL LVKRN14E.DLL
FILE_DWG | AutoCAD DWG Format (LFACS is required to allow DWG filters to load ACIS data embedded in this format.) | LFDWG14N.DLL LVKRN14N.DLL LFACS14N.DLL | LFDWG14E.DLL LVKRN14E.DLL LFACS14E.DLL
FILE_DXF_R12 FILE_DXF_R13 | AutoCAD DXF Format (LFACS is required to allow DWG filters to load ACIS data embedded in this format.) | LFDXF14N.DLL LVKRN14N.DLL LFACS14N.DLL | LFDXF14E.DLL LVKRN14E.DLL LFACS14E.DLL
FILE_ECW | Enhanced Compressed Wavelet Format | LFECW14N.DLL NCSECW.DLL NCSECWC.DLL NCSUTIL.DLL NCSCNET.DLL | LFECW14E.DLL NCSECW.DLL NCSECWC.DLL NCSUTIL.DLL NCSCNET.DLL
FILE_EMF | Windows Enhanced Metafile | LFWMF14N.DLL LVKRN14N.DLL | LFWMF14E.DLL LVKRN14E.DLL
FILE_EPS | Encapsulated PostScript | LFEPS14N.DLL | LFEPS14E.DLL
FILE_EPSTIFF | Encapsulated PostScript | LFEPS14N.DLL LFTIF14N.DLL | LFEPS14E.DLL LFTIF14E.DLL
FILE_EPSWMF | Encapsulated PostScript | LFEPS14N.DLL LFWMF14N.DLL LVKRN14N.DLL | LFEPS14E.DLL LFWMF14E.DLL LVKRN14E.DLL
FILE_EPSPOSTSCRIPT | Encapsulated PostScript | LFEPS14N.DLL LFPDF14N.DLL PDFDLL32.DLL | LFEPS14E.DLL LFPDF14E.DLL PDFDLL32.DLL
FILE_EXIF FILE_EXIF_YCC FILE_EXIF_JPEG_411 FILE_EXIF_JPEG_422 | Exif Format | LFTIF14N.DLL LFCMP14N.DLL | LFTIF14E.DLL LFCMP14E.DLL
FILE_FAX_G3_1D FILE_FAX_G3_1D_NOEOL FILE_FAX_G3_2D FILE_FAX_G4 | Raw FAX Formats | LFFAX14N.DLL | LFFAX14E.DLL
FILE_FIT | Flexible Image Transport System Format | LFFIT14N.DLL | LFFIT14E.DLL
FILE_FLC FILE_FLI | Flic Animation | LFFLC14N.DLL | LFFLC14E.DLL
FILE_FPX FILE_FPX_SINGLE_COLOR FILE_FPX_JPEG FILE_FPX_JPEG_QFACTOR | Kodak FlashPix support | LFFPX14N.DLL LFFPX7.DLL LFKODAK.DLL | LFFPX14E.DLL LFFPX7.DLL LFKODAK.DLL
FILE_GERBER | Gerber File Format | LFGBR14N.DLL LVKRN14N.DLL | LFGBR14E.DLL LVKRN14E.DLL
FILE_GIF | Compuserve GIF Format | LFGIF14N.DLL | LFGIF14E.DLL
FILE_IFF_ILBM FILE_IFF_CAT FILE_IFF_ILBM_UNCOMPRESSED FILE_IFF_CAT_UNCOMPRESSED | Interchange File Format | LFIFF14N.DLL | LFIFF14E.DLL
FILE_IMG | GEM Image Format | LFIMG14N.DLL | LFIMG14E.DLL
FILE_INTERGRAPH_RLE FILE_INTERGRAPH_CCITT_G4 | Intergraph Format | LFITG14N.DLL LFFAX14N.DLL | LFITG14E.DLL LFFAX14E.DLL
FILE_INTERGRAPH_VECTOR | Intergraph MicroStation and Interactive Graphics Design System Format | LFDGN14N.DLL LVKRN14N.DLL | LFDGN14E.DLL LVKRN14E.DLL
FILE_ICA_IBM_MMR FILE_ICA_UNCOMPRESSED | Image Object Content Architecture Format | LFICA14N.DLL | LFICA14E.DLL
FILE_ICA_G3_1D FILE_ICA_G3_2D FILE_ICA_G4 | Image Object Content Architecture Format | LFICA14N.DLL LFFAX14N.DLL | LFICA14E.DLL LFFAX14E.DLL
FILE_ICA_ABIC | Image Object Content Architecture Format | LFICA14N.DLL LFABI14N.DLL | LFICA14E.DLL LFABI14E.DLL
FILE_J2K FILE_JP2 | JPEG 2000 File Format | LFJ2K14N.DLL | LFJ2K14E.DLL
FILE_JBIG2 | JBIG2 Format | LFJB214N.DLL | LFJB214E.DLL
FILE_JBIG | JBIG Format | LFJBG14N.DLL | LFJBG14E.DLL
FILE_JPEG FILE_JPEG_411 FILE_JPEG_422 FILE_JPEG_RGB FILE_JPEG_LAB FILE_JPEG_LAB_411 FILE_JPEG_LAB_422 | JPEG File Interchange Format (If you are loading or saving files that use CMYK or LAB color space, you will also need LTCLR.) | LFCMP14N.DLL | LFCMP14E.DLL
FILE_KDC FILE_KDC_120 FILE_KDC_40 FILE_KDC_50 | Kodak Digital Camera Format | LFKDC14N.DLL DC120V154_32.DLL | LFKDC14E.DLL DC120V154_32.DLL
FILE_LASERDATA | LasreView LaserData Format(read only) | LFFAX14N.DLL | LFFAX14E.DLL
FILE_LEAD1BITA | LEAD 1-bit Compressed Format | LFLMA14N.DLL | LFLMA14E.DLL
FILE_LEAD1BIT | LEAD 1-bit Compressed Format. | LFLMB14N.DLL | LFLMB14E.DLL
FILE_MAC | Macintosh Paint Format | LFMAC14N.DLL | LFMAC14E.DLL
FILE_MPEG1 FILE_MPEG2 | MPEG Video Format (read only) | LFMPG14N.DLL | LFMPG14E.DLL
FILE_MRC | Mixed Raster Content | LTSGM14N.DLL LFCMP14N.DLL LFFAX14N.DLL | LTSGM14E.DLL LFCMP14E.DLL LFFAX14E.DLL
FILE_LEAD_MRC | Mixed Raster Content | LTSGM14N.DLL LFCMP14N.DLL LFFAX14N.DLL LFJBG14N.DLL | LTSGM14E.DLL LFCMP14E.DLL LFFAX14E.DLL LFJBG14E.DLL
FILE_MSP | Microsoft Paint Format | LFMSP14N.DLL | LFMSP14E.DLL
FILE_OS2 FILE_OS2_2 | OS/2 Bitmap Format | LFBMP14N.DLL | LFBMP14E.DLL
FILE_PBM_BINARY FILE_PBM_ASCII FILE_PGM_BINARY FILE_PGM_ASCII FILE_PPM_BINARY FILE_PPM_ASCII | Portable Bitmap Utilities Format | LFPNM14N.DLL | LFPNM14E.DLL
FILE_PCD | Kodak PhotoCD Format (read only) | LFPCD14N.DLL PCDLIB32.DLL PCDLIB.DLL | LFPCD14E.DLL PCDLIB32.DLL PCDLIB.DLL
FILE_PCL FILE_PCL_TEXT_AS_POLYLINE FILE_PLT | Printer Command Language Format | LFPCL14N.DLL LVKRN14N.DLL | LFPCL14E.DLL LVKRN14E.DLL
FILE_PCT | Macintosh Pict | LFPCT14N.DLL | LFPCT14E.DLL
FILE_PCX | ZSoft PCX Format | LFPCX14N.DLL | LFPCX14E.DLL
FILE_PDF_LEAD_MRC | Mixed Raster Content | LTSGM14N.DLL LCMRC14N.DLL LCPDF14N.DLL LCENC14N.DLL LCZIB.DLL LFCMP14N.DLL LFJB214N.DLL | LTSGM14E.DLL LCMRC14E.DLL LCPDF14E.DLL LCENC14E.DLL LCZIB.DLL LFCMP14E.DLL LFJB214E.DLL
FILE_PDF_LEAD_MRC | Mixed Raster Content | LTSGM14N.DLL LFCMP14N.DLL LFFAX14N.DLL LFJB214N.DLL LFPDF14N.DLL PDFDLL32.DLL | LTSGM14E.DLL LFCMP14E.DLL LFFAX14E.DLL LFJB214E.DLL LFPDF14E.DLL PDFDLL32.DLL
FILE_PLT | PLT / HPGL Format | LFPCL14N.DLL LVKRN14N.DLL | LFPCL14E.DLL LVKRN14E.DLL
FILE_PNG | Portable Network Graphics Format | LFPNG14N.DLL | LFPNG14E.DLL
FILE_POSTSCRIPT | Postscript Document Format | LFPDF14N.DLL PDFDLL32.DLL PDF Redist Files: For reading PDF files, you must follow the instructions outlined in the "Distributing an application built using the PDF Module" section of Implementing PDF Plug in Features. | LFPDF14E.DLL PDFDLL32.DLL PDF Redist Files: For reading PDF files, you must follow the instructions outlined in the "Distributing an application built using the PDF Module section of Implementing PDF Plug in Features.
FILE_PSD | PhotoShop 3.0 Format | LFPSD14N.DLL | LFPSD14E.DLL
FILE_PSP FILE_PSP_RLE | Paint Shop Pro Format | LFPSP14N.DLL | LFPSP14E.DLL
FILE_PTOCA | Presentation Text Object Content Architecture Format | LFPTK14N.DLL | LFPTK14E.DLL
FILE_RAS FILE_RAS_RLE | SUN Raster Format | LFRAS14N.DLL | LFRAS14E.DLL
FILE_RAS_PDF (Read Support) | Portable Document Format (PDF) | LFPDF14N.DLL PDFDLL32.DLL PDF Redist Files | LFPDF14E.DLL PDFDLL32.DLL PDF Redist Files
FILE_RAS_PDF FILE_RAS_PDF_LZW (Write Support) | Portable Document Format (PDF) | LFPDF14N.DLL | LFPDF14E.DLL
FILE_RAS_PDF_G3_1D FILE_RAS_PDF_G3_2D FILE_RAS_PDF_G4 (Write Support) | Portable Document Format (PDF) | LFPDF14N.DLL LFFAX14N.DLL | LFPDF14E.DLL LFFAX14E.DLL
FILE_RAS_PDF_JPEG FILE_RAS_PDF_JPEG_422 FILE_RAS_PDF_JPEG_411 (Write Support) | Portable Document Format (PDF) | LFPDF14N.DLL LFCMP14N.DLL | LFPDF14E.DLL LFCMP14E.DLL
FILE_RAS_PDF_JBIG2 (Write Support) | Portable Document Format (PDF) | LFPDF14N.DLL LFJB214N.DLL | LFPDF14E.DLL LFJB214E.DLL
FILE_RAW FILE_RAW_RGB FILE_RAW_RLE4 FILE_RAW_RLE8 FILE_RAW_BITFIELDS FILE_RAW_PACKBITS FILE_RAW_JPEG FILE_FAX_G3_1D_NOEOL FILE_RAW_LZW | RAW Data Formats | LFRAW14N.DLL LFFAX14N.DLL | LFRAW14E.DLL LFFAX14E.DLL
FILE_RAWICA_IBM_MMR FILE_RAWICA_UNCOMPRESSED | Image Object Content Architecture Format | LFICA14N.DLL | LFICA14E.DLL
FILE_RAWICA_G3_1D FILE_RAWICA_G3_2D FILE_RAWICA_G4 | Image Object Content Architecture Format | LFICA14N.DLL LFFAX14N.DLL | LFICA14E.DLL LFFAX14E.DLL
FILE_RTF_RASTER | Rich Text Format | LFRTF14N.DLL | LFRTF14E.DLL
FILE_SCT | Scitex Continuous Tone Format | LFSCT14N.DLL LTCLR14N.DLL | LFSCT14E.DLL LTCLR14N.DLL
FILE_SFF | Structured Fax Format | LFSFF14N.DLL LFFAX14N.DLL | LFSFF14E.DLL LFFAX14E.DLL
FILE_SGI FILE_SGI_RLE | Silicon Graphics Format | LFSGI14N.DLL | LFSGI14E.DLL
FILE_SHP | ESRI Shape Format | LFSHP14N.DLL LVKRN14N.DLL | LFSHP14E.DLL LVKRN14E.DLL
FILE_SID | MrSid Format | LFSID14N.DLL | LFSID14N.DLL
FILE_SMP FILE_SMP_G3_1D FILE_SMP_G3_2D FILE_SMP_G4 | Xionics Format | LFSMP14N.DLL LFFAX14N.DLL | LFSMP14E.DLL LFFAX14E.DLL
FILE_SVG | Scalable Vector Graphics Format | LFSVG14N.DLL LVKRN14N.DLL | LFSVG14E.DLL LVKRN14E.DLL
FILE_TGA FILE_TGA_RLE | Truvision Targa Format | LFTGA14N.DLL | LFTGA14E.DLL
FILE_TIF FILE_TIF_YCC FILE_TIF_PACKBITS FILE_TIF_PACKBITS_YCC FILE_TIFLZW FILE_TIFLZW_YCC FILE_GEOTIFF FILE_TIF_UNKNOWN FILE_TIF_CUSTOM | TIFF Tagged Image File Format | LFTIF14N.DLL If you are loading TIF files that use LAB color space, you will also need LTCLR. | LFTIF14E.DLL If you are loading TIF files that use LAB color space, you will also need LTCLR.
FILE_CCITT FILE_CCITT_GROUP3_1DIM FILE_CCITT_GROUP3_2DIM FILE_CCITT_GROUP4 | TIFF Tagged Image File Format | LFTIF14N.DLL LFFAX14N.DLL | LFTIF14E.DLL LFFAX14E.DLL
FILE_TIF_CMYK FILE_TIF_PACKBITS_CMYK FILE_TIFLZW_CMYK | TIFF Tagged Image File Format | LFTIF14N.DLL LTCLR14N.DLL | LFTIF14E.DLL LTCLR14E.DLL
FILE_TIF_JPEG FILE_TIF_JPEG_422 FILE_TIF_JPEG_411 FILE_TIF_CMP | TIFF Tagged Image File Format | LFTIF14N.DLL LFCMP14N.DLL | LFTIF14E.DLL LFCMP14E.DLL
FILE_TIF_JBIG2 | TIFF Tagged Image File Format | LFTIF14N.DLL LFJB214N.DLL | LFTIF14E.DLL LFJB214E.DLL
FILE_TIF_JBIG | TIFF Tagged Image File Format | LFTIF14N.DLL LFJBG14N.DLL | LFTIF14E.DLL LFJBG14E.DLL
FILE_TIF_DXF_R12 FILE_TIF_DXF_R13 | TIFF Tagged Image File Format | LFTIF14N.DLL LFDXF14N.DLL LVKRN14N.DLL | LFTIF14E.DLL LFDXF14E.DLL LVKRN14E.DLL
FILE_TIF_J2K | TIFF Tagged Image File Format | LFTIF14N.DLL LFJ2K14N.DLL | LFTIF14E.DLL LFJ2K14E.DLL
FILE_TIFX_JBIG FILE_TIFX_JBIG_T43 FILE_TIFX_JBIG_T43_ITULAB FILE_TIFX_JBIG_T43_GS | Xerox Internet Fax Format | LFTFX14N.DLL LFJBG14N.DLL | LFTFX14E.DLL LFJBG14E.DLL
FILE_TIFX_FAX_G3_1D FILE_TIFX_FAX_G3_2D FILE_TIFX_FAX_G4 | Xerox Internet Fax Format | LFTFX14N.DLL LFFAX14N.DLL | LFTFX14E.DLL LFFAX14E.DLL
FILE_TIFX_JPEG | Xerox Internet Fax Format | LFTFX14N.DLL LFCMP14N.DLL | LFTFX14E.DLL LFCMP14E.DLL
FILE_TIF_CMW | TIFF Tagged Image File Format | LFTIF14N.DLL LFCMW14N.DLL | LFTIF14E.DLL LFCMW14E.DLL
FILE_TIF_ABC | TIFF Tagged Image File Format | LFTIF14N.DLL LFABC14N.DLL | LFTIF14E.DLL LFABC14E.DLL
FILE_TIF_ABIC | TIFF Tagged Image File Format | LFTIF14N.DLL LFABI14N.DLL | LFTIF14E.DLL LFABI14E.DLL
FILE_TIF_MRC | TIFF Tagged Image File Format | LFTIF14N.DLL LTSGM14N.DLL LFCMP14N.DLL LFFAX14N.DLL | LFTIF14E.DLL LTSGM14E.DLL LFCMP14E.DLL LFFAX14E.DLL
FILE_TIF_LEAD_MRC | TIFF Tagged Image File Format | LFTIF14N.DLL LTSGM14N.DLL LFCMP14N.DLL LFJBG14N.DLL LFFAX14N.DLL | LFTIF14E.DLL LTSGM14E.DLL LFCMP14E.DLL LFJBG14E.DLL LFFAX14E.DLL
FILE_TXT | ASCII Text Files (Read Only) | LFTXT14N.DLL | LFTXT14E.DLL
FILE_VWPG | WordPerfect Vector Format | LFVPG14N.DLL LVKRN14N.DLL | LFVPG14E.DLL LVKRN14E.DLL
FILE_WBMP | Wireless Bitmap Format | LFWMP14N.DLL | LFWMP14E.DLL
FILE_WFX_G3_1D FILE_WFX_G4 | Delrina WinFax Format | LFWFX14N.DLL LFFAX14N.DLL | LFWFX14E.DLL LFFAX14E.DLL
FILE_WIN_ICO FILE_WIN_CUR | Windows icon and cursor Format | LFBMP14N.DLL | LFBMP14E.DLL
FILE_WMF | Windows Metafile | LFWMF14N.DLL LVKRN14N.DLL | LFWMF14E.DLL LVKRN14E.DLL
FILE_WMZ | Compressed Windows Metafile Format | LFWMZ14N.DLL LVKRN14N.DLL | LFWMZ14E.DLL LVKRN14E.DLL
FILE_WPG | WordPerfect Graphic Format | LFWPG14N.DLL | LFWPG14E.DLL
FILE_XBM | XWindows XBitMap Format | LFXBM14N.DLL | LFXBM14E.DLL
FILE_XPM | X Window PixMap Format | LFXPM14N.DLL | LFXPM14E.DLL
FILE_XWD10 FILE_XWD11 | X Window Dump Format | LFXWD14N.DLL | LFXWD14E.DLL

Canon Runtime files required for CRW support:

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.

Canon, Inc. publishes these DLLs. If you wish to obtain a license to distribute these files, contact Canon and license the free Canon Digital Camera Software Developer Kit at http://www.powershot.com/powershot2/customer/develop1.html. These files are included for demonstration and testing purposes. You must obtain a license from canon prior to distributing these files.

Canon, Inc. suggests that the user of their CRW SDK MUST place the required DLLs/Libraries in the working folder of the EXE application that is using it, and not in the SYSTEM folder. LEADTOOLS tested this in the system folder and it worked fine. But to follow Canon's instructions, we recommend the users of CANON DLLs/Libraries to place them in the working folder of his/her application to avoid any problems/conflicts, which may result from ignoring this recommendation.

PDF Runtime Files:

For reading PDF files you must follow the instructions outlined in the "Distributing an application built using the PDF Module" section of Implementing PDF Plug in Features.


Installation Directory

The installation procedure creates a directory tree for the LEADTOOLS files, demonstration programs and online help. You specify the root directory during installation.

Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

The following is a list of the subdirectories in the root directory:

BIN | Executable files for the demonstration programs.
EXAMPLES\VCL | One subdirectory for each example VCL program.
EXAMPLES\RES | Resource files for the example programs.
HELP | Online help files.
IMAGES | Sample images and databases containing images.
IMPORTANT FORMS | Contracts, Pricing Schedules, Runtime Agreements, etc.
INCLUDE | Header files.
LIB\VCL\DELPHI7 | The LEADTOOLS VCL Delphi 7.0 package and unit files.
LIB\VCL\DELPHI9 | The LEADTOOLS VCL Delphi 9.0 package and unit files.
LIB\VCL\BUILDER5 | The LEADTOOLS VCL Builder 5.0 package, LIB and header files.
LIB\VCL\BUILDER6 | The LEADTOOLS VCL Builder 6.0 package, LIB and header files.
REDIST | Redistributable files. These are copies of the LEADTOOLS files and other files that you may need to distribute with your application. For exact information about required files, refer to Files To Be Included With Your Application.
REDIST\NONAG | This directory contains the LTKRN DLL that must be distributed with your application. For more information about the nag and no-nag versions of LTKRN, refer to Document/Medical Support and Licensing Requirements. For non-royalty products, the extra licensing requirements do not apply, simply distribute the LTKRN from REDIST\NONAG.
USES | Pascal user uses and includes files.


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

The LEADTOOLS WIN32 installation procedure adds the following Borland runtime 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.

BORLNDMM.DLL
CP3240MT.DLL
CC3250MT.DLL
CC3260MT.DLL
VCL50.BPL
VCLDB50.BPL
VCLBDE50.BPL
VCL40.BPL
VCLDB40.BPL
VCL60.BPL
VCLDB60.BPL
VCL70.BPL
VCLDB70.BPL


Summary of All Supported Image File Formats

Raster Color and Grayscale

ABIC - ABIC Format

AFP - AFP Format

ANI - Windows Animated Cursor

AVI - Windows AVI Format

BMP - Windows Bitmap Formats

CIN - Cineon Format

CLP - Microsoft Windows Clipboard Format

CMP - LEAD Compressed

CMW - LEAD Wavelet Compressed

CRW - Canon RAW Format

CUR - Windows Cursors

CUT - Dr. Halo Format

DCR - Kodak Professional Digital Camera Format

DCS - Kodak Professional Digital Camera System Format

DCX - DCX Format

DICOM - DICOM Format

DJVU - DjVu Format

ECW - Enhanced Compressed Wavelet Format

EMF - Windows Metafile Formats

EPS - Encapsulated PostScript Format

EXIF - Exif Formats

FIT - FITS Format

FLC - Flic Animation Format

FPX - Kodak Format

GIF - Compuserve GIF Format

ICO - Windows Icons

IFF - Interchange File Formats

JBG - JBIG Format

JPG - JPEG Compressed

JP2 - JPEG 2000 Compressed

KDC - Kodak Digital Camera Format

MRC - Mixed Raster Content

MPG - MPEG Video Format

PBM - Portable Bitmap Utilities Format

PCD - Kodak Format

PCT - Macintosh Pict Format

PCX - PCX Format

PDF - Portable Document Format

PNG - Portable Network Graphics Format

PSD - PhotoShop 3.0 Format

PSP - Paint Shop Pro Format

PTK - PTOCA Format

RAS - SUN Raster Format

SCT - Scitex Continuous Tone Format

SFF - Structured Fax File Format

SGI - Silicon Graphics Image Format

SID - MrSid Format

TGA - Truevision TARGA Format

TIFF - Tagged Image File Format

WBMP - Wireless Bitmap Format

WMF - Windows Metafile Formats

WPG - WordPerfect Format

XPM - XPicMap

XWD - X WindowDump

Raster Bitonal (1-Bit)

ABC - ABCt Format

AWD - Microsoft FAX Format

CAL - CALS Raster Format

CMP - LEAD 1-Bit Format

FAX - Raw Fax Format

ICA - Image Object Content Architecture (IOCA/MODCA)

IMG - GEM Image Format

ITG - Intergraph Format

JBIG2 - JBIG2 Format

MAC - MacPaint Format

MSP - Microsoft Paint

SMP - Xionics Format

TIFF - Tagged Image File Format / CCITT

TIFX - Xerox Internet Fax File Format

WFX - WinFax Format

XBM - XBitMap Format

Vector

CGM - Computer Graphics Metafile

CMX - Corel Presentation Exchange Format

DGN - Intergraph Format

DRW - Micrografx Designer DRaWing

DWF - DWF Format

DWG - DWG Format

DXF - Drawing Interchange Format

EMF - Windows Metafile Formats

GBR - Gerber Format

PCL - Printer Command Language Format

PCT - Macintosh Pict Format

PDF - Portable Document Format

PLT - PLT / HPGL Format

PS - PostScript Document Format

RTF - Rich Text Format

SHP - ESRI Shape Format

SVG - Scalable Vector Graphics Format

TXT - ASCII Text Format

VEC - LEADTOOLS Vector Dump Format

VPG - WordPerfect Vector Format

WMF - Windows Metafile Formats

WMZ - Compressed Windows Metafile Format


File Formats: ABC (ABC)

ABC (ABC)

ABC is the best 1 bit lossless compression provided by LEAD. It gives better results than JBIG, or CCITT G4, and it gives better compression for computer or electronic generated documents than for scanned documents. You can read and write files in this format.

With ABC, there are also lossy options. For more information on the qFactor values to control the ABC compression, refer to Compression Quality Factors

This format is available only in selected LEADTOOLS products. For a list of products, refer to Topic Selection.

The default extension used by this format is: ABC.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_ABC | 1 BPP | 1 BPP | [32] LEAD ABC 1 bit, lossless compression.
FILE_TIF_ABC | 1 BPP | 1 BPP | [180] TIFF with LEAD ABC 1 bit, lossless compression.

Required DLL: LFABC. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CMP - LEAD 1-Bit Format, FAX - Raw Fax Format, TIFF - Tagged Image File Format / CCITT.


File Formats: ABIC Format (ABIC, ICA)

ABIC Format (ABIC, ICA)

LEADTOOLS reads and writes ABIC files.

The ABIC file format is a raster file format created by IBM. This file format consists of ABIC compression/decompression algorithms that uses an arithmetic coding technique to produce lossless data compression, these algorithms called ABIC (Bi-level Q-Coder) compression algorithm and Concatenated ABIC (Grayscale) compression algorithm.

LEADTOOLS can Load/Save (compression/decompression) ABIC Raw data separately.

The default extension used by this format is: ICA, ABIC (for raw data).

This file format does not support progressive loads and saves, multi-page files, stamps, or Lossless JPEG compression.

Support for this file format can be unlocked using the following support constant: L_KEY_ABIC_READ, L_KEY_ABIC_SAVE.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_ABIC | 1, 4 BPP | 1, 4 BPP | [185] Raw ABIC compressed data

Required DLL: LFABI. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: IOCA/MODCA - Image Object Content Architecture Format


File Formats: AFP (AFP)

AFP Format (AFP)

The AFP format is part of IBM's document imaging system. It is a raster format, created to add enhanced formatting and indexing capabilities to documents for print applications in finance, retail, insurance and other industries. LEAD provides support for the user to open MODCA/PTOCA or AFP/PTOCA documents.

The default extension used by this format is: AFP.

This format is used by the IBM plug in.

This file format does not support stamps or Lossless JPEG compression, but it does support multi-page files.

LEADTOOLS supports functions that let you set the DPI for the opened image file. Please refer to the PTK Options functions.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_AFP | 24 BPP | None | [252] IBM This format is part of IBM's document imaging system.
FILE_AFPICA_G3_1D | 1 BPP | 1 BPP | [309] IOCA, G3 1D compressed.
FILE_AFPICA_G3_2D | 1 BPP | 1 BPP | [310] IOCA, G3 2D compressed.
FILE_AFPICA_G4 | 1 BPP | 1 BPP | [311] IOCA, G4 compressed.
FILE_AFPICA_UNCOMPRESSED | 1 BPP | 1 BPP | [312] IOCA, uncompressed.
FILE_AFPICA_IBM_MMR | 1 BPP | 1 BPP | [313] IOCA, IBM MMR compressed.

Required DLL: LFAFP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Currently, LEAD does not save AFP files, but these files can be saved to IOCA.

Related Formats: FAX - Raw Fax Format, ICA - Image Object Content Architecture (IOCA/MODCA), PTK - PTOCA Format, TIFF - Tagged Image File Format / CCITT.


File Formats: BMP Formats

BMP Formats

LEADTOOLS reads and writes the following BMP formats:

Windows Bitmap (BMP). This is a file format created by Microsoft. Some BMP images are compressed with an RLE-type compression.

OS/2 Bitmap (OS/2 BMP). These are files created on an OS/2 operating system. LEADTOOLS supports both 1.x and 2.x formats.

File constants associated with these file formats are:

Constant | Read Support | Write Support | Description
FILE_BMP | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [6] Windows BMP, with no compression.
FILE_BMP_RLE | 4, 8 BPP | 4, 8 BPP | [84] Windows BMP, with RLE compression.
FILE_OS2 | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [14] OS/2 BMP version 1.x.
FILE_OS2_2 | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [74] OS/2 BMP version 2.x.

Required DLL: LFBMP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: PBM - Portable Bitmap Utilities Format, PCX - PCX Format, WBMP - Wireless Bitmap Format, XPM - XPicMap, XBM - XBitMap Format.


Canon RAW Format (CRW)

The Canon Raw file format is a raster file format created by Canon digital cameras. It is a raw dump of CCD pixels with no compression. This format is supported by POLYVIEW.

LEADTOOLS can read and view, using the Canon Digital Camera SDK (CD-SDK), CRW files generated by the following digital cameras:

Power Shot | IXY DIGITAL | DIGITAL IXUS | EOS
Power Shot A10 Power Shot A20 Power Shot A30 Power Shot A40 Power Shot A100 Power Shot S10 Power Shot S20 Power Shot S30 Power Shot S40 Power Shot S100 Power Shot S110 Power Shot S200 Power Shot S300 Power Shot S330 Power Shot G1 Power Shot G2 Power Shot Pro90 IS | IXY DIGITAL IXY DIGITAL 200 IXY DIGITAL 200a IXY DIGITAL 300 IXY DIGITAL 300a | DIGITAL IXUS DIGITAL IXUS v DIGITAL IXUS v2 DIGITAL IXUS 300 DIGITAL IXUS 300 | EOS D30 EOS D60 EOS-1D

The default extension used by this format is: CRW.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CRW | 24 BPP | None | [296] Cannon raw format.

Required DLLs: LFCRW. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: DCR - Kodak Professional Digital Camera Format, DCS - Kodak Professional Digital Camera System Format, EXIF - Exif Formats, FPX - Kodak Format, KDC - Kodak Digital Camera Format, PCD - Kodak Format.


File Formats: Cineon Format (CIN)

Cineon Format (CIN)

KODAK Cineon Format (CIN) files are raster format files created by Kodak and supported by XnView and PixEdit. They are designed to better represent film imagery in a digital format. Cineon files store data in a 10-bit logarithmic scale. Therefore, each color component has a range of 0 to 1023. LEADTOOLS supports version 4.5 of this format.

The default extension used by this format is: CIN.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CIN | 24 BPP | 24 BPP | [298] Kodak Cineon Format.

Required DLL: LFCIN. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: Compressed Windows Metafile Format (WMZ)

Compressed Windows Metafile Format (WMZ)

The Compressed Windows Metafile format is a vector file format that represents primarily Group 3 fax documents. It contains information concerning the page structure and the compressed line data of the fax document. This format was developed by Microsoft and is supported by Microsoft Office 2000 and Microsoft Word 2000.

The default extension used by this format is: WMZ.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Background color and mode | Supported | Supported
Chord | Supported | Supported
Circle | Supported | Supported
Color | Supported | Supported
Ellipse | Supported | Supported
HPolyBezier | Supported | Supported
Lines | Supported | Supported
Pie | Supported | Supported
PolyBezier | Supported | Supported
PolyDraw | Supported | Supported
Polygons | Supported | Supported
Polyline | Supported | Supported
Raster | Supported | Supported
Rectangle | Supported | Supported
Round Rectangle | Restricted Support | Restricted Support
Spline | Supported | Supported
Text | Supported | Supported
Text(Color and Font Type) | Supported | Supported
Vertex | Supported | Supported

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_WMZ | Yes | Yes | [307] Compressed Windows Metafile Format

When WMZ files are rasterized, they are 24 BPP.

Required DLL: LFWMZ. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats.


File Formats: Computer Graphics Metafile (CGM)

Computer Graphics Metafile (CGM)

Computer Graphics Metafile is a format used for the exchange of vector and bitmap data. This file format is supported by Autovue and Corel. LEADTOOLS supports versions 1, 2, 3 and 4 of CGM, as well as the Binary data-encoding format of CGM.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Circle | Supported | Not Supported
Circular Arc Center | Supported | Not Supported
Ellipse | Supported | Supported
Elliptical Arc | Supported | Not Supported
Font | Supported | Supported
Lines | Supported | Supported
PolyBezier | Supported | Not Supported
Polygons | Supported | Supported
Polyline | Supported | Supported
Rectangle | Supported | Supported
Text | Supported | Supported

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this file format is: CGM.

This file format does not support layers.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CGM | Yes | Yes | [62] Computer Graphics Metafile.

When CGM files are rasterized, they are 24 BPP.

Required DLL: LFCGM. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: Corel Presentation Exchange (CMX)

Corel Presentation Exchange Format (CMX)

The Corel Presentation Exchange file format is the presentation format of the CorelSuite applications. It is a recording of the display primitives of an application to a display interface. The CMX format supports Intel and Motorola binary formats.

CMX adopts the Resource Interchange File Format (RIFF). The entire CMX file is enclosed within either the RIFF or RIFX form, depending on the platform.

This file format is not supported in the non-vector toolkits. Read support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: CMX.

This file format is supported by CorelDraw.

LEAD supports versions 5, 6, 7, and 8 of this format.

This file format does support layers. LEAD does not support RImage.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CMX | Yes | No | [261] Corel Presentation Exchange Format.

When CMX files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Ellipse | Supported | Not Supported
PolyDraw | Supported | Not Supported
Raster | Supported | Not Supported
Rectangle | Supported | Not Supported
Text | Supported | Not Supported

Required DLL: LFCMX. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: DGN (DGN)

DGN (DGN)

DGN (also RDL) is a file format common to Intergraph's MicroStation and Interactive Graphics Design System (IGDS) CAD applications running on Intergraph workstations and PCs.

This file format is not supported in the non-vector toolkits. Read support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEADTOOLS supports DGN versions 1, 2 and 3.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_INTERGRAPH_VECTOR | Yes | Yes | [123] Intergraph MicroStation and Interactive Graphics Design.

When DGN files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Not Supported
Ellipse | Supported | Not Supported
Lines | Supported | Not Supported
Polygons | Supported | Supported
Polyline | Supported | Supported
Raster | Supported | Supported
Text | Supported | Not Supported

Required DLL: LFDGN. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: DICOM Format (DIC)

DICOM Format (DIC)

Note:

This format is supported only in Document/Medical.

DICOM (DIC) files are commonly used in medical images. LEADTOOLS reads a broad range of DICOM formats, converting them to LEAD-supported bits-per-pixel as necessary. LEADTOOLS writes DICOM files in the LEAD-supported bits-per-pixel. DICOM files can contain many comment fields of various types. You can use the ReadComment method to read comments in an existing file. Before writing a file, you can use the Comment property to create an array of comments to be saved in the file.

You can read DICOM files as follows:

Grayscale files in the 1- to 16-bit range are loaded as they are in the original file.

Palettized color files in the 1- to 16-bit range are converted to 8-bit palettized or 24-bit unpalettized. By default, they are converted to 24-bit only if the palette contains more than 256 colors.

Unpalettized color files (RGB, ARGB, or CMYK) with 1 to 16 bits per plane are converted to 24-bit RGB.

Read multipage DICOM files by setting the page number when calling the Load method.

You can write DICOM files as 8, 12, or 16-bit grayscale, 8-bit palettized color, or 24-bit RGB color (8 bits per plane).

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DICOM_GRAY | 1 to 16 BPP (Grayscale) | 1 to 16 BPP (Grayscale) | [89] Grayscale DICOM uncompressed.
FILE_DICOM_COLOR | 8, 24 BPP | 8, 24 BPP | [90] Color DICOM uncompressed.
FILE_DICOM_RLE_GRAY | xxxx | xxxx | [125] Grayscale DICOM RLE compressed.
FILE_DICOM_RLE_COLOR | xxxx | xxxx | [126] Color DICOM RLE compressed.
FILE_DICOM_JPEG_GRAY | 8, 16 BPP (Grayscale) | 8, 16 BPP (Grayscale) | [127] Grayscale DICOM JPEG compressed.
FILE_DICOM_JPEG_COLOR | 24 BPP | 24 BPP | [128] Color DICOM JPEG compressed.
FILE_DICOM_J2K_GRAY | 8, 16 BPP (Grayscale) | 8, 16 BPP (Grayscale) | [293] Grayscale DICOM JPEG 2000 compressed.
FILE_DICOM_J2K_COLOR | 24 BPP | 24 BPP | [294] Color DICOM JPEG 2000 compressed.

Required DLL: LTDIC. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: EXIF - Exif Formats, JPG - JPEG Compressed, JP2 - JPEG 2000 Compressed, TIFF - Tagged Image File Format.


File Formats: DjVu Format (DJVU)

DjVu Format (DJVU)

The DjVu format is a raster file representing a new image compression technology that allows the distribution on the Internet of very high resolution images of scanned documents, digital documents and photographs. This format was developed by LizardTech and is supported by the LizardTech SDK. LEADTOOLS, using the LizardTech SDK 3.6, can load DJVU files. LEADTOOLS does not save DJVU files.

LEADTOOLS® supports the loading of DJVU files at different resolutions, depending on the user's preference. In the COM the DJVResolution property lets the programmer manipulate the resolution for DJVU files.

The default extensions used by this format are: DJV, DJVU.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DJVU | 1, 8, 24 BPP | None | [308] LizardTech DjVu.

Required DLLs: LFDJV. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: Dr. Halo (CUT)

Dr Halo (CUT)

Dr. Halo files are device-independent images. The image is stored in one file (.CUT) and the palette is stored in a separate file (PAL). If the image has no corresponding .PAL file, it is considered a grayscale image.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CUT | 8 BPP | 8 BPP | [108] Dr. Halo.

Required DLL: LFCUT. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

For CUT files, you can read and write the following bits per pixel: 8.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).


File Formats: Drawing Interchange Format (DXF)

Drawing Interchange Format (DXF)

DXF (Drawing Interchange Format) was first introduced by AutoDesk AutoCAD, and is one of the most widely used CAD/CAM/CAE applications in the world. DXF is very popular and is supported by most 3D formats on PC platforms.

A DXF file is an ASCII file containing 2D and 3D components representing a drawing. Those components are known as Entities. The DXF file can represent almost any CAD drawing using those entities, and can connect a group of entities together (such as windows, doors, etc.) and use them later in the file. The DXF file has seen many changes through the years, from version 2.6 to the latest release version 14. However, the latest release of AutoCAD still manages to open files created with any of the earlier versions.

LEADTOOLS supports all current variations of the DXF format (versions 2.6, 9, 10, 11, 12, 13, 14).

You can load any of the DXF files as either vector images or raster images. Users can load a DXF file, and save it to any of file formats supported by LEADTOOLS.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DXF | Yes | Yes | [58] AutoDesk AutoCAD ASCII format Release 12.
FILE_DXF_R12 | Yes | Yes | Same as FILE_DXF
FILE_DXF_R13 | Yes | Yes | [290] AutoDesk AutoCAD ASCII format Release 13.

When DXF files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Attdef | Supported | Not Supported
Attrib | Supported | Not Supported
Circle | Supported | Supported
Clone | Supported | Supported
Ellipse | Supported | Supported
Elliptical Arc | Supported | Not Supported
Insert | Supported | Not Supported
Leader | Supported | Not Supported
Lines | Supported | Supported
MText | Supported | Supported
Polygons | Supported | Supported
PolyLine | Supported | Supported
Raster | Supported | Not Supported
Solid | Supported | Not Supported
Spline | Supported | Not Supported
Text | Supported | Supported
Tolerance | Supported | Not Supported
Vertex | Supported | Supported
WPolyLine | Supported | Not Supported
3DFace | Supported | Not Supported

Required DLL: LFDXF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: DRaWing (DRW)

DRaWing (DRW)

DRW (DRaWing) is a native format used in the popular Micrografx Designer CAD/CAM/CAE application for the Windows operating system.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEADTOOLS supports versions 1, 2, 3, 4 and 5 of the DRW file format.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DRW | Yes | Yes | [136] Micrografx Designer CAD drawing.

When DRW files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Not Supported
Lines | Supported | Supported
Pie | Supported | Not Supported
Point | Supported | Supported
PolyDraw | Supported | Supported
Polygons | Supported | Supported
Polyline | Supported | Supported
Raster | Supported | Not Supported
Text | Supported | Supported

Required DLL: LFDRW. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: DWF (DWF)

DWF Format (DWF)

DWF is a binary file format used by AutoDesk AutoCAD for storing DWG files on the World Wide Web. DWF is a 2D, vector-based description of drawings and illustrations.

LEADTOOLS supports DWF versions .4, .5, .55 and .6.

This file format is not supported in the non-vector toolkits. Read and write support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DWF | Yes | Yes | [145] AutoDesk AutoCAD for storing DWG files on the World Wide Web.
FILE_DWF_TEXT_AS_POLYLINE | N/A | Yes | [297] AutoDesk AutoCAD for storing DWG files on the World Wide Web. Use this format to save DWF and have Text objects converted to Polyline objects in the output file.

When DWF files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Not Supported
Attdef | Supported | Not Supported
Attrib | Supported | Not Supported
BoundaryPolydraw | Supported | Not Supported
Circle | Supported | Supported
Dimension | Supported | Not Supported
Ellipse | Supported | Supported
Hatch | Supported | Not Supported
Insert | Supported | Not Supported
Leader | Supported | Not Supported
Lines | Supported | Supported
Mline | Supported | Not Supported
Mtext | Supported | Not Supported
Polygons | Supported | Not Supported
Polyline | Supported | Supported
PureLine | Supported | Not Supported
PurePolygon | Supported | Not Supported
PurePolyline | Supported | Not Supported
Segment | Supported | Not Supported
Spline | Supported | Not Supported
Text | Supported | Supported
Vertex | Supported | Not Supported
Wpolyline | Supported | Not Supported
3DFace | Supported | Not Supported
3DSolid | Supported | Not Supported

LEADTOOLS also supports text and embedded raster objects.

Required DLL: LFDWF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: DWG Format (DWG)

DWG Format (DWG)

DWG is a binary file format used by AutoDesk AutoCAD. It can contain 2D or 3D objects and offers compression and a CRC check for internal data.

LEADTOOLS supports DWG 13, 14 and 15 files.

This file format is not supported in the non-vector toolkits. Read support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: DWG.

LEAD supports the object types listed above, as well as, layers and the grouping of objects. Embedded raster objects are not supported.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DWG | Yes | No | [124] AutoDesk AutoCAD binary format.

When DWG files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Not Supported
Attdef | Supported | Not Supported
Attrib | Supported | Not Supported
BoundaryPolydraw | Supported | Not Supported
Circle | Supported | Not Supported
Dimension | Supported | Not Supported
Ellipse | Supported | Not Supported
Hatch | Supported | Not Supported
Insert | Supported | Not Supported
Leader | Supported | Not Supported
Lines | Supported | Not Supported
Mline | Supported | Not Supported
Mtext | Supported | Not Supported
Polygons | Supported | Not Supported
Polyline | Supported | Not Supported
PureLine | Supported | Not Supported
PurePolygon | Supported | Not Supported
PurePolyline | Supported | Not Supported
Segment | Supported | Not Supported
Spline | Supported | Not Supported
Text | Supported | Not Supported
Vertex | Supported | Not Supported
Wpolyline | Supported | Not Supported
3DFace | Supported | Not Supported
3DSolid | Supported | Not Supported

Required DLL: LFDWG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: Encapsulated PostSript (EPS)

Encapsulated PostScript (EPS)

PostScript Raster (Encapsulated PostScript). These files are used primarily on PostScript printers. These printers usually offer more variety of fonts and higher resolution than standard laser printers. EPS files will work on any PostScript compatible printer and any end-user application that supports placement of EPS files in its work space.

The image that you read from an EPS file can be a PostScript image, a PostScript raster image, an embedded TIFF image, or an embedded WMF image. The image that you write to an EPS file is always a PostScript raster image.

These files can be forced to open thumbnails instead of the PostScript data by setting ELO_FORCE_EPS_THUMBNAIL.

For a PostScript image, you can read the following bits per pixel, using various DPI options: 1, 2, 4, 8, 24. This requires the PDF filter.

For a PostScript raster image, you can read the following bits per pixel: 1, 8, 24.

For an embedded TIFF image, you can read the following bits per pixel: 1, 4, 8, 16, 24, 32.

For an embedded WMF file, you can read the following bits per pixel: 24.

You can write only an 8-bit PostScript raster image, which is grayscale.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_EPSPOSTSCRIPT | 1, 2, 4, 8, 24 BPP | None | [300] Encapsulated PostScript.
FILE_EPSTIFF | 1, 4, 8, 16, 24, 32 BPP | None | [63] Encapsulated PostScript with TIFF preview.
FILE_EPSWMF | 24 BPP | None | [64] Encapsulated PostScript with WMF preview.
FILE_EPS | 1, 8, 24 BPP | 8 BPP (Grayscale) | [16] Encapsulated PostScript.

Required DLLs: LFEPS14N.DLL. This format also requires one or more of the following, for loading, depending on the content of the file: LFTIFF14N.DLL, LFWMF14N.DLL, LFPDF14N.DLL (This DLL also requires PDFDLL32.DLL.).

Related Formats: PCL - Printer Command Language Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format.


Enhanced Compressed Wavelet Formats (ECW)

Enhanced Compressed Wavelet Format (ECW)

The Enhanced Compressed Wavelet file format is a raster file format created by the ER Mapper Company.

The ECW format uses wavelet compression, which results in small, high quality image files that can be loaded and saved quickly. This format is supported by ER Viewer and the Plug in for Adobe Photoshop. LEADTOOLS uses the ECW SDK to compress and decompress ECW images. This SDK has the following two restrictions:

The maximum sized image that can be compressed is 500MB.

An image must be at least 128 X 128 to be compressed.

LEADTOOLS supports V2.0 of this file format.

The default extension used by this format is: ECW.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_ECW | 24 BPP | 24 BPP | [277] ER Mapper Enhanced Compressed Wavelet.

Required DLLs: LFECW. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application .

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).


File Formats: ESRI Shape (SHP)

ESRI Shape Format (SHP)

The ESRI Shape format is a vector format created by the Environmental System Research Institute. The SHP file can support point, multi-point, polygon, polyline and multi-patches. This file format has a much faster drawing speed and more editing capabilities than other data sources. It is supported by the ARC Explorer 2.0 and ARCView.

This file format contains three files:

Main file: *.shp

Index file: *.shx

DBase file: *.dbf

This file format is not supported in the non-vector toolkits. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: SHP.

This file format does not support layers, grouping objects or embedded raster objects.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_SHP | Yes | Yes | [255] ESRI Shape – Environmental System Research Institute.

When SHP files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
PolyDraw | Supported | Not Supported
Polyline | Supported | Supported
Vertex | Supported | Not Supported

Required DLL: LFSHP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: Exif Formats (TIFF and JPG)

Exif Formats (TIFF and JPG)

Exif is a standard for image files created with digital cameras and other input devices. The standard is set by the Japan Electronic Industry Development Association, and formally it is called the Digital Still Camera Image File Format Standard.

Exif files contain either uncompressed TIFF images or compressed JPEG images. In addition, these files can contain many comment fields of various types. You can use the ReadComment method to read comments in an existing file. Before writing a file, you can use the Comment property to create an array of comments to be saved in the file.

LEADTOOLS reads and writes the following Exif formats:

TIFF. This is a tag-based file format designed to promote universal interchanges of digital image data. You can save any image size.

JPG. This is the JPEG format with YUV 4:2:2 sampling. You can save any image size.

For more information, refer to Compression Using LEAD and JPEG Formats.

If you are working with compressed (JPEG) Exif files, the stamp size has been restricted to 160x120x24. When you call the SaveWithStamp method and specify that you want to save a compressed Exif file, the StampWidth, StampHeight and StampBits parameters are ignored. They are assumed to be 160 (StampWidth), 120 (StampHeight) and 24 (StampBits). That limitation has been imposed in order to conform with the ExifR98 interoperability rules imposed by Japanese digital camera manufacturers.

If you are working with uncompressed (TIFF) Exif files, the stamp size is (width x height x 24 bpp), with no limitations on width and height.

The stamp image can be retrieved by calling the LoadStamp method.

File constants associated with these file formats are:

Constant | Read Support | Write Support | Description
FILE_EXIF | 24 BPP | 24 BPP | [96] Exif file containing a TIFF image, with no compression and with RGB color space.
FILE_EXIF_YCC | 24 BPP | 24 BPP | [97] Exif file containing a TIFF image, with no compression and with YCbCr color space.
FILE_EXIF_JPEG_422 | 24 BPP | 24 BPP | [98] Exif file containing a JPEG compressed image and YUV 4:2:2 color space.
FILE_EXIF_JPEG_411 | 24 BPP | 24 BPP | [101] Exif file containing a JPEG compressed image and YUV 4:1:1 color space.

Required DLL: LFTIF, LFCMP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: JPG - JPEG Compressed, TIFF - Tagged Image File Format.


File Formats: FITS Format (FIT)

FITS Format (FIT)

FITS, the Flexible Image Transport System, is the standard astron data format endorsed by NASA and the IAU. It is a raster format designed to store scientific data sets, which consist of multi-dimensional arrays and 2-dimensional tables. The FITS format was developed by NASA and is supported by XnView and fv Desktop Manager. This file format is available in the Medical toolkits. It can be unlocked using L_SUPPORT_EXTGRAY. Support for the 16-bit grayscale is available in Medical toolkits and must be unlocked using L_SUPPORT_MEDICAL.

The default extensions used by this format are: FIT, FTS and FITS.

The file format supports multi-page files. LEADTOOLS can load the FITS multi-page files.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_FIT | 8 BPP (unsigned binary integer - gray) 16 BPP (twos complement signed integers - gray) 32 BPP (twos complement signed integers - color) | 8 BPP (unsigned binary integer - gray) 16 BPP (twos complement signed integers - gray) 32 BPP (twos complement signed integers - color) | [295] Flexible Image Transport System.

Required DLL: LFFIT. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: Flic Animation (FLC)

Flic Animation (FLC)

The Flic file is an animation file created by Auto-desk. This file supports image data but not audio data.

The frames of this file can be of 8bpp image data. The maximum number of frames is 4000.

This file has two versions. The FLI file types support 320 X 200 images with a maximum of 64 colors per image. The FLC file types support up to 64k X 64k images with 256 colors per image.

LEAD supports loading and saving multi-page files in this format.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_FLC | 8 BPP | 8 BPP | [134] Flic Animation 256 color.
FILE_FLI | 8 BPP | none | [61] Flic Animation 64 color.

Required DLL: LFFLC. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: GIF - Compuserve GIF Format.


File Formats: Gerber Format (GBR)

Gerber Format (GBR)

The Gerber file format is a vector – based format used by GerbTools, ViewMate and CamTastic as a simple way of transferring printed circuit board information to a wide variety of devices. The Extended Gerber Format (RS-274X) handles information for defining shapes and sizes of lines and other features. This format supports Polygons, Circles, Ovals, Outlines, Arcs, Lines, Rectangles, Moire and Thermal.

This file format is not supported in the non-vector toolkits. Read and write support for this format is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection.

The default extension used by this format is: GBR.

This file format does support layers.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_GERBER | Yes | Yes | [169] Gerber Vector.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Chord | Supported | Supported
Circle | Supported | Supported
Lines | Supported | Supported
Polygons | Supported | Supported
Rectangle | Supported | Not Supported

Required DLL: LFGBR. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: Compuserve GIF

Compuserve GIF

GIF. This is the Graphics Interchange Format created by CompuServe for storing and exchanging color raster images.

Animated GIF. This is a multipage GIF format that can be played as an animation by displaying the images sequentially. LEADTOOLS lets you create and play the animations.

These files are LZW compressed.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_GIF | 1, 2, 3, 4, 5, 6, 7, 8 BPP | 1, 2, 3, 4, 5, 6, 7, 8 BPP | [2] CompuServe GIF.

Required DLL: LFGIF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: FLC - Flic Animation Format, PNG - Portable Network Graphics Format.


File Formats: Icons and Cursors

Icons and Cursors (ICO and CUR)

LEADTOOLS reads and writes Windows Icon and Cursor files. LEADTOOLS is not designed as an icon editor, but this file support lets you create a bitmap from an icon or cursor, or create an icon or cursor from a bitmap. The library (DLL) to support these formats is the same as for BMP files.

Windows Icon (ICO). This is a multi-page file format for storing one or more Windows icons. The background color when you read these images is always black. The size when you write these images can be no larger than 255-by-255 pixels. (Neither the width nor height can be greater than 255.) You can read and write single-page or multi-page files.

Windows Cursor (CUR). This is a file format for storing Windows cursors (mouse pointers). LEADTOOLS loads or saves transparency information using the region. The size when you write these images should be exactly 32-by-32 pixels. LEAD supports loading and saving multi-page files in this format.

The file constants associated with these file formats are:

Constant | Read Support | Write Support | Description
FILE_WIN_ICO | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [91] Windows Icon.
FILE_WIN_CUR | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [92] Windows Cursor.
FILE_ANI | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [119] Windows Animated Cursor.

Required DLL: LFBMP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: ANI - Windows Animated Cursor, CLP - Microsoft Windows Clipboard Format.


File Formats: Interchange File Format (IFF)

Interchange File Format (IFF)

IFF (Amiga Interchange) is a general-purpose data storage format (raster), developed by Electronic Arts, Inc. and Commodore-Amiga, Inc. that can associate and store multiple types of data. It is used by ACD FotoCanvas Lite 2.0 and XnView applications.

IFF reads and writes RLE, and non-compressed images. IFF CAT supports multipage files.

The default extension for this format is: IFF.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_IFF_ILBM | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | [111] Interchange File - RLE Compressed.
FILE_IFF_CAT | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | [112] Interchange File - multiple images per file-RLE Compressed.
FILE_IFF_ILBM_UNCOMPRESSED | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | [303] Interchange File - Uncompressed.
FILE_IFF_CAT_UNCOMPRESSED | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 24 BPP | [304] Interchange File - multiple images per file-Uncompressed.

Required DLL: LFIFF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).


File Formats: Image Object Content Architecture (IOCA/MODCA)

Image Object Content Architecture Format (IOCA/MODCA)

The Image Object Content Architecture format was developed by IBM. This architecture provides a consistent way to represent images, including conventions and directions for processing and interchanging image information. LEADTOOLS supports single and multi-page files in a MO:DCA wrapper with embedded 1-bit CCITT, Group 3 or Group 4 images, IBM MMR and uncompressed IOCA. LEAD also supports IOCA files without the MO:DCA wrapper. LEAD loads and saves all these formats.

The default extension used by this format is: ICA.

This file format does not support stamps or Lossless JPEG compression, but it does support multi-page files. For this file format, LEAD supports CCITT, G3(1D, 2D), CCIT G4, and IBM MMR compression. LEAD does not support ABIC, RL4, and Color Compression used by OS/2.

LEAD supports loading and saving multi-page files in this format.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_ICA_G3_1D | 1 BPP | 1 BPP | [71] IOCA, compressed using CCITT group 3, 1 dimension.
FILE_ICA_G3_2D | 1 BPP | 1 BPP | [72] IOCA, compressed using CCITT group 3, 2 dimensions.
FILE_ICA_G4 | 1 BPP | 1 BPP | [73] IOCA, compressed using CCITT group 4.
FILE_ICA_IBM_MMR | 1 BPP | 1 BPP | [117] IOCA, compressed using IBM MMR, with the MO:DCA wrapper.
FILE_ICA_UNCOMPRESSED | 1 BPP | 1 BPP | [253] IOCA, uncompressed, with the MO:DCA wrapper.
FILE_RAWICA_G3_1D | 1 BPP | 1 BPP | [77] IOCA, compressed using CCITT group 3, 1 dimension, without the MO:DCA wrapper.
FILE_RAWICA_G3_2D | 1 BPP | 1 BPP | [78] IOCA, compressed using CCITT group 3, 2 dimensions, without the MO:DCA wrapper.
FILE_RAWICA_G4 | 1 BPP | 1 BPP | [79] IOCA, compressed using CCITT group 4, without the MO:DCA wrapper.
FILE_RAWICA_IBM_MMR | 1 BPP | 1 BPP | [118] IOCA, compressed using IBM MMR, without the MO:DCA wrapper.
FILE_RAWICA_UNCOMPRESSED | 1 BPP | 1 BPP | [254] IOCA, uncompressed, without the MO:DCA wrapper.

Required DLL: LFICA. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: AFP - AFP Format, PTK - PTOCA Format, CAL - CALS Raster Format, FAX - Raw Fax Format, TIFF - Tagged Image File Format / CCITT.


File Formats: IntergraphRLE (ITG)

IntergraphRLE (ITG)

Intergraph is a monochrome bitmap format developed by Intergraph. LEADTOOLS supports the RLE and CIT versions of this file format.

The default extensions used by this format are: ITG and CIT.

This file format does not support stamps or Lossless JPEG compression. For this file format, LEAD supports CCITT G4 and RLE compression.

Currently LEAD writes the ITG and CIT format.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_INTERGRAPH_RLE | 1 BPP | 1 BPP | [122] ITG, Intergraph RLE compressed file.
FILE_INTERGRAPH_CCITT_G4 | 1 BPP | 1 BPP | [301] ITG, Intergraph CCITT G4 compressed file.

Required DLL: LFITG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: JBIG Format (JBG)

JBIG Format (JBG)

JBIG (JBG) is an industry standard lossless compressed file format for bi-tonal (black and white), grayscale and color images. LEAD’s JBIG support is comprehensive and handles the various flavors and bits per pixel as defined by the specification including progressive, where you can store and send multiple representations of images at different resolutions without any extra storage overhead. In order to achieve highest compression ratios available by the JBIG format, LEAD also takes full advantage of all the functional blocks of this robust standard including the Adaptive Arithmetic Encoder, the Adaptive Template Block, the Typical Prediction Block, the Resolution Reduction Block, and the Deterministic Prediction Block. Saving images in a JBIG format results in smaller image files sizes when compared to other industry standard compressed formats such as CCITT G3 or G4.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_JBIG | 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32 BPP | [115] JBIG.
FILE_TIF_JBIG | 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32 BPP | [139] TIFF with JBIG compression.

Required DLL: LFJBG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: JBIG2 Format (JB2)

JBIG2 Format (JB2)

LEADTOOLS reads and writes JBIG2 files.

The JBIG2 file format is a raster file format created by ISO/IEC 14492. This format is supported by Image Power. This format is an industry standard lossless, lossy and lossy to lossless compressed file format for bi-tonal (black and white) images. LEAD’s JBIG2 support handles the various flavor of generic region encoding/decoding procedure based on sequential coding of the image pixels using arithmetic coding (lossless). The generic region encoding/decoding procedure encodes/decodes a bitmap, treating it simply as an array of binary pixels. In order to achieve highest compression ratios available by the generic region encoding procedure of JBIG2 format, LEAD also takes full advantage of all the functional blocks of this robust standard including the Adaptive Arithmetic Encoder, the Adaptive Template Pixels, and the Typical Prediction Block. Saving images in a JBIG2 format results in smaller image files sizes when compared to other industry standard compressed formats such as JBIG, CCITT G3 or G4. JBIG2 can compress bi-tonal images 2 - 5 times more than the same image compressed with the CCITT G4 compression.

The default extension used by this format is: JB2.

This file format does not support progressive loads and saves, stamps, or Lossless JPEG compression.

Support for this file format can be unlocked using the following support constant: L_KEY_JBIG2.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_JBIG2 | 1 BPP | 1 BPP | [183] JBIG2.

Required DLL: LFJB2. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: JBG - JBIG Format.


File Formats: JPEG and LEAD Compressed (JPG, J2K, JP2, CMP, and CMW)

JPEG and LEAD Compressed (JPG, J2K, JP2, CMP, and CMW)

LEADTOOLS reads and writes the following LEAD and JPEG compressed formats:

LEAD. This is the LEAD CMP compressed format for grayscale and color images. This format results in smaller files and better image quality than industry-standard formats. In addition, LEAD also supports CMW files, which use Wavelet CMP compression in 8, 12, and 16-bit grayscale and 24-bit color.

Progressive LEAD. This is a LEAD format that is useful for transmitting images, because the first part of the file contains the full dimensions of the image. Therefore, in a paint-while-load routine, you can display the whole image, then progressively clarify it as the rest of the file loads. In this format you can read and write 8 or 24 bits per pixel, where 8 is for grayscale and 24 is for color.

Lossy JFIF. This is the JPEG File Interchange Format. LEADTOOLS supports YUV 4:4:4, 4:2:2, and 4:1:1 color spacing, and YUV 4:0:0 for grayscale.

Lossless JFIF. This is the JPEG File Interchange Format. LEADTOOLS supports 8, 12, and 16-bit grayscale and 24-bit color spacing. Please note that not all applications support Lossless JPEG. Before saving a file using Lossless JPEG, make sure your reader supports it.

Both JPEG 4:4:4 and Lossless JPEG will be recognized when getting file information.

12 and 16-bit grayscale images are only supported in the Document/Medical toolkits.

Progressive JPEG. This is a JFIF format that is useful for transmitting images, because the first part of the file contains the full dimensions of the image. Therefore, in a paint-while-load routine, you can display the whole image, then progressively clarify it as the rest of the file loads. LEADTOOLS supports YUV 4:4:4, 4:2:2, and 4:1:1 color spacing, and YUV 4:0:0 for grayscale.

Lossy JTIF. This is the JPEG Tagged Interchange Format. LEADTOOLS supports YUV 4:4:4, 4:2:2, and 4:1:1 color spacing, and YUV 4:0:0 for grayscale.

Lossless JTIF. This is the JPEG Tagged Interchange Format. LEADTOOLS supports 8, 12, and 16-bit grayscale and 24-bit color spacing. Please note that not all applications support Lossless JPEG. Before saving a file using Lossless JPEG, make sure your reader supports it.

Both TIFF JPEG 4:4:4 and Lossless JPEG will be recognized when getting file information.

12 and 16-bit grayscale images are only supported in the Document/Medical toolkits.

J2K – Lossy or Lossless. This is a JPEG 2000 Format. LEADTOOLS can read 8, 12, and 16-bit grayscale and 24 and 48--bit color images. LEADTOOLS can save 8 - 16-bit grayscale and 24, 27, 30, 33, 36, 39, 42, 45 and 48--bit color images. The J2K format contains only a stream of image data. Support for this format is only available in the LEADTOOLS JPEG 2000 Plug in. (12 and 16-bit grayscale support is only in Document/Medical toolkits)

JP2 – Lossy or Lossless. This is a JPEG 2000 Format. LEADTOOLS can read 8, 12, and 16-bit grayscale and 24 and 48--bit color images. LEADTOOLS can save 8 - 16-bit grayscale and 24, 27, 30, 33, 36, 39, 42, 45 and 48--bit color images. The JP2 format contains a stream of image data, plus extra data about the organization and contents of the file. Support for this format is only available in the LEADTOOLS JPEG 2000 Plug in.

TIF J2K – Lossy or Lossless. This is a Tagged Image File with JPEG 2000 Compression. This file format contains only a stream of image data. LEADTOOLS supports 8, 12, and 16-bit grayscale and 24-bit color spacing. Support for this format is only available in the LEADTOOLS JPEG 2000 Plug in. (12 and 16-bit grayscale support is only in Document/Medical toolkits)

For general information, refer to Compression Using LEAD and JPEG Formats. JPEG and LEAD files can contain many comment fields of various types. You can use the ReadComment method to read comments in an existing file. Before writing a file, you can use the Comment property to create an array of comments to be saved in the file.

Please note that the LTCLR DLL is required for loading JPEG CMYK images and for loading and saving JPEG LAB images.

For more information about the LEADTOOLS JPEG 2000 Plug in, refer to Implementing JPEG 2000 Plug in Features.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CMP | 8 BPP (Grayscale) 24 BPP | 8 BPP (Grayscale) 24 BPP | [5] LEAD CMP compressed format.
FILE_JPEG | 8, 12, 16 BPP (Grayscale) 24 BPP | 8, 12, 16 BPP (Grayscale) 24 BPP | [10] JPEG File Interchange Format.
FILE_JPEG_411 | 8 BPP (Grayscale) 24 BPP | 8 BPP (Grayscale) 24 BPP | [21] JPEG File Interchange Format, 4:1:1.
FILE_JPEG_422 | 8 BPP (Grayscale) 24 BPP | 8 BPP (Grayscale) 24 BPP | [21] JPEG File Interchange Format, 4:2:2.
FILE_JPEG_LAB | 24 BPP | 24 BPP | [171] JPEG File Interchange Format, CieLAB 4:4:4.
FILE_JPEG_LAB_411 | 24 BPP | 24 BPP | [172] JPEG File Interchange Format, CieLAB 4:1:1.
FILE_JPEG_LAB_422 | 24 BPP | 24 BPP | [173] JPEG File Interchange Format, CieLAB 4:2:2.
FILE_JPEG_RGB | 24 BPP | 24 BPP | [182] JPEG File Interchange Format, RGB 4:4:4.
FILE_JP2 | 8, 16 BPP (Grayscale) 24, 27, 30, 33, 36, 39, 42, 45, 48 BPP | 8, 16 BPP (Grayscale) 24, 27, 30, 33, 36, 39, 42, 45, 48 BPP | [163] JPEG 2000 File.
FILE_J2K | 8, 16 BPP (Grayscale) 24, 27, 30, 33, 36, 39, 42, 45, 48 BPP | 8, 16 BPP (Grayscale) 24, 27, 30, 33, 36, 39, 42, 45, 48 BPP | [164] JPEG 2000 Stream.
FILE_CMW | 8, 12, 16 BPP (Grayscale) 24 BPP | 8, 12, 16 BPP (Grayscale) 24 BPP | [165] LEAD Wavelet CMP compressed format.

Required DLL: For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: EXIF - Exif Formats, FPX - Kodak Format, TIFF - Tagged Image File Format.


File Formats: Kodak Formats (PCD and FPX)

Kodak Formats (PCD and FPX)

LEADTOOLS supports the following Kodak formats:

PhotoCD (PCD). This is a common high-resolution format for images on CD-ROM. An image file can contain one or more physical resolutions, with fixed dimensions. You can choose which resolution to load, and thus control the size of the resulting bitmap.

You cannot write PhotoCD files. They are read-only.

FlashPix (FPX). The FlashPix file format was developed through the combined efforts of Eastman Kodak Company, Microsoft Corporation, Hewlett-Packard Company, and Live Picture Inc. It combines the best features of existing formats with object orientation to make the use of digital color images easier.

The format of a FlashPix file is based on compound object storage, which allows storage of various kinds of data. A FlashPix file may consist of several "pages" where each "page" has storage for a source image, non-image data in the form of comments, transform data, and a stamp or thumbnail. Each image is stored as an entire multi-resolution hierarchy where each resolution in the hierarchy differs from the next highest resolution by a factor of 2 in the x dimension and in the y dimension. Non-image data are treated as comments in FlashPix file format. Comments are used to store information pertaining to the image, not actual pixel data. This information may include image title, image subject, camera manufacturer, scan software version number, and so forth. In addition to the image itself, FlashPix files store transform information. This data indicates transformations which may be performed on the source image. By storing the transforms, the source image may be stored in its original state and transformed, using the stored transforms, at your discretion. A stamp, or thumbnail, provides a small bitmap representation of a FlashPix image.

File constants associated with these file formats are:

Constant | Read Support | Write Support | Description
FILE_PCD | 8, 24 BPP | None | [57] Kodak PhotoCD.
FILE_FPX | 8, 24 BPP | 8, 24 BPP | [80] FlashPix, with no compression.
FILE_FPX_SINGLE_COLOR | 8, 24 BPP | 8, 24 BPP | [81] FlashPix, compressed with the single color method.
FILE_FPX_JPEG | 8, 24 BPP | 8, 24 BPP | [82] FlashPix, compressed with JPEG, using the default Q factor.
FILE_FPX_JPEG_QFACTOR | 8, 24 BPP | 8, 24 BPP | [83] FlashPix, compressed with JPEG, using a specified Q factor.

Required DLL: LFPCD for PCD, LFFPX for FPX. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).

Related Formats: CRW - Canon RAW Format, DCR - Kodak Professional Digital Camera Format, DCS - Kodak Professional Digital Camera System Format, EXIF - Exif Formats, KDC - Kodak Digital Camera Format.


File Formats: Kodak Digital Camera Format (KDC)

Kodak Digital Camera Format (KDC)

The Kodak Digital Camera format files are raster files created by Kodak digital cameras. This format was developed by Kodak and is supported by PaintShop Pro and ACDSee. LEADTOOLS can read and view, using the Kodak SDK, the full image of KDC files of type 40, 50 and 120, which are generated by the Kodak DC40, DC50 and DC120 digital cameras. LEADTOOLS can load all versions of the KDC 40, KDC 50 and KDC 120 files. LEADTOOLS does not save KDC files.

The default extension used by this format is: KDC.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_KDC_120 | 24 BPP | None | [263] KDC DC120.
FILE_KDC_40 | 24 BPP | None | [264] KDC DC40.
FILE_KDC_50 | 24 BPP | None | [265] KDC DC50.

Required DLLs: LFKDC. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).

Related Formats: CRW - Canon RAW Format, DCR - Kodak Professional Digital Camera Format, DCS - Kodak Professional Digital Camera System Format, EXIF - Exif Formats, FPX - Kodak Format, PCD - Kodak Format.


File Formats: Kodak Professional Digital Camera Format (DCR)

Kodak Professional Digital Camera Format (DCR)

The Kodak Professional Digital Camera format files are raster files created by Kodak digital cameras. This format was developed by Kodak. LEADTOOLS can read and view, using the Kodak SDK, the full image of DCR files generated by the Kodak DCS 720x, DCS760, DCS 760M, DCS Pro back, DCS Pro Back Plus and DCS Pro Back 645 (M, C, and H models) digital cameras. LEADTOOLS supports the Pro SLR SDK V 2.0.0.8 and ProBack SDK V 2.0.0.8. LEADTOOLS does not save DCR files.

The default extension used by this format is: DCR.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DCR | 48 BPP | None | [292] Kodak Professional Digital Camera Format

Required DLLs: LFDCR. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CRW - Canon RAW Format, DCS - Kodak Professional Digital Camera System Format, EXIF - Exif Formats, FPX - Kodak Format, KDC - Kodak Digital Camera Format, PCD - Kodak Format.


File Formats: Kodak Professional Digital Camera System Format (DCS)

Kodak Professional Digital Camera System Format (DCS)

The Kodak Professional Digital Camera format files are raster files created by Kodak digital cameras. This format was developed by Kodak. LEADTOOLS can read and view, using the Kodak SDK, the full image of DCR files generated by the following digital cameras:

SCSI:

  • NC2000 EOS DC53

  • DCS 410 DCS 420

  • EOS DCS5 DCS 460

  • DCS 465 EOS DCS1

IEEE 1394:

  • DCS 520 EOS D2000

  • DCS 315 DCS 330

  • DCS 560 EOS D6000

  • DCS 620 DCS 620x

  • DCS 660 DCS 660M

LEADTOOLS supports the SDK V 1.8.2. LEADTOOLS does not save DCS files.

The default extension used by this format is: DCS, TIF, TIFF.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_DCS | 16 (Grayscale), 24 BPP | None | [266] Kodak Professional Digital Camera System Format

Required DLLs: LFDCS. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CRW - Canon RAW Format, DCR - Kodak Professional Digital Camera Format, EXIF - Exif Formats, FPX - Kodak Format, KDC - Kodak Digital Camera Format, PCD - Kodak Format.


File Formats: LEAD 1-Bit Format (CMP)

LEAD 1-Bit Format (CMP)

LEAD 1BIT is a proprietary 1-bit LEAD compressed format that has better compression and performance than CCITT G4, but not as good as the newer LEAD LMC. Type B provides better compression ratios than Type A.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_LEAD1BITA | 1 BPP | 1 BPP | [31] LEAD Proprietary 1-bit Compression Format, type A.
FILE_LEAD1BIT | 1 BPP | 1 BPP | [26] LEAD Proprietary 1-bit Compression Format, type B.

Required DLL: LFLMA, LFLMB. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: FAX - Raw Fax Format, LMC - LEAD 1-Bit Format, TIFF - Tagged Image File Format / CCITT.


File Formats: LEADTOOLS Mixed Raster Content (LEAD MRC)

LEADTOOLS Mixed Raster Content (MRC)

The Mixed Raster Content format was defined for use of color and grayscale fax. LEADTOOLS offers the LEADTOOLS MRC (Mixed Raster Content) format. The LEADTOOLS Mixed Raster Content enables most different coding methods and a lot of resolutions (such as one bit, two bit, grayscale, and pictures) to be used within a single page by defining a 3-layer image model for structuring and combining the scanned image data.

The image is segmented and each segment assigned a type based on the number of colors used in that segment. Segments can be combined and compressed using different compression schemes to create a file that balances quality with compression.

The default extension used by this format is: MRC.

LEADTOOLS supports Load and save for this format.

Keys that must be unlocked to enable this format support:

L_SUPPORT_DOCUMENT

Multi-page is supported through TIFF format.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_LEAD_MRC | 24 BPP | N/A (see note below) | [314] LEAD Mixed Raster Content.

NOTE: MRC is made up of different segments, which can be of various BitsPerPixel. When you request file information on an MRC file, it will be reported as 24-bit. When you save MRC files, various segments will be saved with different BitsPerPixel, based on the content.

Required DLL: LTSGM. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: MRC Format, TIFF - Tagged Image File Format.


File Formats: LEADTOOLS Vector Dump Format (VEC)

LEADTOOLS Vector Dump Format (VEC)

This is an internal vector format, used by the LEADTOOLS® Vector toolkit. The main advantage of using this format is the speed of writing and the capability of maintaining all the details of the vector data. It can be used to save the status of the vector toolkit, which can provide undo and redo capabilities.

Two versions of this format exist, version 12 and version 13. LEADTOOLS will maintain compatibility between different versions.

This format supports layers, grouping of objects and embedded raster objects.

The default extension used by this format is: VEC.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_VECTOR_DUMP | Yes | Yes | [144] LEADTOOLS Vector Dump format.

When VEC files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Chord | Supported | Supported
Circle | Supported | Supported
Clone | Supported | Supported
Ellipse | Supported | Supported
Elliptical Arc | Supported | Supported
HPolyBezier | Supported | Supported
Lines | Supported | Supported
Pie | Supported | Supported
PolyDraw | Supported | Supported
Polygons | Supported | Supported
Polyline | Supported | Supported
Raster | Supported | Supported
Rectangle | Supported | Supported
Spline | Supported | Supported
Text | Supported | Supported
Vertex | Supported | Supported

Required DLL: LFVEC. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format also requires LVKRN14N.DLL.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: Macintosh Pict (PCT)

Macintosh Pict Format (PCT)

Macintosh Pict (PCT) files are produced using Macintosh QuickDraw, and are used in desktop publishing and imaging applications.

PCT Vector files can be read and written as raster images in the non-vector toolkits. LEADTOOLS supports multiple page files when reading and writing PCT images as raster images. Vector read/write support for these formats is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

File constants associated with this file format are:

Constant | Raster Read Support | Raster Write Support | Vector Read Support | Vector Write Support | Description
FILE_PCT | 1, 4, 8, 16, 24 BPP | 1, 4, 8, 16, 24 BPP | Yes | Yes | [56] Macintosh QuickDraw

When PCT files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Background | Supported | Supported
Ellipse | Supported | Not Supported
Foreground | Supported | Supported
Lines | Supported | Supported
Point | Supported | Supported
Polygons | Supported | Not Supported
Rectangle | Supported | Not Supported
Text | Supported | Supported

Required DLL: LFPCT. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: Microsoft Windows Clipboard (CLP)

Microsoft Windows Clipboard (CLP)

CLP stands for Microsoft Windows Clipboard. This file format is used to store the contents of the clipboard to disk. The clipboard is an area of memory shared by the Windows operating system, and it is a simple mechanism for exchanging data between applications.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CLP | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [114] Microsoft Windows Clipboard Uncompressed.
FILE_CLP_RLE | 4, 8 BPP | 8 BPP | [291] Microsoft Windows Clipboard RLE Compressed.

Required DLL: LFCLP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: ANI - Windows Animated Cursor, CUR - Windows Cursors, ICO - Windows Icons.


File Formats: Miscellaneous 1-Bit Formats (MAC, IMG, and MSP)

Miscellaneous 1-Bit Formats (MAC, IMG, and MSP)

LEADTOOLS supports reading and writing of the following 1-bit formats:

MacPaint (MAC). These Macintosh Paint files are commonly used for monochrome clip art.

File constant associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_MAC | 1 BPP | 1 BPP | [51] MacPaint - Macintosh Paint.

Required DLL: LFMAC. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

GEM Image (IMG). These files are native to the Graphical Environment Manager developed by Digital Research.

File constant associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_IMG | 1 BPP | 1 BPP | [52] GEM Image.

Required DLL: LFIMG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Microsoft Paint (MSP). These files from early versions of Windows are used for black-and-white drawings and clip art.

File constant associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_MSP | 1 BPP | 1 BPP | [53] Microsoft Paint.

Required DLL: LFMSP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: Mixed Raster Content Format (MRC)

Mixed Raster Content Format (MRC)

The Mixed Raster Content format was defined for use of color and grayscale fax as part of the RFC-2301, File Format for Internet Fax. The Mixed Raster Content mode (T.44) enables different coding methods and resolutions to be used within a single page by defining a 3-layer image model for structuring and combining the scanned image data. The image is segmented and each segment assigned a type based on the number of colors used in that segment. Segments can be combined and compressed using different compression schemes to create a file that balances quality with compression.

The default extension used by this format is: MRC.

LEADTOOLS supports Load and save for this format.

Keys that must be unlocked to enable this format support:

L_SUPPORT_DOCUMENT

Multi-page is supported through TIFF format.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_MRC | 24 BPP | N/A (see note below) | [168] Mixed Raster Content.

NOTE: MRC is made up of different segments, which can be of various BitsPerPixel. When you request file information on an MRC file, it will be reported as 24-bit. When you save MRC files, various segments will be saved with different BitsPerPixel, based on the content.

Required DLL: LTSGM. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: LEAD MRC Format, TIFF - Tagged Image File Format.


File Formats: MPEG Video Format (MPG)

MPEG Video Format (MPG)

MPEG Video Format (MPG) is a file format used for multimedia files. These files store both audio and video data.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_MPEG1 | 24 BPP | None | [243] MPEG-1 (video) file.
FILE_MPEG2 | 24 BPP | None | [246] MPEG-2 (video) file.

Required DLL: LFMPG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: AVI - Windows AVI Format.


File Formats: MrSid Format (SID)

MrSid Format (SID)

The MrSid file format is a raster format developed by LizardTech and supported by the MrSid Viewer from LizardTech. LEADTOOLS can read and view the full image using the MrSID SDK V 3.1.4. Various levels of the MrSid file can be loaded using the GetLoadResolution, ReadLoadResolutions and SetLoadResolution methods.

The default extension used by this format is: SID.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_SID | 24 BPP | 24 BPP | [306] MrSid Format.

Required DLL: LFSID. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: Paint Shop Pro Formats (PSP)

Paint Shop Pro Format (PSP)

PSP is a raster format created by JASC Software. It supports uncompressed, RLE compressed, LZ77 compressed, and JPEG compressed files (including Lossless JPEG). LEADTOOLS supports all these compression types. LEADTOOLS supports versions 5, 6 and 7 of this format. Version 7 supports the Vector Shapes layer, which LEADTOOLS views as raster.

For PSP files, you can read the following bits per pixel: 1 (gray), 4 (gray), 8 (gray or color), 24 (color). For all compression type (uncompressed, RLE compressed, LZ77 compressed, and JPEG compressed files (including Lossless JPEG).

For PSP files, you can write the following bits per pixel: 1 (gray), 4 (gray), 8 (gray or color), 24 (color). With this compression type only (uncompressed, RLE compressed, and JPEG compressed files (including Lossless JPEG).

The default extension used by this format is: PSP.

This file format does support layers. With LEADTOOLS, layers may be loaded individually using the LoadLayer method, or all at once, using the Load method.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PSP | 1, 4, 8 BPP (Grayscale) 8, 24 BPP (Color) | 1, 4, 8 BPP (Grayscale) 8, 24 BPP (Color) | [267] PaintShop Pro Format.
FILE_PSP_RLE | 1, 4, 8 BPP (Grayscale) 8, 24 BPP (Color) | 1, 4, 8 BPP (Grayscale) 8, 24 BPP (Color) | [268] PaintShop Pro Format - RLE Compressed.

Required DLL: LFPSP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: PCX Formats (PCX and DCX)

PCX Formats (PCX and DCX)

LEADTOOLS reads and writes the following PCX formats:

PCX. This is a file format created by ZSoft. This format compresses its image data with the RLE type compression.

DCX. This is a multipage PCX format that enables a file to contain more than one image. It is handled the same as a regular PCX file, except for the multipage feature.

For PCX and DCX files, you can read and write the following bits per pixel: 1, 4, 8, 24.

LEAD supports loading and saving multi-page files in this format.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PCX | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [1] ZSoft PCX.

Required DLL: LFPCX. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: PhotoShop 3.0 Format (PSD)

PhotoShop 3.0 Format (PSD)

Photoshop 3.0 (PSD) is the format produced by the Adobe Photoshop graphics editor.

LEAD supports RLE Compression for this file format.

For PSD files, you can read the following modes with the following bits per pixel:

Mode | Bits Per Channel | LEAD Bits Per Pixel
Bitmap | 0 | 1
Grayscale | 8 | 8
Grayscale | 16 | 16
CMYK | 8 | 24
CMYK | 16 | 24
Indexed Color | 8 | 8
RGB with 3 & 4 Channels | 8 | 24/32
RGB | 16 | 64
Duotone | 8 | 8 Grayscale
LAB | 8 | 24
LAB | 16 | 24

You can also read and write layers to this file with the following bits per pixel: 8 (GrayScale), 24, and 32.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PSD | 1, 8, 16, 24 BPP | 1, 8, 24 BPP | [76] Adobe Photoshop 3.0.

Required DLL: LFPSD. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: PLT (PLT)

PLT (PLT)

PLT (also HPGL) is the standard language for printing line drawings created by Hewlett-Packard. HPGL is supported by many CAD programs, charting programs and word processors.

LEADTOOLS supports HPGL and HPGL/2.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PLT | Yes | Yes | [137] PLT.

When PLT files are rasterized, they are 4 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Circle | Supported | Supported
Lines | Supported | Supported
Pie | Supported | Supported
PolyDraw | Supported | Not Supported
Polygons | Supported | Not Supported
Polyline | Supported | Not Supported
Rectangle | Supported | Supported
Text | Supported | Not Supported

Required DLL: LFPCL. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format.


File Formats: Portable Bitmap Utilities (PBM)

Portable Bitmap Utilities (PBM)

The Portable Bitmap Utilities consists of Portable Greymap Utilities (PGM), Portable Pixmap Utilities (PPM), and Portable Anymap Utilities (PNM). Their source is the UNIX environment.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PBM_BINARY | 1 BPP | 1 BPP | [103] Portable Bitmap - Binary File.
FILE_PBM_ASCII | 1 BPP | 1 BPP | [102] Portable Bitmap - ASCII File.
FILE_PGM_BINARY | 8 BPP (Grayscale) | 8 BPP (Grayscale) | [105] Portable Greymap - Binary File.
FILE_PGM_ASCII | 8 BPP (Grayscale) | 8 BPP (Grayscale) | [104] Portable Greymap - ASCII File.
FILE_PPM_BINARY | 24 BPP | 24 BPP | [107] Portable Pixelmap - Binary File.
FILE_PPM_ASCII | 24 BPP | 24 BPP | [106] Portable Pixelmap - ASCII File.

Required DLL: LFPNM. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application .

Related Formats: BMP - Windows Bitmap Formats.


File Formats: Portable Document Format (PDF)

Portable Document Format (PDF)

Portable Document Format (PDF). PDF was developed by the Adobe Corporation to allow the exchange and viewing of electronic documents easily and reliably, independent of the environment in which they were created. This format lets you compress large documents to a size small enough to download very quickly. It is also becoming a powerful format for reproducing documents over the web.

LEAD supports versions 1.2, 1.3 and 1.4 of this format. LEAD also supports loading and saving multi-page files in this format.

The PDF Filter loads AI (Adobe Illustrator) files from version 7 to version 10, which only have PDF data.

This filter can also save large images by setting the ESO_PDF_SAVE_LOW_MEMORY_USAGE flag. It can also load files that are stored in memory (memory files). It can both load and save PDF files that are JPEG, LZW, CCITT G1 1D, CCITT G3 2D, or CCITT G4 compressed, or are uncompressed. In addition, this filter supports JBIG2 compressed PDF files. (Note that not all flavors of JBIG2 decompression are supported.)

This filter can load files that are stored in memory (memory files).

Support for this format is available in the Barcode PDF modules and the PDF Plug in. For more information on the available products, refer to Topic Selection. Support for this file format can be unlocked using one of the following support constants: L_KEY_PDF, L_KEY_PDF_SAVE, L_KEY_OCR_PDF_OUTPUT, L_KEY_BARCODES_PDF_READ, or L_KEY_BARCODES_PDF_WRITE.

For saving JBIG2 compressed PDF files, the user should unlock this capability using L_KEY_JBIG2.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_RAS_PDF | Yes* | 1, 2, 4, 8, 24 BPP | [146] Raster PDF uncompressed.
FILE_RAS_PDF_JBIG2 | N/A* | 1 BPP | [188] Raster PDF with JBIG2 Compression.
FILE_RAS_PDF_G3_1D | N/A* | 1 BPP | [147] Raster PDF with G3 1D Compression.
FILE_RAS_PDF_G3_2D | N/A* | 1 BPP | [148] Raster PDF with G3 2D Compression.
FILE_RAS_PDF_G4 | N/A* | 1 BPP | [149] Raster PDF with G4 Compression.
FILE_RAS_PDF_LZW | N/A* | 1, 2, 4, 8, 24 BPP | [179] Raster PDF with LZW Compression.
FILE_RAS_PDF_JPEG | N/A* | 8 BPP (Grayscale) 24 BPP | [150] Raster PDF with JPEG 4:4:4 Compression.
FILE_RAS_PDF_JPEG_422 | N/A* | 24 BPP | [151] Raster PDF with JPEG 4:2:2 Compression.
FILE_RAS_PDF_JPEG_411 | N/A* | 24 BPP | [152] Raster PDF with JPEG 4:1:1 Compression.

Required DLL: LFPDF. The files required for reading PDF and writing PDF are different . For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

*NOTE: When you request file information on a PDF file, FILE_RAS_PDF will always be returned for the file format, regardless of the composition of the PDF file. LEADTOOLS can read PDF documents that are made up of both text and images. The text and images are rasterized into one raster image for each page of the document. LEADTOOLS can write PDF documents that are made up of raster images only.

Related Formats: PCL - Printer Command Language Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format.


File Formats: Portable Network Graphics Format (PNG)

Portable Network Graphics Format (PNG)

PNG (Portable Network Graphics) is a replacement for the GIF format. It is a full-featured (non-LZW) compressed format intended for widespread use without legal restraints.

LEADTOOLS supports reading (but not writing) interlaced PNG files. To implement the paint-while-load feature, set the ProgressivePasses property to paint the image in more than one pass.

You can read the following bits per pixel: 1, 4, 8, 16, 24, 32.

You can write the following bits per pixel: 1, 4, 8, 24, 32.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PNG | 1, 4, 8, 16, 24, 32 BPP | 1, 4, 8, 24, 32 BPP | [75] Portable Network Graphics (PNG).

Required DLL: LFPNG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: GIF - Compuserve GIF Format, JPG - JPEG Compressed.


File Formats: PostSript Document (PS)

PostScript Document Format (PS)

PostScript (PostScript). PostScript is a simple interpretive page description language, also known as PDL, that is used to describe the appearance of text, graphical shapes and sampled images on printed or displayed pages. The page description and graphical capabilities of this language include arbitrary shapes, painting operators, fully integrated text and graphics, and sampled images derived from natural sources. Most advanced laser printers use PostScript in order to render electronic information on a printed page.

This filter can load files that are stored in memory (memory files).

Support for this format is available in the Barcode PDF modules and the PDF Plug in. For more information on the available products, refer to Topic Selection. Support for this file format can be unlocked using one of the following support constants: L_KEY_PDF, L_KEY_PDF_SAVE, L_KEY_OCR_PDF_OUTPUT, L_KEY_BARCODES_PDF_READ, or L_KEY_BARCODES_PDF_WRITE.

For a PostScript image, you can read the following bits per pixel, using various DPI options: 1, 2, 4, 8, 24.

For a PS file, you can read the following bits per pixel, using various DPI options: 1, 2, 4, 8, 24.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_POSTSCRIPT | 1, 2, 4, 8, 24 BPP | None | [222] PostScript Document.

Required DLLs: LFPDF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Postscript files that are included in PJL files can also be loaded. This requires the PCL filter.

You can write only an 8-bit PostScript raster image, using the LEAD EPS filter.

Related Formats: PCL - Printer Command Language Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format.


File Formats: Printer Command Language (PCL)

Printer Command Language Format (PCL)

The Printer Command Language vector format was developed by Hewlett-Packard, specifically to provide a means of communication between computers and printers. The PCL files contain the commands and the HP printers parse and decode those commands. This format also includes HPGL. For more information about HPGL, refer to PLT.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

LEAD supports version 3.0 and 5.0 of this file format.

The default extensions used by this format are: PRN, PRT and PCL.

This format is used by Visual PCL, PCLTOOLS, redtitan EscapE and AutoVue.

This file format does not support layers or grouping, but it does support embedded raster objects.

PCL filter supports many features such as:

Support for Raster, text and rectangular area.

Support for Macros.

Enhanced performance of the filter.

Support for HPGL mode in PCL

Raster fonts

RTL Raster data

Support for all compression methods (RLE, TIFF, Delta, Adaptive and Unencoded).

Support for old versions of PCL v.3, besides v.5.

Viewing PJL with POSTSCRIPT data (requires the PDF filter)

Support for user-defined and pre-defined patterns

Support for Unicode symbols

Detecting non-standard PCL/HPGL files that lack a correct header

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PCL | Yes | Yes | [251] Printer Command Language – Hewlett Packard.
FILE_PLT | Yes | Yes | [137] HPGL – Hewlett-Packard.

When PCL files are rasterized, they are 24 BPP.
When PLT files are rasterized, they are 4 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Circle | Supported | Supported
Lines | Supported | Supported
Pie | Supported | Supported
Point | Supported | Supported
PolyBezier | Supported | Not Supported
PolyDraw | Supported | Not Supported
Polygons | Supported | Not Supported
Polyline | Supported | Not Supported
Raster | Supported | Supported
Rectangle | Supported | Supported
Text | Supported | Supported

Required DLL: LFPCL. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats , WMZ - Compressed Windows Metafile Format.


File Formats: PTOCA (PTOCA)

PTOCA Format (PTOCA)

The Presentation Text Object Content Architecture (PTOCA) is the data object used in document processing environments for representing text, which has been prepared for presentation. Each file contains one or more pages of text and is always included as part of a document in a MODCA file. Each page may reference a PTOCA Overlay, which is merged with the text as a background. PTOCA overlays can be merged to recreate the original document and many configurable settings including font properties.

There is no default extension.

This format originated at IBM.

This file format does not support QFactor, progressive loads and saves, stamps or Lossless JPEG compression, but it does support multi-page files.

LEADTOOLS supports callbacks to load specific overlay files from a specific path. LEADTOOLS also supports functions to let you set the DPI for the opened image file. Please refer to the PTK Options functions or callbacks.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_PTOCA | 24 BPP | None | [249] Presentation Text Object Content Architecture format.

Required DLL: LFPTK. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: ICA - Image Object Content Architecture (IOCA/MODCA).


File Formats: Rich Text Format (RTF)

Rich Text Format (RTF)

The Rich Text Format (RTF) specification is a method of encoding formatted text and graphics for easy transfer between applications. Currently, users depend on special translation software to move word-processing documents between different MS-DOS®, Windows, OS/2, Macintosh, and Power Macintosh applications. This raster format was developed by Microsoft and is used by WordPad.

RTF uses the ANSI, PC-8, Macintosh, or IBM PC character set to control the representation and formatting of a document, both on the screen and in print. With the RTF Specification, documents created under different operating systems and with different software applications can be transferred between those operating systems and applications. LEADTOOLS can load versions 1, 2, and 3.

For information on known problems with the RTF filter on Windows 98 machines, refer to Using the RTF Filter in Windows 98.

The default extension used by this format is: RTF.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_RTF_RASTER | 24 BPP | None | [305] Rich Text Format.

When RTF files are rasterized, they are 24 BPP.

Required DLL: LFRTF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: PCL - Printer Command Language Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format.


File Formats: Scalable Vector Graphics (SVG)

Scalable Vector Graphics Format (SVG)

The Scalable Vector Graphics file format is an Internet standard vector format for describing two-dimensional graphics in XML. SVG supports vector graphic shapes, images, and text. For more information about this format please refer to the World Wide Web Consortium (W3C) website http://www.w3c.org.

This file format is not supported in the non-vector toolkits. Read support and write support for this format are provided in the LEADTOOLS Vector toolkits and are unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

The default extension used by this format is: SVG.

This file format is supported by Adobe SVG Viewer, CorelDraw! 10.0, JASC WebDraw and Apache Batik SVG browser.

This file format does not support layers, but it will save embedded raster objects.

When saving SVG files, the images are stored externally and a reference to the image(s) is added to the file. Use FILE_SVG_EMBED_IMAGES to save raster images embedded inside the SVG file.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_SVG | Yes | Yes | [247] Scalable Vector Graphics Format.
FILE_SVG_EMBED_IMAGES | Yes | Yes | [289] Scalable Vector Graphics Format with embedded raster images.

When SVG files are rasterized, they are 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Rectangle | Supported | Supported
Circle | Supported | Supported
Ellipse | Supported | Supported
Lines | Supported | Supported
Polyline | Supported | Supported
Polygons | Supported | Supported
PolyDraw | Supported | Supported
Raster | Supported | Supported
Vertex | Not Supported | Supported
PolyBezier | Not Supported | Supported
Spline | Not Supported | Supported
HPolyBezier | Not Supported | Supported
Text | Supported | Supported
Filling,Stroking, and Marker | Supported | Supported
Gradients and Patterns | Not Supported | Not Supported
Color | Supported | Supported
Clipping, Masking, and Compositing | Not Supported | Not Supported
Filter Effects | Not Supported | Not Supported
Interactivity | Not Supported | Not Supported
Linking | Not Supported | Not Supported
Animation | Not Supported | Not Supported
Fonts | Supported | Supported

Required DLL: LFSVG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, VEC - LEADTOOLS Vector Dump Format,VPG - WordPerfect Vector Format, WMF - Windows Metafile Formats , WMZ - Compressed Windows Metafile Format.


File Formats: Scitex Continuous Tone Format (SCT)

Scitex Continuous Tone Format (SCT)

The Scitex Continuous Tone file format was developed by Scitex and is used for high-end image processing. The SCT/CT files are used primarily to store CMY and CMYK color space for the image. For saving the SCT file format, LEAD saves it as CMY instead of CMYK. This maintains the image quality, since the conversion from RGB to CMYK will result in some loss of data.

The default extensions used by this format are: SCT and CT.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_SCT | 24 BPP | 24 BPP | [250] Scitex Continuous Tone Format.

Required DLL: LFSCT. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: Silicon Graphics Image Format (SGI)

Silicon Graphics Image Format (SGI)

The SGI file format was developed at Silicon Graphics, and is used for black and white, gray-scale and color images. LEADTOOLS supports both uncompressed SGI and RLE compressed SGI.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_SGI | 8, 24, 32 BPP | 8, 24, 32 BPP | [142] Silicon Graphics Image - uncompressed
FILE_SGI_RLE | 8, 24, 32 BPP | 8, 24, 32 BPP | [143] Silicon Graphics Image - RLE compressed

Required DLL: LFSGI. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: SMP (SMP)

SMP Format (SMP)

The SMP file contains a 1-bit raster bitmap. It may be uncompressed, compressed using CCITT Group 3 or compressed using CCITT Group 4. LEADTOOLS supports loading and saving for all these types.

The default extension is .SMP.

This format was created by Xionics and is used in PixEdit for Techsoft.

This file format does not support QFactor, progressive loads and saves, multi-page files, stamps or Lossless JPEG compression.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_SMP | 1 BPP | 1 BPP | [256] Xionics format.
FILE_SMP_G3_1D | 1 BPP | 1 BPP | [257] Xionics format, compressed using CCITT Group 3 1D.
FILE_SMP_G3_2D | 1 BPP | 1 BPP | [258] Xionics format, compressed using CCITT Group 3 2D.
FILE_SMP_G4 | 1 BPP | 1 BPP | [259] Xionics format, compressed using CCITT Group 4.

Required DLL: LFSMP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: Structured Fax File Format (SFF)

Structured Fax File Format (SFF)

The Structured Fax File format is a raster file format that represents primarily Group 3 fax documents. It contains information concerning the page structure and the compressed line data of the fax document. This format is used by COMMON-ISDN-API (CAPI) and is supported by IrfanView and PMView 2000. LEADTOOLS supports Version 1 of this file format.

The default extension used by this format is: SFF.

LEADTOOLS supports the multi-page SFF files.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_SFF | 1 BPP | 1 BPP | [302] Structured Fax File Format.

Required DLL: LFSFF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: SUN Raster Format (RAS)

SUN Raster Format (RAS)

SUN Raster (RAS) is a format native to Sun UNIX platforms.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_RAS | 1, 4, 8, 24, 32 BPP | 1, 4, 8, 24, 32 BPP | [55] Sun Raster, uncompressed.
FILE_RAS_RLE | 1, 4, 8, 24, 32 BPP | 1, 4, 8, 24, 32 BPP | [288] Sun Raster, RLE compressed.

Required DLL: LFRAS. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: TIFF CCITT and Other FAX Formats

TIFF CCITT and Other FAX Formats

LEADTOOLS supports reading and writing of the following 1-bit formats that are commonly used in FAX transmissions:

TIFF

TIFF CCITT. These are compressed TIFF files that are commonly used for FAX transmission and document imaging.

TIFF CCITT Group 3. These are TIFF CCITT files in a format that is more advanced and more compressed than TIFF CCITT. LEADTOOLS supports both 1-dimension and 2-dimension variations of this format.

TIFF CCITT Group 4. These are TIFF CCITT files in a format that is more advanced and more compressed than TIFF CCITT Group 3.

For more information refer to Tagged Image File Format (TIFF).

CALS

CALS Raster (Type 1, 2, 3, and 4). These are CCITT Group 4 CALS raster files. CALS is a United States government standard. CALS3 are multipage files.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_CALS | 1 BPP | 1 BPP | [50] CALS Raster file.
FILE_CALS2 | 1 BPP | 1 BPP | [130] CALS CCITT G4 compressed.
FILE_CALS3 | 1 BPP | 1 BPP | [131] CALS Fax Group 4 compressed.
FILE_CALS4 | 1 BPP | 1 BPP | [129] CALS CCITT G4 Tiled.

Required DLL: LFCAL. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

IOCA

IOCA (ICA). This is the Image Object Content Architecture developed by IBM. LEADTOOLS supports these files in an MO:DCA wrapper with embedded 1-bit CCITT Group 3 or Group 4 images. LEADTOOLS also supports IOCA files without an MO:DCA wrapper.

For more information refer to Image Object Content Architecture Format (IOCA/MODCA).

WinFax

WinFax Group 3. This is a FAX format created by Delrina for Group 3 support.

WinFax Group 4. This is a FAX format created by Delrina for Group 4 support.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_WFX_G3_1D | 1 BPP | 1 BPP | [69] Winfax, compressed using CCITT group 3, 1 dimension
FILE_WFX_G4 | 1 BPP | 1 BPP | [70] Winfax, compressed using CCITT group 4.

Required DLL: LFWFX. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Raw FAX

FAX Group 3. This is a raw FAX format (without a header) for Group 3 support. LEADTOOLS supports both 1-dimension and 2-dimension variations of this format.

FAX Group 4. This is a raw FAX format (without a header) for Group 4 support.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_FAX_G3_1D | 1 BPP | 1 BPP | [66] Raw FAX, compressed using CCITT group 3, 1 dimension.
FILE_FAX_G3_1D_NOEOL | 1 BPP | 1 BPP | [162] Raw FAX, compressed using CCITT group 3, 1 dimension.with no EOL.
FILE_FAX_G3_2D | 1 BPP | 1 BPP | [67] Raw FAX, compressed using CCITT group 3, 2 dimensions.
FILE_FAX_G4 | 1 BPP | 1 BPP | [68] Raw FAX, compressed using CCITT group 4.

Required DLL: LFFAX. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: TIFF - Tagged Image File Format.

Microsoft Fax

AWD. This is a Microsoft FAX format.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_AWD | 1 BPP | 1 BPP | [99] Microsoft FAX format.

Required DLL: LFAWD. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

This format does not support LEAD's redirected IO feature, therefore it cannot be used with LoadMemory method (Main Control), SaveMemory method (Main Control), or FeedLoad method (Main Control).

TIFF-FX

TIFF-FX. These are Internet Fax files developed and used by Xerox. This format supports several types of compression, which allows the user or developer to use the compression that best suits his or her needs. In addition, this file format can be extended as the need arises. The following modes are supported:

Minimal Black and White: This mode uses binary MH compression (T.4).

Extended Black and White: This mode uses binary MH, MR and MMR compression (T.4 and T.6).

Lossless JBIG Black and White: This mode uses JBIG compression (T.85, T.82).

Lossy Color and Grayscale: This mode uses JPEG compression (T.42, T.81).

Lossless Color and Grayscale: This mode uses JBIG compression (T.43, T.82).

The default extensions used by this format is: TIFX, TIFF.

This file format does support multipage files.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_TIFX_JBIG | 1 BPP | 1 BPP | [269] TIFF-FX format. JBIG compressed.
FILE_TIFX_JBIG_T43 | 3 BPP | 3 BPP | [270] TIFF-FX format. JBIG compressed.
FILE_TIFX_JBIG_T43_ITULAB | 8 BPP | 8 BPP | [271] TIFF-FX format. JBIG compressed.
FILE_TIFX_JBIG_T43_GS | 1 BPP | 1 BPP | [272] TIFF-FX format. JBIG compressed.
FILE_TIFX_FAX_G4 | 1 BPP | 1 BPP | [273] TIFF-FX format, compressed using CCITT group 4.
FILE_TIFX_FAX_G3_1D | 1 BPP | 1 BPP | [274] TIFF-FX format, compressed using CCITT group 3, 1 dimension.
FILE_TIFX_FAX_G3_2D | 1 BPP | 1 BPP | [275] TIFF-FX format, compressed using CCITT group 3, 2 dimensions.
FILE_TIFX_JPEG | 8 BPP (Grayscale), 24 BPP | 8 BPP (Grayscale), 24 BPP | [276] TIFF-FX format. JPEG compressed.

Required DLL: LFTFX. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: TIFF - Tagged Image File Format.

LaserView LaserData

LaserView LaserData. The LaserData file format is a legacy Group 4 compressed FAX format.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_LASERDATA | 1 BPP | None | [121] LaserData CCITT G4

Required DLL: LFFAX. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: TIFF (Tagged Image File Format)

TIFF (Tagged Image File Format)

TIFF is a tag-based file format designed to promote universal interchanges of digital image data. Because TIFF files do not have a single way to store image data, there are many versions of TIFF. LEADTOOLS supports the most common TIFF formats. The usual file extension is TIFF for single-image files, and MPT for multipage files (which can contain many images). TIFF files can contain many comment fields of various types. You can use the ReadComment method to read comments in an existing file. Before writing a file, you can use the Comment property to create an array of comments to be saved in the file.

LEADTOOLS also supports the ability to save a vector image as a DXF within a TIFF.

LEAD supports loading and saving multi-page files in this format.

LEADTOOLS can read and write TIFF files that use RGB, CMYK, or YCbCr color space. LEADTOOLS can also read and write files with PackBits compression.

LEADTOOLS can also read and write files with Lossless JPEG compression for 8, 12, and 16-bit grayscale and 24-bit color spacing.

You can read and write 12- bit grayscale. (Document/Medical toolkits only)

You can read and write 16- bit grayscale. (Document/Medical toolkits only)

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_TIF | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | [3] Tagged Image File Format, with no compression and with RGB color space.
FILE_TIF_ABIC | 1, 4 BPP | 1, 4 BPP | [186] Tagged Image File Format, with ABIC compression. (Supports multi-page) (ABIC support is required.)
FILE_TIF_CMYK | 24, 32 BPP | 24, 32 BPP | [85] Tagged Image File Format, with no compression and with CMYK color space.
FILE_TIF_YCC | 24 BPP | 24 BPP | [93] Tagged Image File Format, with no compression and with YCbCr color space.
FILE_TIF_PACKBITS | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32 BPP | [87] Tagged Image File Format with PackBits Compression and RGB color space.
FILE_TIF_PACKBITS_CMYK | 24, 32 BPP | 24, 32 BPP | [88] Tagged Image File Format with PackBits Compression and CMYK color space.
FILE_TIF_PACKBITS_YCC | 24 BPP | 24 BPP | [95] Tagged Image File Format with PackBits Compression and color YCbCr space.
FILE_TIFLZW | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 16, 24, 32, 48, 64 BPP | [17] Tagged Image File Format with LZW Compression and RGB color space.
FILE_TIFLZW_CMYK | 24, 32 BPP | 24, 32 BPP | [86] Tagged Image File Format with LZW Compression and CMYK color space
FILE_TIFLZW_YCC | 24 BPP | 24 BPP | [94] Tagged Image File Format with LZW Compression and YCbCr color space.
FILE_TIF_JPEG | 8, 12 16 BPP (Grayscale) 24 BPP | 8, 12 16 BPP (Grayscale) 24 BPP | [11] Tagged Image File Format with JPEG compression and YUV 4:4:4 color space Lossless.
FILE_TIF_JPEG_422 | 8 BPP (Grayscale) 24 BPP | 8 BPP (Grayscale) 24 BPP | [24] Tagged Image File Format with JPEG compression and YUV 4:2:2 color space.
FILE_TIF_JPEG_411 | 8 BPP (Grayscale) 24 BPP | 8 BPP (Grayscale) 24 BPP | [22] Tagged Image File Format with JPEG compression and YUV 4:1:1 color space.[
FILE_TIF_CMP | 8 BPP (Grayscale) 24 BPP | 8 BPP (Grayscale) 24 BPP | [138] Tagged Image File Format with CMP Compression.
FILE_TIF_JBIG | 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32 BPP | 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32 BPP | [139] Tagged Image File Format with JBIG Compression.
FILE_TIF_JBIG2 | 1 BPP | 1 BPP | [187] Tagged Image File Format with JBIG2 Compression. (Supports multi-page) (JBIG2 and Advanced PDF support is required.)
FILE_TIF_DXF_R12 | 8 BPP | 8 BPP | [176] Tagged Image File Format with a vector image saved as a DXF Release 12.
FILE_TIF_DXF_R13 | 8 BPP | 8 BPP | [140] Tagged Image File Format with a vector image saved as a DXF Release 13.
FILE_TIF_J2K | 8, 12, 16 BPP (Grayscale) 24 BPP | 8, 12, 16 BPP (Grayscale) 24 BPP | [166] Tagged Image File Format with JPEG 2000 Compression. This file format contains only a stream of image data.
FILE_TIF_CMW | 8, 12, 16 BPP (Grayscale) 24 BPP | 8, 12, 16 BPP (Grayscale) 24 BPP | [167] Tagged Image File Format with Wavelet CMP Compression.
FILE_GEOTIFF | 16 BPP (Grayscale) | 16 BPP (Grayscale) | [174] GeoTIFF file format.
FILE_EXIF | 24 BPP | 24 BPP | [96] Exif file containing a TIFF image, with no compression and with RGB color space.
FILE_EXIF_YCC | 24 BPP | 24 BPP | [97] Exif file containing a TIFF image, with no compression and with YCbCr color space.
FILE_EXIF_JPEG_422 | 24 BPP | 24 BPP | [98] Exif file containing a JPEG compressed image.
FILE_EXIF_JPEG_411 | 24 BPP | 24 BPP | [101] Exif 2.0 file containing a JPEG compressed image.
FILE_CCITT | 1 BPP | 1 BPP | [25] Tagged Image File Format, compressed using CCITT.
FILE_CCITT_GROUP3_1DIM | 1 BPP | 1 BPP | [27] Tagged Image File Format, compressed using CCITT, group 3, 1 dimension.
FILE_CCITT_GROUP3_2DIM | 1 BPP | 1 BPP | [28] Tagged Image File Format, compressed using CCITT, group 3, 2 dimensions.
FILE_CCITT_GROUP4 | 1 BPP | 1 BPP | [29] Tagged Image File Format, compressed using CCITT, group 4.
FILE_TIF_UNKNOWN | NA | NA | [141] Tagged Image File Format, with unknown compression.
FILE_TIF_ABC | 1 BPP | 1 BPP | [180] Tagged Image File Format with ABC compression.
FILE_TIF_MRC | 1 BPP | 1 BPP | [177] Tagged Image File Format with MRC compression.
FILE_TIF_LEAD_MRC | 1 BPP | 1 BPP | [315] Tagged Image File Format with LEAD MRC compression.

Required DLL: LFTIF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

For loading or saving CMYK files or LAB color space files, you will also need the LTCLR DLL.

Related Formats: CMP - LEAD Compressed, , CMP - LEAD 1-Bit Format, EXIF - Exif Formats, JPG - JPEG Compressed, JP2 - JPEG 2000 Compressed, TIFX - Xerox Internet Fax File Format.


File Formats: Truevision TARGA Format (TGA)

Truevision TARGA Format (TGA)

Truevision TGA (TARGA) is a file format created by Truevision Inc. LEADTOOLS supports all uncompressed and RLE compressed TGA file formats.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_TGA | 8, 16, 24, 32 BPP | 8, 16, 24, 32 BPP | [4] TARGA, uncompressed.
FILE_TGA_RLE | 8, 16, 24, 32 BPP | 8, 16, 24, 32 BPP | [262] TARGA, RLE compressed.

Required DLL: LFTGA. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: TXT (TXT)

ASCII Text format (TXT)

A text file in which each byte represents one character according to the ASCII code. Contrast with a binary file, in which there is no one-to-one mapping between bytes and characters. Files that have been formatted with a word processor must be stored and transmitted as binary files to preserve the formatting. ASCII files are sometimes called plain text files.

LEADTOOLS supports loading only for this format.

This format is available only in selected LEADTOOLS products. For a list of products, refer to Topic Selections.

The default extension used by this format is: TXT.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_TXT | 24 BPP | N/A | [316] ASCII Text format.

Required DLL: LFTXT. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: RTF - Rich Text Format


File Formats: Windows Animated Cursor (ANI)

Windows Animated Cursor (ANI)

ANI is an animated cursor (animated mouse pointer). This file format is used for reading and storing Windows Animated Cursors. The LEADTOOLS filter does not support transparency information within these files.

LEAD supports loading and saving multi-page files in this format. Multipage ANI files will have a cursor as each page.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_ANI | 1, 4, 8, 24 BPP | 1, 4, 8, 24 BPP | [119] Windows Animated Cursor.

Required DLL: LFANI. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CUR - Windows Cursors, CLP - Microsoft Windows Clipboard Format, ICO - Windows Icons.


File Formats: Windows AVI Format (AVI)

Windows AVI Format (AVI)

Windows AVI (AVI) is a file format created by Microsoft and used for multimedia files. These files store both audio and video data.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_AVI | 24 BPP | None | [59] Windows AVI (video) file.

Required DLL: LFAVI. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: MPG - MPEG Video Format.


File Formats: Windows Metafile Format (WMF)

Windows Metafile Formats (WMF and EMF)

The Windows Metafile (WMF and EMF) formats are vector formats that may or may not also contain a raster image.

EMF/WMF Vector files can be read and written as raster images in the non-vector toolkits. Vector read/write support for these formats is provided in the LEADTOOLS Vector toolkits and is unlocked when the Vector features are unlocked. For more information on available LEADTOOLS products, refer to Topic Selection or contact LEAD.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_WMF | Yes | Yes | [15] Windows Metafile.
FILE_EMF | Yes | Yes | [116] Windows Enhanced Metafile.

When WMF and EMF files are rasterized, they are either 8 or 24 BPP.

The following table indicates which objects LEAD can load and which objects it can save:

Object: | Load: | Save:
Arc | Supported | Supported
Background color and mode | Supported | Supported
Chord | Supported | Supported
Circle | Supported | Supported
Color | Supported | Supported
Ellipse | Supported | Supported
HPolyBezier | Supported | Supported
Lines | Supported | Supported
Pie | Supported | Supported
PolyBezier | Supported | Supported
PolyDraw | Supported | Supported
Polygons | Supported | Supported
Polyline | Supported | Supported
Raster | Supported | Supported
Rectangle | Supported | Supported
Round Rectangle | Restricted Support | Restricted Support
Spline | Supported | Supported
Text | Supported | Supported
Text(Color and Font Type) | Supported | Supported
Vertex | Supported | Supported

Required DLL: LFWMF. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Note:

When working with LEADTOOLS annotations (rather than image files), you can save the annotations as WMF or EMF files containing vector graphics that can be used in other applications.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format, VPG - WordPerfect Vector Format, WMZ - Compressed Windows Metafile Format.


File Formats: Wireless Bitmap Format (WBMP)

Wireless Bitmap Format (WBMP)

The Wireless Bitmap file format is a 1-bit format used to send graphical information to a variety of handsets. It is terminal independent and describes only graphical information.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_WBMP | 1 BPP | 1 BPP | [170] Wireless Bitmap.

Required DLL: LFWMP. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: WordPerfect Graphics Format (WPG and VWPG)

WordPerfect Graphics Format (WPG and VWPG)

The WordPerfect (WPG) format can contain vectored or raster images. LEADTOOLS handles both the raster images and the vector images.

Raster Images

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_WPG | 1, 4, 8 BPP | 1, 4, 8 BPP | [54] WordPerfect Graphics Format.

Required DLL: LFWPG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Vector Images

VWPG (Vector Word Perfect Graphics) is a vector format created by COREL. There are two versions (version1 and version2) of the VWPG file format. Each has its own format and specifications. LEAD supports only version2 of this format. This file format is supported by COREL DRAW 8.0.

The default extension used by this format is: WPG.

This file format does support layers and embedded raster objects, but not grouping.

LEAD can load the following objects: Poly Curve, Rect, Vertical Line, Horizontal Line, Poly Line, Text, and Image.

LEAD can save the following objects: Line, Polyline, Rect, Polygon, Ellipse, Circle, Arc, Elliptical arc, Pie, Chord, Text, Polydraw, Polybezier, and Image.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_VWPG | Yes | Yes | [260] WordPerfect Graphics Format (vector).

When vector WPG files are rasterized, they are 24 BPP.

Required DLL: LFVPG. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: CGM - Computer Graphics Metafile, CMX - Corel Presentation Exchange Format, DGN - Intergraph Format, DRW - Micrografx Designer DRaWing, DWF - DWF Format, DWG - DWG Format, DXF - Drawing Interchange Format, EMF - Windows Metafile Formats, GBR - Gerber Format, PCL - Printer Command Language Format, PCT - Macintosh Pict Format, PDF - Portable Document Format, PLT - PLT / HPGL Format, PS - PostScript Document Format, RTF - Rich Text Format, SHP - ESRI Shape Format, SVG - Scalable Vector Graphics Format, VEC - LEADTOOLS Vector Dump Format,WMF - Windows Metafile Formats,WMZ - Compressed Windows Metafile Format.


File Formats: XBitMap (XBM)

XBitMap (XBM)

XBM is a monochrome bitmap format in which data is stored as a C language data array. It is primarily used for the storage of cursor and icon bitmaps, for use in the X graphical user interface.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_XBM | 1 BPP | 1 BPP | [110] XWindows XBitMap.

Required DLL: LFXBM. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.

Related Formats: BMP - Windows Bitmap Formats.


File Formats: XPicMap Format (XPM)

XPicMap Format (XPM)

XPM files are used to store X Window PixMap information to disk. They are capable of storing black-and-white, grayscale, and color images. XPM stores image data in the form of ASCII text formatted as a standard C character string array.

File constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_XPM | 8, 16, 24, 32 BPP | 8, 16, 24, 32 BPP | [109] XWindows XPicMap.

Required DLL: LFXPM. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


File Formats: X Window Dump (XWD)

X Window Dump (XWD)

XWD stands for X Window dump. This file format is used to store and restore screen window images. Two versions of this file exist, the X10 window dump and the X11 window dump. These versions differ slightly in the format of the data (i.e. headers and bits per pixel).

The version X10 XWD file cannot have more than 8 BPP image data.

The file constants associated with this file format are:

Constant | Read Support | Write Support | Description
FILE_XWD10 | 1, 4, 8 BPP | 1, 4, 8 BPP | [132] XWindows X Window dump, version 10.
FILE_XWD11 | 1, 4, 8, 16. 24, 32 BPP | 1, 4, 8, 16. 24, 32 BPP | [133] XWindows X Window dump, version 11.

Required DLL: LFXWD. For a listing of the exact DLLs needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Formats of Input Files

This topic has been replaced. Refer to Summary of All Supported Image File Formats.


Formats of Output Files

This topic has been replaced. Refer to Summary of All Supported Image File Formats.


Multipage File Formats

LEADTOOLS supports the following file formats which support multipage files. These formats are:

Animated Cursor | Animated Gif
CALS3 | DCX
DICOM (Read Only) | FlashPix
FLC | GIF
IFF | IOCA/MODCA
PCX | PDF
Tiff(MPT) | ABC

When loading a multipage file, you can load all pages using the Load method (ILEADRasterIO). If you wish to load only one of the pages, set the lPage parameter when calling the Load method (ILEADRasterIO). For more information on loading a multi-page file, refer to Loading a Bitmap from a File.


Tutorial for C++ Builder Programmers

The following topics provide brief and simple examples to help you learn how to use the LEADTOOLS VCL.

Note: | These tutorial examples are intended to be easy to understand and easy to test. The example programs in the EXAMPLES subdirectory provide more in depth design and more detailed code.
Note: | Please note that programmers using C++ Builder 4.0 or 5.0 must include the LEAD XX_BC.LIB files in any project. For more information about which XX_BC.LIB files to include and where they are located, refer to Installing VCL. In addition, please note that the header files are located in (LTVCL)\LIB\VCL\BUILDER4 or (LTVCL)\LIB\VCL\BUILDER5 and have the .hpp extension.
Note: | Please note that programmers must add the following for each project, depending on what compiler you are using:

Builder 3.0

(LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER3 to the library path

(LTVCL)\LIB\VCL\BUILDER3 to the include path

Builder 4.0

(LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER4 to the library path

(LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER4 to the include path

Builder 5.0

(LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER5 to the library path

(LTVCL)\LIB;(LTVCL)\LIB\VCL\BUILDER5 to the include path

Loading and Displaying an Image

Zooming Out and Zooming In

Dynamically Positioning the Control

Zooming In on a Selection

Outlining, Dragging, and Pasting a Region

Printing Multiple Images

Print a Real Image Size in Inches

Writing and Reading Multipage Files

Using Transparent Controls

Drawing Simple Lines and Shapes

Cropping a Bitmap

Using LEADTOOLS with Data Controls

Creating, Viewing, and Merging Color Separations

Updating a Gauge and Detecting a User Interrupt

Using a PanWindow

Combining Images with Regions

Creating and Using Annotations

Miscellaneous Examples


Loading and Displaying an Image (C++ Builder)

Take the following steps to start a project and to add some code that positions, scales, and displays an image on the main form:

1. | Start C++ Builder.
2. | In the File menu, choose New Application.
3. | On the Builder toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing this tutorial.
4. | Select the LEAD Main control on the VCL toolbar. Size and position the control as you want it to appear at run time, and change the name of the control to Lead1.
5. | Add a command button to your form and name it as follows:

Name | Caption
LoadLead | Load Image

6.

Code the main form's FormShow procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::FormShow(TObject *Sender)
{

// Set defaults for displaying the image.
// These are all persistent properties that can be set in the properties box.
Lead1->BorderStyle = bsSingle;
Lead1->BackColor = RGB(255, 255, 125);
Lead1->PaintDither = pdDiffusion;
Lead1->PaintPalette = ppAuto;
Lead1->AutoRepaint = True;
Lead1->AutoSize = False;
Lead1->AutoSetRects = True;
Lead1->PaintSizeMode = smFit;

}

7.

Code the LoadLead button's click procedure as follows:

void __fastcall TForm1::LoadLeadClick(TObject *Sender)
{
Lead1->Load("c:\\lead\\images\\image1.cmp", 0, 0, 1);
}

8. | On the Project menu, select Build Project.
9. | Run your program to test it.
10. | Save the project to use as a starting point for other tasks in this tutorial.


Zooming Out and Zooming In (C++ Builder)

Take the following steps to add code that can reduce and enlarge the displayed size of the image. This demonstrates the scaling properties that are normally used for zooming in and zooming out. It emphasizes the relationship of the displayed rectangle to the LEAD control.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add two command buttons to your form and name them as follows:

Name | Caption
ZoomIn | Zoom In
ZoomOut | Zoom Out

3.

Code the ZoomIn button's click procedure as follows:

void __fastcall TForm1::ZoomInClick(TObject *Sender)
{
Lead1->AutoSetRects = True;
Lead1->PaintSizeMode = smZoom;
Lead1->PaintZoomFactor = Lead1->PaintZoomFactor + 10;
}

4.

Code the ZoomOut button's click procedure as follows:

void __fastcall TForm1::ZoomOutClick(TObject *Sender)
{
Lead1->AutoSetRects = True;
Lead1->PaintSizeMode = smZoom;
if(Lead1->PaintZoomFactor > 10)
Lead1->PaintZoomFactor = Lead1->PaintZoomFactor - 10;
}

5.

Run your program to test it.


Dynamically Positioning the Control (C++ Builder)

Take the following steps to dynamically scale and position the LEAD control when loading an image. This example scales the control to use most of the form's area while preserving the image's aspect ratio.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Modify the LeadLoad button's click procedure so that it appears as follows. For a general explanation of how images are positioned and scaled, refer to Displaying an Image.

void __fastcall TForm1::LoadLeadClick(TObject *Sender)
{
/* Declare variables used for preserving aspect ratios. */
int HeightFactor, WidthFactor, HeightAllowed, WidthAllowed;
AnsiString ImageFile;
/* This hard-coded path name may be different on your system. */
ImageFile = "c:\\lead\\images\\image1.cmp";
/* Get information about the image. */
Lead1->GetFileInfo(ImageFile, 0);
/* Set the variables used for preserving the aspect ratio.
Allow for a border of 1/8 of the form size.*/
HeightFactor = Lead1->InfoHeight;
WidthFactor = Lead1->InfoWidth;
HeightAllowed = (ClientHeight * 3) / 4;
WidthAllowed = (ClientWidth * 3) / 4;
/* Center the LEAD control on the form, preserving the aspect ratio. Check to see if (using the maximum width will make the image too tall. Set the dimensions based on the result. */
if(((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed)
{
Lead1->Left = ClientWidth / 8;
Lead1->Width = WidthAllowed;
Lead1->Height = (Lead1->Width * HeightFactor) / WidthFactor;
Lead1->Top = (ClientHeight - Lead1->Height) / 2;
}
else
{
Lead1->Top = ClientHeight / 8;
Lead1->Height = HeightAllowed;
Lead1->Width = (Lead1->Height * WidthFactor) / HeightFactor;
Lead1->Left = (ClientWidth - Lead1->Width) / 2;
}
/* Set the automated behavior so that we control the display size.*/
Lead1->AutoSetRects = False;
Lead1->AutoRepaint = True;
Lead1->AutoScroll = False;
/* Set the image display size to match the LEAD control */
Lead1->SetSrcRect(0, 0, Lead1->InfoWidth, Lead1->InfoHeight);
Lead1->SetSrcClipRect(0, 0, Lead1->InfoWidth, Lead1->InfoHeight);
Lead1->SetDstRect(0, 0, Lead1->ClientWidth, Lead1->ClientHeight);
Lead1->SetDstClipRect(0, 0, Lead1->ClientWidth,Lead1
 >ClientHeight);
/* Load the bitmap. */
Lead1->Load(ImageFile, 0, 0, 1);
Lead1->ForceRepaint();
}

3.

Run your program to test it.


Zooming In on a Selection (C++ Builder)

Take the following steps to add code that lets you select an area with a mouse, and zoom in on the selected area.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add Code to the main form's FormShow procedure as follows.

.
.
/* Enable AutoRubberBand */
Lead1->AutoRubberBand = True;
/* Set the pointer to a crosshair */
Lead1->Cursor = crCross;
.
.

3.

Code the LEAD control's RubberBand procedure as follows.

void __fastcall TForm1::Lead1RubberBand(TObject *Sender)
{
int zoomleft, zoomtop, zoomwidth, zoomheight ;

/*Zoom in on the selection.*/
zoomleft = Lead1->RubberBandLeft;
zoomtop = Lead1->RubberBandTop;
zoomwidth = Lead1->RubberBandWidth;
zoomheight = Lead1->RubberBandHeight;
Lead1->ZoomToRect(zoomleft, zoomtop, zoomwidth, zoomheight);
Lead1->Refresh();
}

4.

Run your program to test it.


Outlining, Dragging, and Pasting a Region (C++ Builder)

Take the following steps to add code that lets you outline an area with a mouse, drag a copy of the selected area, and paste the copy into another part of the bitmap:

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add a second LEAD control, name it Lead2, and set its Visible property to False.
3. | Add the following declarations to the private section of the Unit1.h file. In online help, you can copy the block of code and paste it into your application.

bool ReadyToDrag; /*The state after marking the region but before dragging */
bool Dragging; /*The state when the mouse is used for dragging the floater */
int StartX; /*Starting X position in screen pixels */
int StartY; /*Starting Y position in screen pixels */
int FloaterX; /*Floater X position in screen pixels */
int FloaterY; /*Floater Y position in screen pixels */
float ZoomFactorX; /*Used for translating positioning information */
float ZoomFactorY; /*Used for translating positioning information */

4.

At the top of your main form, add two command buttons and name them as follows:

Name | Caption
SelectRgn | Select Region
PasteFloater | Paste Floater

5.

Code the SelectRgn control's Click procedure as follows:

void __fastcall TForm1::SelectRgnClick(TObject *Sender)
{
Lead1->RgnMarkingMode = mmFreeHand;
ShowMessage("Draw a freehand region");
}

6.

Code the PasteFloaterBtn control's Click procedure as follows:

void __fastcall TForm1::PasteFloaterClick(TObject *Sender)
{
/*Declare the variable for the Combine operation. */
int MyOp;
/*Declare variables for the client area coordinates. */
int LCRgnX, LCRgnY , LCRgnWidth, LCRgnHeight;
/*Declare variables for the bitmap coordinates. */
int LBRgnX, LBRgnY , LBRgnWidth, LBRgnHeight;

/*Do nothing if( there is no floater. */
if(!Lead1->Floater)
return;
/*Get the floater into another bitmap */
Lead2->Bitmap = Lead1->Floater;
/*Get the floater's client coordinates into local variables. */
LCRgnX = Lead1->FloaterDstLeft;
LCRgnY = Lead1->FloaterDstTop;
LCRgnWidth = Lead1->FloaterDstWidth;
LCRgnHeight = Lead1->FloaterDstHeight;
/*Delete the floater. */
Lead1->FloaterVisible = false;
Lead1->Floater = 0;
/*Translate the client coordinates to bitmap coordinates. */
LBRgnX = (LCRgnX-Lead1->DstLeft) / ZoomFactorX + Lead1->SrcLeft;
LBRgnY = (LCRgnY-Lead1->DstTop) / ZoomFactorY + Lead1->SrcTop;
LBRgnWidth = LCRgnWidth / ZoomFactorX;
LBRgnHeight = LCRgnHeight / ZoomFactorY;
/*Reposition the region to use it as a mask for the Combine method*/
Lead1->OffsetRgn(LBRgnX-Lead1->RgnLeft, LBRgnY-Lead1->RgnTop);
/*Use the Combine method to paste the Lead2 bitmap into the Lead1 bitmap*/
MyOp = CB_OP_ADD | CB_DST_0; /*Operation flags for a simple paste.*/
Lead1->Combine(LBRgnX, LBRgnY, LBRgnWidth, LBRgnHeight, Lead2
 >Bitmap, 0, 0, MyOp);
/*Repaint the part of the client area that has changed. */
Lead1->RepaintRect(LCRgnX, LCRgnY, LCRgnWidth, LCRgnHeight, false);
/*Free the region. */
Lead1->FreeRgn();
}

7.

In the LEAD1 control's OnMouseDown procedure, add the following code.

void __fastcall TForm1::Lead1MouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
{
/*Declare local variables. */
int BitmapX, BitmapY;
int NewX, NewY, NewWidth, NewHeight;

/*Do nothing if we are drawing a region. */
if(Lead1->RgnMarkingMode != mmNone)
return;
/* Save the starting position, in case we need it. */
StartY = Y;
StartX = X;
/*if we are ready to drag the selection, get a floater. */
if(ReadyToDrag)
{
/*Translate the current mouse coordinates. */
/*These coordinates account for the zoom factor and offset. */
ZoomFactorX = (float)Lead1->DstWidth / (float)Lead1->SrcWidth;
ZoomFactorY = (float)Lead1->DstHeight / (float)Lead1
 >SrcHeight;
BitmapX = (X / ZoomFactorX) - (Lead1->DstLeft / ZoomFactorX) + Lead1->SrcLeft;
BitmapY = (Y / ZoomFactorY) - (Lead1->DstTop / ZoomFactorY) + Lead1->SrcTop;
/*Continue to create the floater if( the mouse is pointing to the region we marked*/
if(Lead1->IsPtInRgn(BitmapX, BitmapY))
{
/*Hide the region frame. */
Lead1->RgnFrameType = ftNone;
/*Create the floater bitmap, which will be the part of the*/
/* main bitmap that is in the region's bounding rectangle */
Lead1->Floater = Lead1->Bitmap;
/*Translate the bitmap region coordinates to client area coordinates. */
NewY = (Lead1->RgnTop - Lead1->SrcTop) * ZoomFactorY + Lead1->DstTop;
NewX = (Lead1->RgnLeft - Lead1->SrcLeft) * ZoomFactorX + Lead1->DstLeft;
NewWidth = Lead1->RgnWidth * ZoomFactorX;
NewHeight = Lead1->RgnHeight * ZoomFactorY;
/*Set the initial display position of the floater. */
Lead1->SetFloaterDstRect(NewX, NewY, NewWidth, NewHeight);
/*Set form-level variables. */
FloaterY = Lead1->FloaterDstTop;
FloaterX = Lead1->FloaterDstLeft;
Lead1->FloaterVisible = true;
Dragging = true;
ReadyToDrag = false;
}
}
}

8.

In the LEAD1 control's MouseMove procedure, add the following code.

void __fastcall TForm1::Lead1MouseMove(TObject *Sender, TShiftState Shift, int X, int Y)
{
/*Declare variables for repositioning the floater. */
int NewX, NewY, NewWidth, NewHeight, XDelta, YDelta;

/*Do nothing if( we are drawing a region. */
if(Lead1->RgnMarkingMode != mmNone)
return;
/*Reposition the floater if we are dragging it. */
if(Dragging && Shift==(TShiftState() << ssLeft) && (Lead1
 >Floater))
if(Lead1->IsPtInFloater(X, Y))
{
/*Update the position variables. */
XDelta = X - StartX;
YDelta = Y - StartY;
NewX = FloaterX + XDelta;
NewY = FloaterY + YDelta;
NewWidth = Lead1->FloaterDstWidth;
NewHeight = Lead1->FloaterDstHeight;
/*Reposition the floater. */
Lead1->SetFloaterDstRect(NewX, NewY, NewWidth, NewHeight);
/*Save the form-level position variables. */
FloaterY = NewY;
FloaterX = NewX;
StartY = Y;
StartX = X;
}
}

9.

In the LEAD1 control's MouseUp procedure, add the following code.

void __fastcall TForm1::Lead1MouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
{
/*if we were drawing a region, set up for the next operation*/
if(Lead1->RgnMarkingMode != mmNone)
{
Lead1->RgnMarkingMode = mmNone;
Lead1->RgnFrameType = ftStatic;
ReadyToDrag = true;
ShowMessage("Now, drag the selection to another place.");
}
}

10.

Run your program to test it.


Printing Multiple Images (C++ Builder)

Take the following steps to add code that prints two images on one page. This code shows you how to control the size and position of images on the page.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
3. | Change the Button control's Caption property to Print 2 on 1 Page.
4. | Add #include <printers.hpp> to the main unit.
5. | Code the Print 2 on 1 Page button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
//Declare the variable for printed text.
AnsiString Msg;
//Declare the variables for print-area measurements.
int SkipSpace;
float UsableWidth, UsableHeight, MaxImageHeight;
//Declare the variables for sizing and positioning the image.
int PrintLeft, PrintTop, PrintHeight, PrintWidth;
//Declare variables used for preserving aspect ratios.
float WidthFactor, HeightFactor;

//Set the variables used for preserving the aspect ratio
HeightFactor = Lead1->BitmapHeight;
WidthFactor = Lead1->BitmapWidth;
//Set the pointer to an hourglass
Screen->Cursor = crHourGlass;
//Establish some print-area dimensions. These are arbitrary values.
SkipSpace = Printer()->PageHeight / 30;
UsableWidth = Printer()->PageWidth - (SkipSpace * 4);
UsableHeight = Printer()->PageHeight - (SkipSpace * 4);
//Get the maximum height of one image,
//assuming two equal-size images and space between them.
MaxImageHeight = (UsableHeight - (2 * SkipSpace)) / 2;
//Print a title at the top of the page
Msg = "This is a print example using the LEADTOOLS VCL";
Printer()->BeginDoc();
Printer()->Canvas->TextOut( SkipSpace * 2, SkipSpace * 2, Msg);
//Size and position the first image, preserving the aspect ratio.
//Check to see if( using the maximum width makes the image too tall.
//Set the dimensions based on the result.
if(((UsableWidth * HeightFactor) / WidthFactor) < MaxImageHeight)
{
PrintLeft = SkipSpace * 2;
PrintTop = Printer()->Canvas->PenPos.y + SkipSpace;
PrintWidth = UsableWidth;
PrintHeight = (PrintWidth * HeightFactor) / WidthFactor;
}
else
{
PrintLeft = SkipSpace * 2;
PrintTop = Printer()->Canvas->PenPos.y + SkipSpace;
PrintHeight = MaxImageHeight;
PrintWidth = (PrintHeight * WidthFactor) / HeightFactor;
}
//Print the first image
Lead1->Render(Printer()->Canvas->Handle, PrintLeft, PrintTop, PrintWidth, PrintHeight);
//Update the current printing position
Printer()->Canvas->MoveTo( SkipSpace, Printer()->Canvas->PenPos.y +
PrintHeight + (2 * SkipSpace));
//Print the second line of text.
Msg = "This is the second picture, which is modif(ied before printing:";
Printer()->Canvas->TextOut( SkipSpace * 2, Printer()->Canvas->PenPos.y, Msg);
//Modif(y the bitmap for the second printing
//to show the dif(ference between the second picture and the first.
Lead1->HistoContrast(200);
//Size and position the second image, preserving the aspect ratio.
//The coding is the same as for the first image.
if(((UsableWidth * HeightFactor) / WidthFactor) < MaxImageHeight)
{
PrintLeft = SkipSpace * 2;
PrintTop = Printer()->Canvas->PenPos.y + SkipSpace;
PrintWidth = UsableWidth;
PrintHeight = (PrintWidth * HeightFactor) / WidthFactor;
}
else
{
PrintLeft = SkipSpace * 2;
PrintTop = Printer()->Canvas->PenPos.y + SkipSpace;
PrintHeight = MaxImageHeight;
PrintWidth = (PrintHeight * WidthFactor) / HeightFactor;
}
//Print the second image
Lead1->Render(Printer()->Canvas->Handle, PrintLeft, PrintTop, PrintWidth, PrintHeight);
//Finish the page and finish the print job
Printer()->EndDoc();
//Set the mouse pointer back to the default
Screen->Cursor = crDefault;
}

6.

Run your program to test it.


Writing and Reading Multipage Files (C++ Builder)

Take the following steps to create a multipage file, then load and display the images from the file. For a list of formats that support multipage file operations, see the iModify parameter of the Save method.

1. | Start C++ Builder.
2. | In the File menu, choose New Application.
3. | On the Builder toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEAD Main control on the VCL toolbar, and add two LEAD Main controls to your main form and name them Lead1 and Lead2. The size and position do not matter.
5. | Code the main form's FormShow procedure as follows. In online help, you can copy the block of code and paste it into your application. For a general explanation of how images are positioned and scaled, refer to Displaying an Image.

void __fastcall TForm1::FormShow(TObject *Sender)
{
float HeightFactor1, WidthFactor1, HeightFactor2, WidthFactor2;
float HeightAllowed, WidthAllowed;
int ImageWidth1, ImageWidth2, ImageHeight1, ImageHeight2;
/*Disable automatic repainting of the image.*/
Lead1->AutoRepaint = False;
Lead2->AutoRepaint = False;
/*Turn off scroll bars to make sure we use the full client area.*/
Lead1->AutoScroll = False;
Lead2->AutoScroll = False;
/* Position and size the main form so that it takes up most of the screen. */
Width = Screen->Width * 0.9;
Height = Screen->Height * 0.8;
Left = (Screen->Width - Width) / 2;
Top = (Screen->Height - Height) / 2;
/*Display the form and set the mouse pointer to an hourglass.*/
Show();
Screen->Cursor = crHourGlass;
/*Load the bitmaps. These hard-coded path names may be different on your system.*/
Lead1->Load("C:\\lead\\IMAGES\\IMAGE1.CMP", 0, 0, 1);
Lead2->Load("C:\\lead\\IMAGES\\IMAGE2.CMP", 0, 0, 1);
/*Save the bitmaps to a single multipage TIFF file*/
Lead1->Save("C:\\lead\\IMAGES\\COMBINED.MPT", FILE_TIF, 24, 0, SAVE_OVERWRITE);
Lead2->Save("C:\\lead\\IMAGES\\COMBINED.MPT", FILE_TIF, 24, 0, SAVE_APPEND);
/*Get information about the images so that we can size the controls.*/
Lead1->GetFileInfo("C:\\lead\\IMAGES\\COMBINED.MPT", 1);
Lead2->GetFileInfo("C:\\lead\\IMAGES\\COMBINED.MPT", 2);
/*Clear the bitmaps from memory*/
Lead1->Bitmap = 0;
Lead2->Bitmap = 0;
/*Make the controls visible so that we can size and position them.*/
/*They will not really appear until we load an image and paint it.*/
Lead1->Visible = True;
Lead2->Visible = True;
/*Set the variables used for preserving the aspect ratio.*/
HeightFactor1 = Lead1->InfoHeight;
WidthFactor1 = Lead1->InfoWidth;
HeightFactor2 = Lead2->InfoHeight;
WidthFactor2 = Lead2->InfoWidth;
HeightAllowed = ClientHeight * 0.8;
WidthAllowed = ClientWidth * 0.45;
/*Center each LEAD control on half of the form, preserving the aspect ratio.*/
/*Check to see if using the maximum width will make the image too tall.*/
/*Set the dimensions based on the result.*/
if((WidthAllowed * HeightFactor1) / WidthFactor1 < HeightAllowed)
{
Lead1->Left = (ClientWidth / 4) - (WidthAllowed / 2);
Lead1->Width = WidthAllowed;
Lead1->Height = (Lead1->Width * HeightFactor1) / WidthFactor1;
Lead1->Top = (ClientHeight - Lead1->Height) / 2;
}
else
{
Lead1->Top = (ClientHeight - HeightAllowed) / 2;
Lead1->Height = HeightAllowed;
Lead1->Width = (Lead1->Height * WidthFactor1) / HeightFactor1;
Lead1->Left = (ClientWidth / 4) - (Lead1->Width / 2) ;
}
if( (WidthAllowed * HeightFactor2) / WidthFactor2 < HeightAllowed)
{
Lead2->Left = (ClientWidth * 3/4) - (WidthAllowed / 2);
Lead2->Width = WidthAllowed;
Lead2->Height = (Lead2->Width * HeightFactor2) / WidthFactor2;
Lead2->Top = (ClientHeight - Lead2->Height) / 2;
}
else
{
Lead2->Top = (ClientHeight - HeightAllowed) / 2;
Lead2->Height = HeightAllowed;
Lead2->Width = (Lead2->Height * WidthFactor2) / HeightFactor2;
Lead2->Left = (ClientWidth * 3 / 4) - (Lead2->Width / 2);
}
/*Load the bitmaps from the multipage TIFF file*/
Lead1->Load("C:\\lead\\IMAGES\\COMBINED.MPT", 24, 1, 1);
Lead2->Load("C:\\lead\\IMAGES\\COMBINED.MPT", 24, 2, 1);
/*Set the image display sizes to match the LEAD controls*/
ImageWidth1 = Lead1->Width;
ImageHeight1 = Lead1->Height;
Lead1->SetDstRect(0, 0, ImageWidth1, ImageHeight1);
Lead1->SetDstClipRect(0, 0, ImageWidth1, ImageHeight1);
/*Set the image display sizes to match the LEAD controls*/
ImageWidth2 = Lead2->Width;
ImageHeight2 = Lead2->Height;
Lead2->SetDstRect(0, 0, ImageWidth2, ImageHeight2);
Lead2->SetDstClipRect(0, 0, ImageWidth2, ImageHeight2);
/*Display the images*/
Lead1->ForceRepaint();
Lead2->ForceRepaint();
/*Set the mouse pointer back to the default*/
Screen->Cursor = crDefault;
}

6.

Build and run your program to test it.


Using Transparent Controls (C++ Builder)

Take the following steps to add transparent controls, with special effects. The transparent controls are added as child controls so that they will scroll with the parent image.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add two LEAD controls, which you will set to be transparent at run time. (At design time, you can make the controls easier to see by setting the BackColor property of each control to a different color.) Add the controls as follows:

a. | Add a control named LEAD2 as a child control to LEAD1. In other words, draw it inside the LEAD1 control.
b. | Add a control named LEAD3 as a child control to LEAD2. In other words, draw it inside the LEAD2 control.

3.

Add a command button to your form and code the button's click procedure as follows:

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Lead1->EnableMethodErrors = False;
Lead1->AutoRepaint = False;
Lead2->AutoRepaint = False;
Lead3->AutoRepaint = False;
/*Make Lead2 and Lead3 Transparent*/
Lead2->Transparent = True;
Lead3->Transparent = True;
/*Give each control a different effect*/
Lead1->PaintEffect = EFX_EFFECT_WIPE_RECTANGLE_OUT;
Lead2->PaintEffect = EFX_EFFECT_WIPE_RECTANGLE_IN;
Lead3->PaintEffect = EFX_EFFECT_WIPE4_R_B_L_B;
Lead1->EffectDelay = 20;
Lead2->EffectDelay = 10;
Lead3->EffectDelay = 10;
Lead1->EffectGrain = 1;
Lead2->EffectGrain = 5;
Lead3->EffectGrain = 1;
/*Position Lead2 and Lead3 inside Lead1*/
Lead2->Width = Lead1->Width / 2;
Lead2->Height = Lead1->Height / 2;
Lead2->Left = (Lead1->Width - Lead2->Width) / 2;
Lead2->Top = (Lead1->Height - Lead2->Height) / 2;
Lead3->Top = 0;
Lead3->Left = 0;
Lead3->Width = Lead2->Width;
Lead3->Height = Lead2->Height;
/*We will be drawing into the bitmaps*/
Lead2->DrawPersistence = True;
Lead3->DrawPersistence = True;

/*First, we need some bitmaps*/
Lead2->CreateBitmap(Lead2->Width, Lead3->Height, 24);
Lead3->CreateBitmap(Lead3->Width, Lead3->Height, 24);
/*Fill them with black, which we will make transparent*/
Lead2->Fill(RGB(0, 0, 0));
Lead3->Fill(RGB(0, 0, 0));
Lead2->UseTransparentColor = True;
Lead3->UseTransparentColor = True;
Lead2->TransparentColor = (TColor)RGB(0, 0, 0);
Lead3->TransparentColor = (TColor)RGB(0, 0, 0);

/*Draw a shape into Lead2*/
/*Shape background*/
Lead2->ShapeBackgroundStyle = sbsTranslucent;
/*Shape location*/
Lead2->ShapeTop = 0;
Lead2->ShapeLeft = 0;
Lead2->ShapeWidth = Lead2->BitmapWidth;
Lead2->ShapeHeight = Lead2->BitmapHeight;
/*Shape border*/
Lead2->ShapeBorderColor = (TColor)RGB(255, 0, 0);
Lead2->ShapeBorderStyle = sbrSolid;
Lead2->ShapeBorderThickness = 5;
Lead2->PatternStyle = epsTransparent;

/*Draw the shape*/
Lead2->DrawShape(EFX_SHAPE_STAR4, 0);
/*Draw text into Lead3*/
/*Specify the text, font, and styles*/
Lead3->TextFont->Name = "Arial";
Lead3->TextFont->Size = 40;
Lead3->TextAngle = 450;
Lead3->TextFont->Color = (TColor)RGB(0, 0, 255); /*Blue*/
Lead3->TextStyle = etsNormal;
Lead3->TextAlign = etaHcenterVcenter;
/*Set the location for the text*/
Lead3->TextTop = 0;
Lead3->TextLeft = 0;
Lead3->TextWidth = Lead3->BitmapWidth;
Lead3->TextHeight = Lead3->BitmapHeight;

/*Set the properties for drawing a rectangle behind the text.*/
Lead3->DrawPenStyle = psSolid;
Lead3->DrawPenColor = (TColor)RGB(255, 255, 0);
Lead3->DrawMode = pmCopy;
/*Draw the rectangle,) draw the text.*/
Lead3->DrawRectangle(0, 0, Lead3->BitmapWidth, Lead3->BitmapHeight);
Lead3->DrawTextStr("Text", 0);
/*Load an image into Lead1*/
Lead1->Load("c:\\lead\\images\\image1.cmp", 0, 0, 1);
Lead1->PaintSizeMode = smZoom;
Lead1->PaintZoomFactor = 150;
Lead1->ForceRepaint();

/*Turn off the effects.*/
Lead1->PaintEffect = EFX_EFFECT_NONE;
Lead2->PaintEffect = EFX_EFFECT_NONE;
Lead3->PaintEffect = EFX_EFFECT_NONE;
}

4.

Run your program to test it.


Drawing Simple Lines and Shapes (C++ Builder)

Take the following steps to add code that lets you draw a line, rectangle and ellipse on the bitmap.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declarations to the private section of the Unit1.h file:

int DrawObject; /*The object we are drawing*/
int StartX; /*Starting X position*/
int StartY; /*Starting Y position*/
int EndX; /*Ending X position*/
int EndY; /*Ending Y position*/
bool Drawing;

3.

Add the following line to the Unit1.h file:

#include <stdlib.h>

4.

Add the following initialization code to the main form's FormShow procedure:

DrawObject = 0;
Drawing = False;

5.

Code the LEAD control's MouseDown event as follows. This code selects a different drawing object each time the event occurs.

void __fastcall TForm1::Lead1MouseDown (TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
{
//Temp. Disable Scrolling
Lead1->EnableKeyboard = False;
Lead1->EnableScroll = False;
Drawing = True;
/*Save the starting position.*/
StartX = X;
StartY = Y;
EndX = X;
EndY = Y;
/*Cycle through the types of drawing objects.*/
switch(DrawObject)
{
case 0:
DrawObject = 1; /*Line*/
break;
case 1:
DrawObject = 2; /*Rectangle*/
break;
case 2:
DrawObject = 0; /*Ellipse*/
break;
}
}

6.

Code the LEAD control's MouseMove event as follows. This code uses pmNot for the DrawMode, which means that pixel colors are inverted. Thus, the drawing methods can erase the previous object and draw a new one.

void __fastcall TForm1::Lead1MouseMove (TObject *Sender, TShiftState Shift, int X, int Y)
{
int OldEndX, OldEndY;
int OldDrawX, OldDrawY, OldWidth, OldHeight;
int DrawX, DrawY, NewWidth, NewHeight;

if(Drawing == True)
{
/*Set the drawing styles.*/
Lead1->DrawPenStyle = psSolid;
Lead1->DrawMode = pmNot;
Lead1->DrawFillStyle = bsClear;
Lead1->DrawPersistence = False; /*On the window, not the bitmap*/
/*Save the previous ending mouse position.*/
OldEndX = EndX;
OldEndY = EndY;
/*Get the current mouse position.*/
EndX = X;
EndY = Y;
/*Calculate the origin of the current object.*/
if(EndX > StartX)
DrawX = StartX;
else
DrawX = EndX;
if(EndY > StartY)
DrawY = StartY;
else
DrawY = EndY;
/*Calculate the origin of the previous object.*/
if(OldEndX > StartX)
OldDrawX = StartX;
else
OldDrawX = OldEndX;
if(OldEndY > StartY)
OldDrawY = StartY;
else
OldDrawY = OldEndY;
/*Calculate the height and width of the current object.*/
NewHeight = abs(StartY - EndY);
NewWidth = abs(StartX - EndX);
/*Calculate the height and width of the previous object.*/
OldHeight = abs(StartY - OldEndY);
OldWidth = abs(StartX - OldEndX);
/*Erase the old object and draw the new one.*/
switch(DrawObject)
{
case 0: /*Ellipse*/
Lead1->DrawEllipse(OldDrawX, OldDrawY, OldWidth, OldHeight);
Lead1->DrawEllipse(DrawX, DrawY, NewWidth, NewHeight);
break;
case 1: /*Line*/
Lead1->DrawLine(StartX, StartY, OldEndX, OldEndY);
Lead1->DrawLine(StartX, StartY, EndX, EndY);
break;
case 2: /*Rectangle*/
Lead1->DrawRectangle(OldDrawX, OldDrawY, OldWidth, OldHeight);
Lead1->DrawRectangle(DrawX, DrawY, NewWidth, NewHeight);
break;
}
}
}

7.

Code the LEAD control's MouseUp event as follows. This code sets the drawing style and draws the object on the bitmap.

void __fastcall TForm1::Lead1MouseUp (TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
{
int DrawX, DrawY, NewWidth, NewHeight;

//Restore scrolling
Lead1->EnableKeyboard = True;
Lead1->EnableScroll = True;
Drawing = False;
/*Set the drawing style.*/
Lead1->DrawPenStyle = psSolid;
Lead1->DrawPenWidth = 2;
Lead1->DrawPenColor = (TColor)RGB(255, 0, 0); /*Red*/
Lead1->DrawMode = pmCopy;
Lead1->DrawFillColor = (TColor)RGB(0, 255, 0); /*Green*/
Lead1->DrawFillStyle = bsHorizontal;
Lead1->DrawPersistence = True; /*On the bitmap*/
/*Get the current mouse position*/
EndX = X;
EndY = Y;
/*Determine the origin of the object.*/
if(EndX > StartX)
DrawX = StartX;
else
DrawX = EndX;
if(EndY > StartY)
DrawY = StartY;
else
DrawY = EndY;
/*Determine the height and width of the object.*/
NewHeight = abs(StartY - EndY);
NewWidth = abs(StartX - EndX);
/*Draw the object*/
switch(DrawObject)
{
case 0: /*Ellipse*/
Lead1->DrawEllipse(DrawX, DrawY, NewWidth, NewHeight);
break;
case 1: /*Line*/
Lead1->DrawLine(StartX, StartY, EndX, EndY);
break;
case 2: /*Rectangle*/
Lead1->DrawRectangle(DrawX, DrawY, NewWidth, NewHeight);
break;
}
}

8.

Run your program to test it.


Cropping a Displayed Image and Copying It to a Bitmap (C++ Builder)

Cropping a Bitmap (C++ Builder)

Take the following steps to add code that lets you select an area with a mouse, crop the display to show only that area, and trim the bitmap to match the selected area. (This example uses both cropping and trimming, so that you can see the difference.)

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declarations to the private section of the Unit1.h file:

bool Cropping; /*The state when the mouse is used for cropping*/
int StartX; /*Starting X position in screen pixels*/
int StartY; /*Starting Y position in screen pixels */
int EndX; /*Ending X position in screen pixels */
int EndY; /*Ending Y position in screen pixels */

3. | Add #include <printers.hpp> to the main unit.
4. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
5. | In the Object Inspector box, change the Button control's Caption property to Select Rectangle, and change the name to RectButton.
6. | Code the Select Rectangle button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::RectButtonClick(TObject *Sender)
{
/*Initialize cropping so that you can do it more than once*/
if( Cropping == True)
{
/*Set the clipping area to match the image. */
Lead1->SetDstClipRect(Lead1->DstLeft, Lead1->DstTop,
Lead1->DstWidth, Lead1->DstHeight);
/*Display the image */
Lead1->ForceRepaint();
}
/*Set a form variable to let other events know that you are cropping*/
Cropping = True;
/*Set the pointer to a crosshair */
Lead1->Cursor = crCross;
}

7.

Code the LEAD control's MouseDown procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::Lead1MouseDown (TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
/*Save the starting position*/
StartX = X;
StartY = Y;
/*Make the rubberband invisible until the mouse moves*/
Lead1->RubberBandVisible = False;
}

8.

Code the LEAD control's MouseMove procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::Lead1MouseMove (TObject *Sender, TShiftState Shift, int X, int Y)
{
int rbX;
int rbY;
int rbHeight;
int rbWidth;

if( (Cropping == True) && (Shift.Contains(ssLeft)))
{
/*Get the current mouse position */
EndX = X;
EndY = Y;
/*Determine the origin of the rubberband rectangle,
regardless of which way the mouse moves. */
if( EndX > StartX)
rbX = StartX ;
else
rbX = EndX;

if( EndY > StartY)
rbY = StartY ;
else
rbY = EndY;

/*Determine the height and width of the rubberband rectangle*/
rbHeight = abs(StartY - EndY);
rbWidth = abs(StartX - EndX);
/*Set the rubberband rectangle*/;
Lead1->SetRubberBandRect(rbX, rbY, rbWidth, rbHeight);
/*Alternatively, you could use the following properties to set the rubberband rectangle:
Lead1->RubberBandHeight = rbHeight;
Lead1->RubberBandLeft = rbX;
Lead1->RubberBandTop = rbY;
Lead1->RubberBandWidth = rbWidth; */

/*Make the rubberband rectangle visible*/
Lead1->RubberBandVisible = True;
}
}

9.

Code the LEAD control's MouseUp procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::Lead1MouseUp (TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
{
int CropLeft;
int CropTop;
int CropWidth;
int CropHeight;

/* Quit if( we are not selecting an area to crop. */
if( Cropping == False)
return;

/*Get the current mouse position */
EndX = X;
EndY = Y;
/*Get the origin of the rubberband rectangle.
Allow for different mouse drag directions */
if( StartX < EndX)
CropLeft = StartX ;
else
CropLeft = EndX;
if( StartY < EndY)
CropTop = StartY ;
else
CropTop = EndY;

/*Get the height and width of the cropped area */
CropWidth = abs(EndX - StartX);
CropHeight = abs(EndY - StartY);
if ((CropWidth < 1) || (CropHeight < 1))
{
Lead1->RubberBandVisible= False;
return;
}
/*Crop and repaint the image */
Lead1->SetDstClipRect(CropLeft, CropTop, CropWidth, CropHeight);
Lead1->ForceRepaint();
Lead1->RubberBandVisible = False;
Lead1->Cursor = crDefault; /*Default */
}

10. | Select the Button control; then add another control to your main form. Put the control at the top of the form to keep it away from the image.
11. | In the Object Inspector box, change the Button control's Caption property to Trim. and change its Name property to TrimButton. This command button will be used to trim the bitmap in memory and redisplay the bitmap.
12. | Code the Trim button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::TrimButtonClick(TObject *Sender)
{
Single XFactor;
Single YFactor;
Single NewTop;
Single NewLeft;
Single NewWidth;
Single NewHeight;
Single HeightFactor;
Single WidthFactor;
Single HeightAllowed;
Single WidthAllowed;

Screen->Cursor = crHourGlass; /*hourglass */
/*Use the clipping rectangle's percentage offsets in the image rectangle */
/*to determine the trimmed rectangle in the bitmap. */
/*Using percentages allows for the possibility that the image is zoomed. */
XFactor = Lead1->BitmapWidth / Lead1->DstWidth;
YFactor = Lead1->BitmapHeight / Lead1->DstHeight;
NewTop = (Lead1->DstClipTop - Lead1->DstTop) * YFactor;
NewLeft = (Lead1->DstClipLeft - Lead1->DstLeft) * XFactor;
NewWidth = Lead1->DstClipWidth * XFactor;
NewHeight = Lead1->DstClipHeight * YFactor;

/*Make sure display rectangles are automatically adjusted. */
Lead1->AutoSetRects = True;
/*Trim the bitmap. */
Lead1->Trim(NewLeft, NewTop, NewWidth, NewHeight);
/*Size and redisplay the control, using the new bitmap size. */
/*Set the variables used for preserving the aspect ratio. */
/*Allow for a border of 1/8 of the form size. */
/*The units of measure do not matter, since we are calculating proportions. */
HeightFactor = Lead1->BitmapHeight;
WidthFactor = Lead1->BitmapWidth;
HeightAllowed = ClientHeight - (ClientHeight / 4);
WidthAllowed = ClientWidth - (ClientWidth / 4);

/*Center the LEAD control on the form, preserving the aspect ratio.*/
/*Check to see if( using the maximum width will make the image too tall. */
/*Set the dimensions based on the result. */
if(((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed)
{
Lead1->Left = ClientWidth / 8;
Lead1->Width = WidthAllowed;
Lead1->Height = (Lead1->Width * HeightFactor) / WidthFactor;
Lead1->Top = (ClientHeight - Lead1->Height) / 2;
}
else
{
Lead1->Top = ClientHeight / 8;
Lead1->Height = HeightAllowed;
Lead1->Width = (Lead1->Height * WidthFactor) / HeightFactor;
Lead1->Left = (ClientWidth - Lead1->Width) / 2;
}

/*Turn off scroll bars to make sure we use the full client area. */
Lead1->AutoScroll = False;
/*Set the image display size to match the LEAD control */
Lead1->SetDstRect(0, 0, Lead1->Width, Lead1->Height);
Lead1->SetDstClipRect(0, 0, Lead1->Width, Lead1->Height);
/*Display the image */
Lead1->ForceRepaint();
Screen->Cursor = crDefault; /*Default */
}

13.

Run your program to test it.


Using LEADTOOLS with Data Controls(C++ Builder)

You can associate the LEAD control with a data control so that the LEAD control's bitmap is bound to a specified field in the data control's data set.

Take the following steps to start a project and to add some code that associates the LEAD control with a data control:

1. | Start C++Builder 3.
2. | On the Project menu, select Remove From Project and remove Unit1.cpp and Form1.
3. | On the Database menu, choose Form Wizard. In the first wizard dialog, select the following options and click Next:

Create a simple form

Create a form using TTable Object

4. | In the second wizard dialog, select the file IMAGES.DB shipped with LEADTOOLS and click Next.
5. | In the following dialog, click the ">>" button to select both fields, then click Next.
6. | In the following dialog, choose Vertically, then click Next.
7. | In the following dialog, choose Top, then click Next.
8. | In the last dialog, make sure that the options are as follows, them click Finish.

Generate a main form

Form Only

9. | Click on the ImageBMP control and delete it. In its place, insert a LEAD Main VCL Control (LEADImage) from the LEADTOOLS tab and position it as you would like it to appear in your application.
10. | Change the following properties of the LEAD Main Control as follows:

Property | Value
DataSource | DataSource1
DataField | BMP

You must assign the DataSource before the DataField.

11. | From the LEADTOOLS tab, add a LEADDlgFile control and a LEADDlgService control to the form.
12. | Add a Button control to the form and change its name to btnFlip.

13.

Add the following code to the FromCreate procedure. Do not delete code that already exists in the function.

LEADImage1->BorderStyle = bsSingle;
LEADImage1->BackColor = (TColor)RGB(255, 255, 125);
LEADImage1->AutoRepaint = True;
LEADImage1->AutoSize = False;
LEADImage1->AutoSetRects = True;
LEADImage1->PaintSizeMode = smFit;
LEADImage1->DataLoadBits = 0;
LEADDlgService->InitDialogs(0);

14.

Handle the DBNavigator OnClick event, and code the DBNavigator OnClick procedure as follows:

void __fastcall TForm1::DBNavigatorClick(TObject *Sender, TNavigateBtn Button)
{
if(Button != nbInsert) /* do nothing */
return;
LEADDlgFile1->DlgFlags
  = 0;
LEADDlgFile1->DialogTitle
  = "Add an image";
LEADDlgFile1->PreviewEnabled
  = True;
LEADDlgFile1->Filter
  = "All |*.*|CMP|*.cmp|JPEG|*.jpg";
LEADDlgFile1->FilterIndex
   = 2; /*look for *.cmp first*/
LEADDlgFile1->InitialDir
  = "C:\\Program Files\\LEAD Technologies, Inc\\LEADTOOLS14\\images\\";
LEADDlgFile1->LoadPasses
  = 0;
LEADDlgFile1->LoadRotated
  = True;
LEADDlgFile1->LoadCompressed
  = False;
LEADDlgFile1->DlgFlags
  =   +
DLG_OPEN_SHOW_PROGRESSIVE   +
DLG_OPEN_SHOW_MULTIPAGE   +
DLG_OPEN_SHOW_LOADROTATED   +
DLG_OPEN_SHOW_LOADCOMPRESSED   +
DLG_OPEN_SHOW_FILEINFO   +
DLG_OPEN_SHOW_PREVIEW   +
DLG_OPEN_SHOW_DELPAGE   +
DLG_OPEN_VIEWTOTALPAGES   +
DLG_OPEN_LOADBITMAP;
LEADDlgFile1->LEADImage
  = LEADImage1; /*assign the main control for processing*/
LEADDlgFile1->EnableMethodErrors = False;
/* when the user does not load and image, abort the process */
if(LEADDlgFile1->ShowOpenDlg
 (this) != SUCCESS_DLG_OK)
{
Table1->Cancel();
return;
}
/* Enable image processing before posting to the database */
btnFlip->Enabled = True;
/* Specify the appropriate properties for saving the image in the database */
switch(LEADImage1->BitmapBits)
{
case 1:
LEADImage1->DataSaveBits = 1;
LEADImage1->DataSaveFormat = FILE_LEAD1BIT;
break;
case 4:
LEADImage1->DataSaveBits = 4;
LEADImage1->DataSaveFormat = FILE_PCX;
break;
default:
if(LEADImage1->IsGrayScale == GRAY_NO) /* save as color */
LEADImage1->DataSaveBits = 24;
else /*save as grayscale*/
LEADImage1->DataSaveBits = 8;
LEADImage1->DataSaveFormat = FILE_CMP;
LEADImage1->DataSaveQuality = QMS;
} /* end of case statement */
EditNAME->SetFocus();
}

15.

Handle the btnFlip OnClick event, and code the btnFlipClick procedure as follows:

void __fastcall TForm1::btnFlipClick(TObject *Sender)
{
LEADImage1->Flip();
}

16.

Handle the LEADImage1 OnChange event, and code to the LEADImage1Change procedure as follows:

void __fastcall TForm1::LEADImage1Change(TObject *Sender)
{
/* Avoid processing events that occur before the bitmap is fully loaded */
if(LEADImage1->Bitmap == 0)
return;
/* Demonstrate how the DataChanged property works */
if(LEADImage1->DataChanged && (DataSource1->State != dsInsert))
ShowMessage("You flipped the image");
}

17.

Handle the DataSource1 OnStateChange event, and code the DataSource1StateChange procedure as follows:

void __fastcall TForm1::DataSource1StateChange (TObject *Sender)
{
btnFlip->Enabled = (DataSource1->State == dsEdit);
}

18.

Run your program to test it.


Creating, Viewing, and Merging Color Separations (C++ Builder)

Take the following steps to add code that creates CMYK color separations, displays each of the color planes, merges the planes, and displays the result. The code increases the contrast of the K plane to demonstrate how you can manipulate the color separations.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following global declaration at the top of the Unit1 file:

int ClickCount; //Used with the Color Separations example

3. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
4. | Change the Button control's Caption property to Do Separations.
5. | Code the Do Separations button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Screen->Cursor = crHourGlass;
//Turn off the automatic display rectangles.
Lead1->AutoSetRects = False;
//Use the ClickCount form variable to step through the actions.
switch(ClickCount)
{
case 0:
Lead1->ColorSeparate(COLORSEP_CMYK);
//Just for fun, add contrast to the K plane
Lead1->Bitmap = Lead1->ColorPlanes[3]; //Copy the K plane
Lead1->Contrast(300); //Increase the contrast
Lead1->ColorPlanes[3] = Lead1->Bitmap; //Update the K plane
ShowMessage("Separated. Keep clicking to see separations, then merge");
break;
case 1:
Lead1->Bitmap = Lead1->ColorPlanes[0]; //Cyan
Lead1->ForceRepaint();
break;
case 2:
Lead1->Bitmap = Lead1->ColorPlanes[1]; // Magenta
Lead1->ForceRepaint();
break;
case 3:
Lead1->Bitmap = Lead1->ColorPlanes[2]; // Yellow
Lead1->ForceRepaint();
break;
case 4:
Lead1->Bitmap = Lead1->ColorPlanes[3]; // K
Lead1->ForceRepaint();
break;
case 5:
Lead1->ColorMerge(COLORSEP_CMYK);
Lead1->ForceRepaint();
Lead1->ColorPlanes[0] = 0;
Lead1->ColorPlanes[1] = 0;
Lead1->ColorPlanes[2] = 0;
Lead1->ColorPlanes[3] = 0;
ShowMessage("Merged, with more contrast in the K plane");
break;
case 6:
ClickCount = -1;
ShowMessage("Cycle is finished");
}

ClickCount++;
Screen->Cursor = crDefault;
}

6.

Run your program to test it. Notice that you can click the button several times to create the separations, view each of them, and merge them to recreate the original bitmap.


Updating a Gauge and Detecting a User Interrupt (C++ Builder)

Take the following steps to update a gauge during processing and detect a user interrupt:

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
3. | In the Object Inspector box, change the Button control's Caption property to Do Median.
4. | Select the Button control; then add another control to your main form. Put the control at the top of the form to keep it away from the image.
5. | In the Object Inspector box, change the Button control's Caption property to Quit.
6. | Build a gauge consisting of two rectangular shape objects (Shape1 and Shape2). Use Shape1 as the frame of the gauge. Use Shape2 as the fill color by putting it inside of Shape1, flush left. Change Shape2's brush color to any contrasting color, and change its Width property to 1.
7. | Add the following global variable declarations at the top of the Unit1 file:

bool fEscape; //Used with the Gauge example
bool fInProc; //Used with the Gauge example

8.

Code the Do Median button's Click procedure as follows:

void __fastcall TForm1::Button1Click(TObject *Sender)

{
//Enable the Status event
Lead1->EnableProgressEvent = True;

//Initialize the indicators
fEscape = False; //The user does not want to quit
fInProc = True; //Processing is taking place

//Perform a relatively slow median filter
Lead1->Median(5);

//Clean up
fInProc = False; //Processing is no longer taking place
Lead1->ForceRepaint();
}

9.

Code LEAD control's Status procedure as follows:

void __fastcall TForm1::Lead1Status(TObject *Sender, int Percent)
{
TMsg WinMsg; //Windows message

//Are there any messages in the queue (like a mouse click) ?
while( PeekMessage(&WinMsg,Handle, 0, 0, PM_REMOVE) )
{
TranslateMessage( &WinMsg ); //Translates virtual key codes.
DispatchMessage( &WinMsg ); //Dispatches message to window.
}

if (!fEscape) // Look for the Click on the Quit button
Shape2->Width = Shape1->Width * Percent / 100; //Udpate the gauge
else
Lead1->EnableProgressEvent = False; //Cancel the task
}

10.

Code the Quit button's Click procedure as follows:

void __fastcall TForm1::Button2Click(TObject *Sender)
{
fEscape = True; //The user wants to quit
Shape2->Width = 1; //Set the gauge back to the beginning
}

11.

Code the main form's CloseQuery procedure as follows:

void __fastcall TForm1::FormCloseQuery(TObject *Sender, bool &CanClose)
{
if (fInProc) //If processing is taking place
CanClose = False; //Do not let the user close the form

}

12.

Run your program to test it.


Using a PanWindow (C++ Builder)

1. | Start C++ Builder.
2. | In the File menu, choose New Application.
3. | On the Builder toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEAD Main control on the VCL toolbar. Size and position the control as you want it to appear at run time, and change the name of the control to Lead1.
5. | Add a command button from the Standard toolbar to your form and name it as follows:

Name | Caption
PanWin | Show Pan Window

6.

Add a CheckBox from the Standard toolbar to the form and name it as follows:

Name | Caption
Check1 | Pan Window

7.

Code the PanWindowClick procedure as follows:

void __fastcall TForm1::PanWindowClick(TObject *Sender)
{
//set the location of the PanWindow
Lead1->PanWinX = 100;
Lead1->PanWinY = 100;
//set the size of the PanWindow
Lead1->PanWinWidth = 150;
Lead1->PanWinHeight = 200;
//set the type of mouse pointer
Lead1->PanWinPointer = crHandPoint;
Lead1->PanWinTitle = "PanWindow";
Lead1->PanWinRectColor = (TColor)RGB(0, 0, 255);
Lead1->PanWinSysMenu = True;
//use the settings for LEAD1
Lead1->PanWinPaintPalette = Lead1->PaintPalette;
Lead1->PanWinBitonalScaling = Lead1->BitonalScaling;
Lead1->PanWinPaintDither = Lead1->PaintDither;
Lead1->PanWinPaintScaling = Lead1->PaintScaling;
Lead1->ShowPanWin(True);
Check1->Checked = True;
}

8.

Code the FormActivate procedure as follows:

void __fastcall TForm1::FormActivate(TObject *Sender)
{
//set the path and name to an image file on your system
Lead1->Load("c:\\lead\\images\\scn1.tif", 0, 0, 1);
}

9.

Code the Lead1OnPanWin event as follows:

void __fastcall TForm1::Lead1PanWin(TObject *Sender, int hPanWin,
int iFlag)
{
if (iFlag == PANWIN_DESTROYED)
Check1->Checked = False;
}

10.

Build the project and run your program to test it.


Creating and Using Annotations (C++Builder)

Creating and Using Annotations

Take the following steps to add code that demonstrates the creation and deletion, saving and loading, and copying and pasting of annotation objects. This code also demonstrates the related events. Message boxes prompt for user actions that trigger events.

1. | Start C++ Builder.
2. | In the File menu, choose New Application.
3. | On the Builder toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing this tutorial.
4. | Select the LEADAnn control on the VCL toolbar. Size and position the Control, as you want it to appear at run time.
5. | Add a command button to your form and name it as follows:

Name | Caption
LoadLEAD | Load Image

6.

Code the main form's FormShow procedure as follows. In online help, you can copy the block of code and paste it into your application.

void __fastcall TForm1::FormShow(TObject *Sender)
{
// Unlock GIF format support.
// Note that, this is a sample key, which will not work in your toolkit.
LEADAnn1->UnlockSupport (L_SUPPORT_DOCUMENT, "TestKey");
LEADAnn1->AnnUserMode= ANNUSERMODE_NONE;
// Set defaults for displaying the image.
// These are all persistent properties that can be set in the properties box.
LEADAnn1->BorderStyle = bsSingle;
LEADAnn1->BackColor = (TColor) RGB (255, 255, 125);
LEADAnn1->PaintDither = pdDiffusion;
LEADAnn1->PaintPalette = ppAuto;
LEADAnn1->AutoRepaint = True;
LEADAnn1->AutoSize = False;
LEADAnn1->AutoSetRects = True;
LEADAnn1->PaintSizeMode = smFit;
}

7.

Code the LoadLEAD button's click procedure as follows:

void __fastcall TForm1::LoadLEADClick(TObject *Sender)
{
LEADAnn1->Load ("D:\\pictures\\Test.cmp", 0, 0, 1);
}

8.

At the top of your main form, add four command buttons and name them as follows:

Name | Caption
AnnToggle | Start
IOToggle | Save
ClipboardToggle | Copy
Realize | Realize

9.

Code the AnnToggle control's Click procedure as follows.

void __fastcall TForm1::AnnToggleClick(TObject *Sender)
{
//Use the button to toggle between design mode and run mode
if ( AnnToggle->Caption == "Start" )
{
LEADAnn1->AnnUserMode = ANNUSERMODE_DESIGN;
LEADAnn1->AnnTool= ANNTOOL_BUTTON;
//Make run mode the next thing.
AnnToggle->Caption= "Run Mode";
ShowMessage ("In design mode now. Draw a button object.") ;
}
else
{
if ( AnnToggle->Caption == "Design Mode" )
{
LEADAnn1->AnnUserMode = ANNUSERMODE_DESIGN;
LEADAnn1->AnnTool = ANNTOOL_BUTTON;
//Make run mode the next thing.
AnnToggle->Caption= "Run Mode";
}
else
{
//The button takes us to run mode
LEADAnn1->AnnUserMode = ANNUSERMODE_RUN;
ShowMessage ( "Click on your new button" ) ;
AnnToggle->Caption= "Design Mode";
}
}
}

10.

Code the IOToggle control's Click procedure as follows:

void __fastcall TForm1::IOToggleClick(TObject *Sender)
{
int nRet;
AnsiString Msg;

//Disable errors so that we can trap our own->
LEADAnn1->EnableMethodErrors = false;
//Use the button to toggle between saving and loading annotations
if (IOToggle->Caption == "Save" )
{
//Do nothing if there are no annotations.
if (LEADAnn1->AnnContainer == 0)
return ;
//Save the selected annotations.
nRet= LEADAnn1->AnnSave ("D:\\pictures\\tmp.ann", ANNFMT_NATIVE, true, SAVE_OVERWRITE, 0);
nRet= LEADAnn1->AnnSave ("D:\\pictures\\tmp.ann", ANNFMT_NATIVE, true);
if (nRet == SUCCESS )
{
//Make loading the next thing.
IOToggle->Caption= "Load";
ShowMessage ( "Use the right mouse button to delete any annotations, then click Load" ) ;
}
else
{
Msg= "Error code: " + IntToStr(nRet);
ShowMessage ( Msg ) ;
}
}
else
{
//We are loading annotations
//Make sure we are in design mode
LEADAnn1->AnnUserMode = ANNUSERMODE_DESIGN;
//Load the annotations.
nRet= LEADAnn1->AnnLoad("D:\\Pictures\\tmp.ann", 1);
if (nRet == SUCCESS)
IOToggle->Caption= "Save";
else
ShowMessage ( "No annotations to load" ) ;
}
}

11.

Code the ClipboardToggle control's Click procedure as follows. (Note that Copy, Cut, and Paste are available as automated popup menu options. This code is for tailoring your application.)

void __fastcall TForm1::ClipboardToggleClick(TObject *Sender)
{
int nRet;
AnsiString Msg;

//Disable errors so that we can trap our own.
LEADAnn1->EnableMethodErrors = False;
//Use the button to toggle between copying and pasting annotations
if (ClipboardToggle->Caption == "Copy")
{
//Do nothing if there are no annotations.
if ( LEADAnn1->AnnContainer == 0 )
return ;
//Copy the selected annotations to the clipboard.
nRet= LEADAnn1->AnnCopy (ANNFMT_NATIVE, True, True);
if ( nRet == SUCCESS )
{

//Make pasting the next thing.
ClipboardToggle->Caption= "Paste";
ShowMessage ( "Use the right mouse button to delete any annotations, then click Paste" );
}
else
{
Msg= "Error code: " + IntToStr(nRet);
ShowMessage ( Msg );
}

}
else
{
//We are pasting annotations
//Make sure we are in design mode
LEADAnn1->AnnUserMode = ANNUSERMODE_DESIGN;
//Paste the annotations
if ( LEADAnn1->AnnPasteReady )
{
LEADAnn1->AnnPaste ();
ClipboardToggle->Caption= "Copy";
}
else
ShowMessage ( "No annotations to paste" ) ;
}
}

12.

Code the Realize control's Click procedure (which renders the annotation objects to the bitmap) as follows:

void __fastcall TForm1::RealizeClick(TObject *Sender)
{
LEADAnn1->AnnRealize (False);
LEADAnn1->ForceRepaint ();
ShowMessage ("Annotations are now rendered to the bitmap");
}

13.

Add the following declaration to the private section of Form1

int NewTag;

14.

Code the LEADAnn1 control's OnAnnCreate event as follows:

void __fastcall TForm1::LEADAnn1AnnCreate (L_HANDLE hObject)
{
//Update the tag if we need one.
if ((LEADAnn1->AnnGetType (hObject)== ANNOBJECT_BUTTON )||
(LEADAnn1->AnnGetType (hObject)== ANNOBJECT_HOTSPOT))
{
NewTag ++;
LEADAnn1->AnnSetTag (hObject, NewTag);
}
}

15.

Code the LEADAnn1 control's OnAnnDrawn event as follows:

void __fastcall TForm1::LEADAnn1AnnDrawn (L_HANDLE hObject)
{
LEADAnn1->AnnTool = ANNTOOL_SELECT;
ShowMessage ( "Use the right mouse button to modify this object; then click on Run Mode to test it." ) ;
}

16.

Code the LEADAnn1 control's OnAnnClicked event as follows:

void __fastcall TForm1::LEADAnn1AnnClicked (L_HANDLE hObject)
{
AnsiString Msg;

Msg= "This is what we do for the button tagged " + IntToStr (LEADAnn1->AnnGetTag(hObject)) ;
ShowMessage (Msg);
}

17.

Code the LEADAnn1 control's OnAnnDestroy Event as follows:

void __fastcall TForm1::LEADAnn1AnnDestroy (L_HANDLE hObject)
{
AnsiString Msg;
Msg= "The object tagged " + IntToStr (LEADAnn1->AnnGetTag (hObject)) + " is deleted.";
ShowMessage (Msg);
}

18.

Run your program to test it.


Print a Real Image Size in Inches (C++ Builder)

Take the following steps to start a project and to add some code that prints an image:

1. | Start C++ Builder.
2. | In the File menu, choose New Application.
3. | On the Builder toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEAD Main control on the VCL toolbar. Size and position the control, as you want it to appear at run time.
5. | Add a button control to your form and name it as follows:
 | Name | Caption
 | btnPrint | Print
6. | Declare the following variables in the private section of Form1.

float fRealWidth; //Image's real width in inches
float fRealHeight;// Image's real height in inches
int XRes; // Number of pixels per logical inch along the screen width.
int YRes; // Number of pixels per logical inch along the screen Height.

7.

Handle the btnPrint button's click procedure and add the following code to it to load the image:

LEADImage1->Load("c:\\image1.cmp", 0, 0, 1);

8.

Calculate the real width and height of the bitmap in inches. Add the following code to btnPrintClick procedure:

fRealWidth= LEADImage1->BitmapWidth / LEADImage1->BitmapXRes;
fRealHeight= LEADImage1->BitmapHeight / LEADImage1->BitmapYRes;

9.

Print the image using its real size in inches. Add the following code to btnPrintClick procedure:

Printer()->BeginDoc ( ) ;

//You should have the number of pixels per logical inch (XRes, YRes)
XRes= GetDeviceCaps ( Printer()->Canvas->Handle, LOGPIXELSX );
YRes= GetDeviceCaps ( Printer()->Canvas->Handle, LOGPIXELSY );

LEADImage1->Render((int)Printer()->Canvas->Handle, 1, 1, (int)(XRes * fRealWidth), (int)(YRes * fRealHeight) ) ;

Printer()->EndDoc ();

10. | Add #include <printers.hpp> to Unit1 header file (Unit1.h).
11. | Run your program to test it.


Combining Images with Regions (C++Builder)

1. | Start C++ Builder.
2. | In the File menu, choose New Application.
3. | On the Builder toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Add 2 of the LEAD Main VCL controls to your form. Size and position the controls, as you want them to appear at run time.
5. | Add a button to your form and name it as follows:
 | Name | Caption
 | btnCombine | Combine
6. | Handle the Form1 OnCreate event, and code FormCreate as follows:

void __fastcall TForm1::FormCreate(TObject *Sender)
{
LEADImage1->Load("r:\\images\\image1.cmp", 0, 1, 1);
LEADImage2->Load ("r:\\images\\image2.cmp", 0, 1, 1);
}

7.

Handle the btnCombine button's OnClick event, and code the btnCombineClick procedure as follows:

void __fastcall TForm1::btnCombineClick(TObject *Sender)
{
int nDstLeft;
int nDstTop;
int nSrcLeft;
int nSrcTop;
int nDstWidth;
int nDstHeight;
TRect rClientArea;

::GetClientRect ( LEADImage1->Handle, &rClientArea );
LEADImage1->SetRgnRect ( (int)(rClientArea.right/8), (int)(rClientArea.bottom/8), (int)(rClientArea.right/2), (int)(rClientArea.bottom/2), L_RGN_SET);

nDstLeft = (int)(LEADImage1->BitmapWidth /8 );
nDstTop = (int)(LEADImage1->BitmapHeight /8 );
nDstWidth = (int)(LEADImage1->BitmapWidth );
nDstHeight= (int)(LEADImage1->BitmapHeight );
nSrcLeft = 0;
nSrcTop = 0;

LEADImage1->Combine( nDstLeft, nDstTop, nDstWidth, nDstHeight, LEADImage2->Bitmap, nSrcLeft, nSrcTop, CB_OP_ADD + CB_DST_0);
}

8.

Run your program to test it.


Miscellaneous Examples (C++ Builder)

You can test any of the following examples by adding a command button to one of the previous lessons in the tutorial, and pasting the sample code in the Click procedure.

In most cases, you can add the button after the first lesson Loading and Displaying an Image. In cases where you need to zoom in or zoom out, you must first finish Zooming Out and Zooming In.

AboutBox example for C++ Builder

AdaptiveContrast Example for C++ Builder

AddBitmaps example for C++ Builder

AddBorder example for C++ Builder

AddFrame example for C++ Builder

AddMessage Example for C++ Builder

AddNoise example for C++ Builder

AddShadow Example for C++ Builder

AddWeightedBitmaps Example for C++ Builder

Aging Example for C++ Builder

AlphaBlend example for C++ Builder

AnimationEnable Example for C++ Builder

AnnAddUserHandle example for C++ Builder

AnnAdjustPoint example for C++ Builder

AnnAutoCursor example for C++ Builder

AnnAutoDialogFontSize Example for C++ Builder

AnnAutoDrawEnable Example for C++ Builder

AnnAutomation Example for C++ Builder

AnnAutoHilightPen example for C++ Builder

AnnAutoMenuEnable Example for C++ Builder

AnnAutoResize example for C++ Builder

AnnAutoRotate example for C++ Builder

AnnBoundingRect... example for C++ Builder

AnnChangeUserHandle example for C++ Builder

AnnDataPath example for C++ Builder

AnnDefine2 example for C++ Builder

AnnDeletePage example for C++ Builder

AnnDeletePageMemory example for C++ Builder

AnnDeleteUserHandle example for C++ Builder

AnnDestroy example for C++ Builder

AnnEncryptApply example for C++ Builder

AnnEnumerateHandles example for C++ Builder

AnnEnumerateTextToken example for C++ Builder

AnnFixed example for C++ Builder

AnnGetAngle example for C++ Builder

AnnGetAutoMenuItemEnable Example for C++ Builder

AnnGetDistance example for C++ Builder

AnnGetDistance2 example for C++ Builder

AnnGetBitmapDpiX Example for C++ Builder

AnnGetGrouping example for C++ Builder

AnnGetHyperlinkParam example for C++ Builder

AnnGetHyperlinkString example for C++ Builder

AnnGetHyperlinkType example for C++ Builder

AnnGetNameOffsetX example for C++ Builder

AnnGetNameRestrict example for C++ Builder

AnnGetNodes example for C++ Builder

AnnGetObjectFromTag example for C++ Builder

AnnGetPoint... example for C++ Builder

AnnGetPredefinedMetafile example for C++ Builder

AnnGetSecondaryMetafile example for C++ Builder

AnnGetSelectList example for C++ Builder

AnnGetTopContainer example for C++ Builder

AnnGetUserHandles example for C++ Builder

AnnGetVisible Example for C++ Builder

AnnGroup example for C++ Builder

AnnHandle example for C++ Builder

AnnHitTestExt example for C++ Builder

AnnHyperlinkMenuEnable example for C++ Builder

AnnInsert example for C++ Builder

AnnInsertTextTokenTable example for C++ Builder

AnnIsFixedRect example for C++ Builder

AnnLock example for C++ Builder

AnnMove example for C++ Builder

AnnNameBoundingRectLeft example for C++ Builder

AnnNameOptions example for C++ Builder

AnnNameRectLeft example for C++ Builder

AnnOptions Example for C++ Builder

AnnPointOptions example for C++ Builder

AnnPopFixedState example for C++ Builder

AnnPredefinedBitmap example for C++ Builder

AnnPushFixedState example for C++ Builder

AnnRectHeight example for C++ Builder

AnnRectLeft example for C++ Builder

AnnRectTop example for C++ Builder

AnnRectWidth example for C++ Builder

AnnRestrictCursor example for C++ Builder

AnnRestrictToContainer example for C++ Builder

AnnRotate example for C++ Builder

AnnRTFText example for C++ Builder

AnnSaveMemory for C++ Builder

AnnSaveTag example for C++ Builder

AnnSelectRect example for C++ Builder

AnnSetAutoMenuItemEnable Example for C++ Builder

AnnSetAutoText Example for C++ Builder

AnnSetBitmap example for C++ Builder

AnnSetBackColor example for C++ Builder

AnnSetFillMode example for C++ Builder

AnnSetFillPattern example for C++ Builder

AnnSetFontBold example for C++ Builder

AnnSetFontItalic example for C++ Builder

AnnSetFontName example for C++ Builder

AnnSetFontSize example for C++ Builder

AnnSetFontStrikeThrough example for C++ Builder

AnnSetFontUnderline example for C++ Builder

AnnSetForeColor example for C++ Builder

AnnSetGaugeLength example for C++ Builder

AnnSetGrouping example for C++ Builder

AnnSetHyperlinkMsg Example for C++ Builder

AnnSetLineStyle example for C++ Builder

AnnSetLineWidth example for C++ Builder

AnnSetMetafile example for C++ Builder

AnnSetPoints example for C++ Builder

AnnSetPolyFillMode example for C++ Builder

AnnSetROP2 example for C++ Builder

AnnSetScalarX example for C++ Builder

AnnSetSecondaryBitmap example for C++ Builder

AnnSetShowFlags example for C++ Builder

AnnSetText example for C++ Builder

AnnSetUnit example for C++ Builder

AnnSetUser Example for C++ Builder

AnnSetWnd example for C++ Builder

AnnShowLockedIcon Example for C++ Builder

AnnTextAlign example for C++ Builder

AnnTextExpandTokens example for C++ Builder

AnnTextRotate example for C++ Builder

AnnTicMarkLength example for C++ Builder

AnnUndo example for C++ Builder

AnnUndoDepth example for C++ Builder

AnnUndoEnable example for C++ Builder

AnnUngroup Example for C++ Builder

AnnUnlock Example for C++ Builder

AnnUnrealize Example for C++ Builder

AnnUserHandle example for C++ Builder

AntiAlias example for C++ Builder

ApplyMathLogic Example for C++ Builder

ApplyModalityLUT Example for C++ Builder

ApplyVOILUT Example for C++ Builder

AutoAnimate Example for C++ Builder

AutoBinary Example for C++ Builder

AutoCADFilesColorScheme example for C++ Builder

AutoColorLevel Example for C++ Builder

AutoSize Example for C++ Builder

AutoTrim example for C++ Builder

Average example for C++ Builder

BackColor (ImageList Control) example for C++ Builder

BackColor example for C++ Builder

BackErase example for C++ Builder

BalanceColors C++ Builder Example

Bending Example for C++ Builder

BinaryFilter example for C++ Builder

BitmapAlpha example for C++ Builder

BitmapCompression Example for C++ Builder

BitmapDataPath Example for C++ Builder

BitmapOrder example for C++ Builder

BitmapToClient example for C++ Builder

BitmapXres and BitmapYres example for C++ Builder

BitonalScaling (ImageList Control) example for C++ Builder

BitonalScaling example for C++ Builder

BorderColor (ImageList Control) example for C++ Builder

BorderRemove example for Builder

BrowseDir example for C++ Builder

BumpMap Example for C++ Builder

ButtonColumns example for C++ Builder

ButtonMenuTool example for C++ Builder

ButtonRows example for C++ Builder

ButtonVisible example for C++ Builder

CancelFloater example for C++ Builder

Capture example for C++ Builder

CenterImage example for C++ Builder

ChangeHueSatInt Example for C++ Builder

ChannelMix Example for C++ Builder

Clear (ImageList Control) example for C++ Builder

ClientToBitmap example for C++ Builder

ColorCount example for C++ Builder

ColorIntensityBalance Example for C++ Builder

ColorizeGray Example for C++ Builder

ColorLevel Example for C++ Builder

ColorReplace Example for C++ Builder

ColorResList Example for C++ Builder

ColorThreshold Example for C++ Builder

Combine example for C++ Builder

CombineExt example for C++ Builder

CombineWarp example for C++ Builder

Comment example for C++ Builder

ContinueBrowse example for C++ Builder

ContourFilter example for C++ Builder

Contrast example for C++ Builder

ContrastBrightIntensity Example for C++ Builder

ConvertToColoredGray C++ Builder Example

ConvertUnsignedToSigned Example for C++ Builder

CopyMarkers example for C++ Builder

Correlation Example for C++ Builder

CountLUTColors Example for C++ Builder

CreateBitmap, Size, and Combine example for C++ Builder

CreateMaskFromBitmapRgn example for C++ Builder

CreateTB example for C++ Builder

CreateThumbnailFromFile example for C++ Builder

Creating and Saving an Animated GIF File example for C++ Builder

Cubism Example for C++ Builder

CurveToBezier example for C++ Builder

Cylindrical Example for C++ Builder

DDB example for C++ Builder

Deinterlace Example for C++ Builder

DeleteBitmapListItems example for C++ Builder

DeleteMarker example for C++ Builder

DeleteMarkerAt example for C++ Builder

DeletePage example for C++ Builder

Desaturate Example for C++ Builder

Deskew example for C++ Builder

Despeckle example for C++ Builder

DIB example for C++ Builder

DiceEffect Example for C++ Builder

DigitalSubtract Example for C++ Builder

DirectionEdgeStatistical Example for C++ Builder

DiscreteFourierTransformation Example for C++ Builder

DisplayFourierTransformation Example for C++ Builder

DJVResolution example for Builder

DocCleanBitmap example for Builder

DocCleanSuccess example for Builder

DrawShape example for C++ Builder

DrawStar Example for C++ Builder

DrawTextStr example for C++ Builder

DropFilesAllowed example for C++ Builder

Dry Example for C++ Builder

Dst... example for C++ Builder

DynamicBinary Example for C++ Builder

EdgeDetectEffect Example for C++ Builder

EdgeDetector example for C++ Builder

EdgeDetectStatistical Example for C++ Builder

Emboss example for C++ Builder

EnableFloater example for C++ Builder

EnableKeyboard (ImageList Control) example for C++ Builder

EnableMethodErrors (ImageList Control) example for C++ Builder

EnableMethodErrors (Thumbnail Browser Control) example for C++ Builder

EnableMethodErrors example for C++ Builder

EnableOLEDragMethod (ImageList Control) example for C++ Builder

EnableOLEDragMethod (Main Control) example for C++ Builder

EnableZoomInRect example for C++ Builder

EnumTags example for C++ Builder

Error (ImageList Control) example for C++ Builder

ErrorMsg (Main Control) example for C++ Builder

Exif example for C++ Builder

ExportBitmapList example for C++ Builder

ExtractMessage Example for C++ Builder

FastFourierTransformation Example for C++ Builder

FastRotate example for C++ Builder

FeatherAlphaBlend example for C++ Builder

FeedLoad example for C++ Builder

Fill example for C++ Builder

Flip example for C++ Builder

FloaterDstClip... example for C++ Builder

Font (ImageList Control) example for C++ Builder

ForeColor (ImageList Control) example for C++ Builder

Frame... example for C++ Builder

FreeHandShear Example for C++ Builder

FreeHandWave Example for C++ Builder

FreePlaneBend Example for C++ Builder

FreeRadBend Example for C++ Builder

FrequencyFilter Example for C++ Builder

FrequencyFilterMask Example for C++ Builder

FunctionalLight Example for C++ Builder

GammaCorrect example for C++ Builder

GaussianFilter C++ Builder Example

GetBitmapClipSegments example for C++ Builder

GetBitmapDC example for C++ Builder

GetBitmapRow example for C++ Builder

GetBitmapRowCol example for C++ Builder

GetDIB example for C++ Builder

GetFeretsDiameter Example for C++ Builder

GetFileInfo example for C++ Builder

GetFloaterHandle example for C++ Builder

GetFunctionalLookupTable example for C++ Builder

GetHistogram example for C++ Builder

GetHistogramGray example for C++ Builder

GetLinearVOILUT Example for C++ Builder

GetMarkers example for C++ Builder

GetMemoryThresholds example for C++ Builder

GetMinMaxBits example for C++ Builder

GetMinMaxVal example for C++ Builder

GetObjectInfo Example for C++ Builder

GetPixelData example for C++ Builder

GetRgnBounds example for C++ Builder

GetRgnHandle example for C++ Builder

GetRgnPerimeterLength Example for C++ Builder

GetStatisticsInfo Example for C++ Builder

GetTransformationParameters Example for C++ Builder

GetUserLookupTable example for C++ Builder

GlassEffect Example for C++ Builder

GlowFilter Example for C++ Builder

Grayscale example for C++ Builder

GrayScaleExt C++ Builder Example

GrayScaleToDuotone Example for C++ Builder

GrayScaleToMultitone Example for C++ Builder

h_Wnd (AnnToolbar) example for C++ Builder

Halftone example for C++ Builder

HasMagGlass example for C++ Builder

HasRgn example for C++ Builder

HDocCleanRgn example for C++ Builder

HistoContrast example for C++ Builder

HistoEqualize example for C++ Builder

HistogramTableSize example for C++ Builder

HitTest (ImageList Control) example for C++ Builder

HolesRemovalRgn Example for C++ Builder

HScrollInfo example for C++ Builder 4.0

HScrollStep example for C++ Builder

HSV_HfromRGB example for C++ Builder

Hue example for C++ Builder

IgnoreFilters example for C++ Builder

ImportBitmapList example for C++ Builder

Impressionist Example for C++ Builder

InfoColorSpace example for C++ Builder

InfoHasAlpha example for C++ Builder

InfoLayers example for C++ Builder

InfoViewPerspective example for C++ Builder

Insert (ImageList Control) example for C++ Builder

InsertAt (ImageList Control) example for C++ Builder

InsertBitmapListItem Example for C++ Builder

InsertFromBitmapList (ImageList Control) example for C++ Builder

InsertMarker example for C++ Builder

Intensity example for C++ Builder

IntensityDetect example for C++ Builder

Invert example for C++ Builder

InvertedText example for C++ Builder

ISISAcquire example for C++ Builder

ISISAcquireMulti example for C++ Builder

ISISGetASCIITag example for C++ Builder

ISISGetASCIITagChoiceCount example for C++ Builder

ISISGetTagChoiceCount example for C++ Builder

IsISISAvailable example for C++ Builder

ISISSelect example for C++ Builder

ISISSetScanOptions example for C++ Builder

IsPtInRgn example for C++ Builder

IsRegMark Example for C++ Builder

IsSigned example for C++ Builder

IsSupportLocked (ISIS Control) example for C++ Builder

Item (ImageList Control) example for C++ Builder

ItemBackgroundColor (ImageList Control) example for C++ Builder

ItemWidth (ImageList Control) example for C++ Builder

J2KCompressionControl example for C++ Builder

J2KCompressionRatio example for C++ Builder

J2KSetDefaults example for C++ Builder

J2KTargetFileSize example for C++ Builder

J2KUseROI example for C++ Builder

JBIG2SaveFlags Example for C++ Builder

LensFlare Example for C++ Builder

LevelLowBit example for C++ Builder

LevelLUT example for C++ Builder

LevelLUTLength example for C++ Builder

Light Example for C++ Builder

LightControl Example for C++ Builder

LineProfile C++ Builder Example

LineRemove example for C++ Builder

LoadDatabase example for C++ Builder

LoadFast example for C++ Builder

LoadFileTile example for C++ Builder

LoadFromFile (ImageList Control) example for C++ Builder

LoadIFD example for C++ Builder

LoadMarkers example for C++ Builder

LoadMemory example for C++ Builder

LoadMemoryTile example for C++ Builder

LoadResize example for C++ Builder

LoadUseViewPerspective example for C++ Builder

LocalHistoEqualize Example for C++ Builder

MagGlassPaintContrast example for C++ Builder

MagGlassPointer example for C++ Builder

MathFunction Example for C++ Builder

MaxFilter example for C++ Builder

Median example for C++ Builder

MinFilter example for C++ Builder

Mosaic example for C++ Builder

MotionBlur example for C++ Builder

Multiply Example for C++ Builder

MultiScaleEnhancement Example for C++ Builder

Ocean Example for C++ Builder

OCXBitmap example for C++ Builder

Oilify example for C++ Builder

OnAnimate Event Example for C++ Builder

OnAnnChange Event Example for C++ Builder

OnAnnEnumerate example for C++ Builder

OnAnnLocked example for C++ Builder

OnAnnMenu example for C++ Builder

OnAnnMouseDown example for C++ Builder

OnAnnSelect example for C++ Builder

OnAnnToolChecked Example for C++ Builder

OnAnnToolDestroy Example for C++ Builder

OnAnnUnlocked Example for C++ Builder

OnBitmapDataPathClosed example for C++ Builder

OnChange example for C++ Builder

OnEnumerateMarkers example for C++ Builder

OnFilePage Event Example for C++ Builder

OnItemSelected (ImageList Control) example for C++ Builder

OnLoadInfo... example for C++ Builder

OnOLECompleteDrag (ImageList Control) example for C++ Builder

OnOLECompleteDrag (Main Control) example for C++ Builder

OnPaint event example for C++ Builder

OnRgnChange example for C++ Builder

OnScroll event example for C++ Builder

OnZoomInDone example for C++ Builder

OwnerDrawItem event example for C++ Builder

OwnerDrawItems example for C++ Builder

PageCount (ImageList Control) example for C++ Builder

PaintContrast example for C++ Builder

PaintDither (ImageList Control) example for C++ Builder

PaintDither example for C++ Builder

PaintEffect example for C++ Builder

PaintGamma example for C++ Builder

PaintIntensity example for C++ Builder

PaintMaxPasses example for C++ Builder

PaintPalette example for C++ Builder

PaintRgnOnly example for C++ Builder

PaintROP3 example for C++ Builder

PaintScaling example for C++ Builder (ImageList Control)

PaintScaling example for C++ Builder (Main Control)

PaintSizeMode Example for C++ Builder

PaintSizeUseDPI example for C++ Builder

PaintWhileLoad example for C++ Builder

PaintZoomFactor Example for C++ Builder

PatternStyle example for C++ Builder

PCDRes example for C++ Builder

PDFEncryptFlags example for C++ Builder

PDFInitDir example for C++ Builder

PDFSaveUseDPI example for C++ Builder

PDFXResolution property example for C++ Builder

Picturize example for C++ Builder

PicturizeBitmapList example for C++ Builder

PicturizeSingle example for C++ Builder

Pixel example for C++ Builder

Pixelate Example for C++ Builder

Plane Example for C++ Builder

PlaneBend Example for C++ Builder

PLTPenColor example for C++ Builder

Polar Example for C++ Builder

Posterize example for C++ Builder

PreferredLoadFormat example for C++ Builder

PreLoadFilters Example for C++ Builder

ProgressivePasses Example for C++ Builder

PTKResolution Example for C++ Builder

Punch Example for C++ Builder

PuzzleEffect Example for C++ Builder

RadialBlur Example for C++ Builder

RadWave Example for C++ Builder

RasterizeViewportWidth example for C++ Builder

RawLoad example for C++ Builder

RawSave example for C++ Builder

ReadLoadResolutions Example for C++ Builder

ReadTagMemory example for C++ Builder

ReadyState Example for C++ Builder

RemapHue example for C++ Builder

RemapTableSize example for C++ Builder

Remove (ImageList Control) example for C++ Builder

RemoveRedeye example for C++ Builder

RenderCenter Example for C++ Builder

RepaintRect event example for C++ Builder

ResizeRgn example for C++ Builder

RevEffect Example for C++ Builder

Reverse event example for C++ Builder

RGBfromHSV example for C++ Builder

RgnFrameColor example for C++ Builder

RgnFrameType example for C++ Builder

RgnHeight example for C++ Builder

RgnMarkingMode example for C++ Builder

RingEffect Example for C++ Builder

Ripple Example for C++ Builder

Rotate example for C++ Builder

RowCount (ImageList Control) example for C++ Builder

RTFPaperHeight example for C++ Builder

SampleTarget Example for C++ Builder

Saturation example for C++ Builder

Save example for C++ Builder

SaveBuffer example for C++ Builder

SaveDatabase example for C++ Builder

SaveIFD example for C+ Builder

SaveInterlaced example for C++ Builder

SaveLayers example for C++ Builder

SaveLSB example for C++ Builder

SaveMemory example for C++ Builder

SaveOffset example for C++ Builder

SavePage example for C++ Builder

SaveResolutionCount example for C++ Builder

SaveTileWidth example for C++ Builder

SaveToFile (ImageList Control) example for C++ Builder

SaveWithStamp example for C++ Builder

ScrollItems (ImageList Control) example for C++ Builder

ScrollStyle (ImageList Control) example for C++ Builder

Segment Example for C++ Builder

SelectAll (ImageList Control) example for C++ Builder

SelectData Example for C++ Builder

SelectedItems example for C++ Builder

SelectionColor (ImageList Control) example for C++ Builder

SelectionStyle (ImageList Control) example for C++ Builder

SelectiveColor Example for C++ Builder

SetMemoryThresholds example for C++ Builder

SetRgn... example for C++ Builder

SetRgnBorder example for C++ Builder

SetRgnColorHSVRange example for C++ Builder

SetRgnColorRGBRange example for C++ Builder

SetRgnFromMask example for C++ Builder

SetRgnMagicWand example for C++ Builder

SetRgnRect example for C++ Builder

SetRgnRoundRect example for C++ Builder

SetSelectionBitmap example for C++ Builder

SetSrcClipRect example for C++ Builder

SetSrcRect example for C++ Builder

SetTag example for C++ Builder

Sharpen example for C++ Builder

Shear example for C++ Builder

ShiftData Example for C++ Builder

ShowMagGlass Example for C++ Builder

ShowMagGlass example for C++ Builder

Skeleton Example for C++ Builder

SkipFile example for C++ Builder

SmoothEdges Example for C++ Builder

Solarize example for C++ Builder

Sort (ImageList Control) example for C++ Builder

SortExt example for C++ Builder

SpatialFilter example for C++ Builder

Spherize Example for C++ Builder

Src... example for C++ Builder

STable example for C++ Builder

StartMagGlass example for C++ Builder

StretchIntensity example for C++ Builder

SubtractBackground Example for C++ Builder

SwapColors C++ Builder Example

Swirl Example for C++ Builder

TextFont example for C++ Builder

TextPointerFixed example for C++ Builder

TextureAlphaBlend Example for C++ Builder

TextWordWrap example for C++ Builder

TransitionEffect example for C++ Builder

TransparentColor example for C++ Builder

Trim example for C++ Builder

Tunnel Example for C++ Builder

Underlay example for C++ Builder

UnlockSupport (ImageList Control) example for C++ Builder

UnlockSupport (ISIS Control) example for C++ Builder

UnlockSupport (Thumbnail Browser Control) example for C++ Builder

UnsharpMask C++ Builder Example

UseLUT Example for C++ Builder

UserFilter Example for C++ Builder

UserPalette and BitmapPalette example for C++ Builder

Version... example for C++ Builder

ViewSize example for C++ Builder

VScrollStep example for C++ Builder

VTable example for C++ Builder

Wave Example for C++ Builder

Wind Example for C++ Builder

WindowLevel example for C++ Builder

WindowLevelBitmap example for C++ Builder

WindowLevelFillLUT example for C++ Builder

WMFResolution example for C++ Builder

WMFResolutionX Example for C++ Builder

WriteComment example for C++ Builder

WriteMarkerAction example for C++ Builder

WriteMetaData example for C++ Builder

ZoomBlur Example for C++ Builder

ZoomIn example for C++ Builder

ZoomWave Example for C++ Builder


AboutBox example for C++ Builder

This example displays the LEADTOOLS VCL information.

Lead1->AboutBox;


AdaptiveContrast Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* This example loads a bitmap and applies Adaptive Contrast Enhancement */
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load( "image1.cmp", 0, 1, 1 );

/* Apply Adaptive Contrast Enhancement */
LEADImage1->AdaptiveContrast(9, 200, ACE_LIN);
}


AddBitmaps example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_INT i;

for ( i= 0; i < 5; i ++ )
{
LEADImage2->Bitmap = LEADImage1->Bitmap;
LEADImage2->Rotate ( 7200 * i, 0, RGB(255, 0, 0) );
LEADImage3->InsertBitmapListItem (LST_APPEND, LEADImage2->Bitmap);
}
LEADImage1->AddBitmaps ( LEADImage3->BitmapList, BC_AVG );
}


AddBorder example for C++ Builder

LEADImage1->AddBorder (30, 30, 30, 30, BORDER_OUTSIDE,
BORDER_STYLE_OPAQUE,
BORDER_EFFECT_CURVEDIN,
0, BORDER_GRAD_INSIDEOUT,
RGB(200, 150, 150),
0, 200, False,
False, 0,
BORDER_SHADOW_LEFT, False);


AddFrame example for C++ Builder

LEADImage1->AddFrame (LEADImage2->Bitmap, False, False, 0, 0, FRAME_OUTSIDE, FRAME_QUALITY_LOW);


AddMessage Example for C++ Builder

void __fastcall TForm1::AddMessageClick(TObject *Sender)
{
AnsiString strMsg= "LEAD Technologies, Inc.";
TPoint ptStart;

ptStart.x= 0;
ptStart.x= 0;

/*Add the above message to image in the default position and with the default password */
LEADImage1->AddMessage( strMsg, "", "", ptStart );
}


AddNoise example for C++ Builder

This example adds red noise and redisplays the bitmap.

Lead1->AddNoise(500, CHANNEL_RED);
Lead1->ForceRepaint();


AddShadow Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load a bitmap at its own bits per pixel */
LEADImage1->Load( "IMAGE3.CMP", 0, 1, 1 );

/* Apply shadow effect to the image*/
LEADImage1->AddShadow( SHADOW_SE, 0, SHADOW_CLR_GRAY );
}


AddWeightedBitmaps Example for C++ Builder

void __fastcall TForm1::AddWeightedBitmapsClick(TObject *Sender)
{
L_INT i;

/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load( "e:\\image1.cmp", 0, 1, 1 );

for ( i= 0; i < 4; i ++ )
{
LEADImage1->Rotate( i * 720, ROTATE_RESIZE, RGB(255, 0, 0));
LEADImage2->InsertBitmapListItem( 0, LEADImage1->Bitmap);
}

LEADImage1->AddWeightedBitmaps( LEADImage2->BitmapList, NULL, BC_AVG );
}


Aging Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load( "image1.cmp", 0, 1, 1 );

/* apply aging effect */
LEADImage1->Aging(10, 2, 50,2,5,6, RGB(255,255,0), RGB(0,0,0),
RGB(0,0,255), AGING_ADD_VSCRATCH + AGING_ADD_PITS + AGING_SCRATCH_INV +
AGING_PITS_CLR);
}


AlphaBlend example for C++ Builder

LEADImage2->Bitmap = LEADImage1->Bitmap;
LEADImage2->IntensityDetect (150, 250) ;
LEADImage1->AlphaBlend (0, 0, LEADImage1->BitmapWidth, LEADImage1->BitmapHeight,
LEADImage2->Bitmap, 0, 0, 128);


AnimationEnable Example for C++ Builder

This example loads and plays an animated file. It assumes that the LEAD control has already been sized to the aspect ratio of the image.

/*Load all pages of an animated gif file.*/
Lead1->Load("d:\\ltwin11\\images\\eye.gif", 0, 1, -1);
/*Set properties for a scaled animation.*/
Lead1->AutoRepaint = True;
Lead1->AutoSetRects = False;
/*Set the image display size to match the LEAD control.*/
Lead1->SetDstRect(0, 0, Lead1->Width, Lead1->Height);
Lead1->SetDstClipRect(0, 0, Lead1->Width, Lead1->Height);
/*Allow a continuous loop. */
Lead1->AnimationLoop = True;
/*Start the animation.*/
Lead1->AnimationEnable = True;


AnnAddUserHandle example for C++ Builder

//This example adds user handles to the center of the top and bottom lines of a rectangle.
//hRect is a rectangle

void TForm1::ExampleAnnAddUserHandle (HANNOBJECT hObject )
{
L_INT nObjectType;
double RectTop;
double RectLeft;
double RectWidth;
double RectHeight;

nObjectType = LEADAnn1->AnnGetType(hObject);
if(nObjectType == ANNOBJECT_RECT )
{
RectTop = LEADAnn1->AnnRectTop[hObject];
RectLeft = LEADAnn1->AnnRectLeft[hObject];
RectWidth = LEADAnn1->AnnRectWidth[hObject];
RectHeight = LEADAnn1->AnnRectHeight[hObject];

LEADAnn1->AnnHandle->ID = 100;
LEADAnn1->AnnHandle->Visible = true;
LEADAnn1->AnnHandle->PenColor = RGB(0, 0, 0);
LEADAnn1->AnnHandle->FillColor = RGB(255, 0, 0);
LEADAnn1->AnnHandle->Shape = ANNHANDLE_SHAPE_CIRCLE;
LEADAnn1->AnnHandle->Cursor = NULL;

LEADAnn1->AnnHandle->Flags = ANNHANDLE_ID +
ANNHANDLE_LOCATION +
ANNHANDLE_CONTAINER_COORDINATES +
ANNHANDLE_VISIBLE +
ANNHANDLE_PEN_COLOR +
ANNHANDLE_FILL_COLOR +
ANNHANDLE_SHAPE;

LEADAnn1->AnnHandle->ContainerX = RectLeft + (RectWidth / 2);
LEADAnn1->AnnHandle->ContainerY = RectTop;

LEADAnn1->AnnHandle->ContainerX = RectLeft + (RectWidth / 2);
LEADAnn1->AnnHandle->ContainerY = RectTop + RectHeight;

LEADAnn1->AnnAddUserHandle (hObject);
}
else
{
ShowMessage ("Annotation object must be a rectangle.");
}
}


AnnAdjustPoint example for C++ Builder

void TForm1::ExampleAnnAdjustPoint (HANNOBJECT hObject , double dAnchorX, double double dAnchorY, double dMoveX, double dMoveY, double dAngle)
{
LEADAnn1->AnnAdjustPoint(dAnchorX, dAnchorY, dMoveX, dMoveY, dAngle, ANNADJUST_HORIZONTAL);
}


AnnAutoCursor example for C++ Builder

This sample sets the Default and Move annotation cursors

void TForm1::SampleAnnAutoCursors()
{
L_HCURSOR hCursorMove;
L_HCURSOR hCursorDefault;

// load the cursors from files
hCursorDefault= (L_HCURSOR)LoadCursorFromFile("c:\\Default.cur");
hCursorMove= (L_HCURSOR)LoadCursorFromFile("c:\\Move.cur");

// Set
LEADAnn1->AnnAutoCursor[ANNAUTOCURSOR_DEFAULT]= hCursorDefault;
LEADAnn1->AnnAutoCursor[ANNAUTOCURSOR_MOVE]= hCursorMove;
}


AnnAutoDialogFontSize Example for C++ Builder

// This example will set the dialog fonts to use Courier 15
LEADAnn1->AnnSetAutoText (ANNAUTOTEXT_DIALOG_FONT, "Courier New");
LEADAnn1->AnnAutoDialogFontSize = 15;


AnnAutoDrawEnable Example for C++ Builder

This example toggles the AnnAutoDrawEnable property.

if (LEADAnn1->AnnAutoDrawEnable == true)
LEADAnn1->AnnAutoDrawEnable= false;
else
LEADAnn1->AnnAutoDrawEnable = true;


AnnAutomation Example for C++ Builder

This example shows how you can use the AnnAutomation property to access the automation object through DLL functions.

L_BOOL IsBold; // Is the object's text bold
int hAnnObject;

hAnnObject= LEADAnn1->AnnAutomation;
//Set the default font to bold, unless it already is
L_AnnGetFontBold ( hAnnObject, &IsBold ) ;
if (IsBold != 0 )
ShowMessage ("Already bold");
else
L_AnnSetFontBold (hAnnObject, 1, 0);


AnnAutoHilightPen example for C++ Builder

This Example assumes that you have a menu item named "_miHilightPen". By selecting this menu item and deselecting it, you can notice the effect of changing the AnnAutoHilightPen property value.

void __fastcall TForm1::FormCreate(TObject *Sender)
{
HANNOBJECT hObject;

LEADAnn1->UnlockSupport(L_SUPPORT_DOCUMENT, "TestKey");

LEADAnn1->Load("Image1.bmp", 0, 0, 1);
LEADAnn1->AnnUserMode= ANNUSERMODE_DESIGN;

hObject= LEADAnn1->AnnCreate(ANNOBJECT_RECT, true, true);
LEADAnn1->AnnRectHeight[hObject]= 100;
LEADAnn1->AnnRectWidth[hObject]= 200;
LEADAnn1->AnnRectLeft[hObject]= 50;
LEADAnn1->AnnRectTop[hObject]= 50;
_miHilightPen->Checked= False;
}

void __fastcall TForm1::_miHilightPenClick(TObject *Sender)
{
_miHilightPen->Checked= ! _miHilightPen->Checked;
if(_miHilightPen->Checked)
LEADAnn1->AnnAutoHilightPen= RGB(0xC0, 0xC0, 0xC0);
else
LEADAnn1->AnnAutoHilightPen= RGB(0xFF, 0xFF, 0xFF);
}


AnnAutoMenuEnable Example for C++ Builder

//This example toggles the AnnAutoMenuEnable property.
if (LEADAnn1->AnnAutoMenuEnable == true)
LEADAnn1->AnnAutoMenuEnable = false;
else
LEADAnn1->AnnAutoMenuEnable = true;


AnnAutoResize example for C++ Builder

//This example, will double the size of the bitmap and annotations
LEADAnn1->AnnAutoResize= true;
LEADAnn1->Size (LEADAnn1->BitmapWidthBitmapWidthProperty * 2,
LEADAnn1->BitmapHeight * 2,
SIZE_RESAMPLE);


AnnAutoRotate example for C++ Builder

//This example enables automatic rotation of annotations,
//then rotates the bitmap 2222 hundredths of degrees to demonstrate the automation:
LEADAnn1->AnnAutoRotate= True;
LEADAnn1->Rotate ( 2222, ROTATE_RESIZE, RGB(0, 0, 255));


AnnBoundingRect... example for C++ Builder

void TForm1::SampleAnnBoundingRect (L_HANDLE hObject )
{
AnsiString strMsg;
int nLeft, nTop, nWidth, nHeight;

nLeft = LEADAnn1->AnnBoundingRectLeft [hObject];
nTop = LEADAnn1->AnnBoundingRectTop [hObject];
nWidth = LEADAnn1->AnnBoundingRectWidth [hObject];
nHeight= LEADAnn1->AnnBoundingRectHeight [hObject];

ShowMessage ("Ann Bounding Rect: Left[" + IntToStr(nLeft) + "], Top[" + IntToStr(nTop) + "], Width[" + IntToStr(nWidth) + "], Height[" + IntToStr(nHeight) + "]");
}


AnnChangeUserHandle example for C++ Builder

// This example changes the first user handle of an object by
// * moving the handle ten pixels to the left,
// * changing the color of handle to blue,
// * changing the shape of the handle to square and
// * displays the hour glass cursor when the mouse is over the handle.

void TForm1::ExampleAnnChangeUserHandle ( HANNOBJECT hObject )
{
long nCount ;

LEADAnn1->AnnGetUserHandles (hObject);
nCount = LEADAnn1->AnnUserHandlesCount;

if( nCount > 0 )
{
LEADAnn1->AnnGetUserHandle(hObject, 0);
LEADAnn1->AnnHandle->ContainerX = LEADAnn1->AnnHandle->ContainerX + 10;
LEADAnn1->AnnHandle->FillColor = RGB(0, 0, 255);
LEADAnn1->AnnHandle->Shape = ANNHANDLE_SHAPE_SQUARE;
LEADAnn1->AnnHandle->Flags = (ANNHANDLE_FILL_COLOR +
ANNHANDLE_SHAPE +
ANNHANDLE_LOCATION);

LEADAnn1->AnnChangeUserHandle(hObject, 0);
}
else
ShowMessage("No User Handle");
}


AnnDataPath example for C++ Builder

//This example shows how to load an annotation file.
LEADAnn1->AnnDataPath= "D:\\pictures\\Test.ann";


AnnDefine2 example for C++ Builder

//This example uses static variables to simulate user input to
//'rotate/resize a rectangle around a point on the bottom center line of the rectangle.
//'Intially the rectangle must not be rotated.
void TForm1::ExampleExampleAnnDefine2 (HANNOBJECT hObject )
{
long hContainer ;
L_INT nObjectType ;
double dAngle ;
long lCallCount=0;
double dRectTop ;
double dRectLeft ;
double dRectWidth ;
double dRectHeight;
double dRectRight ;
double dRectBottom;

double dAnchorX ;
double dAnchorY;
double dMoveX;
double dMoveY;
double dAnnPointX;
double dAnnPointY;

nObjectType= LEADAnn1->AnnGetType(hObject);

if (nObjectType != ANNOBJECT_RECT )
ShowMessage ("This object is not Rect Object");

dAngle = LEADAnn1->AnnRotateAngle[hObject];

if (dAngle != 0 )
ShowMessage ("Object must not be rotated");

lCallCount = lCallCount + 1;
switch (lCallCount)
{
case 1:
dRectTop = LEADAnn1->AnnRectTop[hObject];
dRectLeft = LEADAnn1->AnnRectLeft[hObject];
dRectWidth = LEADAnn1->AnnRectWidth[hObject];
dRectHeight = LEADAnn1->AnnRectHeight[hObject];

dRectRight = dRectWidth + dRectLeft;
dRectBottom = dRectHeight + dRectTop;

dAnchorX = (dRectLeft + dRectRight) / 2;
dAnchorY = dRectBottom;

dAnnPointX = (dRectLeft + dRectRight) / 2;
dAnnPointY = dRectTop;

LEADAnn1->AnnDefine2(hObject, dAnchorX, dAnchorY, ANNDEFINE_SETANCHORPOINT);
LEADAnn1->AnnDefine2(hObject, dAnnPointX, dAnnPointY, ANNDEFINE_BEGINMOVEPOINT);
break;
case 2:

dRectTop = LEADAnn1->AnnRectTop[hObject];
dRectLeft = LEADAnn1->AnnRectLeft[hObject];
dRectWidth = LEADAnn1->AnnRectWidth[hObject];
dRectHeight = LEADAnn1->AnnRectHeight[hObject];
dRectRight = dRectWidth + dRectLeft;
dRectBottom = dRectHeight + dRectTop;

LEADAnn1->PointsCount = 1;
LEADAnn1->AnnContainerPointX[1] = dRectRight;
LEADAnn1->AnnContainerPointY[1] = dRectTop;

hContainer = LEADAnn1->AnnContainer;

LEADAnn1->AnnConvert(hContainer, ANNCONVERT_TO_CLIENT);

dMoveX = LEADAnn1->ClientPointX[0];
dMoveY = LEADAnn1->ClientPointY[0];
LEADAnn1->AnnDefine2(hObject, dMoveX, dMoveY, ANNDEFINE_END);

lCallCount = 0;
break;
}
}


AnnDeletePage example for C++ Builder

/*This sample saves the annotations as the first page of a multipage annotation file
The format is specified by the //uFormat// parameter (either ANNFMT_NATIVE or ANNFMT_ENCODED)
The annotations are flipped, and saved as the second page
The annotations are rotated, and saved as the third page
Information is displayed about the annotation file
The second page is deleted, and information is again displayed about the annotation file*/
void TForm1::SampleAnnSave(AnsiString strFileName , int uFormat)
{
int nRet;
AnsiString strFormat;
AnsiString strMsg;

//Save as the first page of the annotation file
LEADAnn1->AnnSave (strFileName, uFormat, False, SAVE_OVERWRITE, 0);

//Flip the container, and save as the second page (insert before page 2)
LEADAnn1->AnnFlip (True, LEADAnn1->BitmapHeight / 2, False);
LEADAnn1->AnnSave (strFileName, uFormat, False, SAVE_INSERT, 2);

//Rotate the container, and save as the third page
//Here we could pass the SAVE_INSERT flag and 3 for nPage,
//but instead we will use the SAVE_APPEND flag
LEADAnn1->AnnRotate (False, LEADAnn1->BitmapWidth / 2, LEADAnn1->BitmapHeight / 2, 45, False);
LEADAnn1->AnnSave (strFileName, uFormat, False, SAVE_APPEND, 0);

//Verify contents of file
nRet= LEADAnn1->AnnFileInfo(strFileName);
if (nRet == SUCCESS)
{
switch (LEADAnn1->AnnInfoFormat)
{
case ANNFMT_NATIVE:
strFormat= "ANNFMT_NATIVE";
break;

case ANNFMT_WMF:
strFormat= "ANNFMT_WMF";
break;

case ANNFMT_ENCODED:
strFormat= "ANNFMT_ENCODED";
break;

default:
strFormat= "Unknown";
}

strMsg = "File: " + strFileName + "\n";
strMsg = strMsg + "Format: " + strFormat + "\n";
strMsg = strMsg + "Version: " + IntToStr(LEADAnn1->AnnInfoVersion) + "\n";
strMsg = strMsg + "Total Pages: " + IntToStr(LEADAnn1->AnnInfoTotalPages) + "\n";

ShowMessage (strMsg);

}
else
ShowMessage ("Invalid Annotation File: " + strFileName);

//Now delete the second page, and display information
LEADAnn1->AnnDeletePage (strFileName, 2);

//Verify contents of file
nRet = LEADAnn1->AnnFileInfo(strFileName);
if (nRet == SUCCESS)
{
switch (LEADAnn1->AnnInfoFormat)
{
case ANNFMT_NATIVE: // Cut command
strFormat = "ANNFMT_NATIVE";
break;
case ANNFMT_WMF: // Copy command
strFormat = "ANNFMT_WMF";
break;

case ANNFMT_ENCODED: // Clear command
strFormat = "ANNFMT_ENCODED";
break;

default:
strFormat = "Unknown";
}

strMsg = "File: " + strFileName + "\n";
strMsg = strMsg + "Format: " + strFormat + "\n";
strMsg = strMsg + "Version: " + IntToStr(LEADAnn1->AnnInfoVersion) + "\n";
strMsg = strMsg + "Total Pages: " + IntToStr(LEADAnn1->AnnInfoTotalPages) + "\n";

ShowMessage (strMsg);
}
else
ShowMessage ("Invalid Annotation File: " + strFileName);
}


AnnDeletePageMemory example for C++ Builder

/*This sample saves the annotations as the first page of a multipage annotation file in memory
The annotations are flipped, and saved as the second page
The annotations are rotated, and saved as the third page
Information is displayed about the annotation file
The second page is deleted, and information is again displayed about the annotation file*/
//Assume this global declaration:
L_HANDLE hMem;
void __fastcall TForm1::SampleAnnFileInfoMemoryClick(TObject *Sender)
{
int nRet;
AnsiString strFormat;
AnsiString strMsg;
int lSize;
int uFormat;

uFormat= ANNFMT_NATIVE;
//Save as the first page of the annotation file
hMem= 0;
LEADAnn1->AnnSaveMemory (&hMem, uFormat, False, &lSize, SAVE_OVERWRITE, 0);

//Flip the container, and save as the second page (insert before page 2)
LEADAnn1->AnnFlip (True, LEADAnn1->BitmapHeight / 2, False);
LEADAnn1->AnnSaveMemory (&hMem, uFormat, False, &lSize, SAVE_INSERT, 2);

//Rotate the container, and save as the third page
//Here we could pass the SAVE_INSERT flag and 3 for nPage,
//but instead we will use the SAVE_APP} flag
LEADAnn1->AnnRotate (False, LEADAnn1->BitmapWidth / 2, LEADAnn1->BitmapHeight / 2, 45, False);
LEADAnn1->AnnSaveMemory (&hMem, uFormat, False, &lSize, SAVE_APPEND, 0);

//Verify contents of file
nRet= LEADAnn1->AnnFileInfoMemory (hMem, lSize);
if (nRet == SUCCESS)
{
switch (LEADAnn1->AnnInfoFormat)
{
case ANNFMT_NATIVE:
strFormat = "ANNFMT_NATIVE";
break;

case ANNFMT_WMF:
strFormat = "ANNFMT_WMF";
break;

case ANNFMT_ENCODED:
strFormat = "ANNFMT_ENCODED";
break;

default:
strFormat = "Unknown";
};

strMsg = "";
strMsg = strMsg + "Format: " + strFormat + "\n";
strMsg = strMsg + "Version: " + IntToStr(LEADAnn1->AnnInfoVersion) + "\n";
strMsg = strMsg + "Total Pages: " + IntToStr(LEADAnn1->AnnInfoTotalPages) + "\n";
strMsg = strMsg + "Total Size: " + IntToStr(lSize) + "\n";

ShowMessage (strMsg);
}
else
ShowMessage ("Invalid Annotation Memory File");

//Now delete the second page, and display information
LEADAnn1->AnnDeletePageMemory (hMem, &lSize, 2 );

//Verify contents of file
nRet = LEADAnn1->AnnFileInfoMemory (hMem, lSize);
if (nRet == SUCCESS)
{
switch (LEADAnn1->AnnInfoFormat)
{
case ANNFMT_NATIVE: // Cut command.
strFormat = "ANNFMT_NATIVE";
break;

case ANNFMT_WMF: // Copy command.
strFormat = "ANNFMT_WMF";
break;

case ANNFMT_ENCODED: // Clear command.
strFormat = "ANNFMT_ENCODED";
break;

default:
strFormat = "Unknown";
};

strMsg = "";
strMsg = strMsg + "Format: " + strFormat + "\n";
strMsg = strMsg + "Version: " + IntToStr(LEADAnn1->AnnInfoVersion) + "\n";
strMsg = strMsg + "Total Pages: " + IntToStr(LEADAnn1->AnnInfoTotalPages) + "\n";
strMsg = strMsg + "Total Size: " + IntToStr(lSize) + "\n";

ShowMessage (strMsg);
}
else
ShowMessage ("Invalid Annotation File");

//If finished with hMem, then free the memory by calling GlobalFree
}


AnnDeleteUserHandle example for C++ Builder

//This example deletes the first user handle of an object
void TForm1::ExampleAnnDeleteUserHandle (HANNOBJECT hObject )
{
long nCount ;

LEADAnn1->AnnGetUserHandles (hObject);
nCount = LEADAnn1->AnnUserHandlesCount;

if( nCount > 0 )
LEADAnn1->AnnDeleteUserHandle (hObject, 0);
else
ShowMessage("No User Handle");
}


AnnDestroy example for C++ Builder

LEADAnn1->AnnDestroy (LEADAnn1->AnnContainer, ANNFLAG_RECURSE + ANNFLAG_SELECTED);


AnnEncryptApply example for C++ Builder

// This example takes a handle to an annotation object that is an encryptor, and does the following
//1. Verifies that it is an encryptor that is associated with a bitmap
//2. changes the key to 123
//3. Applies the encryptor so that it changes state to a decryptor
//4. Prompts the user to continue
//5. Removes the scrambling by applying the decryptor

void TForm1::ExampleAnnEncryptApply (HANNOBJECT hObject )
{
L_INT nObjectType;
L_INT nRet;

nObjectType = LEADAnn1->AnnGetType(hObject);
if (nObjectType != ANNOBJECT_ENCRYPT)
ShowMessage ("This object is not an Encrypt Object.");

LEADAnn1->AnnEncryptOptions->Flags = ANNENCRYPT_ALL;
LEADAnn1->AnnGetEncryptOptions (hObject);

if (LEADAnn1->AnnEncryptOptions->EncryptBitmap == NULL)
{
ShowMessage("The encrypt object is not associated with a bitmap.");
return;
}

if (LEADAnn1->AnnEncryptOptions->Encryptor == false)
ShowMessage("This object is a decryptor.");

LEADAnn1->AnnEncryptOptions->Key = 123;
LEADAnn1->AnnEncryptOptions->Flags = ANNENCRYPT_KEY;
LEADAnn1->AnnEncryptOptions->SaveDecryptorKey = true;
LEADAnn1->AnnEncryptOptions->SaveEncryptorKey = true;
LEADAnn1->AnnEncryptOptions->ClearDecryptorKey = true;
LEADAnn1->AnnEncryptOptions->ClearEncryptorKey = true;
LEADAnn1->AnnEncryptOptions->NeverEncrypted = false;
LEADAnn1->AnnFlags = 0;
LEADAnn1->AnnSetEncryptOptions(hObject);

LEADAnn1->AnnEncryptApply(hObject, ANNENCRYPTAPPLY_ENCRYPTOR);

nRet = Application->MessageBox("Encryptor has been applied-> Would you like to remove the encryption?","", MB_YESNO);

if (nRet == IDYES)
LEADAnn1->AnnEncryptApply (hObject, ANNENCRYPTAPPLY_DECRYPTOR);
}


AnnEnumerateHandles example for C++ Builder

//This example enumerates all handles of an object,
//changing the predefined handles to blue squares
//and the user handles to red circles.
void TForm1::ExampleAnnEnumerateHandles(HANNOBJECT hObject )
{
LEADAnn1->AnnEnableEnumerateHandlesEvent=
 true;
LEADAnn1->AnnEnumerateHandles(hObject);
}

//---------------------------------------------------------------------------
int __fastcall TForm1::LEADAnn1AnnEnumerateHandles(HANNOBJECT hObject,
TAnnHandleInfo *AnnHandleInfo)
{
AnnHandleInfo->Visible
 = true;
if (AnnHandleInfo->AnnType
 == ANNHANDLETYPE_DEFAULT_HANDLE)
{
AnnHandleInfo->Shape
 = ANNHANDLE_SHAPE_SQUARE;
AnnHandleInfo->FillColor
 = (TColor)RGB(0, 255, 0);
AnnHandleInfo->PenColor
 = (TColor)RGB(0, 0, 255);
AnnHandleInfo->ID
 = 100;
}
else
{
AnnHandleInfo->Shape
 = ANNHANDLE_SHAPE_CIRCLE;
AnnHandleInfo->FillColor
 = (TColor)RGB(0, 255, 0);
AnnHandleInfo->PenColor
 = (TColor)RGB(0, 0, 255);
AnnHandleInfo->ID
 = 50;
}
ShowMessage("The handle with index = " + IntToStr(AnnHandleInfo->Index) + "was
 updated" );
ShowMessage("number of handles = " + IntToStr(AnnHandleInfo->TotalHandles));
LEADAnn1->AnnEnableEnumerateHandlesEvent
 = False;
return SUCCESS_CHANGE;
}


AnnEnumerateTextToken example for C++ Builder

void TForm1::ExampleAnnEnumerateTextToken (HANNOBJECT hObject )
{
LEADAnn1->AnnEnableEnumerateTextTokenTableEvent = TRUE;
LEADAnn1->AnnEnumerateTextToken();
}

void __fastcall TForm1::LEADAnn1AnnEnumerateTextTokenTable(DWORD uIndex,
int nTextTokenCount, char cToken, AnsiString strDescription,
AnsiString strTokenString, int nTokenType)
{
AnsiString strType;

strType= "Unknown";
switch ( nTokenType )
{
case ANNTOKEN_NONE:
strType= "ANNTOKEN_NONE";
break;

case ANNTOKEN_SEPARATOR:
strType= "ANNTOKEN_SEPARATOR";
break;

case ANNTOKEN_TEXT:
strType= "ANNTOKEN_TEXT";
break;

case ANNTOKEN_DATE_YYYY:
strType= "ANNTOKEN_DATE_YYYY";
break;

case ANNTOKEN_DATE_YY:
strType= "ANNTOKEN_DATE_YY";
break;

case ANNTOKEN_DATE_MM:
strType= "ANNTOKEN_DATE_MM";
break;

case ANNTOKEN_DATE_DD:
strType= "ANNTOKEN_DATE_DD";
break;

case ANNTOKEN_DATE_MONTH_NAME:
strType= "ANNTOKEN_DATE_MONTH_NAME";
break;

case ANNTOKEN_DATE_DAY_OF_WEEK:
strType= "ANNTOKEN_DATE_DAY_OF_WEEK";
break;

case ANNTOKEN_TIME_HH_12:
strType= "ANNTOKEN_TIME_HH_12";
break;

case ANNTOKEN_TIME_HH_24:
strType= "ANNTOKEN_TIME_HH_24";
break;

case ANNTOKEN_TIME_MM:
strType= "ANNTOKEN_TIME_MM";
break;

case ANNTOKEN_TIME_SS:
strType= "ANNTOKEN_TIME_SS";
break;

case ANNTOKEN_TIME_MILLISECONDS:
strType= "ANNTOKEN_TIME_MILLISECONDS";
break;

case ANNTOKEN_AM_PM:
strType= "ANNTOKEN_AM_PM";
break;
}

ShowMessage ( "Token= " + AnsiString(cToken) + "\n" +
"strDescription= " + strDescription + "\n" +
"Token String= " + strTokenString + "\n" +
"Type= " + strType );

LEADAnn1->AnnEnableEnumerateTextTokenTableEvent= True;
}


AnnFixed example for C++ Builder

void TForm1:: ExampleAnnFixed ( HANNOBJECT hObject )
{
bool bFixed;
bFixed = LEADAnn1->AnnFixed[hObject];
LEADAnn1->AnnEnableAdjust = true;
bFixed = !bFixed;
LEADAnn1->AnnFixed[hObject] = bFixed;
if (bFixed == true)
ShowMessage("Fixed");
else
ShowMessage("Not Fixed");
}


AnnGetAngle example for C++ Builder

void TForm1::AnnGetAngle()
{
HANNOBJECT hProtractor = 0;
HANNOBJECT hPolygon = 0;
ANNPOINT points[4];
L_UINT uArea;
L_DOUBLE dAngle;

LEADAnn1->AnnCreateItem(LEADAnn1->AnnContainer, ANNOBJECT_PROTRACTOR,
 true, hProtractor);
LEADAnn1->AnnCreateItem(LEADAnn1->AnnContainer,
 ANNOBJECT_POLYGON, true, hPolygon);
// Assign values for x and y from 1 through 3
points[1].X= 10;
points[1].Y= 20;
points[2].X= 100;
points[2].Y= 200;
points[3].X= 200;
points[3].Y= 100;
LEADAnn1->AnnSetPoints(hProtractor,
 points+1, 3);
points[0].X= 50;
points[0].Y= 220; // SetPoints starts at 0 because No.
 of points set to 4
LEADAnn1->AnnSetPoints(hPolygon, points, 4);
LEADAnn1->AnnSetFillMode(hPolygon,
 ANNFILLMODE_OPAQUE, False);
Caption= AnsiString("Protractor Bounding Rectangle")
 +
",
 Left:" + IntToStr(LEADAnn1->AnnBoundingRectLeft[hProtractor])
 +
",
 Top:" + IntToStr(LEADAnn1->AnnBoundingRectTop[hProtractor])
 +
",
 Width:" + IntToStr(LEADAnn1->AnnBoundingRectWidth[hProtractor])
 +
",
 Height:" + IntToStr(LEADAnn1->AnnBoundingRectHeight[hProtractor]);
LEADAnn1->AnnBringToFront(hPolygon);
ShowMessage("Brought Polygon to front");
LEADAnn1->AnnGetArea(hPolygon,
 uArea);
Caption= "Polygon Area:" + IntToStr(uArea);
LEADAnn1->AnnSendToBack(hPolygon);
ShowMessage("Sent Polygon to back");
LEADAnn1->AnnCut(hPolygon,
 ANNFMT_WMF, false, true);
dAngle= 0;
LEADAnn1->AnnGetAngle(hProtractor,
 dAngle);
Caption= "Angle:" + FloatToStr(dAngle);
}


AnnGetAutoMenuItemEnable Example for C++ Builder

void __fastcall TMainFrm::LEADAnn1AnnEnumerate(L_HANDLE hObject)
{
ShowMessage (IntToStr (LEADAnn1->AnnGetAutoMenuItemEnable (hObject, 0, ANNAUTOTEXT_MENU_DELETE)));
}


AnnGetBitmapDpiX Example for C++ Builder

{
float x;
float y;
HANNOBJECT hAuto;

hAuto= LEADAnn1->AnnCreate(ANNOBJECT_AUTOMATION, false, false);

LEADAnn1->AnnGetBitmapDpiX(hAuto, x);
LEADAnn1->AnnGetBitmapDpiY(hAuto, y);
ShowMessage(FloatToStr(x) + ", " + FloatToStr(y));
LEADAnn1->AnnSetBitmapDpiX(hAuto, x + 2, false);
LEADAnn1->AnnSetBitmapDpiY(hAuto, y + 2, false);
LEADAnn1->AnnGetBitmapDpiX(hAuto, x);
LEADAnn1->AnnGetBitmapDpiY (hAuto, y);
ShowMessage(FloatToStr(x) + ", " + FloatToStr(y));
}


AnnGetDistance example for C++ Builder

void TForm1::ExampleAnnGetDistance ( HANNOBJECT hObject )
{
L_DOUBLE dDis1;
L_DOUBLE dDis2;

LEADAnn1->AnnGetDistance ( hObject, dDis1, dDis2 );
ShowMessage ( "Distance: " + FloatToStr(dDis1) + "\n" +
"Gauge Length: " + FloatToStr(dDis2) );
}


AnnGetDistance2 example for C++ Builder

void TForm1:: ExampleAnnGetDistance2 (HANNOBJECT hObject )
{
L_INT nObjectType ;
long lCount ;
double dTotalDis ;
long lTotalRulerUnit;
long lTotalSmartUnit;
double dDistance;
double dDistance2;
long lRulerUnit;
long lSmartUnit;
AnsiString asResult;
int i;

nObjectType = LEADAnn1->AnnGetType(hObject);

if (nObjectType != ANNOBJECT_RULER)
ShowMessage("This Object is not an RULER Object");

LEADAnn1->AnnGetDistance2(hObject);

lCount = LEADAnn1->AnnDistanceCount;

dTotalDis = LEADAnn1->AnnTotalDistance;
lTotalRulerUnit = LEADAnn1->AnnTotalRulerUnit;
lTotalSmartUnit = LEADAnn1->AnnTotalSmartUnit;
ShowMessage ( "Total Distance = " + FloatToStr(dTotalDis) + "\n\t" +
"Total Ruler Unit = " + IntToStr(lTotalRulerUnit) + "\n\t" +
"Total Smart Unit = " + IntToStr(lTotalSmartUnit));

for(i = 0; i<lCount ;i++)
{
dDistance = LEADAnn1->AnnDistance[i];
lRulerUnit = LEADAnn1->AnnRulerUnit[i];
lSmartUnit = LEADAnn1->AnnSmartUnit[i];

ShowMessage( "Distance Index = " + IntToStr(i) + "\n\t" +
"Distance = " + FloatToStr(dDistance) + "\n\t" +
"Ruler Unit = " + IntToStr(lRulerUnit) + "\n\t" +
"Smart Unit = " + IntToStr(lSmartUnit));

}
}


AnnGetGrouping example for C++ Builder

//This example will toggle the grouping feature for all
//the sub-containers

//This event is fired for each annotation
//Toggles the Grouping feature for all the containers
void __fastcall TForm1::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
if ( LEADAnn1->AnnGetType (hObject)== ANNOBJECT_CONTAINER )
LEADAnn1->AnnSetGrouping (hObject,
! LEADAnn1->AnnGetGrouping (hObject),0) ;
}

//Add sub-containers by selecting objects and grouping them
//before clicking on this button
//Note that after you disable the grouping you can select and change
//individual objects belonging to a group. When you re-enable
//the grouping, the objects act as a group again.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADAnn1->AnnUserMode = ANNUSERMODE_DESIGN;
LEADAnn1->AnnEnumerate (LEADAnn1->AnnContainer, ANNFLAG_RECURSE + ANNFLAG_NOTTHIS, NULL);
}


AnnGetHyperlinkParam example for C++ Builder

//This example retrieves parameters using AnnGetHyperlinkParam.
void __fastcall TForm1::LEADAnn1AnnChange (L_HANDLE hObject)
{
AnsiString msgstr;
int nType;
int iParamCount;
long lRet;

nType= LEADAnn1->AnnGetHyperlinkType (hObject);
if (nType == ANNLINK_ANNEVENT5)
{
msgstr= "Params are: \n" ;
for ( iParamCount= 0; iParamCount<=4; iParamCount++ )
{
lRet= LEADAnn1->AnnGetHyperlinkParam(hObject, iParamCount);
msgstr= msgstr + " Param" + IntToStr(iParamCount + 1) + ": " + IntToStr((int)lRet) + "\n";
}
}
else
msgstr= "Invalid Type";
ShowMessage ( msgstr ) ;
}


AnnGetHyperlinkString example for C++ Builder

// This example is also for:
// AnnSetHyperlinkString method
// AnnGetItemHandle method
//The following example places calls to both the AnnSetHyperlinkString method and the AnnGetHyperlinkString method.
//Set AnnHyperLink to a URL

void __fastcall TForm1::LEADAnn1AnnHyperlinkMenu (L_PHANDLE phObjects,
int iCount)
{
int i;
char* szLink;
int strSize;

for (i=0; i < iCount; i ++ )
{
LEADAnn1->AnnSetHyperlinkString (LEADAnn1->AnnGetItemHandle (phObjects, i ), ANNLINK_WEBPAGE, "http://www.leadtools.com");
//get the string to see what got set
strSize= LEADAnn1->AnnGetHyperlinkString (LEADAnn1->AnnGetItemHandle (phObjects, i ), NULL);
if (strSize > 0)
{
szLink= (char *) malloc (strSize+1);
LEADAnn1->AnnGetHyperlinkString (LEADAnn1->AnnGetItemHandle (phObjects, i), &szLink);
ShowMessage (szLink);
free (szLink);
}
else
ShowMessage ( "Error setting Link" ) ;
}
}


AnnGetHyperlinkType example for C++ Builder

//The following is an example of OnAnnHyperlink event code, which includes a call to AnnGetHyperlinkType.
void __fastcall TForm1::LEADAnn1AnnHyperlink (L_HANDLE hObject,
int iParamCount, int lParam1, int lParam2, int lParam3, int lParam4,
int lParam5)
{
AnsiString msgstr;
int nType;

nType= LEADAnn1->AnnGetHyperlinkType (hObject);
if ((nType == ANNLINK_ANNEVENT5) || (nType == ANNLINK_ANNEVENT))
{
if (iParamCount >= 0)
msgstr= IntToStr (iParamCount) + " params are valid" + "\n";
if (iParamCount >= 1)
msgstr= msgstr + "Param1: " + IntToStr (lParam1) + "\n";
if (iParamCount >= 2)
msgstr= msgstr + "Param2: " + IntToStr (lParam2) + "\n";
if (iParamCount >= 3)
msgstr= msgstr + "Param3: " + IntToStr (lParam3) + "\n";
if (iParamCount >= 4)
msgstr= msgstr + "Param4: " + IntToStr (lParam4) + "\n";
if (iParamCount == 5)
msgstr= msgstr + "Param5: " + IntToStr (lParam5) + "\n";
}
else
msgstr= "Invalid Type";
ShowMessage (msgstr);
}


AnnGetNameOffsetX example for C++ Builder

/*This sample shifts the NameOffset of the annotation object hObject
two pixels in the X direction and one pixel in the Y direction*/
void TForm1::SampleNameOffset (L_HANDLE hObject )
{
int OffsetX;
int OffsetY;

OffsetX= LEADAnn1->AnnGetNameOffsetX (hObject);
OffsetY= LEADAnn1->AnnGetNameOffsetY (hObject);

OffsetX= OffsetX + 2;
OffsetY= OffsetY + 1;
ShowMessage ("Shifting Name Offset to " + IntToStr(OffsetX) + "," + IntToStr(OffsetY));

LEADAnn1->AnnSetNameOffsetX (hObject, OffsetX, False);
LEADAnn1->AnnSetNameOffsetY (hObject, OffsetY, False);
}


AnnGetNameRestrict example for C++ Builder

//This sample toggles the bNameRestrict property of the annotation object hObject
void TForm1::SampleNameRestrict (L_HANDLE hObject )
{
BOOL bNameRestrict;
AnsiString strMsg;

bNameRestrict= LEADAnn1->AnnGetNameRestrict (hObject);
bNameRestrict= !bNameRestrict;

if (bNameRestrict)
strMsg = "Changing NameRestrict property to TRUE";
else
strMsg = "Changing NameRestrict property to FALSE";

ShowMessage (strMsg);
LEADAnn1->AnnSetNameRestrict (hObject, bNameRestrict, FALSE);
}


AnnGetNodes example for C++ Builder

void TForm1::AnnGetNodes(HANNOBJECT hPlgn)
{
L_UINT uNodes;
bool bShow;
L_UINT uFillPattern;
L_UINT uFillMode;
L_UINT uPolyFillMode;
L_UINT uLineStyle;
L_DOUBLE dLineWidth;

uNodes= 0;
bShow= True;
uFillPattern= 0;
uFillMode= 0;
uPolyFillMode= 0;
uLineStyle= 0;
dLineWidth= 0;

LEADAnn1->AnnGetFillPattern(hPlgn,
 uFillPattern);
LEADAnn1->AnnSetFillPattern(hPlgn,
 (uFillPattern+ 1) % 7, False);
LEADAnn1->AnnGetFillMode(hPlgn,
 uFillMode);
LEADAnn1->AnnSetFillMode(hPlgn,
 (uFillMode+ 1) % 3, False);
LEADAnn1->AnnGetPolyFillMode(hPlgn,
 uPolyFillMode);
LEADAnn1->AnnSetPolyFillMode(hPlgn,
 1 - uPolyFillMode, False);
LEADAnn1->AnnGetLineStyle(hPlgn,
 uLineStyle);
LEADAnn1->AnnSetLineStyle(hPlgn,
 (uLineStyle + 1) % 6, False);
LEADAnn1->AnnGetLineWidth(hPlgn,
 dLineWidth);
LEADAnn1->AnnSetLineWidth(hPlgn,
 (((int)dLineWidth % 4) + 1), False);
LEADAnn1->AnnGetNodes(hPlgn,
 bShow, uNodes);
LEADAnn1->AnnSetNodes(hPlgn,
 (bShow == false), (uNodes + 1) % LEADAnn1->AnnGetPointCount(hPlgn),
 False);
}


AnnGetObjectFromTag example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_HANDLE hObject;
long hTag;
AnsiString Msg;

ShowMessage ("I Will Looking For an Object With Tag = 1");
LEADAnn1->EnableMethodErrors = false;
hObject= LEADAnn1->AnnGetObjectFromTag (LEADAnn1->AnnContainer, 1, false);
if ( hObject)
{
hTag= LEADAnn1->AnnGetTag (hObject);
Msg= "There Is an Object With Tag= " + IntToStr ((int) hTag);
ShowMessage (Msg);
}
else
ShowMessage ("No Object Contain Tag = 1");
LEADAnn1->EnableMethodErrors = True;
}


AnnGetPointCount Example for C++ Builder

AnnGetPoint... example for C++ Builder

// This is an example for the following methods and properties
// AnnGetPointCount method, AnnGetPointX method, AnnGetPointY method
// and Point Property
//In the OnAnnDrawn event, this example checks to see if the annotation
 object is a polygon.
//If it is a polygon,
//the example gets the number of points that define the object;
//then it gets the Xpoints and YPoints and displays them in a message box.

void __fastcall TForm1::LEADAnn1AnnDrawn
 (L_HANDLE hObject)
{
int nType;
int a;
long nPoints; //number of points in the object
AnsiString msg;
TAnnPoints * XPoints ;
TAnnPoints * YPoints;

nType= LEADAnn1->AnnGetType
 (hObject);
if (nType == ANNOBJECT_POLYGON ) //Is the object a polygon?
{
ShowMessage ("Object is a Polygon");
nPoints = LEADAnn1->AnnGetPointCount
 (hObject); //get the number of points
XPoints= LEADAnn1->AnnGetPointX
 (hObject); //get the X coordinates
YPoints= LEADAnn1->AnnGetPointY
 (hObject); //get the Y coordinates
msg= "(";
for (a= 1; a <= nPoints; a ++)
msg= msg + "{"
 + FloatToStr(XPoints->Point
 [a - 1]->X) + "," + FloatToStr(YPoints->Point[a - 1]->Y)
 + "}";

msg= "The Polygon's " + IntToStr((int)nPoints)
 + " points are:\n" + msg + ")";
ShowMessage ( msg);
XPoints->Free ();
YPoints->Free ();
}
LEADAnn1->AnnTool
 = ANNTOOL_SELECT;
}


AnnGetPredefinedMetafile example for C++ Builder

void TForm1::AnnSetMetaFile(HANNOBJECT hStamp)
{
HMETAFILE hMeta;
bool bEnhanced;

LEADAnn1->AnnGetPredefinedMetafile(ANNMETAFILE_IMPORTANT,
 bEnhanced, (unsigned int)hMeta);
LEADAnn1->AnnSetPredefinedMetafile(ANNMETAFILE_TOPSECRET,
 (unsigned int)hMeta);
LEADAnn1->AnnSetMetafile(hStamp,
 0, ANNMETAFILE_TOPSECRET, false);
ShowMessage("Stamp set to TopSecret");

LEADAnn1->AnnGetMetafile(hStamp,
 (unsigned int)hMeta);
switch (GetObjectType(hMeta))
{
case OBJ_ENHMETAFILE:
{
ShowMessage("Type
 is EMF");
}
break;

case OBJ_METAFILE:
{
ShowMessage("Type is WMF");
}
break;
}
}


AnnGetSecondaryMetafile example for C++ Builder

void TForm1::ExampleAnnGetSecondaryMetafile ( HANNOBJECT hObject )
{
L_INT nObjectType;
unsigned hMetafile1;
unsigned hMetafile2;
bool bEncryptorOriginal;

nObjectType = LEADAnn1->AnnGetType(hObject);
if(nObjectType != ANNOBJECT_ENCRYPT)
{
ShowMessage("This object is not an encryptor object.");
return;
}

LEADAnn1->AnnGetMetafile(hObject, hMetafile1);
LEADAnn1->AnnGetSecondaryMetafile ( hObject, hMetafile2);

LEADAnn1->AnnEncryptOptions->Flags = ANNENCRYPT_ALL;
LEADAnn1->AnnGetEncryptOptions(hObject);

bEncryptorOriginal = LEADAnn1->AnnEncryptOptions->Encryptor;

//Set state to Decryptor and set Decryptor metafile
LEADAnn1->AnnEncryptOptions->Flags = ANNENCRYPT_TYPE;
LEADAnn1->AnnFlags = 0;
LEADAnn1->AnnEncryptOptions->Encryptor = TRUE;
LEADAnn1->AnnSetEncryptOptions (hObject);
LEADAnn1->AnnSetMetafile( hObject, hMetafile2, ANNMETAFILE_USER, FALSE);

//Set state to Decryptor and set Decryptor metafile
LEADAnn1->AnnFlags = 0;
LEADAnn1->AnnEncryptOptions->Encryptor = TRUE;
LEADAnn1->AnnSetEncryptOptions (hObject);
LEADAnn1->AnnSetMetafile(hObject, hMetafile2, ANNMETAFILE_USER, FALSE);

LEADAnn1->AnnEncryptOptions->Encryptor = bEncryptorOriginal;
LEADAnn1->AnnFlags = 0;
LEADAnn1->AnnSetEncryptOptions (hObject);
}


AnnGetSelectList example for C++ Builder

//This example is also for:
// AnnGetSelectCount method,
//This example gets the number of selected annotation objects; then it gets an array of the
//selected object handles and checks to see if any of the objects in the array are polygons.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nType;
int a;
bool bSelected;
AnsiString Msg;
int uCount;
L_PHANDLE phObjects; //array for the selected object handles

bSelected= false;
uCount= LEADAnn1->AnnGetSelectCount (); //get number of selected objects
if ( uCount > 0 )
{
phObjects= ( L_PHANDLE ) malloc ( uCount * sizeof ( L_HANDLE )) ;
if (!phObjects )
{
ShowMessage ("NO Memory") ;
return;
}
LEADAnn1->AnnGetSelectList(phObjects); //get the handles of the selected objects
Msg= IntToStr(uCount) + " objects were selected";
ShowMessage (Msg);
for ( a = 1; a<= uCount; a ++ )
{
nType= LEADAnn1->AnnGetType (LEADAnn1->AnnGetItemHandle ( phObjects, a - 1));
if ( nType == ANNOBJECT_POLYGON ) //Is the object a polygon?
bSelected= true;
}
if (!bSelected)
ShowMessage ("No Polygon Objects were selected");
if (phObjects)
{
free (phObjects);
}
}
else
ShowMessage ( "No Selected Objects" ) ;
}


AnnGetTopContainer example for C++ Builder

void TForm1::AnnTestTopContainer()
{
HANNOBJECT hPin;
HANNOBJECT h1;
HANNOBJECT h2;
HANNOBJECT hContainer;

hContainer= LEADAnn1->AnnCreate(ANNOBJECT_CONTAINER,
 true, false);
if(hContainer != 0)
{
hPin= 0;
LEADAnn1->AnnCreateItem(hContainer,
 ANNOBJECT_PUSHPIN, false, hPin);
LEADAnn1->AnnGetContainer(hContainer,
 h1);
LEADAnn1->AnnGetTopContainer(hPin,
 h2);
if((h1 == h2) && (h1 == LEADAnn1->AnnContainer))
ShowMessage("root
 container is same as that of LEADAnn1");
}
}


AnnGetUserHandles example for C++ Builder

void TForm1::ExampleGetAnnUserHandles(HANNOBJECT hObject )
{
long nCount ;

LEADAnn1->AnnGetUserHandles (hObject);
nCount = LEADAnn1->AnnUserHandlesCount;
if( nCount > 0 )
{
LEADAnn1->AnnGetUserHandle( hObject, 0);
ShowMessage ( "uIndex = 0 \n nID = " + IntToStr(LEADAnn1->AnnHandle->ID) + "\n" +
"ContainerX = " + IntToStr((int)LEADAnn1->AnnHandle->ContainerX) + "\n" +
"ContainerY = " + IntToStr((int)LEADAnn1->AnnHandle->ContainerY) + "\n" +
"CliantX = " + IntToStr(LEADAnn1->AnnHandle->ClientX) + "\n" +
"ClientY = " + IntToStr(LEADAnn1->AnnHandle->ClientY) + "\n" +
"bVisible = " + IntToStr(LEADAnn1->AnnHandle->Visible) + "\n" +
"PenColor = " + IntToStr(LEADAnn1->AnnHandle->PenColor) + "\n" +
"FillColor = " + IntToStr(LEADAnn1->AnnHandle->FillColor) + "\n" +
"Shape = " + IntToStr(LEADAnn1->AnnHandle->Shape));
}
else
ShowMessage( "No User Handles");
}


AnnGetVisible Example for C++ Builder

void __fastcall TMainFrm::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
//tests AnnGetVisible
if ( LEADAnn1->AnnGetVisible(hObject) )
ShowMessage ( IntToStr(LEADAnn1->AnnGetType (hObject))+ " Visible" );
else
ShowMessage ( IntToStr(LEADAnn1->AnnGetType (hObject))+ " Not Visible");
}


AnnGroup example for C++ Builder

LEADAnn1->AnnGroup (LEADAnn1->AnnContainer, ANNFLAG_SELECTED + ANNFLAG_RECURSE, NULL);


AnnHandle example for C++ Builder

void TForm1::ExampleAnnUserHandle ( HANNOBJECT hObject )
{
L_UINT uCount;
AnsiString strVisible;

LEADAnn1->AnnGetUserHandles ( hObject );
uCount= LEADAnn1->AnnUserHandlesCount;
if ( uCount > 0 )
{
LEADAnn1->AnnGetUserHandle ( hObject, 0 );

(LEADAnn1->AnnHandle->Visible)?strVisible= "True":strVisible="False";

ShowMessage ( "uIndex = 0 \n"\
"nID = " + IntToStr(LEADAnn1->AnnHandle->ID) + "\n" +
"ContainerX = " + FloatToStr(LEADAnn1->AnnHandle->ContainerX) + "\n" +
"ContainerY = " + FloatToStr(LEADAnn1->AnnHandle->ContainerY) + "\n" +
"CliantX = " + IntToStr(LEADAnn1->AnnHandle->ClientX) + "\n" +
"ClientY = " + IntToStr(LEADAnn1->AnnHandle->ClientY) + "\n" +
"Visible = " + strVisible + "\n" +
"PenColor = " + IntToStr(LEADAnn1->AnnHandle->PenColor) + "\n" +
"FillColor = " + IntToStr(LEADAnn1->AnnHandle->FillColor) + "\n" +
"Shape = " + IntToStr(LEADAnn1->AnnHandle->Shape) + "\n" );
}
else
ShowMessage ( "No User Handles" );
}


AnnHitTestExt example for C++ Builder

//This example uses the caller's mouse coordinates to get the handle
// to the annotation object at the specified coordinates.
// The part of the clicked annotation is displayed in the Output window.
// If the result of the hittest is a user handle, additional information about the handle is //displayed.
void TForm1:: ExampleAnnHitTestExt ( HANNOBJECT hObject, HANNOBJECT hContainer, long lPointToTestX,
long lPointToTestY)
{
AnsiString strResult;
LEADAnn1->AnnHitTestExt( hContainer, lPointToTestX, lPointToTestY);
if(LEADAnn1->AnnObjectHitHandle == 0 )
{
ShowMessage ("There is no object to hit test.");
return;
}
switch (LEADAnn1->AnnPositionResult)
{
case ANNHIT_NONE:
strResult = "ANNHIT_NONE";
break;

case ANNHIT_BODY:
strResult = "ANNHIT_NONE";
break;

case ANNHIT_NAME:
strResult = "ANNHIT_NAME";
break;

case ANNHIT_HANDLE:
strResult = "ANNHIT_HANDLE HandleIndex = " + IntToStr(LEADAnn1->AnnHandleIndex) + "\n\t" + "HandleId = " + IntToStr(LEADAnn1->AnnHandleID);
break;

case ANNHIT_USER_HANDLE:
strResult = "ANNHIT_USER_HANDLE HandleIndex = " + IntToStr(LEADAnn1->AnnHandleIndex) + "\n\t" + "HandleId = " + IntToStr(LEADAnn1->AnnHandleID);
break;
}
ShowMessage(strResult);
}


AnnHyperlinkMenuEnable example for C++ Builder

//This example toggles the AnnHyperlinkMenuEnable property.
//toggle AnnHyperLinkMenu item and event
if (LEADAnn1->AnnHyperlinkMenuEnable)
LEADAnn1->AnnHyperlinkMenuEnable= false;
else
LEADAnn1-> AnnHyperlinkMenuEnable = true;


AnnInsert example for C++ Builder

L_HANDLE hEllipseObject;
hEllipseObject= LEADAnn1->AnnCreate (ANNOBJECT_ELLIPSE, false, true);
LEADAnn1->AnnInsert (LEADAnn1->AnnContainer, hEllipseObject, false);


AnnInsertTextTokenTable example for C++ Builder

void TForm1::ExampleAnnInsertTextTokenTable (HANNOBJECT hObject )
{
LEADAnn1->AnnToken = 'A';
LEADAnn1->AnnDescription = "Two Digit Month";
LEADAnn1->AnnTokenString = "";
LEADAnn1->AnnTokenType = ANNTOKEN_DATE_MM;

LEADAnn1->AnnInsertTextTokenTable();

LEADAnn1->AnnToken = 'B';
LEADAnn1->AnnDescription = "Two Digit day";
LEADAnn1->AnnTokenString = "";
LEADAnn1->AnnTokenType = ANNTOKEN_DATE_DD;

LEADAnn1->AnnInsertTextTokenTable();

LEADAnn1->AnnToken = 'C';
LEADAnn1->AnnDescription = "Two Digit day";
LEADAnn1->AnnTokenString = "";
LEADAnn1->AnnTokenType = ANNTOKEN_DATE_YYYY;

LEADAnn1->AnnInsertTextTokenTable();

LEADAnn1->AnnDeleteTextTokenTable('B');

LEADAnn1->AnnToken = 'D';
LEADAnn1->AnnDescription = "";
LEADAnn1->AnnTokenString = "";
LEADAnn1->AnnTokenType = ANNTOKEN_SEPARATOR;

LEADAnn1->AnnClearTextTokenTable();
}


AnnIsFixedRect example for C++ Builder

void TForm1::ExampleAnnIsFixedRect ( HANNOBJECT hObject, int nLeft, int nTop, int nRight, int
zBottom)
{
bool bFixedInRect;
LEADAnn1->AnnFlags = ANNFLAG_RECURSE;
bFixedInRect = LEADAnn1->AnnIsFixedRect(hObject, nLeft, nTop, nRight , nBottom);
if(bFixedInRect == true)
ShowMessage("There are Fixed annotations visible.");
else
ShowMessage("There are No Fixed annotations visible.");
}


AnnLock example for C++ Builder

//This example locks objects of type ANNOBJECT_ELLIPSE using the key "LEADTOOLS".
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nType;
int a;
bool bSelected;
int uCount;
L_PHANDLE phObjects; //pointer to the array of the selected object handles

//lock only the ellipse objects that are selected
bSelected= false;
uCount= LEADAnn1->AnnGetSelectCount (); //get number of selected objects
if ( uCount > 0 )
{
phObjects= (L_PHANDLE) malloc (uCount * sizeof (L_HANDLE)) ;
if ( !phObjects )
{
ShowMessage ("NO Memory");
return;
}
LEADAnn1->AnnGetSelectList (phObjects); //get the handles of the selected objects
for (a= 1; a <= uCount; a ++)
{
nType= LEADAnn1->AnnGetType (LEADAnn1->AnnGetItemHandle (phObjects, a - 1));
if ( nType == ANNOBJECT_ELLIPSE ) //Is the object a polygon?
{
bSelected= true;
LEADAnn1->AnnLock (LEADAnn1->AnnGetItemHandle (phObjects, a - 1), "LEADTOOLS", false);
}
}
if (!bSelected )
ShowMessage ("No Ellipse Objects were selected");
if (phObjects)
{
free (phObjects);
}
}
}


AnnMove example for C++ Builder

//This example moves one or more selected annotation objects.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int DeltaX, DeltaY;
//Specify arbitrary delta values.
DeltaX= 200;
DeltaY= 100;
//Move the selected annotations.
LEADAnn1->AnnMove (DeltaX, DeltaY, true);
}


AnnNameBoundingRectLeft example for C++ Builder

//This sample displays the bounding rectangle of the annotation hObject
void TForm1::SampleAnnNameBoundingRect (L_HANDLE hObject )
{
AnsiString strMsg;
int nLeft, nTop, nWidth, nHeight;

nLeft = LEADAnn1->AnnNameBoundingRectLeft [hObject];
nTop = LEADAnn1->AnnNameBoundingRectTop [hObject];
nWidth = LEADAnn1->AnnNameBoundingRectWidth [hObject];
nHeight= LEADAnn1->AnnNameBoundingRectHeight [hObject];

ShowMessage ("Ann Name Bounding Rect: Left[" + IntToStr(nLeft) + "], Top[" + IntToStr(nTop) + "], Width[" + IntToStr(nWidth) + "], Height[" + IntToStr(nHeight) + "]");
}


AnnNameOptions example for C++ Builder

//'This sample enumerates all objects in a container,
//'changing the object name and displaying it.
//'If the object is a button, the name is restricted to appear within the
 bitmap bounds.
//'If the object is not a button, the name is not restricted.
void TForm1::ExampleAnnNameOptions ( HANNOBJECT hObject )
{
LEADAnn1->AnnEnumerate
 ( hObject, ANNFLAG_RECURSE + ANNFLAG_NOTCONTAINER, "" );
}

void __fastcall TForm1::LEADAnn1AnnEnumerate(L_HANDLE hObject)
{
L_INT nObjectType;

LEADAnn1->AnnNameOptions->Flags = ANNNAME_ALL;
LEADAnn1->AnnGetNameOptions(hObject);

nObjectType = LEADAnn1->AnnGetType(hObject);

if (nObjectType == ANNOBJECT_BUTTON)
{
LEADAnn1->AnnNameOptions->ShowName =
 FALSE;
LEADAnn1->AnnNameOptions->AnnotationName
 = " Name Restricted";
LEADAnn1->AnnNameOptions->NameRestrict
 = FALSE;
LEADAnn1->AnnNameOptions->FontBold =
 FALSE;
LEADAnn1->AnnNameOptions->FontItalic
 = FALSE;
LEADAnn1->AnnNameOptions->FontStrikeOut
 = FALSE;
LEADAnn1->AnnNameOptions->FontUnderline
 = FALSE;
LEADAnn1->AnnNameOptions->NameBackTransparent
 = FALSE;
}
else
{
LEADAnn1->AnnNameOptions->ShowName =
 TRUE;
LEADAnn1->AnnNameOptions->AnnotationName
 = " Name UnRestricted";
LEADAnn1->AnnNameOptions->NameRestrict
 = TRUE;
LEADAnn1->AnnNameOptions->FontBold =
 TRUE;
LEADAnn1->AnnNameOptions->FontItalic
 = TRUE;
LEADAnn1->AnnNameOptions->FontStrikeOut
 = TRUE;
LEADAnn1->AnnNameOptions->FontUnderline
 = TRUE;
LEADAnn1->AnnNameOptions->NameBackTransparent
 = TRUE;
}

LEADAnn1->AnnNameOptions->NameOffsetX
 = 10;
LEADAnn1->AnnNameOptions->NameOffsetY
 = 10 ;
LEADAnn1->AnnNameOptions->FaceNameColor
 = (TColor)RGB(0, 0, 0);
LEADAnn1->AnnNameOptions->BackNameColor
 = (TColor)RGB(255, 255, 255);
LEADAnn1->AnnNameOptions->FontName
 = "Arial";
LEADAnn1->AnnNameOptions->FontSize
 = 12;

LEADAnn1->AnnNameOptions->Flags
 = ANNNAME_ALL;
LEADAnn1->AnnSetNameOptions(hObject);
}


AnnNameRectLeft example for C++ Builder

//This sample displays the defining rectangle of the annotation hObject
void TForm1::SampleAnnNameRect (L_HANDLE hObject )
{
AnsiString strMsg;
int nLeft, nTop, nWidth, nHeight;

nLeft = LEADAnn1->AnnNameRectLeft [hObject];
nTop = LEADAnn1->AnnNameRectTop [hObject];
nWidth = LEADAnn1->AnnNameRectWidth[hObject];
nHeight= LEADAnn1->AnnNameRectHeight [hObject];

ShowMessage ("Ann Name Rect: Left[" + IntToStr(nLeft) + "], Top[" + IntToStr(nTop) + "], Width[" + IntToStr(nWidth) + "], Height[" + IntToStr(nHeight) + "]");
}


AnnOptions Example for C++ Builder

// This example demonstrates how to enable/disable the new
// 'side handle' annotation feature in version 14.5. To see how this works,
// paste this example into the main annotation demo, draw a rectangle,
// and select it before calling this function. The example toggles the feature.
void TForm1::ExampleAnnOptions()
{
AnsiString strMsg;
int uOptions;
uOptions= LEADAnn1->AnnOptions;
if(uOptions & OPTIONS_NEW_SIDE_HANDLES)
{
uOptions &= ~OPTIONS_NEW_SIDE_HANDLES;
strMsg= "Draw a rectangular object and select it. Note there are no side handles. Run this example again to enable the side handles.";
}
else
{
uOptions |= OPTIONS_NEW_SIDE_HANDLES;
strMsg= "Draw a rectangular object and select it. Note the side handles. Run this example again to disable the side handles.";
}
LEADAnn1->AnnOptions= uOptions;
ShowMessage(strMsg);
}


AnnPointOptions example for C++ Builder

// This example toggles the appearance of a point annotation object
// The appearance toggles between bitmap to circle

void TForm1::ExampleAnnPointOptions ( HANNOBJECT hObject
 )
{
L_INT nObjectType;

nObjectType = LEADAnn1->AnnGetType(hObject);
if( nObjectType != ANNOBJECT_POINT )
ShowMessage("This object is not
 an Point Option") ;

LEADAnn1->AnnPointOptions->Flags = ANNPOINT_ALL;
LEADAnn1->AnnGetPointOptions
 (hObject);

if (LEADAnn1->AnnPointOptions->PointBitmap
 == NULL)
{
ShowMessage("There is no raster
 associated");
return ;
}

if(LEADAnn1->AnnPointOptions->PointUseBitmap
 == True)
{
LEADAnn1->AnnPointOptions->PointUseBitmap
 = False;
LEADAnn1->AnnPointOptions->PointFixedSize
 = False;
LEADAnn1->AnnPointOptions->PointTransparentFill
 = False;

LEADAnn1->AnnPointOptions->PointBorderColor
 = (TColor)RGB(0, 0, 0);
LEADAnn1->AnnPointOptions->PointFillColor
 = = (TColor)RGB(255, 255, 0);
LEADAnn1->AnnPointOptions->PointRadius
 = 12;

LEADAnn1->AnnPointOptions->Flags = (ANNPOINT_USE_BITMAP
 +
ANNPOINT_RADIUS
 +
ANNPOINT_BORDER_COLOR
 +
ANNPOINT_FILL_COLOR
 +
ANNPOINT_TRANSPARENT_FILL
 +
ANNPOINT_FIXED_SIZE);
}
else
{
//Change Point appearance to a bitmap
LEADAnn1->AnnPointOptions->PointUseBitmap
 = True;
LEADAnn1->AnnPointOptions->PointBitmapTransparent
 = True;
LEADAnn1->AnnPointOptions->PointBitmapTransparentColor=
 (TColor)RGB(255, 255, 255);
}

LEADAnn1->AnnFlags
 = 0;
LEADAnn1->AnnSetPointOptions(hObject);
}


AnnPopFixedState example for C++ Builder

//This example enables the"fixed" property for all objects in the container that
//have been temporarily disabled with a call to AnnPushFixedState.
//For an example using the magnifying glass, see the source code
//for the main COM annotation demo.
void TForm1:: ExampleAnnPopFixedState(HANNOBJECT hContainer )
{
LEADAnn1->AnnFlags = ANNFLAG_RECURSE + ANNFLAG_NOINVALIDATE;
LEADAnn1->AnnPopFixedState (hContainer);
}


AnnPredefinedBitmap example for C++ Builder

//This example does the following:
//1. Gets the current point bitmap
//2. Inverts it
//3. Sets the inverted bitmap as the default point bitmap
void TForm1:: ExampleAnnPredefinedBitmap ( HANNOBJECT hObject )
{
LEADAnn2->Bitmap= LEADAnn1->AnnPredefinedBitmap [ANNBITMAP_POINT];
LEADAnn2->Invert ( );
LEADAnn1->AnnPredefinedBitmap [ANNBITMAP_POINT]= LEADAnn2->Bitmap;
}


AnnPushFixedState example for C++ Builder

// This example temporarily disables the"fixed" property of all objects in the container.
// This is useful when fixed objects need to be temporarly painted larger or smaller than
// the fixed size. For an example using the magnifying glass, see the source code
// for the main COM annotation demo.
void TForm1::ExampleAnnPushFixedState ( HANNOBJECT hContainer )
{
LEADAnn1->AnnFlags = ANNFLAG_RECURSE + ANNFLAG_NOINVALIDATE;
LEADAnn1->AnnPushFixedState (hContainer);
}


AnnRectHeight example for C++ Builder

void __fastcall TForm1::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
LEADAnn1->AnnRectHeight[hObject]= LEADAnn1->AnnRectHeight [hObject] + 50;
}


AnnRectLeft example for C++ Builder

void __fastcall TForm1::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
LEADAnn1->AnnRectLeft[hObject]= LEADAnn1->AnnRectLeft [hObject] + 50;
}


AnnRectTop example for C++ Builder

void __fastcall TForm1::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
LEADAnn1->AnnRectTop [hObject]= LEADAnn1->AnnRectTop [hObject] + 50;
}


AnnRectWidth example for C++ Builder

void __fastcall TForm1::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
LEADAnn1->AnnRectWidth [hObject]= LEADAnn1->AnnRectWidth [hObject] + 50;
}


AnnRestrictCursor example for C++ Builder

void TForm1::ExampleAnnRestrictCursor (HANNOBJECT hObject )
{
long hContainer;
L_INT nObjectType;
double dBoundsTop;
double dBoundsLeft;
double dBoundsWidth;
double dBoundsHeight;
double dBoundsRight ;
double dBoundsBottom ;
RECT rcClipOld;

nObjectType= LEADAnn1->AnnGetType(hObject);

if(( nObjectType != ANNOBJECT_AUTOMATION) && (nObjectType != ANNOBJECT_CONTAINER) )
ShowMessage("This object is not an Automation Object and it is not a Container Object.");

hContainer = LEADAnn1->AnnContainer;

dBoundsTop = LEADAnn1->AnnRectTop[hObject];
dBoundsLeft = LEADAnn1->AnnRectLeft[hObject];
dBoundsWidth = LEADAnn1->AnnRectWidth[hObject];
dBoundsHeight = LEADAnn1->AnnRectHeight[hObject];

LEADAnn1->PointsCount = 2;
LEADAnn1->AnnContainerPointX[2] = dBoundsLeft;
LEADAnn1->AnnContainerPointY[2] = dBoundsTop;
LEADAnn1->AnnConvert(hObject, ANNCONVERT_TO_CLIENT);

dBoundsLeft = LEADAnn1->ClientPointX[0];
dBoundsTop = LEADAnn1->ClientPointY[0];

dBoundsRight = (dBoundsWidth + dBoundsLeft) + 10;
dBoundsBottom = (dBoundsHeight + dBoundsTop) + 10;
dBoundsTop = dBoundsTop - 10;
dBoundsLeft = dBoundsLeft - 10;

LEADAnn1->AnnRestrictCursor(hContainer, (long)dBoundsLeft, (long)dBoundsTop, (long)dBoundsRight, (long)dBoundsBottom, 0, 0, FALSE);

rcClipOld.top= LEADAnn1->AnnTopPreviousClip;
rcClipOld.left= LEADAnn1->AnnLeftPreviousClip;
rcClipOld.right= LEADAnn1->AnnRightPreviousClip;
rcClipOld.bottom= LEADAnn1->AnnBottomPreviousClip;

// When done with the restricted cursor, use the line below
ClipCursor ( &rcClipOld );


AnnRestrictToContainer example for C++ Builder

//This example toggles the "restrict to container" property.
//If an object is restricted to the container, no part of it can be moved outside the container
void TForm1:: ExampleRestrictToContainer (HANNOBJECT hObject )
{
bool bRestrict;

bRestrict = LEADAnn1->AnnRestrictToContainer[hObject];
bRestrict = !bRestrict;
LEADAnn1->AnnRestrictToContainer[hObject] = bRestrict;
if (bRestrict == true)
ShowMessage ("Restricted To Container");
else
ShowMessage ("Not Restricted To the Container");
}


AnnRotate example for C++ Builder

// This example is also for:
// AnnFlip method
// AnnReverse method
//This example uses the AnnFlip, AnnReverse, and AnnRotate methods.
//To code this example, add a command button named Test to the example you created in Loading
//and Displaying an Image. For best results when you run the example,
//draw two objects in opposite corners, and use the right mouse button to select
//all annotation objects. The command button then lets you cycle through the AnnFlip, AnnReverse, and AnnRotate methods.
void __fastcall TForm1::TestClick(TObject *Sender)
{

AnsiString MyCaption;

MyCaption= Test->Caption;
if ( MyCaption == "Flip" )
{
//Flip using the center of the bitmap as the axis.
LEADAnn1->AnnFlip (True, LEADAnn1->BitmapHeight / 2, True);
Test->Caption= "Reverse";
return;
}

if ( MyCaption == "Reverse" )
{
//Reverse using the center of the bitmap as the axis.
LEADAnn1->AnnReverse (True, LEADAnn1->BitmapWidth / 2, True);
Test->Caption= "Rotate";
return;
}
if ( MyCaption == "Rotate" )
{
//Rotate 90 degrees using the center of the bitmap as the axis.
LEADAnn1->AnnRotate (True, LEADAnn1->BitmapWidth / 2, LEADAnn1->BitmapHeight / 2, 90, True);
Test->Caption= "Flip";
return;
}

Test->Caption= "Flip";
LEADAnn1->AnnUserMode = ANNUSERMODE_DESIGN;
LEADAnn1->AnnTool= ANNTOOL_REDACT;
ShowMessage ( "Draw two objects, use the right mouse button to select all, then click the command button" ) ;
}


AnnRTFText example for C++ Builder

// This sample loads a rich text annotation object with text
//It illustrates how AnnRTFText can treat the text as Rich Text, or plain text

// hObject: the Rich Text annotation object
// uFormat: the format of the retrieved text--one of
// RTFFORMAT_TEXT
// RTFFORMAT_RTF
void TForm1::ExampleAnnRTFText (HANNOBJECT hObject, L_UINT uFormat )
{
AnsiString strText;
AnsiString strFormat;
switch(uFormat)
{
case RTFFORMAT_TEXT:
strFormat = "Format: RTFFORMAT_TEXT";
break;

case RTFFORMAT_RTF:
strFormat = "Format: RTFFORMAT_RTF";
break;
default:
break;
}
strText= LEADAnn1->AnnRTFText[hObject][uFormat];
Application->MessageBox ( strText.c_str(), strFormat.c_str(), MB_OK );
}


AnnSaveMemory example for C++ Builder

// This example is also for:
// AnnLoadMemory method

Note:

This topic is for Document/Medical only.

This example lets you save the current annotations to a file in memory, and lets you load the annotations that were saved.

1. | Start with the project that you created in Creating and Using Annotations.
2. | Add the following to the declarations as private members in your main form:

L_HANDLE hMem;
int iSize;

3.

At the top of your main form, add two command buttons and name them as follows:

Name | Caption
AnnSaveMem | Save In Memory
AnnLoadMem | Load From Memory

4.

Code the AnnSaveMem button's Click procedure as follows:

void __fastcall TForm1::AnnSaveMemClick(TObject *Sender)
{
if ( LEADAnn1->AnnSaveMemory (&hMem, ANNFMT_NATIVE, false, &iSize, SAVE_OVERWRITE, 0) != SUCCESS )
ShowMessage ( "Error calling AnnSaveMemory");
}

5.

Code the AnnLoadMem button's Click procedure as follows:

void __fastcall TForm1::AnnLoadMemClick(TObject *Sender)
{
//Load the annotations from the memory-resident file.
if ( LEADAnn1->AnnLoadMemory (hMem, iSize, 1) != SUCCESS)
ShowMessage ( "Error calling AnnLoadMemory");
else
ShowMessage ( "AnnLoadMemory succeeded");
GlobalFree (( void * )hMem);
}

6.

Run your program to test it.


AnnSaveTag example for C++ Builder

The following example saves selected objects as a Wang compatible TIFF tag.

//Save only selected objects in Wang TIFF tag
LEADAnn1->AnnSaveTag ( True, True );
LEADAnn1->Save ("d:\\pictures\\testwang.tif", FILE_CCITT_GROUP4, 1, 2, SAVE_OVERWRITE );


AnnSelectRect example for C++ Builder

void TForm1::AnnSelectRect(HANNOBJECT hPlgn)
{
bool bSelected;
TRect rcSelect;

LEADAnn1->AnnSelectRect(LEADAnn1->AnnContainer, Rect(10,
 10, 200, 100));
LEADAnn1->AnnSelectPoint(LEADAnn1->AnnContainer,
 Point(300, 300));
LEADAnn1->AnnGetSelected(hPlgn,
 bSelected);
if(bSelected)
{
LEADAnn1->AnnRemove(hPlgn);
LEADAnn1->AnnSetSelected(hPlgn,
 false, false);
}
else
LEADAnn1->AnnInsert(LEADAnn1->AnnContainer,
 hPlgn, false);

LEADAnn1->AnnGetSelectRect(LEADAnn1->AnnContainer,
 rcSelect);
Caption= "Left:" + IntToStr(rcSelect.Left)
 +
", Top:"
 + IntToStr(rcSelect.Top) +
", Width:"
 + IntToStr(rcSelect.Right - rcSelect.Left) +
", Height:"
 + IntToStr(rcSelect.Bottom - rcSelect.Top);
}


AnnSetAutoMenuItemEnable Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
//disable the Delete menu item from all the selected objects
LEADAnn1->AnnSetAutoMenuItemEnable (LEADAnn1->AnnContainer, 0, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, ANNFLAG_RECURSE + ANNFLAG_SELECTED, "");
//disable the Delete menu item from all the ellipse objects
LEADAnn1->AnnSetAutoMenuItemEnable (LEADAnn1->AnnAutomation, ANNOBJECT_ELLIPSE, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, 0, "");
}


AnnSetAutoText Example for C++ Builder

// This example is also for:
// AnnGetAutoText method,
//This example modifies the text string that is used for the undo option on the annotation pop-up menu.
void __fastcall TForm1::Button1Click(TObject *Sender)
{
char * pTestText;
int strSize;

strSize= LEADAnn1->AnnGetAutoText (ANNAUTOTEXT_MENU_UNDO, NULL);
if (strSize > 0)
{
pTestText= (char *) malloc (strSize + 1);
if ( !pTestText )
{
ShowMessage ("NO MEMORY");
return;
}
LEADAnn1->AnnGetAutoText (ANNAUTOTEXT_MENU_UNDO, &pTestText);
StrCat (pTestText, " - New");
LEADAnn1->AnnSetAutoText (ANNAUTOTEXT_MENU_UNDO, pTestText);
free (pTestText);
}
}


AnnSetBackColor example for C++ Builder

void TForm1::TestAnnBackColor ( HANNOBJECT hAnnObject )
{
TColor clColor; /* Object background color */
/* Invert the foreground color */
LEADAnn1->AnnGetBackColor(hAnnObject,
 clColor );
LEADAnn1->AnnSetBackColor(hAnnObject,
 (TColor)(ColorToRGB(clColor) ^ 0x00FFFFFF), false );
}


AnnSetBitmap example for C++ Builder

void TForm1::AnnSetBitmap(HANNOBJECT hStamp, HANNOBJECT hPlgn)
{
L_INT nRet;
TColor clTemp;
bool bTransparent;
TBitmapHandle StampBitmap;

clTemp= (TColor)0;
StampBitmap= 0;
nRet= LEADAnn2->Load("C:\\flagsel.bmp",
 0, 1, 1);
if(nRet == SUCCESS)
{
LEADAnn1->AnnSetBitmap(hStamp,
 LEADAnn2->Bitmap, false);
LEADAnn1->AnnSetAutoBackColor(LEADAnn1->AnnAutomation, ANNOBJECT_ALL,
 (TColor)RGB(40, 80, 160));
LEADAnn1->AnnGetAutoBackColor(LEADAnn1->AnnAutomation,
 ANNOBJECT_POLYGON, clTemp);
ShowMessage("AutoBackColor: "
 + ColorToString(clTemp));

LEADAnn1->AnnGetTransparent(hStamp,
 bTransparent);
if(!bTransparent)
LEADAnn1->AnnSetTransparent(hStamp,
 true, false);

LEADAnn1->AnnSetTransparentColor(hStamp,
 clGreen, false);
LEADAnn1->AnnGetTransparentColor(hStamp,
 clTemp);
ShowMessage("TransparentColor:
 " + ColorToString(clTemp));

LEADAnn1->AnnSetBackColor(hPlgn,
 (TColor)RGB(255, 0, 255), false);
LEADAnn1->AnnGetBackColor(hPlgn,
 clTemp);
ShowMessage("BackColor: "
 + ColorToString(clTemp));

LEADAnn1->AnnSetForeColor(hPlgn,
 TColor(RGB(0, 255, 255)), false);
LEADAnn1->AnnGetForeColor(hPlgn,
 clTemp);
ShowMessage("ForeColor: "
 + ColorToString(clTemp));
LEADAnn1->AnnGetBitmap(hStamp,
 StampBitmap);
LEADAnn1->Bitmap= StampBitmap;
}
}


AnnSetFillMode example for C++ Builder

void TForm1::TestAnnFillMode ( HANNOBJECT hAnnObject )
{
L_UINT uFillMode; /* Object fill mode */

/* Set the fill mode to transparent, unless it already is */
LEADAnn1->AnnGetFillMode ( hAnnObject, uFillMode );
if ( uFillMode == ANNFILLMODE_TRANSPARENT )
ShowMessage ( "Already transparent" );
else
LEADAnn1->AnnSetFillMode ( hAnnObject, ANNFILLMODE_TRANSPARENT, false );
}


AnnSetFillPattern example for C++ Builder

void TForm1::TestAnnFillPattern ( HANNOBJECT hAnnObject )
{
L_UINT uFillPattern; /* Object fill pattern */

/* Set the fill pattern to solid, unless it already is */
LEADAnn1->AnnGetFillPattern ( hAnnObject, uFillPattern );
if ( uFillPattern == ANNFILLPATTERN_SOLID )
ShowMessage ( "Already solid" );
else
LEADAnn1->AnnSetFillPattern ( hAnnObject, ANNFILLPATTERN_SOLID, false );
}


AnnSetFontBold example for C++ Builder

void TForm1::TestAnnFontBold ( HANNOBJECT hAnnObject )
{
bool IsBold; /* Is the object’s text bold */

/* Set the font to bold, unless it already is */
LEADAnn1->AnnGetFontBold ( hAnnObject, IsBold );
if ( IsBold )
ShowMessage ( "Already bold" );
else
LEADAnn1->AnnSetFontBold ( hAnnObject, true, false );
}


AnnSetFontItalic example for C++ Builder

void TForm1::TestAnnFontItalic ( HANNOBJECT hAnnObject )
{
bool IsItalic; /* Is the object’s text italic */
/* Set the font to italic, unless it already is */
LEADAnn1->AnnGetFontItalic ( hAnnObject, IsItalic );
if ( IsItalic )
ShowMessage ( "Already Italic" );
else
LEADAnn1->AnnSetFontItalic ( hAnnObject, true, false );
return;
}


AnnSetFontName example for C++ Builder

void TForm1::TestAnnFontName ( HANNOBJECT hAnnObject )
{
AnsiString strFontName;/* The object’s font name */

/* Get the current font name */
LEADAnn1->AnnGetFontName ( hAnnObject, strFontName );
/* Set the font to Times New Roman, unless it already is */
if ( lstrcmp(strFontName.c_str(),"Times New Roman" )== 0 )
ShowMessage ( "Already Times New Roman" );
else
LEADAnn1->AnnSetFontName ( hAnnObject, "Times New Roman", false );
}


AnnSetFontSize example for C++ Builder

void TForm1::TestAnnFontSize ( HANNOBJECT hAnnObject )
{
L_DOUBLE FontSize; /* Object font size */

/* Double the font size */
LEADAnn1->AnnGetFontSize ( hAnnObject, FontSize );
LEADAnn1->AnnSetFontSize ( hAnnObject, FontSize * 2, false );
}


AnnSetFontStrikeThrough example for C++ Builder

void TForm1::TestAnnFontStrike ( HANNOBJECT hAnnObject )
{
bool bStrikeThrough; /* Strike-through property of the object’s text */

/* Set the font to have a strike-through, unless it already has one */
LEADAnn1->AnnGetFontStrikeThrough ( hAnnObject, bStrikeThrough );
if ( bStrikeThrough )
ShowMessage ( "Already has strike-through" );
else
LEADAnn1->AnnSetFontStrikeThrough ( hAnnObject, true, false );
}


AnnSetFontUnderline example for C++ Builder

void TForm1::TestAnnFontUnderline ( HANNOBJECT hAnnObject )
{
bool bUnderLine; /* Underline property of the object’s text */

/* Set the font to have an underline, unless it already has one */
LEADAnn1->AnnGetFontUnderline ( hAnnObject, bUnderLine );
if ( bUnderLine )
ShowMessage ( "Already has an underline" );
else
LEADAnn1->AnnSetFontUnderline ( hAnnObject, True, False );
}


AnnSetForeColor example for C++ Builder

void TForm1::TestAnnForeColor ( HANNOBJECT hAnnObject )
{
COLORREF crColor; /* Object foreground color */
/* Invert the foreground color */
LEADAnn1->AnnGetForeColor ( hAnnObject, crColor );
LEADAnn1->AnnSetForeColor ( hAnnObject, crColor ^ 0x00FFFFFF, false );
}


AnnSetGaugeLength example for C++ Builder

void TForm1::TestAnnGauge ( HANNOBJECT hAnnObject, HANNOBJECT hContainer )
{
L_DOUBLE dLength;
/* if gauge length setting
is longer than 5 pixels, then make it 5 pixels. */
LEADAnn1->AnnGetGaugeLength ( hAnnObject, dLength );
if ( dLength > 5.0 )
{
LEADAnn1->AnnSetGaugeLength ( hAnnObject, 5.0, false );
}
}


AnnSetGrouping example for C++ Builder

// This example will temporarily disable the grouping in all objects
// and re-enable the grouping later.
// Disable grouping in all groups
LEADAnn1->AnnSetGrouping (LEADAnn1->AnnContainer, False, ANNFLAG_RECURSE);

//… you can now select and change individual objects from groups
//… you can also put the two calls to AnnSetGrouping in two
//… buttons

// re-enable grouping all groups
// note that we do NOT enable grouping in the topmost container!
// if you enable the grouping in the top container, then all the
// objects will act as a group!
LEADAnn1->AnnSetGrouping (LEADAnn1->AnnContainer, True, ANNFLAG_RECURSE+ANNFLAG_NOTTHIS);


AnnSetHyperlinkMsg Example for C++ Builder

//The following is an example of OnAnnHyperlinkMenu event code, which includes a call to AnnSetHyperlinkMsg.
void __fastcall TForm1::LEADAnn1AnnHyperlinkMenu (L_PHANDLE phObjects,
int iCount)
{
int x;
//set HyperLink to type ANNLINK_ANNEVENT5
//and set the 5 params to some values.
for (x= 0; x < iCount; x ++ )
LEADAnn1->AnnSetHyperlinkMsg (LEADAnn1->AnnGetItemHandle (phObjects, x), ANNLINK_ANNEVENT5, 5, 4, 3, 2, 1);
}


AnnSetLineStyle example for C++ Builder

void TForm1::TestAnnLineStyle ( HANNOBJECT hAnnObject )
{
L_UINT uLineStyle; /* Line style property of the object */

/* Set the style to a dashed line, unless it is already dashed */
LEADAnn1->AnnGetLineStyle ( hAnnObject, uLineStyle );
if ( uLineStyle == ANNLINE_DASH )
ShowMessage ( "Already dashed line" );
else
LEADAnn1->AnnSetLineStyle ( hAnnObject, ANNLINE_DASH, false );
}


AnnSetLineWidth example for C++ Builder

void TForm1::TestAnnLineWidth ( HANNOBJECT hAnnObject )
{
L_DOUBLE dLineWidth; /* Object line width */
/* Double the line width */
LEADAnn1->AnnGetLineWidth ( hAnnObject, dLineWidth );
LEADAnn1->AnnSetLineWidth ( hAnnObject, dLineWidth * 2, false );


AnnSetMetafile example for C++ Builder

void TForm1::TestMetaFile(HANNOBJECT hStamp)
{
HMETAFILE hMeta;
bool bEnhanced;

LEADAnn1->AnnGetPredefinedMetafile(ANNMETAFILE_IMPORTANT,
 bEnhanced, (unsigned int)hMeta);
LEADAnn1->AnnSetPredefinedMetafile(ANNMETAFILE_TOPSECRET,
 (unsigned int)hMeta);
LEADAnn1->AnnSetMetafile(hStamp,
 0, ANNMETAFILE_TOPSECRET, False);
ShowMessage("Stamp set to TopSecret");

LEADAnn1->AnnGetMetafile(hStamp,
 (unsigned int)hMeta);
switch (GetObjectType(hMeta))
{
case OBJ_ENHMETAFILE:
ShowMessage("Type
 is EMF");
break;

case OBJ_METAFILE:
ShowMessage("Type
 is WMF");
break;
}
}


AnnSetPoints example for C++ Builder

void TForm1::AnnSetPointsExample ( HANNOBJECT hObj, HANNOBJECT hObj2 )
{
L_UINT uArea;
ANNPOINT ptPoints[ 4 ];

// Assign values for x and y from 1 through 3
ptPoints[1].X= 10;
ptPoints[1].Y= 20;
ptPoints[2].X= 100;
ptPoints[2].Y= 200;
ptPoints[3].X= 200;
ptPoints[3].Y= 100;

LEADAnn1-> AnnSetPoints ( hObj, ptPoints, 3 );
ptPoints[0].X= 50;
ptPoints[0].Y= 220; // SetPoints starts at 0 because No. of points set to 4

LEADAnn1-> AnnSetPoints ( hObj2, ptPoints, 4 );
LEADAnn1-> AnnSetFillMode ( hObj2, ANNFILLMODE_OPAQUE, false );
Form1->Caption= "Protractor Bounding Rectangle \n"\
" Left: " + IntToStr(LEADAnn1-> AnnBoundingRectLeft [hObj]) + "\n" +
" Top:" + IntToStr(LEADAnn1-> AnnBoundingRectTop [hObj]) + "\n" +
" Width:" + IntToStr(LEADAnn1-> AnnBoundingRectWidth [hObj]) + "\n" +
" Height:" + IntToStr(LEADAnn1-> AnnBoundingRectHeight [hObj]);
LEADAnn1-> AnnBringToFront ( hObj2 );
ShowMessage ( "Brought Polygon to front" );
LEADAnn1-> AnnGetArea (hObj2, uArea);
Form1->Caption= "Polygon Area:" + IntToStr(uArea);
LEADAnn1-> AnnSendToBack ( hObj2 );
ShowMessage ( "Sent Polygon to back" );
}


AnnSetPolyFillMode example for C++ Builder

void TForm1::TestAnnPolyFillMode ( HANNOBJECT hAnnObject )
{
L_UINT uPolyFillMode; /* Object's polygonal fill mode */

/* Change the fill mode */
LEADAnn1->AnnGetPolyFillMode ( hAnnObject, uPolyFillMode );
if ( uPolyFillMode == ANNPOLYFILLMODE_WINDING )
LEADAnn1->AnnSetPolyFillMode ( hAnnObject, ANNPOLYFILLMODE_ALTERNATE, false );
else
LEADAnn1->AnnSetPolyFillMode ( hAnnObject, ANNPOLYFILLMODE_WINDING, false );
}


AnnSetROP2 example for C++ Builder

void TForm1::AnnSetROP2(HANNOBJECT
 hAnnObject)
{
L_UINT uRop2; /* ROP2 code */

/* Get the current ROP2 code */
LEADAnn1->AnnGetROP2(hAnnObject,
 uRop2);

/* if the code is not ANNROP2_AND, make it so */
if(uRop2 != ANNROP2_AND)
{
/* make sure the FillMode is set to
 Transparent */
LEADAnn1->AnnSetFillMode(hAnnObject,
 ANNFILLMODE_TRANSPARENT, true);

/* set ROP2 code */
LEADAnn1->AnnSetROP2(hAnnObject,
 ANNROP2_AND, true);
}
}


AnnSetScalarX example for C++ Builder

void TForm1::TestScalarsAndOffsets ( HANNOBJECT hContainer )
{
L_DOUBLE dScalarX;
L_DOUBLE dScalarY;
L_DOUBLE dOffsetX;
L_DOUBLE dOffsetY;

LEADAnn1->AnnGetScalarX ( hContainer, dScalarX );
LEADAnn1->AnnGetScalarY ( hContainer, dScalarY );
LEADAnn1->AnnGetOffsetX ( hContainer, dOffsetX );
LEADAnn1->AnnGetOffsetY ( hContainer, dOffsetY );

ShowMessage ( "ScalarX: " + FloatToStr(dScalarX) + "\n" +
"ScalarY: " + FloatToStr(dScalarY) + "\n" +
"OffsetX: " + FloatToStr(dOffsetX) + "\n" +
"OffsetY: " + FloatToStr(dOffsetY) + "\n" );

LEADAnn1->AnnSetScalarX ( hContainer, 1.5, False );
LEADAnn1->AnnSetScalarY ( hContainer, 1.5, False );
LEADAnn1->AnnSetOffsetX ( hContainer, 10, False );
LEADAnn1->AnnSetOffsetY ( hContainer, 20, False );

LEADAnn1->AnnGetScalarX ( hContainer, dScalarX );
LEADAnn1->AnnGetScalarY ( hContainer, dScalarY );
LEADAnn1->AnnGetOffsetX ( hContainer, dOffsetX );
LEADAnn1->AnnGetOffsetY ( hContainer, dOffsetY );

ShowMessage ( "ScalarX: " + FloatToStr(dScalarX) + "\n" +
"ScalarY: " + FloatToStr(dScalarY) + "\n" +
"OffsetX: " + FloatToStr(dOffsetX) + "\n" +
"OffsetY: " + FloatToStr(dOffsetY) + "\n" );
}


AnnSetSecondaryBitmap example for C++ Builder

void TForm1::AnnSetSecondaryBitmap(HANNOBJECT hPushPin)
{
TBitmapHandle SecondaryBitmap;
LEADAnn1->AnnSetSecondaryBitmap(hPushPin,
 LEADAnn2->Bitmap, false);
LEADAnn1->AnnUserMode=
 ANNUSERMODE_RUN;
ShowMessage("Secondary bitmap set");
LEADAnn1->AnnGetSecondaryBitmap(hPushPin,
 SecondaryBitmap);
LEADAnn1->Bitmap= SecondaryBitmap;
}


AnnSetShowFlags example for C++ Builder

void TForm1::AnnSetShowFlags(HANNOBJECT hProt)
{
float fArcRadius;
bool bAcute;
L_INT nUnit;
L_INT nPrecision;
AnsiString strAbbr;
L_UINT uShowFlags;

fArcRadius= 0;
bAcute= true;
nUnit= 0;
nPrecision= 0;
uShowFlags= 0;

LEADAnn1->AnnGetProtractorOptions(hProt,
 bAcute, nUnit, strAbbr, nPrecision, fArcRadius);
LEADAnn1->AnnSetProtractorOptions(hProt,
 (bAcute == False), 1 - ANNANGLE_DEGREES, strAbbr, (nPrecision + 1) % 5,
 fArcRadius, False);
LEADAnn1->AnnGetShowFlags(hProt,
 uShowFlags);
LEADAnn1->AnnSetShowFlags(hProt,
 (uShowFlags+ 1) % 4, false);
}


AnnSetText example for C++ Builder

void TForm1::TestAnnSetText ( HANNOBJECT hAnnObject )
{
AnsiString strText; /* The object’s text */

/* Get the current text */
LEADAnn1->AnnGetText ( hAnnObject, strText );
/* Add " - New" to the end of the current text */
strText= strText + " - New";
LEADAnn1->AnnSetText ( hAnnObject, strText, false );
}


AnnSetUnit example for C++ Builder

void TForm1::TestAnnSetUnit ( HANNOBJECT hCrossProd )
{
L_UINT uUnit;
L_UINT uPrecision;
AnsiString strUnitAbbrev;

LEADAnn1->AnnGetUnit ( hCrossProd, strUnitAbbrev, uUnit, uPrecision );
uUnit= (uUnit + 1) % 10;
LEADAnn1->AnnSetUnit ( hCrossProd, uUnit + ANNUNIT_DEF_ABBR, "", 2, false );
}


AnnSetUser Example for C++ Builder

// This example is also for:
AnnSetVisible method
void __fastcall TForm1::Button1Click(TObject *Sender)
{
//hide the selected objects
LEADAnn1->AnnSetVisible (LEADAnn1->AnnContainer, False, ANNFLAG_RECURSE + ANNFLAG_SELECTED, "");
//set the selected objects to belong to user XXX
LEADAnn1->AnnSetUser (LEADAnn1->AnnContainer, "", "xxx", True);
}


AnnSetWnd example for C++ Builder

/* This example updates the container object's window handle if necessary. */
void TForm1::TestAnnWnd ( HANNOBJECT hContainer, HWND hWnd )
{
HWND hObjectWnd; /* Container object's window */

/* Set the container's window to the current window, unless it is already current */
LEADAnn1->AnnGetWnd ( hContainer, hObjectWnd );
if ( hObjectWnd == hWnd )
ShowMessage ( "Already using the current window" );
else
LEADAnn1->AnnSetWnd ( hContainer, hWnd );
}


AnnShowLockedIcon Example for C++ Builder

//This example toggles the AnnShowLockedIcon property.
//Toggle AnnShowLockedIcon
if (LEADAnn1->AnnShowLockedIcon)
LEADAnn1->AnnShowLockedIcon = False;
else
LEADAnn1->AnnShowLockedIcon= True;


AnnTextAlign example for C++ Builder

void TForm1::ExampleAnnTextAlign (HANNOBJECT hObject )
{
L_INT nObjectType;
long nAlign;

nObjectType= LEADAnn1->AnnGetType(hObject);

if (nObjectType != ANNOBJECT_TEXT)
ShowMessage( "This object is not a Text Object");

nAlign= LEADAnn1->AnnTextAlign[hObject];

if (nAlign == TEXTALIGN_CENTER )
nAlign= TEXTALIGN_LEFT;
else
nAlign= TEXTALIGN_CENTER;

LEADAnn1->AnnFlags= 0;
LEADAnn1->AnnTextAlign[hObject]= nAlign;
}


AnnTextExpandTokens example for C++ Builder

void TForm1::ExampleAnnTextExpandTokens ( HANNOBJECT hObject )
{
L_INT nObjectType;
bool bTextExpandToken;

nObjectType= LEADAnn1->AnnGetType(hObject);

if (nObjectType != ANNOBJECT_TEXT)
ShowMessage( "This object is not a Text Object");

bTextExpandToken = LEADAnn1->AnnTextExpandTokens[hObject];
bTextExpandToken = ~bTextExpandToken;
LEADAnn1->AnnTextExpandTokens[hObject] = bTextExpandToken;

if (bTextExpandToken == true)
ShowMessage( "Text Expand Token");
else
ShowMessage( "Text Not Expand Token");
}


AnnTextRotate example for C++ Builder

void TForm1::ExampleAnnTextRotate ( HANNOBJECT hObject )
{
L_INT nObjectType;
long nAngle;

nObjectType= LEADAnn1->AnnGetType(hObject);

if (nObjectType != ANNOBJECT_TEXT)
ShowMessage( "This object is not a Text Object");

nAngle = LEADAnn1->AnnTextRotate[hObject];
nAngle = nAngle + TEXTROTATE_90;
LEADAnn1->AnnFlags = 0 ;
LEADAnn1->AnnTextRotate[hObject] = nAngle;
}


AnnTicMarkLength example for C++ Builder

void TForm1::ExampleAnnTicMarkLength (HANNOBJECT hObject )
{
L_INT nObjectType;
double Length;

nObjectType= LEADAnn1->AnnGetType(hObject);

if ( nObjectType != ANNOBJECT_POLYRULER && nObjectType != ANNOBJECT_RULER )
ShowMessage("This object is not a POLYRULER or a RULER Object");

Length= LEADAnn1->AnnTicMarkLength[hObject];

Length+= 10;

LEADAnn1->AnnTicMarkLength[hObject]= Length;
}


AnnUndo example for C++ Builder

// Make some changes and then call this method.
// See how the last change is undone.
LEADAnn1->AnnUndo ();


AnnUndoDepth example for C++ Builder

// Make some changes and then call this method.
// See how the last change is undone.
LEADAnn1->AnnUndoDepth= LEADAnn1->AnnUndoDepth + 5;


AnnUndoEnable example for C++ Builder

//This example toggles the Undo feature
LEADAnn1->AnnUndoEnable =! LEADAnn1->AnnUndoEnable;


AnnUngroup Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADAnn1->AnnUngroup (LEADAnn1->AnnContainer, ANNFLAG_SELECTED + ANNFLAG_RECURSE, "");
}


AnnUnlock Example for C++ Builder

This is also the example for AnnGetLocked method.

If an object is found to be locked, using AnnGetLocked method, the object is unlocked, by AnnUnlock, using the key "LEADTOOLS".

bool bLocked;
L_HANDLE ghObject;
//.
//.
//.

bLocked= LEADAnn1->AnnGetLocked (ghObject);
if (bLocked)
LEADAnn1->AnnUnlock (ghObject, "LEADTOOLS");
//.
//.
//.


AnnUnrealize Example for C++ Builder

The following example calls the AnnUnrealize method.

//Unrealized all redact objects in the container
LEADAnn1->AnnUnrealize (LEADAnn1->AnnContainer, False);


AnnUserHandle example for C++ Builder

void TForm1::ExampleGetAnnUserHandles(HANNOBJECT hObject )
{
L_UINT i;
L_UINT uCount;
AnsiString strVisible;

LEADAnn1->AnnGetUserHandles ( hObject );
uCount= LEADAnn1->AnnUserHandlesCount;

if ( uCount > 0 )
{
for ( i= 0; i < uCount; i ++ )
{
if ( LEADAnn1->AnnUserHandle[i]->Visible )
strVisible= "bVisible = True";
else
strVisible= "bVisible = False";

ShowMessage ( "uIndex = " + IntToStr(i) + "\n" +
"nID = " + IntToStr(LEADAnn1->AnnUserHandle[i]->ID) + "\n" +
"ContainerX = " + IntToStr((int)LEADAnn1->AnnUserHandle[i]->ContainerX) + "\n" +
"ContainerY = " + IntToStr((int)LEADAnn1->AnnUserHandle[i]->ContainerY) + "\n" +
"CliantX = " + IntToStr(LEADAnn1->AnnUserHandle[i]->ClientX) + "\n" +
"ClientY = " + IntToStr(LEADAnn1->AnnUserHandle[i]->ClientY) + "\n" +
strVisible + "\n" +
"PenColor = " + IntToStr(LEADAnn1->AnnUserHandle[i]->PenColor) + "\n" +
"FillColor = " + IntToStr(LEADAnn1->AnnUserHandle[i]->FillColor) + "\n" +
"Shape = " + IntToStr(LEADAnn1->AnnUserHandle[i]->Shape) + "\n");
}
}
else
ShowMessage ( "No User Handles" );
}


AntiAlias example for C++ Builder

LEADImage1->AntiAlias (128, 3, ANTIALIAS_1);


ApplyMathLogic Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/* Multiply the colors of the bitmap using a factor of 1.51 */
LEADImage1->ApplyMathLogic(151, AML_OP_MUL + CHANNEL_MASTER + AML_VALUE_NOP + AML_RES_NOP);
}


ApplyModalityLUT Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
TestModalityLUT ( False );
}

L_INT TForm1::TestModalityLUT ( bool bLinear )
{
L_UINT16 LUT[0x10000];
L_INT nRet;
L_INT i;
L_INT nFirstStoredPixelValueMapped;
unsigned uEntryBits;
unsigned uNumberOfEntries;

LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
if(bLinear)
{
nRet = LEADImage1->ApplyLinearModalityLUT(0.0, 0.5, 0);
}
else
{
// set a LUT which reduces the intensity of each pixel to half
for(i = 0; i <= 0xFFFF; i++)
LUT[i] = i / 2;
// fill the LUTDescriptor structure
nFirstStoredPixelValueMapped = 0;
uEntryBits = 16;
uNumberOfEntries = 0x10000;
// apply the LUT
nRet = LEADImage1->ApplyModalityLUT(LUT, uNumberOfEntries, nFirstStoredPixelValueMapped, uEntryBits, M_LUT_UPDATE_MIN_MAX);
}
return nRet;
}


ApplyVOILUT Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
TestVOILUT(True);
}

L_INT TForm1::TestVOILUT ( bool bLinear )
{
L_INT nRet;
L_UINT16 LUT[0x1000];
L_INT i;
L_INT nFirstStoredPixelValueMapped = 0;
unsigned uEntryBits = 16; unsigned uNumberOfEntries = 0x1000;

LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
if(bLinear)
{
// Apply "Abdomen T1" window-level , high bit is assumed
// to be "11" and low bit "0.
nRet = LEADImage1->ApplyLinearVOILUT(330.0, 600.0, 0);
}
else
{
for(i = 0; i <= 0x1000; i++)
{
if(i < 30)
{
LUT[i] = 0;
}
else
if(i > 630)
{
LUT[i] = 630;
}
else
{
LUT[i] = i;
}
}
nFirstStoredPixelValueMapped = 0;
uEntryBits = 16;
uNumberOfEntries = 0x1000;
// apply the LUT
nRet = LEADImage1->ApplyVOILUT(LUT, uNumberOfEntries, nFirstStoredPixelValueMapped, uEntryBits, 0);
}
return nRet;
}


AutoAnimate Example for C++ Builder

This example gets information about an animated file, uses the information to position the LEAD control, and plays the animation as it loads the file.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int HeightFactor,WidthFactor;
int HeightAllowed,WidthAllowed;

/*Force continued looping after the file loads. */
Lead1->AutoAnimationLoop = AUTOANIMATIONLOOP_INFINITE;
Lead1->GetFileInfo("d:\\ltwin11\\images\\eye.gif", 0);
/*Exit if( this is not an animated file. */
if( Lead1->InfoAnimation == False)
ShowMessage("Not an animated file!!");
else
{
/*Calculate information for centering the LEAD control. */
/*Set the variables used for preserving the aspect ratio. */
/*Allow for a border of 1/8 of the form size. */
/*The units of measure do not matter, since we are calculating proportions.*/
HeightFactor = Lead1->InfoHeight;
WidthFactor = Lead1->InfoWidth;
HeightAllowed = ClientHeight * 3/4;
WidthAllowed = ClientWidth * 3/4;
/*Center the LEAD control on the form, preserving the aspect ratio. Check to see if( using the maximum width will make the image too tall. Set the dimensions based on the result. */
if( ((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed)
{
Lead1->Left = ClientWidth / 8;
Lead1->Width = WidthAllowed;
Lead1->Height = (Lead1->Width * HeightFactor) / WidthFactor;
Lead1->Top = (ClientHeight - Lead1->Height) / 2;
}
else
{
Lead1->Top = ClientHeight / 8;
Lead1->Height = HeightAllowed;
Lead1->Width = (Lead1->Height * WidthFactor) / HeightFactor;
Lead1->Left = (ClientWidth - Lead1->Width) / 2;
}

/*Set properties for playing the animation as is loads.*/
Lead1->AutoAnimate = True;
Lead1->AutoRepaint = True;
/*Load the animated file.*/
Lead1->Load("d:\\ltwin11\\images\\eye.gif", 0, 0, -1);
}
}


AutoBinary Example for C++ Builder

void __fastcall TForm1::AutoBinaryClick(TObject *Sender)
{
LEADImage1->AutoBinary( );
}


AutoCADFilesColorScheme example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* If the current AutoCAD color scheme is not black on white, change it */
if ( LEADImage1->AutoCADFilesColorScheme != AUTOCADFILES_COLORSCHEME_BLACKONWHITE )
LEADImage1->AutoCADFilesColorScheme= AUTOCADFILES_COLORSCHEME_BLACKONWHITE;

/* Load the DXF file */
LEADImage1->Load ( "c:\\image1.dxf", 0, 1, 1 );
}


AutoColorLevel Example for C++ Builder

void __fastcall TForm1::AutoColorLevel1Click(TObject *Sender)
{
LEVELCOLORINFO Master;
LEVELCOLORINFO Red;
LEVELCOLORINFO Green;
LEVELCOLORINFO Blue;

/* Apply "Auto Leveling" to the bitmap */
LEADImage1->AutoColorLevel( Master, Red, Green, Blue, DEFAULT_BLACK_CLIP, DEFAULT_WHITE_CLIP, AUTO_LEVEL );
ShowMessage ( "Min and Max input values for the blue channel using auto level are " +IntToStr(Blue.uMinInput) + "and " + IntToStr(Blue.uMaxInput) );
}


AutoSize Example for C++ Builder

This example shows how the AutoSize property works when loading and when rotating an image.

Lead1->AutoSize=True;
Lead1->Load("c:\\lead\\images\\image1.cmp", 0, 0, 1);
ShowMessage("Control is sized to fit the loaded bitmap");
Lead1->Rotate(4500, True, RGB(0,0,0));
ShowMessage("Control is sized to fit the rotated bitmap");


AutoTrim example for C++ Builder

This example trims the bitmap with threshold of 10.

Lead1->AutoTrim(10);
Lead1->ForceRepaint();


Average example for C++ Builder

This example applies an average filter with a 3x3 neighborhood and redisplays the bitmap.

Lead1->Average(3);
Lead1->ForceRepaint();


BackColor (ImageList Control) example for C++ Builder

/*This example sets the background color to red.*/

LEADImgList1->BackColor = clRed;


BackColor example for C++ Builder

This example sets the background color to red. You can zoom out to see the background color.

Lead1->BackColor = RGB(255,0,0);


BackErase example for C++ Builder

This example turns off repainting of the background, then zooms out to show the effect when repainting.

Lead1->BackErase = False;
Lead1->AutoRepaint = False;
Lead1->AutoScroll = False;

//Calculate the values to zoom out by 10 percent and center the image.
Lead1->DstWidth = (Lead1->DstWidth * 9) / 10;
Lead1->DstHeight = (Lead1->DstHeight * 9) / 10;
Lead1->DstTop = (Lead1->Height - Lead1->DstHeight) / 2;
Lead1->DstLeft = (Lead1->Width - Lead1->DstWidth) / 2;

//Set the clipping area to the same as the destination rectangle
Lead1->DstClipWidth = Lead1->DstWidth;
Lead1->DstClipHeight = Lead1->DstHeight;
Lead1->DstClipTop = Lead1->DstTop;
Lead1->DstClipLeft = Lead1->DstLeft;

//Redisplay the image
Lead1->ForceRepaint();


BalanceColors example for C++ Builder

BalanceColors C++ Builder Example

/*This example assumes there is a bitmap loaded*/
COLORBALANCING RedFact, GreenFact, BlueFact;

RedFact.toRed= 0.25;
RedFact.toGreen= 0.50;
RedFact.toBlue= 0.25;
GreenFact.toRed= 0.30;
GreenFact.toGreen= 0.40;
GreenFact.toBlue= 0.30;
BlueFact.toRed= 0.10;
BlueFact.toGreen= 0.60;
BlueFact.toBlue= 0.30;
LEADImage1->BalanceColors ( RedFact, GreenFact, BlueFact);


Bending Example for C++ Builder

void __fastcall TForm1::Bending1Click(TObject *Sender)
{
POINT ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth/2);
ptCenter.y= (int)(LEADImage1->BitmapHeight/2);
LEADImage1->Bending( 100, ptCenter, 0, FILL_RPT | FILL_WOUTROT | BND_NORM );
}


BinaryFilter example for C++ Builder

This example does omni-directional erosion of black objects and repaints the image.

Lead1->BinaryFilter(BFLT_EROSION_OMNI);
Lead1->ForceRepaint();


BitmapAlpha example for C++ Builder

void __fastcall TForm1::AlphaRGNClick(TObject *Sender)
{
int rgntop ;
int rgnleft ;
int rgnwidth ;
int rgnheight ;
HRGN hRGN ;
int test;

LEADImage1->Load ("v:\\images\\image1.cmp", 0, 0, 1);
LEADImage1->AutoRepaint = False;
/*Get an alpha channel bitmap, and fill it with white*/
LEADImage2->Bitmap = LEADImage1->BitmapAlpha;
LEADImage2->SetRgnColor (RGB(0, 0, 0), L_RGN_SETNOT);
test= LEADImage2->GetRgnArea ();
//test here is test = 0, then Alpha is all black
if (test == 0)
ShowMessage ("Alpha image is all black");

LEADImage2->Fill (RGB(255, 255, 255));
rgntop = 0;
rgnleft = 0;
rgnwidth = LEADImage1->BitmapWidth;
rgnheight = LEADImage1->BitmapHeight;
/*Create an elliptical region in the AlphaBitmap*/
LEADImage2->SetRgnEllipse (rgntop, rgnleft, rgnwidth, rgnheight, L_RGN_SET);
/*Fill the region with black*/
LEADImage2->Fill (RGB(0, 0, 0));
/*Free the region*/
LEADImage2->FreeRgn ();
/*Update the alpha channel in the main bitmap*/
LEADImage1->BitmapAlpha = LEADImage2->Bitmap;
/*Save the bitmap as 32-bit TGA*/
LEADImage1->Save ("test.tga", FILE_TGA, 32, 0, SAVE_OVERWRITE);
/*Free the bitmaps*/
LEADImage1->Bitmap = 0;
LEADImage2->Bitmap = 0;
/*Load the bitmap we just saved and get the alpha channel*/
LEADImage1->Load ("test.tga", 0, 0, 1);
LEADImage2->Bitmap = LEADImage1->BitmapAlpha;
/*Create a region in the AlphaBitmap that includes all of the black pixels*/
LEADImage2->SetRgnColor (RGB(0, 0, 0), L_RGN_SET);
/*get the region from the AlphaBitmap and set it into the main bitmap*/
hRGN = (HRGN)LEADImage2->GetRgnHandle ();
LEADImage1->SetRgnHandle ((int)hRGN, 0, 0, L_RGN_SET);
LEADImage1->PaintRgnOnly = True;
LEADImage1->ForceRepaint ();
}


BitmapCompression Example for C++ Builder

// This example toggles the bitmap’s compression
long oldSize;

/*This example toggles the bitmap's compression*/
int oldSize;

oldSize= LEADImage1->BitmapSize;
if (LEADImage1->BitmapCompression == COMP_NONE)
{
/*Compress the bitmap*/
if (LEADImage1->BitmapBits == 24)
LEADImage1->BitmapCompression= COMP_SUPER;
else
if (LEADImage1->BitmapBits == 1)
LEADImage1->BitmapCompression= COMP_RLE;
}
else
/*Bitmap is compressed-> Uncompress it*/
LEADImage1->BitmapCompression= COMP_NONE;

ShowMessage ("old Size = " + IntToStr(oldSize) + "\nNew Size = " + IntToStr(LEADImage1->BitmapSize));


BitmapDataPath Example for C++ Builder

This example shows how to load an image from the Internet. It uses the BitmapDataPath property to start the asynchronous load; then uses the OnReadyStateChanged event to paint the image when loading is complete.

void __fastcall TForm1::Button1Click(TObject* Sender)
{
/* Start the asynchronous load. */
Lead1->BitmapDataPath = "http://www.leadtools.com/images/newheadr.GIF";
}

void __fastcall TForm1::Lead1ReadyStateChanged(TObject *Sender, TReadyState ReadyState)
{
/* Paint the image when loading is complete. */
if(ReadyState == rsComplete)
{
Lead1->AutoSetRects = True;
Lead1->PaintSizeMode = smFit;
Lead1->ForceRepaint();
}
}


BitmapOrder Example for C++ Builder

if ( LEADImage -> BitmapOrder == ORDER_RGB )
Label->Caption = " The Bitmap With RGB Order " ;


BitmapToClient example for C++Builder

AnsiString szOut;
//Test a bitmap location for its screen location
LEADImage1->BitmapToClient (50, 50);
szOut= "";
szOut= szOut + "ClientX = " + IntToStr(LEADImage1->ConvertX) + "\n";
szOut= szOut + "ClientY = " + IntToStr(LEADImage1->ConvertY) + "\n";
ShowMessage ( szOut.c_str() ) ;


BitmapXres and BitmapYres example for C++ Builder

This example sets the bitmap's resolution to 300 x 600 DPI.

Lead1->BitmapXres = 300;
Lead1->BitmapYres = 600;


BitonalScaling (ImageList Control) example for C++ Builder

/*set the control to use scale to gray*/
LEADImgList1->BitonalScaling = btsScaleToGray ;


BitonalScaling example for C++ Builder

This example sets the display to use scale-to-gray and repaints the image. This affects only 1-bit images.

if(Lead1->IsSupportLocked(L_SUPPORT_EXPRESS))
ShowMessage("No scale to gray - You need to unlock Document/Medical capabilities");
else
{
Lead1->BitonalScaling = btsScaleToGray;
Lead1->ForceRepaint();
}


BorderColor (ImageList Control) example for C++ Builder

/*This sets the border style to Fixed Single*/
/*And sets the border color to red.*/
LEADImgList1->Ctl3D = false;
LEADImgList1->BorderStyle = bsSingle;
LEADImgList1->BorderColor = clRed;


BorderRemove example for C++ Builder

// add this to Form Private Section.
private: // User declarations

HRGN hRgnAll ;

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nRet;
//Border Remove
//This example updates a region with the borders of a bitmap
//For the example, windows regions are passed to the OnBorderRemove Event and combined.
//In practice it would be easier and faster to just update a LEAD region representing the changes
//The border is removed from the image

//Create a NULL region
hRgnAll = CreateRectRgn(0, 0, 0, 0);
nRet = LEADImage1->BorderRemove(BORDER_CALLBACK_REGION | BORDER_USE_VARIANCE,
BORDER_TOP | BORDER_BOTTOM | BORDER_LEFT | BORDER_RIGHT, 20, 2, 5);

if ((nRet == SUCCESS) )
{
LEADImage1->FreeRgn ();
LEADImage1->SetRgnHandle ((int)hRgnAll, 0, 0, L_RGN_SET);
LEADImage1->RgnFrameType = ftAnimated;
}

//delete the Windows Rgn

DeleteObject(hRgnAll);
}

//---------------------------------------------------------------------------

void __fastcall TForm1::LEADImage1BorderRemove (TObject *Sender,
L_HRGN hBorderRgn, int uBorderToRemove, int nBoundingRectLeft,
int nBoundingRectTop, int nBoundingRectWidth,
int nBoundingRectHeight)
{
char * szBorder;
char crOut[256];

CombineRgn((HRGN)hRgnAll,(HRGN)hRgnAll, (HRGN)hBorderRgn, RGN_OR);
switch(uBorderToRemove)
{
case BORDER_TOP:
szBorder = "Top";
break;
case BORDER_LEFT:
szBorder = "Left";
break;
case BORDER_RIGHT:
szBorder = "Right";
break;
case BORDER_BOTTOM:
szBorder = "Bottom";
break;
}
wsprintf(crOut,"Border - %s Bounds:%d,%d,%d,%d",
szBorder,
nBoundingRectLeft,
nBoundingRectTop,
nBoundingRectWidth,
nBoundingRectHeight);

OutputDebugString(crOut);
LEADImage1->DocCleanSuccess = SUCCESS_REMOVE;

}


BrowseDir (Thumbnail Browser Control) example for C++ Builder

LEADThumb1->EnableMethodErrors = True;
LEADThumb1->StopOnError = True;

LEADThumb1->Filter = "*.jpg"; /*search for JPEG files;*/

LEADThumb1->ThumbnailWidth = 150;
LEADThumb1->ThumbnailHeight = 150;
LEADThumb1->ThumbnailBitsPerPixel = 0;

LEADThumb1->MaintainAspect = True;
LEADThumb1->ForceSize = True;
LEADThumb1->ThumbnailBackgroundColor =clGreen;

LEADThumb1->LoadStamp = True;
LEADThumb1->Resample = True;

LEADThumb1->IncludeSubDirectories = False;

LEADThumb1->ExpandMultipage = False;

LEADThumb1->MaxSizeDisk = 0; /*no filesize limit*/
LEADThumb1->MaxSizeMem = 4096000; /*set a image size limit*/

LEADThumb1->DitherFlags = CRF_STUCKIDITHERING;
LEADThumb1->PaletteFlags = CRF_FIXEDPALETTE;
try
{
LEADThumb1->BrowseDir ("f:\\images\\new");
}
catch(ELEADThumbError *e)
{
if (LEADThumb1->Error != ERROR_USER_ABORT)
ShowMessage(LEADThumb1->ErrorMsg);

}


BumpMap Example for C++ Builder

void __fastcall TForm1::BumpMapClick(TObject *Sender)
{
LEADImage1->BumpMap(LEADImage2->Bitmap, 5, 0, 3, 0, 0, 0, 0, true, 50, 0, NULL );
}


ButtonColumns example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADAnn1->AnnToolbar->ButtonColumns= LEADAnn1->AnnToolbar ->ButtonColumns + 1;
}


ButtonMenuTool example for C++ Builder

// This example is also for:
// ButtonToolCount Property.
//make the first rubber stamp tool draw a rectangle
int i ;
for (i= 0; i<LEADAnn1->AnnToolbar->ButtonCount; i ++)
{
//is this the button with the rubber stamps?
if (LEADAnn1->AnnToolbar-> ButtonToolCount [i] > 1 )
LEADAnn1->AnnToolbar-> ButtonMenuTool [i][0]= ANNTOOL_RECT;
}
}


ButtonRows example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADAnn1->AnnToolbar->ButtonRows= LEADAnn1->AnnToolbar->ButtonRows + 1;
}


ButtonVisible example for C++ Builder

//hide/show the first toolbar button
LEADAnn1->AnnToolbar->ButtonVisible [0]= ! LEADAnn1->AnnToolbar ->ButtonVisible [0];


CancelFloater example for C++ Builder

1.

Add a command button to your main form and code the click procedure as follows:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Lead1->AutoFloater = True;
Lead1->EnableFloater = True;
Lead1->RgnMarkingMode = mmRectangle;
}

2.

Add a second command button and code the click procedure as follows:

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Lead1->CancelFloater ();
}

3.

When you run the program, Click Button1 .Create a region using the mouse. Move the region with the mouse to a different location inside the bitmap.

a- | If you want to cancel the operation, click on Button2.
b- | If you want to paste the floater and create a new region, click on the bitmap outside the floater.


Capture example for C++ Builder

This example captures the current form and displays the captured image.

//Turn on the automatic display rectangles.
Lead1->AutoSetRects= True;
Lead1->Capture(0, Left, Top, Width, Height);
Lead1->AutoScroll= True;
Lead1->ForceRepaint();


CenterImage example for C++ Builder

//toggle CenterImage
LEADImage1-> CenterImage= ! LEADImage1->CenterImage;


ChangeHueSatInt Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
HUESATINTDATA HsiData;/*Color Range Information structure*/

/* Load a bitmap at 24 bits per pixel */
LEADImage1->Load("IMAGE1.CMP", 0, 1, 1 );

/*Change bitmap hue, saturation, and brightness */
HsiData.nHue= 18000;
HsiData.nSaturation= 0;
HsiData.nIntensity= 0;
HsiData.nOuterLow= 315;
HsiData.nOuterHigh= 45;
HsiData.nInnerLow= 345;
HsiData.nInnerHigh= 15;
/* change the red color to green */
LEADImage1->ChangeHueSatInt( 0, 0, 0, &HsiData, 1 );
}


ChannelMix Example for C++ Builder

void __fastcall TForm1::ChannelMixClick(TObject *Sender)
{
LEADImage1->ChannelMix( 50, 0, 0, 0, 100, 100, 0, 0, 0, 0, 100, 0 );
}


Clear (ImageList Control) example for C++ Builder

/*empty the current list*/
LEADImgList1->Clear();


ClientToBitmap example for C++Builder

void __fastcall TForm1::LEADImage1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
int BitmapX;
int BitmapY;

BitmapX= X;
BitmapY= Y;
LEADImage1->ClientToBitmap ( BitmapX, BitmapY );

//Change that pixel to White
LEADImage1->Pixel[LEADImage1->ConvertX][LEADImage1->ConvertY]= RGB(255, 255, 255 ) ;
}


ColorCount example for C++ Builder

This example displays a message box showing the number of unique colors in the control's current bitmap.

AnsiString szMessage;
int NumberOfColors;

// Get the number of colors in the bitmap.
NumberOfColors = Lead1->ColorCount;
// Display the result in a message.
szMessage = "The bitmap has " + IntToStr(NumberOfColors) + " colors";
ShowMessage(szMessage);


ColorIntensityBalance Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );

/* Balance the colors by increasing the red channel values */
LEADImage1->ColorIntensityBalance(60, 0, 0, 40, 0, 0, 70, 0, 0, FALSE);
}


ColorizeGray Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
GRAYCOLOR GrayColors[6];
// Load the bitmap, keeping the bits per pixel of the file
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

//Load the grayscale image bitmap, keeping the bits per pixel of the filesource.
LEADImage2->Load ("e:\\image2.cmp", 0, 1, 1 );
LEADImage2->GrayScale( 12 );

GrayColors[0].uThreshold= 9999;
GrayColors[0].crColor.rgbRed= 255;
GrayColors[0].crColor.rgbGreen= 0;
GrayColors[0].crColor.rgbBlue= 0;

GrayColors[1].uThreshold= 19999;
GrayColors[1].crColor.rgbRed= 0;
GrayColors[1].crColor.rgbGreen= 255;
GrayColors[1].crColor.rgbBlue= 0;

GrayColors[2].uThreshold= 29999;
GrayColors[2].crColor.rgbRed= 0;
GrayColors[2].crColor.rgbGreen= 0;
GrayColors[2].crColor.rgbBlue= 255;

GrayColors[3].uThreshold= 39999;
GrayColors[3].crColor.rgbRed= 0;
GrayColors[3].crColor.rgbGreen= 255;
GrayColors[3].crColor.rgbBlue= 255;

GrayColors[4].uThreshold= 49999;
GrayColors[4].crColor.rgbRed= 255;
GrayColors[4].crColor.rgbGreen= 0;
GrayColors[4].crColor.rgbBlue= 255;

GrayColors[5].uThreshold= 59999; // This value will be ignored
GrayColors[5].crColor.rgbRed= 255;
GrayColors[5].crColor.rgbGreen= 255;
GrayColors[5].crColor.rgbBlue= 0;

// Call the method
LEADImage1->ColorizeGray(LEADImage2->Bitmap, GrayColors, 6 );
}


ColorLevel Example for C++ Builder

void __fastcall TForm1::ColorLevel1Click(TObject *Sender)
{
LEVELCOLORINFO Master;
LEVELCOLORINFO Red;
LEVELCOLORINFO Green;
LEVELCOLORINFO Blue;

// Master will cause the image to be Inversed
Master.uMinInput= 0;
Master.uMaxInput= 255;
Master.uMinOutput= 255;
Master.uMaxOutput= 0;
Master.uGamma= DEFAULT_GAMMA;

Red.uMinInput= 0;
Red.uMaxInput= 255;
Red.uMinOutput= 255;
Red.uMaxOutput= 0;
Red.uGamma= DEFAULT_GAMMA;

Green.uMinInput= 0;
Green.uMaxInput= 255;
Green.uMinOutput= 255;
Green.uMaxOutput= 0;
Green.uGamma= DEFAULT_GAMMA;

Blue.uMinInput= 20;
Blue.uMaxInput= 200;
Blue.uMinOutput= 0;
Blue.uMaxOutput= 255;
Blue.uGamma= DEFAULT_GAMMA;

/* Level the Blue and Master channels */
LEADImage1->ColorLevel( Master, Red, Green, Blue, LEVEL_BLUE | LEVEL_MASTER );
}


ColorReplace Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
REPLACECOLOR ColorReplace; /*replaced color structure information*/

/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/* Change the red color by rotating its hue 90 degree */
ColorReplace.crColor= RGB(200, 0, 35);
ColorReplace.uFuzziness= 100;
LEADImage1->ColorReplace(9000, 0, 0, &ColorReplace, 1);
}


ColorRes example for C++ Builder

This example checks to see if the bitmap is 8 bits per pixel and converts it if it is not.

if (Lead1->BitmapBits != 8)
{
Screen->Cursor = crHourGlass;
Lead1->ColorRes(8, CRF_OPTIMIZEDPALETTE, CRF_FLOYDSTEINDITHERING, 0);
Lead1->ForceRepaint();
Screen->Cursor = crDefault;
}


ColorResList Example for C++ Builder

This example changes the hue of bitmaps in a list, then plays the list as an animation. When changing the hue, it preserves the transparent color.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int i; /* Loop Counter */
int uCount; /* Number of bitmaps in the list */
long TransparentColor; /* Color used for transparency */

TransparentColor =Lead1->BitmapTransparentColor;
/* Avoid repaints while we modify the bitmaps. */
Lead1->AutoRepaint= False;
/* Change the hue of each bitmap in the list, */
/* and restore the transparent color as the last color in the palette. */
uCount = Lead1->BitmapListCount;
for(i = 0;i< (uCount - 1);i++)
{
Lead1->BitmapListIndex= i;
Lead1->Hue(i * 10);
Lead1->BitmapPalette[255] = TransparentColor;
}
/* Get an optimized palette for the whole list. */
Lead1->ColorResList(8, CRF_OPTIMIZEDPALETTE, CRF_NODITHERING, 0);
/* Update the palette that is used for playback. */
for i = 0; i <= 255; i++)
Lead1->AnimationPalette[i] = (TColor)Lead1->BitmapPalette[i];
/* Start the animation. */
Lead1->AutoRepaint= True;
Lead1->AnimationEnable= True;
}


ColorThreshold Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_INT nI;
COMPAREDATA CompData[3];

/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );

for (nI = 0; nI < 3; nI++)
{
CompData[nI].nMinRange= 128;
CompData[nI].nMaxRange= 255;
CompData[nI].uFlags= 0;
}

/* Apply color Threshold effect on the image*/
LEADImage1->ColorThreshold( CLTH_RGB_SPACE, CompData );
}


Combine example for C++ Builder

This example copies the Lead1 bitmap to LeadTmp, trims and filters the copied image, and combines the filtered image with the original Lead1 bitmap. Trimming LeadTmp lets you see the difference between filtered and nonfiltered regions.

{
int TrimLeft, TrimTop,
TrimWidth, TrimHeight,
DstLeft, DstTop,
DstWidth, DstHeight,
SrcLeft, SrcTop;
TLeadImage *LeadTmp;

Screen->Cursor = crHourGlass;
LeadTmp = new TLeadImage(this);
LeadTmp->Visible = false;
LeadTmp->Parent = this;
LeadTmp->Bitmap= Lead1->Bitmap;
TrimLeft = (LeadTmp->BitmapWidth * 2)/10;
TrimTop = (LeadTmp->BitmapHeight * 2)/10;
TrimWidth = (LeadTmp->BitmapWidth * 6)/10;
TrimHeight = (LeadTmp->BitmapHeight * 6)/10;
LeadTmp->Trim(TrimLeft, TrimTop, TrimWidth, TrimHeight);
LeadTmp->SpatialFilter(FLT_LINESEG_LTOR);
DstLeft = TrimLeft;
DstTop = TrimTop;
DstWidth = TrimWidth;
DstHeight = TrimHeight;
SrcLeft = 0;
SrcTop = 0;
Lead1->Combine(DstLeft, DstTop, DstWidth, DstHeight, LeadTmp
 >Bitmap, SrcLeft, SrcTop, CB_OP_ADD);
delete LeadTmp;
Lead1->ForceRepaint();
Screen->Cursor = crDefault;
}


CombineExt example for C++ Builder

int TrimLeft;
int TrimTop, TrimWidth, TrimHeight;
int DstLeft, DstTop, DstWidth, DstHeight;
int SrcLeft, SrcTop;

LEADImage2->Bitmap = LEADImage1->Bitmap;
TrimLeft = (int)(LEADImage2->BitmapWidth * 0.2);
TrimTop = (int)(LEADImage2->BitmapHeight * 0.2);
TrimWidth = (int)(LEADImage2->BitmapWidth * 0.6);
TrimHeight = (int)(LEADImage2->BitmapHeight * 0.6);
LEADImage2->Trim (TrimLeft, TrimTop, TrimWidth, TrimHeight);
LEADImage2->SpatialFilter (FLT_LINESEG_HORZ);
DstLeft = TrimLeft;
DstTop = TrimTop;
DstWidth = TrimWidth;
DstHeight = TrimHeight;
SrcLeft = 0;
SrcTop = 0;
LEADImage1->CombineExt (DstLeft, DstTop, DstWidth, DstHeight, LEADImage2->Bitmap, SrcLeft, SrcTop, CB_OP_ADD);
LEADImage1->ForceRepaint();


CombineWarp example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
TPoint ptSrc;
TPoint aptsDest[4];

LEADImage1->Load( "e:\\Master.jpg", 0, 1, 1 );
LEADImage2->Load ( "e:\\Slave.jpg", 0, 1, 1 );

ptSrc.x= 0;
ptSrc.y= 0;

aptsDest [ 0 ].x= 100;
aptsDest [ 0 ].y= 100;
aptsDest [ 1 ].x= 200;
aptsDest [ 1 ].y= 75;
aptsDest [ 2 ].x= 200;
aptsDest [ 2 ].y= 275;
aptsDest [ 3 ].x= 100;
aptsDest [ 3 ].y= 175;

LEADImage1->CombineWarp(aptsDest, LEADImage2->Bitmap, ptSrc, LEADImage1->BitmapWidth, LEADImage1->BitmapHeight, CBW_BILINEAR );
}


Comment example for C++ Builder

This example does the following:

1. | Loads an image from a TIFF file.
2. | Updates the current comment array by reading comments from the file.
3. | Modifies one of the comments.
4. | Modifies and saves the file.
5. | Reads the comment that was saved, and displays it in a message box.
 | This example handles only string comments. For more complex comments, refer to Exif Examples.

void __fastcall TForm1::ReadComment1Click(TObject *Sender)
{
Variant Empty; /* For clearing comments */
AnsiString MyCommentText; /* String for CMNT_SZDESC */
AnsiString NewCommentText; /* String for CMNT_SZDESC that we read */
AnsiString FilePath; /* File to be updated */
int i; /* Counter */

/* Specify the file that we will update. */
FilePath = "c:\\ testcmt.tif";
/* Specify the Empty variant for clearing comments. */
VarClear(Empty);
/* Get all of the current comments from the file. */
/* Temporarily disable method errors so that we do not fail when comments are missing. */
LeadImage1->EnableMethodErrors = False;
for (i = 0; i <= CMNT_LAST; i++)
{
LeadImage1->Comment[i] = Empty;
LeadImage1->Comment[i] = LeadImage1->ReadComment(FilePath, 0, i);
}
LeadImage1->EnableMethodErrors = True;
/* Load and modify the image. */
LeadImage1->Load(FilePath, 0, 0, 1);
LeadImage1->Reverse();
/* Update the CMNT_SZDESC comment. */
MyCommentText = "\nThis image has been reversed.";
LeadImage1->Comment[CMNT_SZDESC] = LeadImage1->Comment[CMNT_SZDESC] + MyCommentText;
/* Save the file and read the comment that we saved. */
LeadImage1->Save(FilePath, FILE_TIF, LeadImage1->BitmapBits, 0, SAVE_OVERWRITE);
NewCommentText = LeadImage1->ReadComment(FilePath, 0, CMNT_SZDESC);
/* Display the message. */
Application->MessageBox(NewCommentText.c_str(), "File Comments", MB_OK);
/* Clear the comments from memory. */
for (i = 0; i <= CMNT_LAST; i++) LeadImage1->Comment[i] = Empty;
}


ContinueBrowse (Thumbnail Browser Control) example for C++ Builder

1.

In the private section of the TForm1 class add the following decleration:

private: // User declarations…

int nCount;

2.

Add the following to the TForm1.FormCreate void __fastcall

void __fastcall TForm1.FormCreate(TObject *Sender)
{
…
nCount = 0 ;
…
}

3.

Add the follwing code to the thumbnail event handler:

void __fastcall TForm1::LEADThumb1ThumbnailEvent(TObject *Sender,
TBitmapHandle Bitmap, AnsiString FileName, int nStatusCode,
int nPercent)
{
AnsiString out;

if( (nStatusCode == 0)) /*successful thumbnail generation*/
{
/*save thumbnails in a multipage TIFF file*/
LEADImage1->Bitmap = Bitmap;
LEADImage1->Save("c:\\temp\\thumbs.tif", FILE_TIF, 24, 0, SAVE_APPEND);
nCount = nCount + 1;
if( nCount > 20) /*allow max of 20 thumbnails*/
{
LEADThumb1->ContinueBrowse = False; /*stop the browse*/
nCount = 0;
return;
}
out = FileName + ‘\n’;
out = out + "Format: " +IntToStr(LEADThumb1->InfoFormat)+ '\n';
out = out + "Compression: " +LEADThumb1->InfoCompression + '\n';
out = out + "Bits: " +IntToStr(LEADThumb1->InfoBits)+ '\n';
out = out + "Width: " +IntToStr(LEADThumb1->InfoWidth)+ '\n';
out = out + "Height: " +IntToStr(LEADThumb1->InfoHeight)+ '\n';
out = out + "Page: " +IntToStr(LEADThumb1->InfoPage)+ '\n';
out = out + "TotalPages: " +IntToStr(LEADThumb1->InfoTotalPages) + '\n';
out = out + "SizeDisk: " +IntToStr(LEADThumb1->InfoSizeDisk) + '\n';
out = out + "SizeMem: " +IntToStr(LEADThumb1->InfoSizeMem) + '\n';
out = out + "XRes: " +IntToStr(LEADThumb1->InfoXRes) + '\n';
out = out + "YRes: " +IntToStr(LEADThumb1->InfoYRes )+ '\n';
ShowMessage(out);
}
LEADThumb1->ContinueBrowse = True; /*continue the browse operation*/
}


ContourFilter example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nRet;

nRet= LEADImage1->Load("e:\\image1.cmp", 0, 1, 1);
if(nRet == SUCCESS)
LEADImage1->ContourFilter(20, 35, 5, CONTOUR_APPROX_COLOR);
}


Contrast example for C++ Builder

This example increases the contrast and repaints the image.

Lead1->Contrast(50);
Lead1->ForceRepaint();


ContrastBrightIntensity Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );
LEADImage1->ContrastBrightIntensity(-146, 385, 240);
}


ConvertToColoredGray example for C++ Builder

ConvertToColoredGray C++ Builder Example

/*This example assumes there is a bitmap loaded*/
int RedFact, GreenFact, BlueFact, RedGrayFact, GreenGrayFact, BlueGrayFact;

RedFact = 300;
GreenFact = 590;
BlueFact = 110;
RedGrayFact = 500;
GreenGrayFact= 300;
BlueGrayFact= 200;
// These arguments will transform the image into a grayscale image
LEADImage1->ConvertToColoredGray (RedFact, GreenFact, BlueFact, RedGrayFact, GreenGrayFact, BlueGrayFact);


ConvertUnsignedToSigned example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADImage1->LoadSigned= true;
/* load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load( "c:\\Image1.tif", 0, 0, 1 );

if ( ! LEADImage1->IsSigned)
/* convert bitmap to signed */
LEADImage1->ConvertUnsignedToSigned( PROCESS_RANGE_ONLY );
}


CopyMarkers example for C++ Builder

void __fastcall TForm1::CopyMarkersClick(TObject *Sender)
{
int i;
LEADMarker1->LoadMarkers ( "e:\\image1.jpg", 0 );
LEADMarker2->CreateMarkers ( );
LEADImage1->CopyMarkers ( LEADMarker2, LEADMarker1 );

for ( i= 0; i < LEADMarker2->Count; i ++ )
{
LEADMarker2->GetMarker ( i );
ShowMessage ( "Marker Type= " + IntToStr(LEADMarker2->MarkerType) + "\n" +
"Marker Element Count= " + IntToStr(LEADMarker2->ElementCount) );
}
}


Correlation Example for C++ Builder

void __fastcall TForm1::Correlation1Click(TObject *Sender)
{
L_UINT uNumOfPoints;
TPoint Points[10];

/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load( "REDISTRIBUTABLE->CMP", 0, 1, 1 );
LEADImage2->Load ( "T->CMP", 0, 1, 1 );

/* Apply the correlation filter */
LEADImage1->Correlation( LEADImage2->Bitmap, Points, 10, uNumOfPoints, 1, 2, 90 );
}


CountLUTColors Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* check the linearity of the LUT and computes its window width and center
by using GetLinearVOILUT method.*/

L_INT nRet;
unsigned uNumberOfEntries;
L_INT nFirstIndex;

LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
nRet = LEADImage1->CountLUTColors( uNumberOfEntries, nFirstIndex, LEADImage1->IsSigned ? COUNT_LUT_SIGNED : COUNT_LUT_UNSIGNED);
if(nRet == SUCCESS)
ShowMessage( "umber of entries " + IntToStr(uNumberOfEntries));
}


CreateBitmap, Size, and Combine example for C++ Builder

This example creates a bitmap for Lead2 (same size and BPS as Lead1) and fills it with green. It resizes the Lead1 bitmap, then uses a loop to do multiple combines with the Lead2 bitmap. It then copies the Lead2 bitmap to Lead1 and redisplays Lead1.

int IntMyWidth, IntMyHeight, IntImageWidth, IntImageHeight, MyOp, MyBPS;
float MyWidth, MyHeight, ImageWidth, ImageHeight, VFactor, HFactor;
int TestWidth, TestHeight, VSpacing, HSpacing;
float SrcL, SrcT, DstT, DstL, DstW, DstH;

Screen->Cursor= crHourGlass;
// Create the Lead2 bitmap. (control must already be on the form).
MyWidth= Lead1->BitmapWidth;
MyHeight= Lead1->BitmapHeight;
MyBPS= Lead1->BitmapBits;
Lead2->CreateBitmap(MyWidth, MyHeight, MyBPS);
Lead2->Fill(RGB(0, 255, 0)); // fill with green
// Resize the Lead1 bitmap
ImageWidth= MyWidth * 0.3;
ImageHeight= MyHeight * 0.3;
Lead1->Size(ImageWidth, ImageHeight, SIZE_RESAMPLE);
// Initialize the variables used for multiple combines.
TestWidth= MyWidth; // Used for horizontal positioning
TestHeight= MyHeight; // Used for vertical positioning
IntMyWidth= MyWidth; // Green bitmap width
IntMyHeight= MyHeight; // Green bitmap height
IntImageWidth= ImageWidth; // Resized bitmap width
IntImageHeight= ImageHeight; // Resized bitmap height
VFactor= (MyHeight / ImageHeight) + 1; // Number spaces between images
VSpacing= (IntMyHeight % IntImageHeight) / VFactor; // Pixels per space
HFactor= (ClientWidth / ImageWidth) + 1; // Number spaces between images
HSpacing= (IntMyWidth % IntImageWidth) / HFactor; // Pixels per space
SrcL= 0; // Left coordinate of the source rectangle
SrcT= 0; // Top coordinate of the source rectangle
DstW= ImageWidth; // Width of the destination rectangle
DstH= ImageHeight; // Height of the destination rectangle
MyOp= CB_OP_ADD | CB_DST_0; // Operation flags used when combining images

// Do the loop that does the multiple combines
while(TestHeight > IntImageHeight) // Vertical loop
{
DstT= IntMyHeight - TestHeight + VSpacing;
TestHeight= TestHeight - IntImageHeight - VSpacing;
while (TestWidth > IntImageWidth) //Horizontal loop
{
DstL= IntMyWidth - TestWidth + HSpacing;
TestWidth= TestWidth - IntImageWidth - HSpacing;
Lead2->Combine(DstL, DstT, DstW, DstH, Lead1->Bitmap, SrcL, SrcT, MyOp);
}
TestWidth= IntMyWidth;
}

// Copy the Lead2 bitmap to Lead1
Lead1->Bitmap= Lead2->Bitmap;
Lead2->Bitmap = 0;
//Set the image display size to match the LEAD control
Lead1->SetDstRect(0, 0, Lead1->BitmapWidth, Lead1->BitmapHeight);
Lead1->SetDstClipRect(0, 0, Lead1->BitmapWidth, Lead1->BitmapHeight);
Lead1->ForceRepaint();
// Repaint the image
Screen->Cursor= crDefault;


CreateMaskFromBitmapRgn example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nRet;

/* This example loads an image, sets a color region using black, */
/* and then creates a 1-bit mask image from that bitmap. */
nRet= LEADImage1->Load ("IMAGE1.CMP", 0, 1, 1);
if(nRet == SUCCESS)
{
LEADImage1->SetRgnColor(RGB(0, 0, 0), L_RGN_SET);
nRet= LEADImage1->CreateMaskFromBitmapRgn ();
if(nRet == SUCCESS)
LEADImage2->Bitmap = LEADImage1->MaskBitmap;
}
}


CreateTB example for C++ Builder

// This example is also for:
// AutoSetTool Property, ButtonBitmapDown Property, ButtonBitmapUp Property,
// ButtonCount Property, ButtonMenuText Property, ButtonMenuTextID Property,
// ButtonTool Property, ButtonToolTipText Property, ButtonToolTipTextID Property,
// Visible Property, AnnToolbar Property
void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADAnn1->AnnToolbar->Visible = False;
LEADAnn1->AnnToolbar->CreateTB (0, 0, ANNTOOLALIGN_TOP + ANNTOOLALIGN_LEFT);

LEADAnn1->AnnToolbar->AutoSetTool = True;
LEADAnn1->AnnToolbar ->ButtonTool [LEADAnn1->AnnToolbar ->ButtonCount]= ANNTOOL_USER_FIRST;

LEADAnn1->Load ("D:\\Pictures\\Ulay1.bmp", 0, 0, 1);
LEADAnn1->AnnToolbar->ButtonBitmapUp [LEADAnn1->AnnToolbar->ButtonCount]= LEADAnn1->Bitmap;
LEADAnn1->Load ("D:\\Pictures\\Ulay2.bmp", 0, 0, 1);
LEADAnn1->AnnToolbar->ButtonBitmapDown [LEADAnn1->AnnToolbar->ButtonCount]= LEADAnn1->Bitmap;
LEADAnn1->Load ("D:\\Pictures\\Ulay3.bmp", 0, 0, 1);
LEADAnn1->AnnToolbar->ButtonToolTipTextID [LEADAnn1->AnnToolbar->ButtonCount]= -1;
LEADAnn1->AnnToolbar->ButtonToolTipText [LEADAnn1->AnnToolbar->ButtonCount]= "User defined tool";

LEADAnn1->AnnToolbar->ButtonCount = LEADAnn1->AnnToolbar->ButtonCount + 1;
LEADAnn1->AnnToolbar->Visible = True;
LEADAnn1->AnnUserMode = ANNUSERMODE_DESIGN;

LEADAnn1->AnnToolbar->ButtonMenuTextID [13][1]= -1;
LEADAnn1->AnnToolbar ->ButtonMenuText [13][1]= "My text";

}


CreateThumbnailFromFile example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADThumb1->LoadStamp= False;
LEADThumb1->ForceSize= True;
LEADThumb1->ThumbnailBackgroundColor= (TColor) RGB (0, 255, 0);
LEADThumb1->ThumbnailWidth= 80;
LEADThumb1->ThumbnailHeight= 40;

LEADThumb1->CreateThumbnailFromFile ("c:\\temp\\test.tif", 1);
LEADThumb1->CreateThumbnailFromFile ("c:\\temp\\test.tif", 2);
LEADThumb1->CreateThumbnailFromFile ("c:\\temp\\test.tif", 3);
}

void __fastcall TForm1::LEADThumb1ThumbnailEvent(TObject *Sender,
TBitmapHandle Bitmap, AnsiString FileName, int nStatusCode,
int nPercent)
{
if ((nStatusCode == 0) && (nPercent == 0) && (Bitmap != 0))
{
LEADImage1->Bitmap= Bitmap;
ShowMessage ("pause");
}
}


Creating and Saving an Animated GIF File example for C++ Builder

The following example creates a multi-page file and saves it as an animated GIF image:

void __fastcall TForm2::AnimateGIFClick(TObject *Sender)
{
int nAngle;

Lead1->Load("c:\\lead\\images\\image1.cmp", 0, 0, 1);
Lead1->Size(Lead1->BitmapWidth / 5, Lead1->BitmapHeight / 5, SIZE_RESAMPLE);
Lead2->Bitmap = 0;
for (nAngle=1000; nAngle<=36000; nAngle+=1000)
{
/* add a new page to the list */
Lead2->InsertBitmapListItem(LST_APPEND, Lead1->Bitmap);
/* make the new page active */
Lead2->BitmapListIndex = Lead2->BitmapListCount-1;
/* rotate each page 10 degrees more than the previous */
Lead2->Rotate(nAngle, False, clBlack);
Lead2->BitmapDelay = 100;
}
Lead2->AnimationLoop = True;
Lead2->Save("c:\\temp\\Animated.gif", FILE_GIF, 8, 0, SAVE_OVERWRITE);
/* clear all the images in the list */
Lead2->BitmapList = 0;
/* start playing upon loading */
Lead1->AutoAnimate = True;
/* load the image that was saved */
Lead1->Load("c:\\temp\\Animated.gif", 0, 0, -1);
}


Cubism Example for C++ Builder

void __fastcall TForm1::CubismClick(TObject *Sender)
{
LEADImage1->Cubism( 10, 20, 50, 4500, RGB(255,0,0), CUB_COLOR | CUB_RECT | CUB_RAND );
}


CurveToBezier example for C++ Builder

int i;
POINT *p = (POINT*) malloc ( LEADImage1->BezierSize * sizeof ( POINT ));

LEADImage1->CurveClose= CURVE_CLOSE;
LEADImage1->CurveSize = 4;
LEADImage1->CurveX[0] = 220;
LEADImage1->CurveY[0] = 10;
LEADImage1->CurveX[1] = 10;
LEADImage1->CurveY[1] = 30;
LEADImage1->CurveX[2] = 20;
LEADImage1->CurveY[2] = 240;
LEADImage1->CurveX[3] = 250;
LEADImage1->CurveY[3] = 260;
LEADImage1->CurveTension= 0.35;
LEADImage1->CurveType= CURVE_STANDARD;
LEADImage1->SetRgnCurve(L_POLY_WINDING, L_RGN_SET);
LEADImage1->RgnFrameType= ftAnimated;

LEADImage1->CurveToBezier();
for (i=0; i<LEADImage1->BezierSize; i ++)
{
p[i].x= LEADImage1->BezierX[i];
p[i].y= LEADImage1->BezierY[i];
}
PolyBezier((HDC)Form1->Canvas->Handle, (POINT*)p, LEADImage1->BezierSize) ;
free ( p ) ;


Cylindrical Example for C++ Builder

void __fastcall TForm1::CylindricalClick(TObject *Sender)
{
LEADImage1->Cylindrical( 100, CYL_HORZ );
}


DDB example for C++ Builder

This example copies the Lead1 bitmap to the clipboard as a DDB. It pastes the DDB into Lead2 and reverses the image. It then gets a DDB from Lead2, sets the same DDB to Lead1, and repaints.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int MyFlags;
L_HBITMAP MyDDB;
L_HPALETTE MyPalette;
THandle MyDC;

Screen->Cursor = crHourGlass;
/*Copy the bitmap to the clipboard*/
MyFlags = COPY_EMPTY | COPY_DDB | COPY_PALETTE;
Lead1->Copy(MyFlags);
/*Paste the image onto the second bitmap.*/
if( Lead2->Paste(PASTE_ISREADY) == 0)
{
ShowMessage ("Invalid data on the clipboard");
}
else
{
Lead2->Paste(0);
}
/*Reverse the image so that we can see that it has changed.*/
Lead2->Reverse();

/*Make the second control visible so that we can get the client DC.*/
Lead2->AutoScroll = False; /*We do not need to see scrollbars.*/
Lead2->Visible = True;
/*Get the client DC and use it when creating a DDB.*/
MyDC = Lead2->GetClientDC();
MyDDB = (L_HBITMAP)Lead2->GetDDB(MyDC);
/*Get the palette handle.*/
MyPalette = (L_HPALETTE)Lead2->GetBitmapPalette(MyDC);
/*Keep the old display rectangles so that we do not have to recalculate.*/
Lead1->AutoSetRects = False;

/*Copy the DDB to the first control and repaint it.*/
Lead1->SetDDB(MyDC, MyDDB, MyPalette);
Lead1->ForceRepaint();
/*Clean up.*/
Lead2->ReleaseClientDC();
Lead2->Visible = False;
Screen->Cursor = crDefault;
}


Deinterlace Example for C++ Builder

void __fastcall TForm1::DeinterlatedClick(TObject *Sender)
{
LEADImage1->Deinterlace( DEINTERLACE_SMOOTH | DEINTERLACE_ODD );
}


DeleteBitmapListItems example for C++ Builder

This example deletes the first five bitmaps from the control's bitmap list. Then, it plays the animation to show that the bitmaps are missing.

/* Delete the first five bitmaps. */
Lead1->DeleteBitmapListItems(0, 5);
/* Play the animation without looping. */
Lead1->AnimationLoop = False;
Lead1->AnimationEnable = True;


DeleteMarker example for C++ Builder

void __fastcall TForm1::DeleteMarkerClick(TObject *Sender)
{
LEADImage1->Load ( "e:\\image1.jpg", 0, 0, 1 );
LEADMarker1->LoadMarkers ( "e:\\image1.jpg", 0 );
LEADMarker1->GetMarker ( 0 );
LEADMarker1->DeleteMarker ( LEADMarker1->MarkerType, 0 );
LEADImage1->SetMarkers ( LEADMarker1, 0 );
LEADImage1->Save ( "e:\\image2.jpg", FILE_EXIF_JPEG, 24, 2, 0 );
}


DeleteMarkerAt example for C++ Builder

void __fastcall TForm1::DeleteMarkerAtClick(TObject *Sender)
{
LEADImage1->Load ( "e:\\image1.jpg", 0, 0, 1 );
LEADMarker1->LoadMarkers ( "e:\\image1.jpg", 0 );
LEADMarker1->GetMarker ( 0 );
LEADMarker1->DeleteMarkerAt ( 0 );
LEADImage1->SetMarkers ( LEADMarker1, 0 );
LEADImage1->Save ( "e:\\image2.jpg", FILE_EXIF_JPEG, 24, 2, 0 );
}


DeletePage example for C++ Builder

/* delete page 1 from TEST.TIF */
Lead1->DeletePage("C:\\IMAGES\\TEST.TIF", 1);


Desaturate Example for C++ Builder

void __fastcall TForm1::DesaturateClick(TObject *Sender)
{
LEADImage1->Desaturate( );
}


Deskew example for C++ Builder

LEADImage1->Deskew ( clBlack, DSKW_PROCESS | DSKW_NOFILL | DSKW_DOCUMENTIMAGE, NULL )
LEADImage1->ForceRepaint ( ) ;


Despeckle example for C++ Builder

This example automatically removes specks from the bitmap and repaints the image. Use this on a 1-bit bitmap such as a scanned document.

Lead1->Despeckle();
Lead1->ForceRepaint();


DIB example for C++ Builder

This example copies the LeadImage1 bitmap to the clipboard as a DIB. It pastes the DIB into LeadTmp and reverses the image. It then gets a DIB from LeadTmp, sets the same DIB to LeadImage1, and repaints.

void __fastcall TForm1::SetDIB1Click(TObject *Sender)
{
int MyFlags;
THandle MyDib;
TLEADImage *LEADTmp;

Screen->Cursor = crHourGlass;
LeadTmp = new TLEADImage(this);
LeadTmp->Visible = false;
LeadTmp->Parent = this;
MyFlags = COPY_EMPTY + COPY_DIB + COPY_PALETTE;
LEADImage1->Copy(MyFlags);
if(LEADTmp->Paste(PASTE_ISREADY)== 0)
ShowMessage("Invalid data on the clipboard");
else
LEADTmp->Paste(0);
LEADTmp->Reverse();
MyDib = LEADTmp->GetDIB(DIB_BITMAPV5HEADER);
LEADImage1->AutoSetRects = False;
LEADImage1->SetDIB(MyDib);
delete LEADTmp;
LEADImage1->ForceRepaint();
Screen->Cursor = crDefault;
}


DiceEffect Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

/* Apply Dice Effect for this bitmap */
LEADImage1->DiceEffect(16, 16, 0, RGB(0,0,0), BITMAP_RESIZE + DICE_SIZE + DICE_BORDER);
}


DigitalSubtract Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmaps, keeping the bits per pixel of the file */
LEADImage1->Load("Destination.cmp", 0, 1, 1 );
LEADImage2->Load ("source.cmp", 0, 1, 1 );

LEADImage1->DigitalSubtract(LEADImage2->Bitmap,DS_CONTRASTENH);
// Now we have the resulting image in LiveBmp
}


DirectionEdgeStatistical Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/* Find the edges in the bitmap*/
LEADImage1->DirectionEdgeStatistical(15, 128, 4500, RGB(255, 255, 255), RGB(0, 0, 0));
}


DiscreteFourierTransformation Example for C++ Builder

/* This example loads a bitmap and applies DFT function. */
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/*Allocate FT buffer*/
LEADImage1->InitFourierTransformationData();

/* Apply DFT*/
LEADImage1->DiscreteFourierTransformation ( 0, 0, LEADImage1->BitmapWidth / 4, LEADImage1->BitmapHeight / 2, DFT_DFT + DFT_GRAY + DFT_RANGE + DFT_INSIDE_X + DFT_OUTSIDE_Y );

/* Free FT buffer */
LEADImage1-> FreeFourierTransformationData( );
}


DisplayFourierTransformation Example for C++ Builder

/* This example loads a bitmap, applies the Discrete Fourier Transform function to it, and displays the data*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

/*Initialize buffer*/
LEADImage1->InitFourierTransformationData( );

/* apply DFT*/
LEADImage1->DiscreteFourierTransformation( 0, 0, LEADImage1->BitmapWidth / 4, LEADImage1->BitmapHeight / 2, DFT_DFT + DFT_GRAY + DFT_RANGE + DFT_INSIDE_X + DFT_OUTSIDE_Y );

/*plot frequency magnitude*/
LEADImage1->DisplayFourierTransformation( DSP_FT_MAG + DSP_FT_LOG );

/*Frees buffer*/
LEADImage1->FreeFourierTransformationData( );
}


DJVResolution example for C++ Builder

//Set new DJV resolution
LEADImage1->DJVResolution= 120;

//Now load the DJV file
LEADImage1->Load("c:\Image1.DJVU", 0, 1, 1);


DocCleanBitmap example for C++ Builder

void __fastcall TForm1::Button2Click(TObject *Sender)
{
int nRet;
// Smooth
// This example smooths all nicks and bumps up to 2 pixels in length
// Long bumps/nicks are treated before short bumps/nicks
// A LEAD region is updated to show all the changes
// The Smooth Event is used to display information about bump or nick

LEADImage1->DocCleanSuccess = SUCCESS_REMOVE;
nRet = LEADImage1->Smooth (2, SMOOTH_SINGLE_REGION |
SMOOTH_LEAD_REGION | SMOOTH_FAVOR_LONG);
if (nRet == SUCCESS)
{
LEADImage1->FreeRgn ();
LEADImage2->Bitmap = LEADImage1->DocCleanBitmap; //copy the result so we can get the rgn handle
LEADImage1->SetRgnHandle (LEADImage2->GetRgnHandle (), 0, 0, L_RGN_SET);
LEADImage2->Bitmap = 0; // no longer need copy
LEADImage1->DocCleanBitmap = 0; // no longer need rgn either
LEADImage1->RgnFrameType = ftAnimated;
}

}

void __fastcall TForm1::LEADImage1Smooth(TObject *Sender, int nBumpOrNick,
int nStartRow, int nStartCol, int nLength, int uHorV)
{
char * szType;
char * szHorV;
char szTemp[256];

if (nBumpOrNick == SMOOTH_BUMP)
szType = "Bump";
else
szType = "Nick";

if (uHorV == SMOOTH_HORIZONTAL_ELEMENT)
szHorV = "Horz.";
else
szHorV = "Vert.";

wsprintf(szTemp,"Fount %s at %d,%d Length %d - %s",
szType,nStartCol,nStartCol,nLength,szHorV);

OutputDebugString(szTemp);
}


DocCleanSuccess example for C++ Builder

procedure TForm1.Button3Click(Sender: TObject);
void __fastcall TForm1::Button3Click(TObject *Sender)
{
int nRet;
// This example updates a region with all 1x1 to 3x3 specks that are solid black
// If a speck has any white pixels, it is NOT part of the updated region
// The call is configured to update a single LEAD region with all changes
// The image itself is unchanged
// The DotRemove Event is used to display information about each speck that is removed

nRet = LEADImage1->DotRemove (DOT_USE_SIZE | DOT_SINGLE_REGION | DOT_LEAD_REGION | DOT_IMAGE_UNCHANGED, 1, 1, 3, 3);
if (nRet == SUCCESS)
{
LEADImage1->FreeRgn ();
LEADImage2->Bitmap = LEADImage1->DocCleanBitmap; // copy the result so we can get the rgn handle
LEADImage1->SetRgnHandle (LEADImage2->GetRgnHandle (), 0, 0, L_RGN_SET);
LEADImage2->Bitmap = 0; // no longer need copy
LEADImage1->DocCleanBitmap = 0; // no longer need rgn either
LEADImage1->RgnFrameType = ftAnimated;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::LEADImage1DotRemove (TObject *Sender,
L_HRGN hDotRgn, int nBoundingRectLeft, int nBoundingRectTop,
int nBoundingRectWidth, int nBoundingRectHeight, int iWhiteCount,
int iBlackCount)
{
long int nRet ;
char szTemp[256];

wsprintf(szTemp,"Dot Found at %d,%d,%d,%d WhiteCount= %d BlackCount= %d",
nBoundingRectLeft,
nBoundingRectTop,
nBoundingRectWidth,
nBoundingRectHeight,
iWhiteCount,
iBlackCount);

OutputDebugString(szTemp);
// Do not remove the speck if it contains any white pixels

if (iWhiteCount > 0)
nRet = SUCCESS_NOREMOVE;
else
nRet = SUCCESS_REMOVE;

LEADImage1->DocCleanSuccess = nRet;
}


DrawShape example for C++ Builder

This example demonstrates most of the three-dimensional shape properties as it draws a rectangle on the current bitmap. For example purposes, both inner and outer bands are turned on. However, normal three-dimensional effects use inner bands or outer bands, but not both.

Lead1->AutoRepaint= False;
/*Load an image for the main control*/
Lead1->Load("d:\\ltwin11x\\images\\image1.cmp", 0, 0, 1);
/*Load an image for the background of the shape*/
Lead2->Load("d:\\ltwin11x\\images\\ulay1.bmp", 0, 0, 1);
/*Shape background*/
Lead1->ShapeBackgroundStyle= sbsTiledImage ;
Lead1->BackgroundImageTop= 0;
Lead1->BackgroundImageLeft= 0;
Lead1->BackgroundImageWidth= Lead2->BitmapWidth;
Lead1->BackgroundImageHeight= Lead2->BitmapHeight;
/*Shape location*/
Lead1->ShapeTop= 50;
Lead1->ShapeLeft= 50;
Lead1->ShapeWidth= Lead1->DstWidth- 50;
Lead1->ShapeHeight= Lead1->DstHeight- 50;
/*Shape border*/
Lead1->ShapeBorderColor= (TColor)RGB(255, 0, 0);
Lead1->ShapeBorderStyle= sbrSolid ;
Lead1->ShapeBorderThickness= 10;
Lead1->ShapeInnerBandHiliteColor= (TColor)RGB(255, 255, 255);
Lead1->ShapeInnerBandShadowColor= (TColor)RGB(0,0,0);
Lead1->ShapeInnerBandStyle= sibRaised ;
Lead1->ShapeInnerBandThickness= 2;
Lead1->ShapeOuterBandHiliteColor = (TColor)RGB(0, 255, 0);
Lead1->ShapeOuterBandShadowColor = (TColor)RGB(128, 128, 128);
Lead1->ShapeOuterBandStyle =sobRaised ;
Lead1->ShapeOuterBandThickness = 2;
/*Make the shape a permanent part of the bitmap*/
Lead1->DrawPersistence = True;
/*Draw the shape*/
Lead1->DrawShape (EFX_SHAPE_RECTANGLE, Lead2->Bitmap);
/*Repaint*/
Lead1->AutoRepaint = True;


DrawStar Example for C++ Builder

void __fastcall TForm1::DrawStarClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);

LEADImage1->DrawStar( ptCenter, 5, (int)(LEADImage1->BitmapWidth/2), (int)(LEADImage1->BitmapHeight/2), 50, 0, 0, 0, 0, 0, 0, RGB(255, 0, 255), RGB(0, 255, 255), 100, STR_INSIDE );
}


DrawTextStr example for C++ Builder

This example demonstrates most of the properties of a three-dimensional text object as it draws rotated text on the current bitmap.

Lead1->AutoRepaint = False;
/* Load an image for the main control */
Lead1->Load ("c:\\lead\\images\\image1.cmp", 0, 0, 1);
/* Load an image for the foreground of the text */
Lead2->Load ("c:\\lead\\images\\ulay1.bmp", 0, 0, 1);
/*Only TrueType fonts can be rotated*/
Lead1->TextFont->Name = "Times New Roman";
Lead1->TextFont->Size = 72;
/* Text location */
Lead1->TextTop = 50;
Lead1->TextLeft = 50;
Lead1->TextWidth = Lead1->DstWidth - 50;
Lead1->TextHeight = Lead1->DstHeight - 50;
/* The foreground image needs to be the correct size. */
Lead2->Size (Lead1->TextWidth, Lead1->TextHeight, 0);
/* Text alignment and angle */
Lead1->TextAlign = etaHcenterVcenter;
Lead1->TextAngle = 450; /* 45 degrees */
/* Text highlight color and style */
Lead1->TextHiliteColor = (TColor)RGB(255, 255, 255);
Lead1->TextStyle = etsDropShadow;
/* Text drop shadow */
Lead1->ShadowColor = (TColor)RGB(0, 0, 0);
Lead1->ShadowXDepth = 5;
Lead1->ShadowYDepth = 5;
/* Make the text a permanent part of the bitmap */
Lead1->DrawPersistence = True;
/* Draw the text */
Lead1->DrawTextStr("LEADTOOLS", Lead2->Bitmap);
Lead1->ForceRepaint();


DropFilesAllowed example for C++ Builder

This example toggles the DropFilesAllowed property.

Add a button to the main form and code its procedure as follows:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Lead1->DropFilesAllowed= !Lead1->DropFilesAllowed;

if( (Lead1->DropFilesAllowed== TRUE))
Lead1->DropAutoLoad= TRUE;
else
Lead1->DropAutoLoad = FALSE;
}


Dry Example for C++ Builder

void __fastcall TForm1::DryClick(TObject *Sender)
{
LEADImage1->Dry( 5 );
}


Dst... example for C++ Builder

Calculate the values to zoom in by 10 percent and center the image.

Lead1->AutoScroll = False;
Lead1->DstWidth = (Lead1->DstWidth * 110) / 100;
Lead1->DstHeight = (Lead1->DstHeight * 110) / 100;
Lead1->DstTop = (Lead1->Height - Lead1->DstHeight) / 2;
Lead1->DstLeft = (Lead1->Width - Lead1->DstWidth) / 2;

//Set the clipping area to the same as the destination rectangle
Lead1->DstClipWidth = Lead1->DstWidth;
Lead1->DstClipHeight = Lead1->DstHeight;
Lead1->DstClipTop = Lead1->DstTop;
Lead1->DstClipLeft = Lead1->DstLeft;

//Redisplay the image
Lead1->ForceRepaint();


DynamicBinary Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/* convert it into a black and white image without changing its bits per pixel */
LEADImage1->DynamicBinary( 8, 16);
}


EdgeDetectEffect Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
// Load the bitmap, keeping the bits per pixel of the file
LEADImage1->Load("image3.cmp", 0, 1, 1 );

/* Apply find edges effect on the image*/
LEADImage1->EdgeDetectEffect(50, 0, EDGE_SOFT);
}


EdgeDetector example for C++ Builder

LEADImage1->EdgeDetector (60, EDG_SOBEL_ALL);


EdgeDetectStatistical Example for C++ Builder

void __fastcall TForm1::EdgeDetectStaticClick(TObject *Sender)
{
LEADImage1->EdgeDetectStatistical( 15, 128, RGB(255, 255, 255), RGB(0, 0, 0) );
}


Emboss example for C++ Builder

This example applies an emboss effect and repaints the image.

Lead1->Emboss(EMBOSS_NE, 500);
Lead1->ForceRepaint();


EnableFloater example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Lead1->AutoFloater = True;
Lead1->RgnMarkingMode = mmRectangle;
Lead1->RgnFrameType = ftStatic;
Lead1->EnableFloater = True;
ShowMessage("Use the mouse to create a floater and move it");
}


EnableKeyboard (ImageList Control) example for C++ Builder

/*disable keyboard processing*/
LEADImgList1->EnableKeyboard = False;


EnableMethodErrors (ImageList Control) example for C++ Builder

void __fastcall TForm1::LEADImgList1Click (TObject *Sender)

{

long lIndex ;

TPoint MousePoint;

GetCursorPos(&MousePoint);

MousePoint = LEADImgList1->ScreenToClient(MousePoint);

if( LEADImgList1->AllowSelection == ALLOWSELECTION_NONE) /*manual selection?*/

{

LEADImgList1->EnableMethodErrors= False;

lIndex = LEADImgList1->HitTest (MousePoint.x,MousePoint.y); /*did we hit an item?*/

LEADImgList1->EnableMethodErrors= True;

if( ((lIndex >= 0) && (lIndex < LEADImgList1->Count)))

{

/* set item as selected*/

LEADImgList1->SelectAll (False);

LEADImgList1->Item [lIndex]->Selected = True; /*make sure the item is selected*/

}

}

}


EnableMethodErrors (Thumbnail Browser Control) example for C++ Builder

/*disable method errors*/
LEADThumb1->EnableMethodErrors = false;


EnableMethodErrors example for C++ Builder

This example disables method errors temporarily so that it can give the user guidance about a particular error (an out-of-range shear angle in this case):

void __fastcall TForm1::Button3Click(TObject *Sender)
{
int ShearAngle, nRet;

ShearAngle = 5500; /* suppose user enters 55 degrees */
Lead1->EnableMethodErrors = False;
nRet = Lead1->Shear(ShearAngle, TRUE, RGB(0,0,255));
if(nRet == ERROR_INV_PARAMETER)
ShowMessage("The angle must be within +/- 45 degrees");
else
Lead1->ForceRepaint();
Lead1->EnableMethodErrors = True;
}


EnableOLEDragMethod (ImageList Control) example for C++ Builder

void __fastcall TForm1::btnStartDragClick(TObject *Sender)
{
LEADImgList1->LoadFromFile("c:\\Image1.tif", 0, 0, -1);
LEADImgList1->AllowSelection = ALLOWSELECTION_SINGLE;
LEADImgList1->EnableOLEDragMethod = true;
LEADImgList2->EnableOLEDragMethod = true;
LEADImgList1->OLEDragCursor = (L_HCURSOR)(this->Icon->Handle);
}

void __fastcall TForm1::btnStopDragClick(TObject *Sender)
{
LEADImgList1->EnableOLEDragMethod = false;
LEADImgList2->EnableOLEDragMethod = false;
}

void __fastcall TForm1::LEADImgList1OLEGiveFeedback(bool &bUseDefaultCursor)
{
bUseDefaultCursor= false;
}


EnableOLEDragMethod (Main Control) example for C++ Builder

void __fastcall TForm1::btnStartDragClick(TObject *Sender)
{
LEADImage2->Load("v:\\images\\image1.cmp", 0, 1, 1 );
LEADImage1->EnableOLEDragMethod = true;
LEADImage2->EnableOLEDragMethod = true;

LEADImage1->OLEDragCursor = (L_HCURSOR)(this->Icon->Handle) ;
LEADImage2->OLEDragCursor = (L_HCURSOR)(this->Icon->Handle) ;
}

void __fastcall TForm1::btnStopDragClick(TObject *Sender)
{
LEADImage1->EnableOLEDragMethod = false;
LEADImage2->EnableOLEDragMethod= false;
}

void __fastcall TForm1::LEADImage1OLEGiveFeedback(bool &bUseDefaultCursor)
{
bUseDefaultCursor = false;
}

void __fastcall TForm1::LEADImage2OLEGiveFeedback(bool &bUseDefaultCursor)
{
bUseDefaultCursor = false;
}


EnableZoomInRect example for C++ Builder

This example toggles the EnableZoomInRect property.

/* Toggle the ZoomInRect setting */
if ((Lead1->EnableZoomInRect== True))
Lead1->EnableZoomInRect = False;
else
Lead1->EnableZoomInRect = True;


EnumTags example for C++ Builder

void __fastcall TForm1::btnEnumTagsClick(TObject *Sender)
{
LEADImage1->EnumTags("clean.tif", 0, 0);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::LEADImage1EnumTags(WORD uTag, WORD uType,
DWORD uCount, bool &bContinue)
{
// Displaying the Tag's Info.
ShowMessage("Tag = " + IntToStr(uTag) + "\n" +
"Type = " + IntToStr(uType) + "\n" +
"uCount = " + IntToStr(uCount));

bContinue= true; // Keep enumerating tags.
}


Error (ImageList Control) example for C++ Builder

LEADImgList1->EnableMethodErrors= true;

try

{

LEADImgList1->LoadFromFile ("d:\\temp\\img\\test1.tif", 0, 0, -1);

}
catch(ELEADImgListError *e)

{

ShowMessage("Error Code :" + IntToStr(LEADImgList1->Error) +"\n"+ LEADImgList1->ErrorMsg );

}


ErrorMsg (Main Control) example for C++ Builder

Lead1->EnableMethodErrors = true;
try
{
Lead1->Load("c:\\bad_name.xyz", 0, 0, 1);
}
catch(ELeadImageError *e)
{
ShowMessage("File load failed\nError No " + IntToStr(Lead1->Error) + "\n" + Lead1->ErrorMsg);
}


Exif example for C++ Builder

This example does the following:

1. | Reads all of the comments in an existing Exif file, updating the Comment array.
2. | Loads and modifies the file's image.
3. | Updates some of the comments in the comment array.
4. | Saves the file.
5. | Reads and displays the updated comments.

Note:

Comments for GIF, TIFF, and DICOM files are simpler than the ones in this Exif example. With those file types, all of the comments are strings that you can get and set with simple assignments.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Variant Empty; /* For clearing comments */
Variant SubjectDistance; /* Array for CMNT_SUBJECTDISTANCE */
Variant NewSubjectDistance; /* Array to be updated by ReadComment */
AnsiString NewDateTime; /* String to be updated by ReadComment */
Variant MyComment; /* Array for CMNT_USERCOMMENT */
AnsiString MyCommentText; /* String for CMNT_USERCOMMENT */
int MyCommentSize; /* Size of the comment array */
Variant NewComment; /* Array to be updated by ReadComment */
AnsiString NewCommentText; /* String for CMNT_USERCOMMENT that we read */
AnsiString TmpString; /* For parsing the comment string into bytes */
AnsiString FilePath, DistanceString, ThisDate, MyMsg; /*Miscellaneous */
int ArraySize, LowerBound, UpperBound; /* Array measurements */
int i; /* Counter */

/* Create the Subject Distance arrays. */
SubjectDistance = VarArrayCreate(OPENARRAY(int, (0,1)), varInteger);
NewSubjectDistance = VarArrayCreate(OPENARRAY(int, (0,1)), varInteger);
/* Specify the file that we will update. */
FilePath = "c:\\lead\\images\\exif1.tif";
/* Specify the Empty variant for clearing comments. */
VarClear(Empty);
/* Get all of the current comments from an Exif file. */
/* Temporarily disable method errors so that we do not fail when comments are missing. */
Lead1->EnableMethodErrors = False;
for (i = 0; i <= CMNT_LAST; i++)
{
Lead1->Comment[i] = Empty;
Lead1->Comment[i] = Lead1->ReadComment(FilePath, 0, i);
}
Lead1->EnableMethodErrors = True;
/* Load and modify the image. */
Lead1->Load(FilePath, 0, 0, 1);
Lead1->Reverse();
/* Update the date when the file is generated. */
ThisDate = FormatDateTime("yyyy:mm:dd hh:nn:ss", Now());
Lead1->Comment[CMNT_SZDATETIMEDIGITIZED] = ThisDate;
Lead1->Comment[CMNT_SZSUBSECTIMEDIGITIZED] = Empty;
/* Change the subject distance to 4 1/3 meters. */
SubjectDistance.PutElement(13,0);
SubjectDistance.PutElement(3,1);
Lead1->Comment[CMNT_SUBJECTDISTANCE] = SubjectDistance;
/* Specify the user comment string. */
MyCommentText = "This is my new comment.";
MyCommentSize = 8 + StrLen(MyCommentText.c_str());
/* Define the array for the user comment. */
MyComment = VarArrayCreate(OPENARRAY(int, (0, MyCommentSize)), varByte);
/* Fill in the ASCII prefix. */
MyComment.PutElement('A',0);
MyComment.PutElement('S',1);
MyComment.PutElement('C',2);
MyComment.PutElement('I',3);
MyComment.PutElement('I',4) ;
MyComment.PutElement(0,5);
MyComment.PutElement(0,6);
MyComment.PutElement(0,7);
/* Fill in the rest of the comment. */
for (i = 8; i<= (MyCommentSize - 1); i++)
{
TmpString = MyCommentText.SubString(i-7, 1);
MyComment.PutElement(Byte (TmpString[1]),i) ;
}
MyComment.PutElement(Byte (0),MyCommentSize) ;
/* Update the user comment. */
Lead1->Comment[CMNT_USERCOMMENT] = Empty;
Lead1->Comment[CMNT_USERCOMMENT] = MyComment;
/* Save the file and read the comments that we saved. */
Lead1->Save(FilePath, FILE_EXIF, 24, 0, SAVE_OVERWRITE);
NewDateTime = Lead1->ReadComment(FilePath, 0, CMNT_SZDATETIMEDIGITIZED);
NewSubjectDistance = Lead1->ReadComment(FilePath, 0, CMNT_SUBJECTDISTANCE);
NewComment = Lead1->ReadComment(FilePath, 0, CMNT_USERCOMMENT);
/* Interpret the Subject-Distance RATIONAL. */
DistanceString = FloatToStr((float)(NewSubjectDistance.GetElement(0)/NewSubjectDistance.GetElement(1)));
/* Initialize the string for the message box. */
MyMsg = "Subject Distance == " + DistanceString + "\n" + "Date/Time == " + NewDateTime;
/* Add the ASCII comment if it is there. */
if( NewComment.GetElement(0) == Byte ("A"))
{
UpperBound = VarArrayHighBound(NewComment, 1);
LowerBound = VarArrayLowBound(NewComment, 1);
ArraySize = UpperBound - LowerBound;
for (i = 8; i <= ArraySize; i++ )
{
NewCommentText = NewCommentText + (char)(Integer(NewComment.GetElement(i)));
}
MyMsg = MyMsg + "\n\n" + NewCommentText;
}
/* Display the message. */
Application->MessageBox(MyMsg.c_str(), "File Comments", MB_OK);
/* Clear the comments from memory. */
for (i = 0; i <= CMNT_LAST; i++) Lead1->Comment[i] = Empty;
}


ExportBitmapList example for C++ Builder

void __fastcall TForm1::btnExportBitmapListClick(TObject
 *Sender)
{
int nRet;
HBITMAPLIST hExportedBitmapList;

// Check if the ImageList control has more than 4 images.
if(LEADImgList1->Count
 > 4)
{
nRet= LEADImgList1->ExportBitmapList
 (1, 2, hExportedBitmapList);
if(nRet == SUCCESS)
{
// Check if the hExportedBitmapList
 updated successfully.
if(hExportedBitmapList
 != 0)
{
LEADImage1->BitmapList = hExportedBitmapList;
}
}
else
ShowMessage("Error:
 " + IntToStr(nRet));
}
else
ShowMessage("Try to add more files
 to the image list control");
}


ExtractMessage Example for C++ Builder

void __fastcall TForm1::ExtractMessageClick(TObject *Sender)
{
L_INT nRet;
AnsiString strMsg;
AnsiString strPassword;
AnsiString strFileName;
AnsiString strDirectory;
TPoint ptStart;

nRet= LEADImage1->ExtractMessage( strMsg, strPassword, strFileName, strDirectory, ptStart );

/*Check if the extracted message is a text or file */
if ( nRet == SUCCESS )
{
MessageBox ( Handle, strMsg.c_str(), "Extracted Message", MB_OK );
}
else
MessageBox ( Handle, "No message", "Error", MB_OK );
}


FastFourierTransformation Example for C++ Builder

/* This example loads a bitmap and applies a FFT transformation. */
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );
/* Resize the bitmap to make sure the bitmap dimensions are power of two*/
LEADImage1->Size(256, 512, SIZE_BICUBIC);

/* Allocate FFT buffer*/
LEADImage1->InitFourierTransformationData( );

/* Apply FFT*/
LEADImage1->FastFourierTransformation( FFT_FFT + FFT_GRAY );

/* Free FFT buffer */
LEADImage1->FreeFourierTransformationData( );
}


FastRotate example for C++ Builder

Note:

This topic is for Document/Medical editions only.

This example uses fast rotation to rotate an image 90 degrees:

Lead1->FastRotate(90);


FeatherAlphaBlend example for C++ Builder

LEADImage2->CreateBitmap (800, 600, 24);
LEADImage2->SetRgnRoundRect (50, 50, 500, 500, 150, 150, L_RGN_SET);
LEADImage3->CreateFadedMask (LEADImage2->Bitmap, 60, 20, 3, 0, FADE_DUMPFILL + FADE_NOTRANSPARENCY, 255, RGB (0, 0, 255));
LEADImage2->Load ("v:\\images\\image2.cmp", 0, 1, 1);
LEADImage1->FeatherAlphaBlend (0, 0, LEADImage3->BitmapWidth, LEADImage3->BitmapHeight, LEADImage2->Bitmap, 0, 0, LEADImage3->Bitmap);


FeedLoad example for C++ Builder

This example uses StartFeedLoad, FeedLoad and StopFeedLoad and loads a file through a buffer to simulate receiving a transmitted image.

void __fastcall TForm1::FeedLoadClick(TObject *Sender)
{
const int BUFFERSIZE = 1000;
void *MyBufferPtr=NULL;
int BytesRead, FileHandle;

/* Declare a buffer that you will use to feed the file-load process.*/
MyBufferPtr = AllocMem(BUFFERSIZE);
/* Declare other local variables.*/
/* Open an image file and get its length.*/
FileHandle = FileOpen("c:\\lead\\images\\image1.cmp", fmOpenRead);
/* Set PaintWhileLoad so that we can watch the progress.*/
Lead1->PaintWhileLoad = True;
/* Initialize the file-load process.*/
/* Specify the default bits per pixel and first page*/
if( Lead1->StartFeedLoad(0, 0, 1) != SUCCESS)
{
ShowMessage("Error in StartFeedLoad !");
goto quit_function;
}
/* Use FeedLoad in a loop to load the file into the bitmap.*/
do
{
/* read from the file*/
BytesRead = FileRead(FileHandle, MyBufferPtr, BUFFERSIZE );
if( Lead1->FeedLoad(MyBufferPtr, BytesRead) != SUCCESS)
{
ShowMessage("Error in FeedLoad !");
goto quit_function;
}
} while (BytesRead > 0);
/* Finish the file-load process.*/
if( Lead1->StopFeedLoad() != SUCCESS)
ShowMessage("Error in StopFeedLoad !");
quit_function:
/* Close the file.*/
if(MyBufferPtr)
SysFreeMem(MyBufferPtr);
FileClose(FileHandle);
}

ShowMessage(MsgStr);


Fill example for C++ Builder

This example fills the bitmap with blue and repaints the image.

Lead1->Fill(RGB(0, 0, 255));
Lead1->ForceRepaint();


Flip example for C++ Builder

This example flips the bitmap and repaints the image.

Lead1->Flip();
Lead1->ForceRepaint();


FloaterDstClip... example for C++ Builder

The following code adjusts the destination clipping rectangle of the floater. You can test it by adding it to a new command button for the lesson described in Outlining, Dragging, and Pasting a Region. By default, the destination clipping rectangle for the floater is the full client area. This code gets the current values and uses them to reduce the size of the clipping rectangle.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*Declare local variables. */
int AdjustX, AdjustY, NewLeft, NewTop, NewWidth, NewHeight;

/*Set variables to use for adjustment increments. */
AdjustX = Lead1->Width / 20;
AdjustY = Lead1->Height / 20;
/*Determine new values, based on adjustments of current values*/
NewLeft = Lead1->FloaterDstClipLeft + AdjustX;
NewTop = Lead1->FloaterDstClipTop + AdjustY;
NewWidth = Lead1->FloaterDstClipWidth - (2 * AdjustX);
NewHeight = Lead1->FloaterDstClipHeight - (2 * AdjustY);
/*Set the clipping rectangle to the new values. */
Lead1->SetFloaterDstClipRect(NewLeft, NewTop, NewWidth, NewHeight);
}


Font (ImageList Control) example for C++ Builder

/*change the font properties*/
if(LEADImgList1->Font->Style.Contains(fsBold))
LEADImgList1->Font->Style >> fsBold;

else
LEADImgList1->Font->Style << fsBold;

LEADImgList1->Font->Size = 10;
LEADImgList1->Font->Name = "Arial";


ForeColor (ImageList Control) example for C++ Builder

/*set text color to green*/
LEADImgList1->ForeColor = clGreen;


Frame... example for C++ Builder

This example sets the control's frame properties. For example purposes, both inner and outer bands are turned on. However, normal three-dimensional effects use inner bands or outer bands, but not both.

Lead1->AutoRepaint = False;
Lead1->FrameThickness = 2;
Lead1->FrameColor = (TColor)RGB(0, 0, 0);
Lead1->FrameInnerStyle = fisInset;
Lead1->FrameOuterStyle = fosRaised ;
Lead1->FrameInnerHiliteColor = (TColor)RGB(255, 255, 0); /*Yellow*/
Lead1->FrameInnerShadowColor = (TColor)RGB(128, 128, 128); /* Dark Gray */
Lead1->FrameOuterHiliteColor = (TColor)RGB(255, 0, 0); /* Red */
Lead1->FrameOuterShadowColor = (TColor)RGB(192, 192, 192); /*Light Gray */
Lead1->FrameInnerThickness = 3;
Lead1->FrameOuterThickness = 3;
Lead1->AutoRepaint = True;


FreeHandShear Example for C++ Builder

void __fastcall TForm1::FreeHandShearClick(TObject *Sender)
{
TPoint apUserPoint [ 4 ];
TPoint* papUserPoint;
L_INT Amplitudes [ 13 ];
L_PINT pAmplitudes;
L_INT nMax, i;

apUserPoint [0].x = 0;
apUserPoint [0].y = 0;

apUserPoint [1].x = 3;
apUserPoint [1].y = 10;

apUserPoint [2].x = 9;
apUserPoint [2].y = -10;

apUserPoint [3].x = 12;
apUserPoint [3].y = 0;

pAmplitudes= Amplitudes;
papUserPoint= apUserPoint;

LEADImage1->GetCurvePoints( papUserPoint, 4, pAmplitudes, NULL, GUB_LINEAR );

nMax= 0;
for (i= 0; i < 13; i ++ )
{
if(nMax < Amplitudes [i])
nMax= Amplitudes [i];
}

if ( nMax > 0 )
{
for (i= 0; i < 13; i ++ )
{
Amplitudes [i]= (L_INT)((1000 * Amplitudes [i] / abs(nMax)));
}
}

LEADImage1->FreeHandShear( pAmplitudes, 13, 100, 0, FILL_RPT | SHR_HORZ );
}


FreeHandWave Example for C++ Builder

void __fastcall TForm1::FreeHandWaveClick(TObject *Sender)
{
TPoint apUserPoint [ 4 ];
TPoint * papUserPoint;
L_INT Amplitudes [ 13 ];
L_PINT pAmplitudes;

apUserPoint [0].x = 0;
apUserPoint [0].y = 0;

apUserPoint [1].x = 3;
apUserPoint [1].y = 10;

apUserPoint [2].x = 9;
apUserPoint [2].y = -10;

apUserPoint [3].x = 12;
apUserPoint [3].y = 0;

pAmplitudes= Amplitudes;
papUserPoint= apUserPoint;

LEADImage1->GetCurvePoints( papUserPoint, 4, pAmplitudes, NULL, GUB_LINEAR );

LEADImage1->FreeHandWave( pAmplitudes, 13, 100, 10, 0, 0, FILL_RPT | DIS_FRQ );
}


FreePlaneBend Example for C++ Builder

void __fastcall TForm1::FreePlaneBendClick(TObject *Sender)
{
TPoint apUserPoint [4];
L_INT Curve[13];

apUserPoint [0].x= 0;
apUserPoint [0].y= 0;

apUserPoint [1].x= 3;
apUserPoint [1].y= 10;

apUserPoint [2].x= 9;
apUserPoint [2].y= -10;

apUserPoint [3].x= 12;
apUserPoint [3].y= 0;

LEADImage1->GetCurvePoints( apUserPoint, 4, Curve, NULL, GUB_LINEAR );

LEADImage1->FreePlaneBend( Curve, 13, 200, RGB(255,0,0), FILL_CLR | FPB_VERT );
}


FreeRadBend Example for C++ Builder

void __fastcall TForm1::FreeRadBendClick(TObject *Sender)
{
TPoint apUserPoint[4];
L_INT Curve[13];
TPoint ptCenter;

/* Applay the filter */
apUserPoint [0].x= 0;
apUserPoint [0].y= 0;

apUserPoint [1].x= 3;
apUserPoint [1].y= 10;

apUserPoint [2].x= 9;
apUserPoint [2].y= -10;

apUserPoint [3].x= 12;
apUserPoint [3].y= 0;

LEADImage1->GetCurvePoints( apUserPoint, 4, Curve, NULL, GUB_LINEAR );

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);
LEADImage1->FreeRadBend( Curve, 13, 200, ptCenter, RGB(255,0,0), FILL_CLR | FILL_ROT );
}


FrequencyFilter Example for C++ Builder

/* This Example supposed that you have initialized the FTArray data by calling InitFourierTransformationData method */

/* filters the frequencies*/
LEADImage1->FrequencyFilter( 0, 0, LEADImage1->BitmapWidth / 4, LEADImage1->BitmapHeight / 2, FRQ_INSIDE_X + FRQ_INSIDE_Y );


FrequencyFilterMask Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADImage1->InitFourierTransformationData ( );
LEADImage1->Load( "e:\\Noisy.jpg", 0, 0, 1 );
LEADImage2->Load ( "e:\\Noisy.jpg", 0, 0, 1 );

LEADImage1->DiscreteFourierTransformation( 0, 0, 0, 0, DFT_DFT + DFT_GRAY );

LEADImage1->Load ( "e:\\Mask.jpg", 0, 0, 1 );
// filter frequencies
LEADImage1->FrequencyFilterMask( True );

LEADImage1->Bitmap= LEADImage2->Bitmap;

// apply inverse DFT
// After this call, the image should be clean
LEADImage1->DiscreteFourierTransformation ( 0, 0, 0, 0, DFT_IDFT + DFT_ALL + DFT_IDFT_SCL );

LEADImage1->FreeFourierTransformationData( );
}


FunctionalLight Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

/* Apply the linear lighting effect */

LEADImage1->FunctionalLight(0, 75, 0, 0, 0, LEADImage1->BitmapWidth/2, LEADImage1->BitmapHeight/2, 0, NULL, 0, FL_LINEAR_QUADRATIC + FL_LINEAR_OUTER);
}


GammaCorrect example for C++ Builder

This example applies a 2.2 gamma correction and repaints the image.

Lead1->GammaCorrect(220);
Lead1->ForceRepaint();


GaussianFilter example for C++ Builder

GaussianFilter C++ Builder Example

LEADImage1->GaussianFilter (20);


GetBitmapClipSegments example for C++ Builder

unsigned uSegments;
unsigned int * pSegments= NULL;
int i, j;
int nStartVal, nEndVal;

// get the maximum number of elements in a row, so I know how big the array of segments should be
LEADImage1->GetBitmapClipSegmentsMax(&uSegments);

// allocate an array large enough to store the maximum number of segments-> Note that
// GetBitmapClipSegmentsMax took into account that each segment has two extremities->
pSegments= GlobalAllocPtr (GMEM_MOVEABLE, uSegments * sizeof(Cardinal));
if(pSegments== NULL)
{
// not enough memory!!
ShowMessage ( "Not Enough Memory" ) ;
return;
}

// get the segments for the first row
LEADImage1->GetBitmapClipSegments(LEADImage1->RgnTop, pSegments, &uSegments);

// do something with the segments->
// to keep this example simple, we will set the pixels in the segment to 0
for (i= 0; i < (int)uSegments; i ++ )
{
nStartVal= (int)pSegments[i * 2];
nEndVal= (int)pSegments[i * 2 + 1];
for (j= nStartVal; j < nEndVal; j ++ )
LEADImage1->Pixel[LEADImage1->RgnTop][j]= (TColor)clBlack;
}
// free the segments array
GlobalFreePtr (pSegments);


GetBitmapDC example for C++ Builder

Take the following steps to demonstrate how GDI functions can be used to print text on the bitmap and on the control. The text printed on the bitmap is a permanent part of the bitmap and becomes permanent if the bitmap is saved; whereas the text on the control is superficial and does not affect the bitmap.

Note:

For an easier way of drawing text, refer to the DrawTextStr example.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
3. | Change the Button control's Caption property to GDI for Text.
4. | Code the GDI for Text button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.
 | Notice that the code prints in two different places: the bitmap and the control. You can see the difference when you run the program.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
// First, print text on the bitmap.
HDC hdcLead = (HDC)Lead1->GetBitmapDC();
// Get the system font and select it. The old font is saved so that it can be restored.
// Using other fonts is more complex. Refer to the Windows API documentation.
HFONT hfnt = (HFONT)GetStockObject(SYSTEM_FONT);
HFONT hOldFont = (HFONT)SelectObject(hdcLead, hfnt);
// Assign the string value
static char mystring[] = "Text on the bitmap";
// Make the background transparent, so that the text will overlay the image
SetBkMode( hdcLead, TRANSPARENT);
// output black text on white background
SetBkColor( hdcLead, RGB(255, 255, 255));
// Print the text on the bitmap. This is a permanent change in the bitmap
TextOut( hdcLead, 20, 40, mystring, lstrlen(mystring));
// Select the old font
SelectObject( hdcLead, hOldFont);
// Release the device context
Lead1->ReleaseBitmapDC();
// Repaint the part of the image that has changed
Lead1->BackErase = False;
Lead1->ForceRepaint();
// Allow full repainting again
Lead1->BackErase=True;
// Next, print text on the control.}
// Create a device context for the control that the GDI functions can access
hdcLead = (HDC)Lead1->GetClientDC();
// Get the system font and select it. The old font is saved so that it can be restored.
// Using other fonts is more complex. Refer to the Windows API documentation.
hfnt = (HFONT)GetStockObject(SYSTEM_FONT);
hOldFont = (HFONT)SelectObject(hdcLead, hfnt);
// Assign the string value
static char mystring2[] = "Text on the control";
// Make the background transparent, so that the text will overlay the image
SetBkMode( hdcLead, TRANSPARENT);
// output black text on white background
SetBkColor( hdcLead, RGB(255, 255, 255));
// Print the text on the control. This is an overlay that does not affect the bitmap.
TextOut( hdcLead, 20, 20, mystring2, lstrlen(mystring2));
// Restore the previous font
SelectObject( hdcLead, hOldFont);
// Remove the lock from the device control
Lead1->ReleaseClientDC();
}

5.

Run your program to test it. Notice that the text printed on the bitmap is scaled as part of the bitmap. If you zoom in, it becomes larger, and if you zoom out, it becomes smaller. The text printed on the control is the normal size for the system font and is not affected by zooming.


GetBitmapRow example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
unsigned char * pBuf ; // Buffer to hold the row
HGLOBAL hBuf ; // Handle to the buffer
int nRow ; // Row counter
unsigned uByte ; // Byte counter

// Load the bitmap, at 24 bits per pixel */
LEADImage->Load ( "v:\\images\\11.bmp", 24, 0,1);
// Allocate and lock the buffer
hBuf = GlobalAlloc(GMEM_MOVEABLE, LEADImage-> BitmapBytesPerLine);
pBuf =( unsigned char * ) GlobalLock( hBuf );
// Process each row in the bitmap
for ( nRow = 0; nRow < LEADImage->BitmapHeight; nRow ++ )
{
LEADImage->GetBitmapRow ( pBuf, nRow, LEADImage->BitmapBytesPerLine);
for ( uByte = 0; uByte <= ( unsigned )LEADImage->BitmapBytesPerLine; uByte ++ )
pBuf[uByte] = pBuf[uByte] ^ (0xFF);

LEADImage->PutBitmapRow(( void * )pBuf,
nRow,
LEADImage->BitmapBytesPerLine);
}
// Free memory that we no longer need
GlobalUnlock(hBuf);
GlobalFree(hBuf);

}


GetBitmapRowCol example for C++ Builder

void __fastcall TForm1::Button2Click(TObject *Sender)
{
int xOffset ; // Column offset of the rectangle to process
int xSize ; // Pixel width of the rectangle to process
int yOffset ; // Row offset of the rectangle to process
int ySize ; // Pixel height of the rectangle to process
unsigned char * pBuf ; // Buffer to hold the row
int i, n ; // Counters
HGLOBAL hBuf ;

// Load the bitmap, at 24 bits per pixel
LEADImage->Load ("v:\\images\\11.bmp", 24, 0, 1);
// Specify a rectangle in the top left part of the displayed image
xOffset = ( int ) LEADImage->BitmapWidth / 8) ;
xSize = ( int ) LEADImage->BitmapWidth / 3;
yOffset = ( int ) LEADImage->BitmapHeight / 8;
ySize = ( int ) LEADImage->BitmapHeight / 3;

// Allocate the buffer
hBuf = GlobalAlloc(GMEM_MOVEABLE, xSize * 3 ) ;
pBuf = ( unsigned char * ) GlobalLock( hBuf );
// Invert the colors of pixels in the rectangle
for ( i = yOffset; i < (yOffset + ySize); i ++ )
{
LEADImage->GetBitmapRowCol( pBuf, i, xOffset, xSize * 3);
for ( n =0; n < ( unsigned ) (xSize * 3 ); n ++ )
pBuf[n]= (pBuf[n] ^ 0xFF);
LEADImage->PutBitmapRowCol( pBuf, i, xOffset, xSize* 3);
}
// Free memory that we no longer need
GlobalFree(hBuf);
}


GetDIB example for C++Builder

L_HANDLE MyDIB;
/*This example gets the image from LEADImage1 as a V5 DIB
and then loads the DIB into LEADImage2*/

/*LEAD1 has an image at this point*/
MyDIB= LEADImage1->GetDIB (DIB_BITMAPV5HEADER);

LEADImage2->SetDIB (MyDIB);
/*Free the DIB using the Windows API*/
GlobalFree ( (void*)MyDIB ) ;


GetFeretsDiameter Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
TPoint * pPoints;
L_UINT uSize, uFeretsDiam, uFstIndex, uSndIndex;

/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );

LEADImage1->SetRgnEllipse( LEADImage1->BitmapWidth / 4, LEADImage1->BitmapHeight / 4, LEADImage1->BitmapWidth, LEADImage1->BitmapHeight, L_RGN_SET);

LEADImage1->GetRgnContourPoints(pPoints, uSize);
L_INT nRet= LEADImage1->GetFeretsDiameter(pPoints, uSize, uFeretsDiam, uFstIndex, uSndIndex);
if ( nRet == SUCCESS )
ShowMessage ( "Number of points = " + IntToStr(uSize));
}


GetFileInfo example for C++ Builder

This example gets information about the specified file.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
AnsiString fname, cmp, cFmt, cMsg;
int pg, fmt, width, height, bps, xres, yres, sizd, sizm;

//Initialize variables
fname = "c:\\lead\\images\\image2.cmp";
pg =0;
//Update the variables
Lead1->GetFileInfo(fname, pg);
//Read the updated properties
fmt = Lead1->InfoFormat;
width = Lead1->InfoWidth;
height = Lead1->InfoHeight;
bps = Lead1->InfoBits;
xres = Lead1->InfoXRes;
yres = Lead1->InfoYRes;
pg = Lead1->InfoPage;
sizd = Lead1->InfoSizeDisk;
sizm = Lead1->InfoSizeMem;
cmp = Lead1->InfoCompress;
// Translate the meaning of the format constant
switch(fmt){
case FILE_PCX: cFmt = "ZSoft PCX"; break;
case FILE_GIF: cFmt = "CompuServe GIF"; break;
case FILE_TGA: cFmt = "TARGA"; break;
case FILE_PNG: cFmt = "Portable Network Graphics"; break;
case FILE_PSD: cFmt = "Adobe Photoshop 3.0"; break;
case FILE_BMP: cFmt = "Windows BMP"; break;
case FILE_OS2: cFmt = "OS/2 BMP version 1.x"; break;
case FILE_OS2_2: cFmt = "OS/2 BMP version 2.x"; break;
case FILE_WMF: cFmt = "Windows Meta File"; break;
case FILE_EPS: cFmt = "Encapsulated PostScript"; break;
case FILE_TIF: cFmt = "Tagged Image File Format (TIFF, TIFLZW, or CCITT file)"; break;
case FILE_JTIF: cFmt = "Tagged Image File with JPEG compression"; break;
case FILE_FAX_G3_1D: cFmt = "Raw FAX, compressed using CCITT group 3, 1 dimension"; break;
case FILE_FAX_G3_2D: cFmt = "Raw FAX, compressed using CCITT group 3, 2 dimensions"; break;
case FILE_FAX_G4: cFmt = "Raw FAX, compressed using CCITT group 4"; break;
case FILE_WFX_G3_1D: cFmt = "WinFax, compressed using CCITT group 3, 1 dimension"; break;
case FILE_WFX_G4: cFmt = "WinFax, compressed using CCITT group 4"; break;
case FILE_ICA_G3_1D: cFmt = "IOCA, compressed using CCITT group 3, 1 dimension"; break;
case FILE_ICA_G3_2D: cFmt = "IOCA, compressed using CCITT group 3, 2 dimensions"; break;
case FILE_ICA_G4: cFmt = "IOCA, compressed using CCITT group 4"; break;
case FILE_CMP: cFmt = "LEAD proprietary compression format"; break;
case FILE_LEAD_NOLOSS: cFmt = "LEAD lossless compression format"; break;
case FILE_JFIF: cFmt = "JPEG File Interchange Format"; break;
case FILE_WPG: cFmt = "WordPerfect"; break;
case FILE_RAS: cFmt = "Sun Raster"; break;
case FILE_CALS: cFmt = "CALS Raster"; break;
case FILE_MAC: cFmt = "MacPaint"; break;
case FILE_PCT: cFmt = "Macintosh Pict"; break;
case FILE_MSP: cFmt = "Microsoft Paint"; break;
case FILE_IMG: cFmt = "GEM Image"; break;
case FILE_PCD: cFmt = "Kodak PhotoCD"; break;
case FILE_EPSTIFF: cFmt = "Encapsulated PostScript with an embedded TIFF file"; break;
default: cFmt = "Unknown format";
}
// Create the message string
cMsg = fname + "\n";
cMsg = cMsg + "Page = " + IntToStr(pg) + " of " + IntToStr(Lead1
 >InfoTotalPages) + "\n";
cMsg = cMsg + "Format = " + cFmt + "\n";
cMsg = cMsg + "Width = " + IntToStr(width) + "\n" + "Height = " + IntToStr(height) + "\n";
cMsg = cMsg + "Bits per pixel = " + IntToStr(bps) + "\n";
cMsg = cMsg + "Size in memory = " + IntToStr(sizm) + "\n";
cMsg = cMsg + "Size on disk = " + IntToStr(sizd) + "\n";
cMsg = cMsg + "X resolution = " + IntToStr(xres) + "\n" + "Y resolution = " + IntToStr(yres);
//Display the message box
Application->MessageBox(cMsg.c_str(), "File Info", MB_OK);
}


GetFloaterHandle example for C++ Builder

The following is an alternative way of coding the PasteFloater button's click procedure in Outlining, Dragging, and Pasting a Region. This alternative uses the GetFloaterHandle and SetRgnHandle methods to specify the mask for the paste. It also shows how to use the HasRgn, FloaterWidth, and FloaterHeight properties.

void __fastcall TForm1::PasteFloater2Click(TObject *Sender)
{
/*Declare the variable for the Combine operation. */
int MyOp;
/*Declare the variable for the saved region. */
L_HRGN SavedRgn;
/*Declare the variables for the client area coordinates. */
int LCRgnX, LCRgnY , LCRgnWidth, LCRgnHeight;
/*Declare the variables for the bitmap coordinates. */
int LBRgnX, LBRgnY, LBRgnWidth, LBRgnHeight;

/*Exit this routine if there is no region. */
if(Lead1->HasRgn == False)
return;
/*Save the region that is in the floater. */
SavedRgn = Lead1->GetFloaterHandle();
/*Get the floater into another bitmap */
Lead2->Bitmap = Lead1->Floater;
/*Get the floater"s client coordinates into local variables. */
LCRgnX = Lead1->FloaterDstLeft;
LCRgnY = Lead1->FloaterDstTop;
LCRgnWidth = Lead1->FloaterDstWidth;
LCRgnHeight = Lead1->FloaterDstHeight;
/*Translate the client coordinates to bitmap coordinates. */
LBRgnX = (LCRgnX - Lead1->DstLeft) / ZoomFactorX + Lead1->SrcLeft;
LBRgnY = (LCRgnY - Lead1->DstTop) / ZoomFactorY + Lead1->SrcTop;
LBRgnWidth = Lead1->FloaterWidth;
LBRgnHeight = Lead1->FloaterHeight;
/*Delete the floater. */
Lead1->FloaterVisible = False;
Lead1->Floater = 0;
/*Set the saved region to use as a mask for the Combine method. */
Lead1->SetRgnHandle(SavedRgn, LBRgnX, LBRgnY, L_RGN_SET);
/*Use the Combine method to paste the Lead2 bitmap into the Lead1 bitmap. */
MyOp = CB_OP_ADD | CB_DST_0; /*Operation flags for a simple paste. */
Lead1->Combine(LBRgnX, LBRgnY, LBRgnWidth, LBRgnHeight, Lead2->Bitmap, 0, 0, MyOp);
/*Repaint the part of the client area that has changed. */
Lead1->RepaintRect(LCRgnX, LCRgnY, LCRgnWidth, LCRgnHeight, False);
/*Free the region. */
Lead1->FreeRgn();
/*Delete the region handle. */
Lead1->DeleteRgnHandle(SavedRgn);
}


GetFunctionalLookupTable example for C++ Builder

LEADImage1->GetFunctionalLookupTable (0, 255, 5, FLT_EXP);
LEADImage1->RemapIntensity (CHANNEL_MASTER);


GetHistogram example for C++ Builder

The following code does a CMYK separation and uses a histogram to find the brightest and darkest intensities in the K plane of the bitmap. It then remaps the intensities to use the full range and merges the color planes to recreate the bitmap:

{
int Brightest, Darkest, MyIndex, Offset, CurrentRange;

Screen->Cursor = crHourGlass;

//Do a CMYK color separation and copy the K plane to the bitmap
LeadImage1->ColorSeparate(COLORSEP_CMYK);
LeadImage1->Bitmap = 0; //Free the bitmap
LeadImage1->Bitmap = LeadImage1->ColorPlanes[3]; //Copy the K plane

//Load the histogram
LeadImage1->GetHistogram(CHANNEL_MASTER);

//Find the brightest and darkest intensities in the image
MyIndex = 0;
Brightest = 0;
Darkest = -1;
while (MyIndex < 256)
{
if (LeadImage1->HistogramTable[MyIndex] > 0)
{
Brightest = MyIndex;
if (Darkest == -1)
Darkest = MyIndex;
}
MyIndex++;
}

LeadImage1->RemapTableSize = 256;
//Remap the intensities to use the full range
MyIndex = Darkest;
CurrentRange = Brightest - Darkest;
if (CurrentRange > 0)
{
while (MyIndex <= Brightest)
{
Offset = MyIndex - Darkest;
LeadImage1->RemapTable[MyIndex] = (255 * Offset) / CurrentRange;
MyIndex++;
}
LeadImage1->RemapIntensity(CHANNEL_MASTER);
}

//Merge the color planes and free them from memory
LeadImage1->ColorPlanes[3] = LeadImage1->Bitmap; //Update the K plane
LeadImage1->ColorMerge(COLORSEP_CMYK);
LeadImage1->ColorPlanes[0] = 0;
LeadImage1->ColorPlanes[1] = 0;
LeadImage1->ColorPlanes[2] = 0;
LeadImage1->ColorPlanes[3] = 0;

//Set the image display size to match the LEAD control
LeadImage1->SetDstRect(0, 0, LeadImage1->Width, LeadImage1->Height);
LeadImage1->SetDstClipRect(0, 0, LeadImage1->Width, LeadImage1->Height);
LeadImage1->ForceRepaint();
Screen->Cursor = crDefault;
}


GetHistogramGray example for C++Builder

/*This example gets a histogram for a 12-bit or 16-bit grayscale image and then
displays the number of occurrences of the brightest and darkest intensities*/

int nRet;
ShowMessage ("Table size before call to GetHistogramGray: " + IntToStr(LEADImage1->HistogramGrayTableSize)) ;
nRet= LEADImage1->GetHistogramGray ( ) ;
if ( nRet == SUCCESS )
{
LEADImage1->GetMinMaxVal ( ) ;
ShowMessage ("Highest Intensity: " + IntToStr(LEADImage1->MaxVal) + " Count: " + IntToStr(LEADImage1->HistogramGrayTable[LEADImage1->MaxVal])
+ "\nLowest Intensity: " + IntToStr(LEADImage1->MinVal) + " Count: " + IntToStr(LEADImage1->HistogramGrayTable[LEADImage1->MinVal]));
}
ShowMessage ( "Table size of current histogram: " + IntToStr(LEADImage1->HistogramGrayTableSize));


GetLinearVOILUT Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* check the linearity of the LUT and computes its window width and center
by using GetLinearVOILUT method.*/

L_DOUBLE Width, Center;
L_INT nRet;
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
nRet = LEADImage1->GetLinearVOILUT(Center, Width, 0);
if(nRet == SUCCESS)
ShowMessage( "Window Center = " + FloatToStr(Center) + "\nWindow Width" + FloatToStr(Width));
}


GetMarkers example for C++ Builder

void __fastcall TForm1::GetMarkersClick(TObject *Sender)
{
int i;
LEADImage1->Load ( "e:\\image1.jpg", 0, 0, 1 );
LEADMarker1->LoadMarkers ( "e:\\image1.jpg", 0 );
LEADImage1->SetMarkers ( LEADMarker1, 0 );
LEADImage1->Save ( "c:\\image2.jpg", FILE_EXIF_JPEG, 24, 2, 0 );
LEADMarker2->GetMarkers ( 0 );
for (i= 0; i < LEADMarker2->Count; i ++)
{
LEADMarker2->GetMarker ( i );
ShowMessage ( "Marker Type= " + IntToStr(LEADMarker2->MarkerType) + "\n" +
"Marker Element Count= " + IntToStr(LEADMarker2->ElementCount) );
}
}


GetMemoryThresholds example for C++ Builder

{ This example doubles the maximum size for a conventional bitmap }
void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_INT nMaxConvSize;

/* Get only the max conventional size value */
LEADImage1->GetMemoryThresholds(NULL, &nMaxConvSize, NULL, NULL, NULL );

/* Double the max conventional size value */
LEADImage1->SetMemoryThresholds(0, nMaxConvSize * 2, 0, 0, 0, MEM_MAXCONVSIZE );
}


GetMinMaxBits example for C++ Builder

The following example retrieves the values for MinBit and MaxBit using GetMinMaxBits and writes the results.

Lead1->GrayScale(12); //Grayscale image to 12-bit
Lead1->GetMinMaxBits();
Edit1->Text = IntToStr(Lead1->MinBit);
Edit2->Text = IntToStr(Lead1->MaxBit);


GetMinMaxVal example for C++ Builder

The following example retrieves the values for MinVal and MaxVal using GetMinMaxVal and writes the results.

//Grayscale image to 12-bit
Lead1->GrayScale(12);
//must call GetMinMaxVal first
Lead1->GetMinMaxVal();
Edit1->Text = IntToStr(Lead1->MinVal);
Edit2->Text = IntToStr(Lead1->MaxVal);


GetObjectInfo Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_UINT uX, uY, uRound;
L_INT nAngle;

/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );

/* Get the objects center of mass and it's roundness. */
L_INT nRet = LEADImage1->GetObjectInfo( FALSE, uX, uY, nAngle, uRound);
if ( nRet == SUCCESS )
ShowMessage ( "object's center mass is at = (" + IntToStr(uX/100) + " , " + IntToStr(uY/100) + ")");
}


GetPixelData example for C++ Builder

/* This example uses GetPixelData and PutPixelData to swap the R and G values for a particular pixel->
This example will work only with 24, 32, 48 and 64-bit bitmaps*/

void TForm1::SwapRGBtoBGR( int nRow, int nCol)
{
unsigned uVal;
L_UCHAR aPixel[4] ; // make it large enough for both bitmap types
L_UINT16 bPixel[4]; // make it large enough for both bitmap types
void * pPixel;

if((LEADImage1->BitmapBits == 24) ||
(LEADImage1->BitmapBits == 32))
{
pPixel= &aPixel;
LEADImage1->GetPixelData(pPixel, nRow, nCol, 4);
// swap the R and B values
uVal= aPixel[0]; aPixel[0] = aPixel[2]; aPixel[2] = (L_UCHAR)uVal;
// put back the transformed pixel
LEADImage1->PutPixelData(pPixel, nRow, nCol, sizeof(aPixel));
}
else
if((LEADImage1->BitmapBits == 48) ||
(LEADImage1->BitmapBits == 64))
{
pPixel= &bPixel;
LEADImage1->GetPixelData(pPixel, nRow, nCol, 4);
// swap the R and B values
uVal= aPixel[0]; aPixel[0]= aPixel[2]; aPixel[2]= (L_UINT16)uVal;
// put back the transformed pixel
LEADImage1->PutPixelData(pPixel, nRow, nCol, sizeof(aPixel));
}
}


GetRgnBounds example for C++ Builder

void __fastcall TForm1::Test(TObject *Sender)
{
TRect RgnRect ;

if(Lead1->HasRgn)
{
Lead1->GetRgnBounds(RgnRect);
Edit1->Text = "Region Bounds : (Top , Left) (Buttom , Right) : ( " + IntToStr(RgnRect.Top) + " , " + IntToStr(RgnRect.Left) + ") , (" + IntToStr(RgnRect.Bottom) + " , " + IntToStr(RgnRect.Right) + ")";
}
}


GetRgnHandle example for C++ Builder

The following code creates a region, saves its handle and adds the saved region beside the current region.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*Declare local variables.*/
int OffsetX, OffsetY;
HRGN SavedRegion;

/*Initialize the variables that we will manipulate to simulate mouse coordinates.*/
OffsetX = Lead1->BitmapWidth / 8;
OffsetY = Lead1->BitmapHeight / 6;
/*Create an elliptical region.*/
Lead1->SetRgnEllipse(OffsetX, OffsetY, OffsetX, OffsetY, L_RGN_SET);

/*Save a copy of the region.*/
SavedRegion = (HRGN) Lead1->GetRgnHandle();
/*Offset original Region*/
Lead1->OffsetRgn(OffsetX / 2, OffsetY / 2);
/*Add the saved region to the bitmap, offsetting it so that we can see it.*/
Lead1->SetRgnHandle((L_HRGN)SavedRegion, OffsetX, OffsetY, L_RGN_OR);
/*Delete the saved region.*/
Lead1->DeleteRgnHandle((L_HRGN)SavedRegion);
/*Fill the bitmap region with blue.*/
Lead1->Fill(RGB(0, 0, 255));
/*Free the bitmap region.*/
Lead1->FreeRgn();
/*Repaint the image so that we can see how the image was updated.*/
Lead1->ForceRepaint();
}


GetRgnPerimeterLength Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_UINT uPerimeter;
/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );
LEADImage1->SetRgnEllipse( LEADImage1->BitmapHeight/3, LEADImage1->BitmapWidth /3, LEADImage1->BitmapWidth, LEADImage1->BitmapHeight, L_RGN_SET);

L_INT nRet = LEADImage1->GetRgnPerimeterLength(uPerimeter);
if(nRet == SUCCESS)
ShowMessage("Length of the perimeter" + IntToStr(uPerimeter));
}


GetStatisticsInfo Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_UINT uStdDev;
L_UINT uMean;
L_UINT uMedian;
L_UINT uMax;
L_UINT uMin;
L_UINT uPixelCnt;
L_UINT uTotalPixelCnt;
L_UINT uPercent;

/* Load a bitmap at 24 bits per pixel */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/*Get statistical image information */
L_INT nRet= LEADImage1->GetStatisticsInfo( CHANNEL_MASTER, 0, 255, uStdDev, uMean, uMedian, uMax, uMin, uPixelCnt, uTotalPixelCnt, uPercent );
if(nRet == SUCCESS)
{
ShowMessage ( "Standard deviation value = " + IntToStr(uStdDev) + "\n" + "Mean value = " + IntToStr(uMean)+ "\n" + "Median value = " + IntToStr(uMedian)+ "\n" + "Maximum value = " + IntToStr(uMax)+ "\n" + "Minimum value = " + IntToStr(uMin)+ "\n" + "Pixel number value = " + IntToStr(uPixelCnt)+ "\n" + "Whole image Pixel number value = " + IntToStr(uTotalPixelCnt) + "\n" + "Percent value = " + IntToStr(uPercent) + "\n" );
}
}


GetTransformationParameters Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* This example loads a bitmap, and computes the translation parameters.
The example makes the assumption that you have saved the position of the
registration marks of the reference bitmap in a file. It also assumes you have
a method which loads these positions, namely, ?oadRefParameters·
You should modify this example and replace LoadRefParameters with your
own method before testing this example.*/

L_INT nAngle, uXTranslation, uYTranslation;
L_UINT uXScale, uYScale;
REGMARKS aSearchMarks[3];
TPoint aMarkPoints[3];
TPoint aMarkCMPoints[3];
TPoint aRefPoints[3];
TPoint CenterPt;

// Load a bitmap at its own bits per pixel
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

// bend the image around it is center
CenterPt.x= LEADImage1->BitmapWidth/2;
CenterPt.y= LEADImage1->BitmapHeight/2;

/* Get aRefPoints from pre-calculated saved values. You have to implement LoadRefParameters */
//LoadRefParameters(aRefPoints);

aSearchMarks[0].uType= RGS_T;
aSearchMarks[0].uMinScale= 90;
aSearchMarks[0].uMaxScale= 110;
aSearchMarks[0].uWidth= 31;
aSearchMarks[0].uHeight= 29;
SetRect(&aSearchMarks[0].rcRect, 200,150,100,100);
aSearchMarks[0].uSearchMarkCount= 1;
aSearchMarks[0].pMarkDetectedPoints= &aMarkPoints[0];

aSearchMarks[1].uType= RGS_T;
aSearchMarks[1].uMinScale= 90;
aSearchMarks[1].uMaxScale= 110;
aSearchMarks[1].uWidth= 31;
aSearchMarks[1].uHeight= 29;
SetRect(&aSearchMarks[0].rcRect, 200,150,100,100);
aSearchMarks[1].uSearchMarkCount= 1;
aSearchMarks[1].pMarkDetectedPoints= &aMarkPoints[1];

aSearchMarks[2].uType= RGS_T;
aSearchMarks[2].uMinScale= 90;
aSearchMarks[2].uMaxScale= 110;
aSearchMarks[2].uWidth= 31;
aSearchMarks[2].uHeight= 29;
SetRect(&aSearchMarks[0].rcRect, 300,300,100,100);
aSearchMarks[2].uSearchMarkCount= 1;
aSearchMarks[2].pMarkDetectedPoints= &aMarkPoints[2];

LEADImage1->Load ("e:\\image2.cmp", 0, 1, 1 );

LEADImage1->SearchRegMarks( aSearchMarks, 3 );

LEADImage1->GetMarksCenterMass( aMarkPoints, aMarkCMPoints, 3 );

LEADImage1->GetTransformationParameters( aRefPoints, aMarkCMPoints, uXTranslation, uYTranslation, nAngle, uXScale, uYScale );
}


GetUserLookupTable example for C++ Builder

int PointCount;
LEADImage1->UserLUTCurveSize = 3;
LEADImage1->UserLUTCurveX [0] = 0;
LEADImage1->UserLUTCurveY[0] = 0;
LEADImage1->UserLUTCurveX[1] = 128;
LEADImage1->UserLUTCurveY[1] = 150;
LEADImage1->UserLUTCurveX[2] = 255;
LEADImage1->UserLUTCurveY[2] = 255;
LEADImage1->GetUserLookupTable (&PointCount);
LEADImage1->RemapIntensity (CHANNEL_MASTER);
ShowMessage (IntToStr (PointCount) + " Points were modified");


GlassEffect Example for C++ Builder

void __fastcall TForm1::GlassEffectClick(TObject *Sender)
{
LEADImage1->GlassEffect( 20,10, GLASS_WFRQ | GLASS_HPER );
}


GlowFilter Example for C++ Builder

void __fastcall TForm1::GlowFilterClick(TObject *Sender)
{
LEADImage1->GlowFilter( 5, 3, 0 );
}


Grayscale example for C++ Builder

This example converts the bitmap to 12-bit grayscale.

Lead1->GrayScale (12); //Grayscale image to 12-bit


GrayscaleExt example for C++ Builder

GrayScaleExt C++ Builder Example

/*This example assumes there is a bitmap loaded*/
int RedFact, GreenFact, BlueFact;

RedFact = 300;
GreenFact = 590;
BlueFact = 110;
LEADImage1->GrayScaleExt (RedFact, GreenFact, BlueFact);


GrayScaleToDuotone Example for C++ Builder

void __fastcall TForm1::GrayScaleToDuotone1Click(TObject *Sender)
{
/* Change the bitmap to grayscale bitmap */
LEADImage1->GrayScale( 8 );
/* Apply duotone conversion */
LEADImage1->GrayScaleToDuotone( NULL, RGB(255, 0, 0), DT_REPLACE );
}


GrayScaleToMultitone Example for C++ Builder

void __fastcall TForm1::GrayScaleToMultitone1Click(TObject *Sender)
{
COLORREF crColors [2];

/* Change the bitmap to grayscale bitmap */
LEADImage1->GrayScale( 8 );

/* The new colors */
crColors[0]= RGB ( 255, 255, 0 );
crColors[1]= RGB ( 255, 0, 0 );

/* Apply Multitone conversion */
LEADImage1->GrayScaleToMultitone( DT_DUOTONE, (pCOLORREF)crColors, DT_LINEAR, NULL, DT_REPLACE );
}


h_Wnd example for C++ Builder

h_Wnd (AnnToolbar) example for C++ Builder

// This Example is also for Tool Property.
void __fastcall TMainFrm::LEADAnn1AnnToolDestroy ()
{
int iTool;
ShowMessage ( "Toolbar has been destroyed!" ) ;
if (LEADAnn1->AnnToolbar ->h_Wnd == 0)
LEADAnn1->AnnToolbar->CreateTB ( 0, 0, 0 );
iTool= LEADAnn1->AnnToolbar->Tool;
}


Halftone example for C++ Builder

//This example halftones the bitmap with a horizontal pattern and repaints the image.
LEADImage1->Halftone ( HT_PRINT, 0, 0, NULL );
LEADImage1->ForceRepaint ( );


HasMagGlass example for C++ Builder

if (LEADImage1->HasMagGlass)
{
Caption = "Stop";
//Stop the MagGlass
LEADImage1->StopMagGlass();
}
else
Caption = "Error";


HasRgn example for C++ Builder

if (Lead1->HasRgn)
Edit1->Text = "Bitmap Has Region";


hDocCleanRgn example for C++ Builder

void __fastcall TForm1::Button4Click(TObject *Sender)
{
int nRet;

// HolePunch Remove
// This example updates a windows region with all removed hole punches
// For the example, a windows region is updated and then converted to a LEAD region
// but in practice it would easier and faster to just update a LEAD region
// The HOLEPUNCH_USE_DPI flag instructs the API to determine the size of the hole punches
// based on the image DPI
// The image is modified
// The HolePunch Event is used to display information about each hole punch removed

nRet = LEADImage1->HolePunchRemove (HOLEPUNCH_SINGLE_REGION | HOLEPUNCH_USE_DPI | HOLEPUNCH_USE_COUNT | HOLEPUNCH_USE_LOCATION,
2, 4, 0, 0, 0, 0, HOLEPUNCH_LEFT);

if (nRet == SUCCESS)
{
LEADImage1->FreeRgn ();
LEADImage1->SetRgnHandle ((int)LEADImage1->hDocCleanRgn, 0, 0, L_RGN_SET);
LEADImage1-> hDocCleanRgn = 0 ;// no longer need rgn
LEADImage1->RgnFrameType = ftAnimated;
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::LEADImage1HolePunchRemove(TObject *Sender,
L_HRGN hHoleRgn, int nBoundingRectLeft, int nBoundingRectTop,
int nBoundingRectWidth, int nBoundingRectHeight, int iHoleIndex,
int iHoleTotalCount, int iWhiteCount, int iBlackCount)
{
char szTemp[256];
wsprintf(szTemp,"HolePunch at %d,%d,%d,%d HoleIndex= %d TotalCount= %d WhiteCount= %d BlackCount= %d",
nBoundingRectLeft,
nBoundingRectTop,
nBoundingRectWidth,
nBoundingRectHeight,
iHoleIndex,
iHoleTotalCount,
iWhiteCount,
iBlackCount);

OutputDebugString(szTemp);

}


HistoContrast example for C++ Builder

This example applies a histogram contrast to the bitmap and repaints the image.

Lead1->HistoContrast(300);
Lead1->ForceRepaint();


HistoEqualize example for C++ Builder

This example equalizes the bitmap's histogram and repaints the image.

Lead1->HistoEqualize();
Lead1->ForceRepaint();


HistogramTableSize example for C++ Builder

if ((LEADImage1->BitmapBits == 64) ||
(LEADImage1->BitmapBits == 48))
LEADImage1->HistogramTableSize = 65536;
else
LEADImage1->HistogramTableSize= 256;


HitTest(ImageList Control) example for C++ Builder

/* Handle MouseDown and MouseUp events as follows*/

void __fastcall TForm1::LEADImgList1MouseDown(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)

{

long nItem ;
nItem = LEADImgList1->HitTest(X, Y);

if( (nItem >= 0))

{
LEADImgList1->SelectionColor = clRed;
LEADImgList1->Item[nItem]->Selected = True;
}

}

//---------------------------------------------------------------------------

void __fastcall TForm1::LEADImgList1MouseUp(TObject *Sender,

TMouseButton Button, TShiftState Shift, int X, int Y)

{

long nItem ;
nItem = LEADImgList1->HitTest(X, Y);

if( (nItem >= 0))

{
LEADImgList1->SelectionColor = clBlue;
LEADImgList1->Item[nItem]->Selected = True ;
}
}


HolesRemovalRgn Example for C++ Builder

L_INT TForm1::DoHolesRemovalRgn ( L_HRGN hRegn, L_INT nOffsetX, L_INT nOffsetY )
{
/* put the predefined region */
LEADImage1->SetRgnHandle( hRegn, nOffsetX, nOffsetY, L_RGN_SET );

/* Remove holes */
return LEADImage1->HolesRemovalRgn( );
}


HScrollInfo example for C++ Builder

AnsiString msg;

if (LEADImage1->HScrollInfo->Visible)
{
LEADImage1->HScrollInfo->Page = LEADImage1->HScrollInfo->Max / 10;
LEADImage1->HScrollInfo->Line = 10;
}
if (LEADImage1->VScrollInfo->Visible)
{
LEADImage1->VScrollInfo->Page = LEADImage1->VScrollInfo->Max / 10;
LEADImage1->VScrollInfo->Line = 10;
}
msg= "HScrollMin: " + IntToStr (LEADImage1->HScrollInfo->Min) + "\n";
msg= msg + "HScrollMax: " + IntToStr(LEADImage1->HScrollInfo->Max) + "\n";
msg= msg + "VScrollMin: " + IntToStr(LEADImage1->VScrollInfo->Min) + "\n";
msg= msg + "VScrollMax: " + IntToStr(LEADImage1->VScrollInfo->Max) + "\n";
msg= msg + "-------------\n";
msg= msg + "HScrollPage: " + IntToStr(LEADImage1->HScrollInfo->Page)+ "\n";
msg= msg + "HScrollLine: " + IntToStr(LEADImage1->HScrollInfo->Line)+ "\n";
msg= msg + "VScrollPage: " + IntToStr(LEADImage1->VScrollInfo->Page)+ "\n";
msg= msg + "VScrollLine: " + IntToStr(LEADImage1->VScrollInfo->Line)+ "\n";
msg= msg + "-------------\n";
msg= msg + "HScrollPos: " + IntToStr(LEADImage1->HScrollInfo->Pos) + "\n";
msg= msg + "VScrollPos: " + IntToStr(LEADImage1->VScrollInfo->Pos) + "\n";
msg= msg + "-------------\n";
msg= msg + "HScrollWidth: " + IntToStr(LEADImage1->HScrollInfo->Width)+ "\n";
msg= msg + "VScrollWidth: " + IntToStr(LEADImage1->VScrollInfo->Width)+ "\n";

ShowMessage ( msg.c_str() ) ;


HScrollStep example for C++ Builder

Lead1->HScrollStep = 2 ;


HSV_HfromRGB example for C++Builder

/*Takes an RGB, displays the RGB components, and displays the HSV components*/
void TForm1::RGBtoHSV(TColorRef cr)
{
int red;
int green;
int blue;
int h;
int s;
int v;

red= GetRValue (cr);
green= GetGValue (cr);
blue= GetBValue(cr);

h= LEADImage1->HSV_HfromRGB(cr);
s= LEADImage1->HSV_SfromRGB(cr);
v= LEADImage1->HSV_VfromRGB(cr);

ShowMessage ( "RGB (" + IntToStr(red) + "," + IntToStr(green) + "," + IntToStr(blue) + ") is HSV(" + IntToStr(h) + "," + IntToStr(s) + "," + IntToStr(v) + ")");
}


Hue example for C++ Builder

This example rotates the hue 180 degrees and repaints the image.

Lead1->Hue(180);
Lead1->ForceRepaint();


IgnoreFilters Example for C++ Builder

This example shows how to ignore filters so that certain files are not loaded.

/* First, make sure PreLoaded Filters does not */
/* contain CMP, and that 0 filters can be cached */
Lead1->PreLoadFilters(3, 0, "BMP,FAX,TIF");
/* Now, ignore CMP filter (never load CMP files) */
Lead1->IgnoreFilters("CMP");


ImportBitmapList example for C++ Builder

void __fastcall TForm1::btnImportBitmapListClick(TObject
 *Sender)
{
if(LEADImage1->BitmapListCount
 > 0)// There are some bitmaps
{
LEADImgList1->ImportBitmapList
 (LEADImage1->BitmapList,
 0, LEADImage1->BitmapListCount, "Imported Bitmap-Text","Imported
 Bitmap-TextExt");
// Redraw the control
LEADImgList1->Refresh();
}
}


Impressionist Example for C++ Builder

void __fastcall TForm1::ImpressionistClick(TObject *Sender)
{
LEADImage1->Impressionist( 10, 10 );
}


InfoColorSpace example for C++ Builder

void __fastcall TForm1::btnInfoColorSpaceClick(TObject *Sender)
{
if(LEADImage1->GetFileInfo("image1.cmp", 0) == SUCCESS)
ShowMessage("Info Color Space = " + IntToStr(LEADImage1->InfoColorSpace));
}


InfoHasAlpha example for C++ Builder

LEAD1->Load ("c:\\temp\\1.jpg", 24, 1, 1);// load a 24-bit image
LEAD2->Bitmap = LEAD1->Bitmap;
LEAD2->ColorRes(8, 0, 0, 0);// just make it 8-bit
//now set an alpha channel
LEAD1->BitmapAlpha = LEAD2->Bitmap;

//save and free
LEAD1->Save ("c:\\temp\\32.png", FILE_PNG, 32, 0, 0);
LEAD1->Bitmap = 0;
LEAD2->Bitmap = 0;

Application->MessageBox ("Pause","Pause",0);

//re-load
LEAD1->GetFileInfo ("c:\\temp\\32.png", 0);
if (LEAD1->InfoHasAlpha != False)
LEAD1->Load ("c:\\temp\\32.png", 0, 1, 1);

LEAD2->Bitmap = LEAD1->BitmapAlpha;


InfoLayers example for C++ Builder

int i;
// This example all the layers in a file to a bitmap list
LEADImage1->GetFileInfo ( "c:\\temp\\layers.psd", 0);

if (!LEADImage1->InfoLayers )
ShowMessage ( "This file has no layers!" );
else
{
// load the first layer directly
LEADImage1->LoadLayer ("c:\\temp\\layers->psd", 0, 0);

// steal the bitmaps from the other control
LEADImage1->RefBitmap= True;

for (i= 1; i < LEADImage1->InfoLayers; i ++ )
{
// use a second control to load the other layers
// using LEADImage1 to load the other layers would invalidate the bitmap list
LEADImage2->LoadLayer ("c:\\temp\\layers.psd", 0, i );
// append the layer to the bitmap list
LEADImage1->InsertBitmapListItem (LST_APPEND, LEADImage2->Bitmap);
}
}


InfoViewPerspective example for C++Builder

LEADImage1->GetFileInfo ( "v:\\images\\image1.cmp", 1 ) ;
ShowMessage (IntToStr(LEADImage1->InfoViewPerspective));


Insert (ImageList Control) example for C++ Builder

/*load an image*/
LEADImage1->Load("v:\\images\\eagle.cmp", 0, 0, 1);
/*insert it into the ImageList control*/
LEADImgList1->Insert (LEADImage1->Bitmap, "testing", 1);
LEADImgList1->EnsureVisible (LEADImgList1->Count – 1);


InsertAt (ImageList Control) example for C++ Builder

/*load an image*/
LEADImage1->Load ("v:\\images\\eagle.cmp", 0, 0, 1);
/*insert it into the ImageList control at the first item*/
LEADImgList1->InsertAt(LEADImage1->Bitmap, "test2", 1, 0);


InsertBitmapListItem Example for C++ Builder

This example loads an ordinary file and uses it to create and play an animation. It assumes that the LEAD control has already been sized to the aspect ratio of the image.

void __fastcall TForm1::Button26Click(TObject *Sender)
{
int nMax; /* Maximum width or height for bitmaps in the list */
int BitmapWidth; /* Width of the bitmap */
int BitmapHeight; /* Height of the bitmap */
int i; /* Loop Counter */

nMax = 160;
Lead2->Load("d:\\ltwin11\\images\\image1.cmp", 0, 0, 1);
BitmapWidth = Lead2->BitmapWidth;
BitmapHeight = Lead2->BitmapHeight;
/* Reduce memory requirements, if( necessary. Only small bitmaps play smoothly. */
if (BitmapWidth > nMax)
Lead2->Size(nMax, (int)((BitmapHeight * nMax) / BitmapWidth), SIZE_RESAMPLE);
else
if( (BitmapHeight > nMax))
Lead2->Size((int)((BitmapWidth * nMax) / BitmapHeight), nMax, SIZE_RESAMPLE);

/* Dither to an optimized palette, leaving the last color blank to use */
/* for transparency. */
Lead2->ColorRes(8, CRF_IDENTITYPALETTE, CRF_FLOYDSTEINDITHERING, 255);
/* Set an arbitrary transparent color in the last position of the bitmap palette. */
Lead2->BitmapPalette[255] = (TColor)RGB(212, 222, 202);
/* Set the playback values that will apply to all bitmaps in the list. */
Lead2->BitmapDelay = 10;
Lead2->BitmapTop = 0;
Lead2->BitmapLeft = 0;
Lead2->BitmapEnableTransparency = True;
Lead2->BitmapTransparentColor = (TColor)(16777216 + 255); /* Specified by palette index*/
Lead2->BitmapDisposalMethod = 2; //PLAYDISPOSE_RESTOREBACKGROUND;
/* Free the LEAD1 control"s current bitmap list. */
Lead1->BitmapList = 0;
/* Populate the bitmap list in the LEAD1 control. */
for(i= 0;i<=36;i++)
{
Lead1->InsertBitmapListItem(i, Lead2->Bitmap);
/* Rotate, using the transparent color as the fill color. */
Lead1->BitmapListIndex = i;
Lead1->Rotate(1000 * i, False, 16777216 + 255);
}
/* Set the animation playback properties */
Lead1->AnimationBackColor = (TColor)RGB(0, 0, 255);
Lead1->AnimationBitsPerPixel = 8;
Lead1->AnimationHeight = Lead1->Height;
Lead1->AnimationWidth = Lead1->Width;
Lead1->AnimationLoop = False;
for(i = 0;i<=255;i++)
Lead1->AnimationPalette[i] = (TColor)Lead1->BitmapPalette[i];
/* Set properties for a scaled animation. */
Lead1->AutoRepaint = True;
Lead1->AutoSetRects = False;
/* Set the image display size to match the LEAD control. */
Lead1->SetDstRect(0, 0, Lead1->Width, Lead1->Height);
Lead1->SetDstClipRect(0, 0, Lead1->Width, Lead1->Height);
/* Start the animation. */
Lead1->AnimationEnable = True;
/* Free the LEAD2 control"s bitmap. */
Lead2->BitmapList = 0;
}


InsertFromBitmapList (ImageList Control) example for C++ Builder

/*load an image*/
LEADImage1->Load ("v:\\images\\eagle.cmp", 0, 0, 1);
/*make a bitmap list*/
LEADImage2->InsertBitmapListItem (0, LEADImage1->Bitmap);
LEADImage1->Rotate (2500, 0, 0);
LEADImage2->InsertBitmapListItem (0, LEADImage1->Bitmap);
LEADImage1->Rotate (2500, 0, 0);
LEADImage2->InsertBitmapListItem (0, LEADImage1->Bitmap);
LEADImage1->Rotate (2500, 0, 0);

/*now, insert the items from the bitmap list into the ImageList Control*/
LEADImgList1->InsertFromBitmapList (LEADImage2->BitmapList, "test_list");


InsertMarker example for C++ Builder

void __fastcall TForm1::InsertMarkerClick(TObject *Sender)
{
int i;
LEADMarker1->LoadMarkers ( "e:\\image1.jpg", 0 );
LEADMarker2->LoadMarkers ( "e:\\image2.tif", 0 );
LEADMarker1->GetMarker ( 0 );
LEADMarker2->MarkerType= LEADMarker1->MarkerType;
LEADMarker2->ElementCount= LEADMarker1->ElementCount;
for ( i= 0; i < LEADMarker1->Count; i ++ )
{
LEADMarker2->Element[i]= LEADMarker1->Element[i];
}
LEADMarker2->InsertMarker ( 0 );
}


Intensity example for C++ Builder

This example lightens the bitmap and repaints the image.

Lead1->Intensity(150);
Lead1->ForceRepaint();


IntensityDetect example for C++ Builder

LEADImage1->IntensityDetect ( 128, 255, RGB(0, 0, 0), RGB(255, 255, 255), IDB_CHANNEL_MASTER );
LEADImage1->ForceRepaint ( );


Invert example for C++ Builder

This example inverts the bitmap's colors and repaints the image.

Lead1->Invert();
Lead1->ForceRepaint();


InvertedText example for C++ Builder

void __fastcall TForm1::Button5Click(TObject *Sender)
{
int nRet;
// InvertedText
// This example finds all inverted text regions greater than 5 inches in width and 1/2 inch in height
// and inverts the text so that it appears normal
// The InvertedText Event is used to display additional information about the inverted text regions
// A LEAD region is updated to show all of the changes
LEADImage1->DocCleanSuccess = SUCCESS_REMOVE;
nRet = LEADImage1->InvertedText(INVERTEDTEXT_SINGLE_REGION|INVERTEDTEXT_LEAD_REGION|INVERTEDTEXT_USE_DPI, 5000, 500, 70, 95);
if (nRet == SUCCESS)
{
LEADImage1->FreeRgn ();
LEADImage2->Bitmap = LEADImage1->DocCleanBitmap; //copy the result so we can get the rgn handle
LEADImage1->SetRgnHandle (LEADImage2->GetRgnHandle (), 0, 0, L_RGN_SET);
LEADImage2->Bitmap = 0; // no longer need copy
LEADImage1->DocCleanBitmap = 0; // no longer need rgn either
LEADImage1->RgnFrameType = ftAnimated;
}
}

void __fastcall TForm1::LEADImage1InvertedText (TObject *Sender,
L_HRGN hTextRgn, int nBoundingRectLeft, int nBoundingRectTop,
int nBoundingRectWidth, int nBoundingRectHeight, int nWhiteCount,
int nBlackCount)
{
AnsiString strTemp;
strTemp = "Inverted at " + IntToStr(nBoundingRectLeft) +","+
IntToStr(nBoundingRectTop) + "," + IntToStr(nBoundingRectWidth) +","+
IntToStr(nBoundingRectHeight) + " WhiteCount=" +
IntToStr(nWhiteCount) + " BlackCount= " +
IntToStr(nBlackCount);

OutputDebugString(strTemp.c_str());
}


ISISAcquire example for C++ Builder 4.0

/*The following example acquires a single image using ISISAcquire.*/

bool bLoaded = False;

LeadIsis1->EnableMethodErrors = True;
try
{
LeadIsis1->ISISLoadDriver();
bLoaded = True;
LeadIsis1->ISISAcquire(ISIS_SHOWUI);
}
catch (ELeadIsisError *e)
{
if(LeadIsis1->Error != ERROR_ISIS_CANCEL)
ShowMessage("Error " + IntToStr(LeadIsis1->Error) +
" during ISIS Scan! \n" + LeadIsis1->ErrorMsg);
if(bLoaded)
LeadIsis1->ISISUnloadDriver();
return;
}
LeadIsis1->ISISUnloadDriver();
Lead1->Bitmap = LeadIsis1->Bitmap;


ISISAcquireMulti example for C++Builder 4.0

/* The following example prepares for scanning multiple images by setting tags */
/* and enabling the OnISISPage event and then scans multiple images using */
/* ISISAcquireMulti method. */

void __fastcall TForm1::AcquireMulti1Click(TObject *Sender)
{
int nMaxPages = 10, nRet;
AnsiString ErrorDesc;

LeadIsis1->EnableMethodErrors = False;
LeadIsis1->EnableISISEvent = True;
nRet = LeadIsis1->ISISLoadDriver();
if(nRet == SUCCESS)
{
LeadIsis1->ISISSetTag(TAG_SCANAHEAD, TAG_SCANAHEAD_YES);
LeadIsis1->ISISGetTag(TAG_MAXPAGES, nMaxPages);
LeadIsis1->ISISSetTag(TAG_SCANAHEAD_MAXPAGES, nMaxPages / 2);
LeadIsis1->ISISSetTag(TAG_COMPRESSION, TAG_COMPRESSION_G4);
nRet = LeadIsis1->ISISAcquireMulti("c:\\temp\\dTest.tif", ISIS_SHOWUI, FILE_CCITT_GROUP4, True);
ErrorDesc = LeadIsis1->ErrorMsg;
LeadIsis1->ISISUnloadDriver();
if(nRet != SUCCESS)
if(nRet == ERROR_USER_ABORT)
ShowMessage("Acquire canceled, " + IntToStr(LeadIsis1->PagesDiscarded) + " pages were aborted!");
else
{
if(nRet != ERROR_ISIS_CANCEL)
ShowMessage("Error " + IntToStr(nRet) + " during ISIS Scan!\n" + ErrorDesc);
}
else
ShowMessage("Image(s) acquired to file(s) c:\\temp\\dTest.tif");
}
}

void __fastcall TForm1::LeadIsis1ISISPage(TObject *Sender, int nPage, AnsiString FileName)
{
Label1->Caption = IntToStr(nPage);
Label1->Refresh();
Label2->Caption = FileName;
Label2->Refresh();
}


ISISGetASCIITag example for C++ Builder

char * pszVal= NULL;
AnsiString msg;

LEADISIS1->ISISLoadDriver();

//get the default value
LEADISIS1->ISISGetASCIITag(TAG_PAGESIZE, &pszVal, TRUE);
msg = "Default: ";
ShowMessage ( msg + pszVal);
if ( pszVal )
{
GlobalFree ( pszVal );
pszVal= NULL;
}

//get the current value
LEADISIS1->ISISGetASCIITag(TAG_PAGESIZE, &pszVal, FALSE);
msg = "Current: ";
ShowMessage ( msg + pszVal);
if ( pszVal )
{
GlobalFree ( pszVal );
pszVal= NULL;
}
//set a new value
//NOTE, this would have to be a valid choice for the scanner
LEADISIS1->ISISSetASCIITag(TAG_PAGESIZE, "Scanner's Maximum");

//get the default value
LEADISIS1->ISISGetASCIITag(TAG_PAGESIZE, &pszVal, FALSE);
msg = "Current: ";
ShowMessage ( msg + pszVal);
if ( pszVal )
{
GlobalFree ( pszVal );
pszVal= NULL;
}

LEADISIS1->ISISUnloadDriver();


ISISGetASCIITagChoiceCount example for C++ Builder

int n;
int x;
char * szChoice= NULL;

LEADISIS1->ISISLoadDriver ( ) ;
LEADISIS1->ISISGetASCIITagChoiceCount ( TAG_PAGESIZE, &n );
ShowMessage ( "Scanner has " + IntToStr(n) + " choices" ) ;
for (x= 0; x< n; x ++ )
{
LEADISIS1->ISISGetASCIITagChoice ( TAG_PAGESIZE, x, &szChoice ) ;
ShowMessage ("Choice: " + IntToStr(x) + " Value: " + szChoice ) ;
if ( szChoice )
{
GlobalFree ( szChoice ) ;
szChoice = NULL;
}
}
LEADISIS1->ISISUnloadDriver ( ) ;


ISISGetTagChoiceCount example for C++ Builder

int lCount;
int lVal;
int x;

LEADISIS1->ISISLoadDriver ( ) ;
//try a long tag
LEADISIS1->ISISGetTagChoiceCount (TAG_IMAGEWIDTH, &lCount ) ;
ShowMessage ( "Scanner has " + IntToStr(lCount) + " choices" ) ;
for (x= 0; x< lCount; x ++ )
{
LEADISIS1->ISISGetTagChoice ( TAG_IMAGEWIDTH, x, &lVal ) ;
ListBox1->Items->Add ( "Choice: " + IntToStr(x) + " Value: " + IntToStr(lVal)) ;
}

//try a short tag
LEADISIS1->ISISGetTagChoiceCount (TAG_BRIGHTNESS, &lCount);
ShowMessage ( "Scanner has " + IntToStr(lCount) + " choices");
for (x= 0; x < lCount; x ++ )
{
LEADISIS1->ISISGetTagChoice (TAG_BRIGHTNESS, x, &lVal ) ;
ListBox2->Items->Add ( "Choice: " + IntToStr(x) + " Value: " + IntToStr(lVal)) ;
}
LEADISIS1->ISISUnloadDriver ( ) ;


IsISISAvailable example for C++Builder 4.0

/* The following example tests to see if ISIS is available and shows an appropriate message*/

if(LeadIsis1->IsISISAvailable)
ShowMessage("ISIS Support installed!");
else
ShowMessage("ISIS Support not present");


ISISSelect example for C++Builder 4.0

/* The following example displays the ISISSelect DialogBox and writes */
/* a message indicating which ISIS Scanner Driver was selected. */
LeadIsis1->ISISSelect();
ShowMessage(LeadIsis1->DriverName + " was selected! ");


ISISSetScanOptions example for C++Builder 4.0

LeadIsis1->ISISLoadDriver();
LeadIsis1->ISISSetScanOptions();
LeadIsis1->ISISUnloadDriver();


IsPtInRgn (Main Control) example for C++ Builder

Code the LEAD Control MouseDown event as follows:

void __fastcall TForm1::Lead1MouseDown (TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
float ZoomFactorX; /*Used for translating positioning information */
float ZoomFactorY; /*Used for translating positioning information */
int tX,tY ; /*For translated Mouse coordinates */

ZoomFactorX = Lead1->DstWidth / (float)Lead1->SrcWidth;
ZoomFactorY = Lead1->DstHeight / (float)Lead1->SrcHeight;

/*Translate the client coordinates to bitmap coordinates. */
tX = (X / ZoomFactorX) - (Lead1->DstLeft / ZoomFactorX) + Lead1->SrcLeft;
tY = (Y / ZoomFactorY) - (Lead1->DstTop / ZoomFactorY) + Lead1->SrcTop;

if( Lead1->HasRgn && Lead1->IsPtInRgn( tY , tX ))
Edit1->Text = "Inside the Region";
else
Edit1->Text = "Outside the Region";
}


IsRegMark Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
// Load a bitmap at its own bits per pixel
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
int nRet = LEADImage1->IsRegMark(RGS_T, 90, 110, 31, 29);
if(nRet == SUCCESS)
{
//it is a registration mark
}
}


IsSigned example for C++ Builder

/*Load the bitmap data as signed so we can use a different conversion*/
LEADImage1->LoadSigned = True;
LEADImage1->Load ("c:\\temp\\signed.tif", 0, 0, 1);
/* use the non-default conversion "zero to center"*/
LEADImage1->ConvertSignedToUnsigned (SHIFT_ZERO_TO_CENTER);


IsSupportLocked (ISIS Control) example for C++Builder 4.0

if(LeadIsis1->IsSupportLocked(L_SUPPORT_OCR))
ShowMessage("OCR Support Locked");
else
ShowMessage("OCR Support is available");


Item (ImageList Control) example for C++ Builder

long nCount;

int index ;

LEADImgList1->SelectAll(False);
/*flip the 3rd item"s bitmap*/
LEADImage1->Bitmap = LEADImgList1->Item[2]->Bitmap;
LEADImage1->Flip();
LEADImgList1->Item[2] ->Bitmap = LEADImage1->Bitmap;
/*set the 4th and 6th items as selected*/
LEADImgList1->Item[3] ->Selected = True;
LEADImgList1->Item[5] ->Selected = True;

/*now, count the selected items*/
nCount = 0;

for (index = 0 ;index <= LEADImgList1->Count – 1; index++)
if( LEADImgList1->Item [index] ->Selected == True) nCount++;

ShowMessage(IntToStr(nCount) +" Items were selected!");


ItemBackgroundColor (ImageList Control) example for C++ Builder

LEADImgList1->ItemBackgroundColor = clRed;/*set to RED*/


ItemWidth (ImageList Control) example for C++ Builder

/*set item display options*/
LEADImgList1->ItemWidth = 150;
LEADImgList1->ItemHeight = 150;
LEADImgList1->ItemVerticalSpacing = 20;
LEADImgList1->ItemHorizontalSpacing = 20;
LEADImgList1->DisplayItemText = False;


J2KCompressionControl example for C++ Builder

{
//shows saving J2K lossless
// compress a lossless file
LEADImage1->J2KCompressionControl = J2K_COMPRESSION_LOSSLESS;
LEADImage1->Save ("c:\\temp\\lossless.j2k", FILE_J2K, 0, 0, SAVE_OVERWRITE);
}


J2KCompressionRatio example for C++ Builder

{
// compress a JPEG2000 file using 100:1 comp ratio
LEADImage1->J2KCompressionControl= J2K_COMPRESSION_RATIO;
LEADImage1->J2KCompressionRatio= 100;
LEADImage1->Save ("c:\\temp\\100_to_1.j2k", FILE_J2K, 0, 0, SAVE_OVERWRITE);
}


J2KSetDefaults example for C++ Builder

{
AnsiString msg;

LEADImage1->UnlockSupport (L_SUPPORT_J2K, L_KEY_J2K);

//Display all the default JPEG2000 advanced options
LEADImage1->J2KSetDefaults();

if (LEADImage1->J2KUseColorTransform)
msg = msg + "J2KUseColorTransform = True \n";
else
msg = msg + "J2KUseColorTransform = False\n";

if ( LEADImage1->J2KDerivedQuantization )
msg = msg + "J2KDerivedQuantization = True\n";
else
msg = msg + "J2KDerivedQuantization = False\n";

msg = msg + "J2KXOsiz = " + IntToStr(LEADImage1->J2KXOsiz) + "\n";
msg = msg + "J2KYOsiz = " + IntToStr(LEADImage1->J2KYOsiz) + "\n";
msg = msg + "J2KXTsiz = " + IntToStr(LEADImage1->J2KXTsiz) + "\n";
msg = msg + "J2KYTsiz = " + IntToStr(LEADImage1->J2KYTsiz) + "\n";
msg = msg + "J2KXTOsiz = " + IntToStr(LEADImage1->J2KXTOsiz) + "\n";
msg = msg + "J2KYTOsiz = " + IntToStr(LEADImage1->J2KYTOsiz) + "\n";

msg = msg + "J2KDecompLevel = " + IntToStr(LEADImage1->J2KDecompLevel) + "\n";
msg = msg + "J2KProgressOrder = " + IntToStr(LEADImage1->J2KProgressOrder) + "\n";
msg = msg + "J2KCodBlockWidth = " + IntToStr(LEADImage1->J2KCodBlockWidth) + "\n";
msg = msg + "J2KCodBlockHeight = " + IntToStr(LEADImage1->J2KCodBlockHeight) + "\n";

if ( LEADImage1->J2KCBS_SelectiveACBypass )

msg = msg + "J2KCBS_SelectiveACBypass = True\n";
else
msg = msg + "J2KCBS_SelectiveACBypass = False\n";

if ( LEADImage1->J2KCBS_ResetContextOnBoundaries )
msg = msg + "J2KCBS_ResetContextOnBoundaries = True\n";
else
msg = msg + "J2KCBS_ResetContextOnBoundaries = False\n";

if ( LEADImage1->J2KCBS_TerminationOnEachPass )
msg = msg + "J2KCBS_TerminationOnEachPass = True\n";
else
msg = msg + "J2KCBS_TerminationOnEachPass = False\n";

if ( LEADImage1->J2KCBS_VerticallyCausalContext )
msg = msg + "J2KCBS_VerticallyCausalContext = True\n";
else
msg = msg + "J2KCBS_VerticallyCausalContext = False\n";

if ( LEADImage1->J2KCBS_PredictableTermination )
msg = msg + "J2KCBS_PredictableTermination = True\n";
else
msg = msg + "J2KCBS_PredictableTermination = False\n";

if ( LEADImage1->J2KCBS_ErrorResilienceSymbol )
msg = msg + "J2KCBS_ErrorResilienceSymbol = True\n";
else
msg = msg + "J2KCBS_ErrorResilienceSymbol = False\n";

msg = msg + "J2KGuardBits = " + IntToStr(LEADImage1->J2KGuardBits) + "\n";
msg = msg + "J2KDerivedBaseMantissa = " + IntToStr(LEADImage1->J2KDerivedBaseMantissa) + "\n";
msg = msg + "J2KDerivedBaseExponent = " + IntToStr(LEADImage1->J2KDerivedBaseExponent) + "\n";

if ( LEADImage1->J2KUseSOPMarker )
msg = msg + "J2KUseSOPMarker = True\n";
else
msg = msg + "J2KUseSOPMarker = False\n";

if ( LEADImage1->J2KUseEPHMarker )
msg = msg + "J2KUseEPHMarker = True\n";
else
msg = msg + "J2KUseEPHMarker = False\n";

ShowMessage (msg);
}


J2KTargetFileSize example for C++ Builder

{
//shows saving J2K using TargetFilesize
// compress a 30K JPEG2000 file
LEADImage1->J2KCompressionControl= J2K_COMPRESSION_TARGETSIZE;
LEADImage1->J2KTargetFileSize= 30 * 1024;
LEADImage1->Save ("c:\\temp\\30k.j2k", FILE_J2K, 0, 0, SAVE_OVERWRITE);
}


J2KUseROI example for C++ Builder

void __fastcall TForm1::btnSaveUsingROIClickClick(TObject *Sender)
{
// Set the default settings for the J2K
LEADImage1->J2KSetDefaults ( ) ;
// Set our options
LEADImage1->J2KCompressionRatio = 1000;
LEADImage1->J2KCompressionControl = J2K_COMPRESSION_RATIO;
LEADImage1->J2KUseROI= true;
LEADImage1->J2KROIControl = J2K_USE_OPTION_RECT;
LEADImage1->J2KROIRect= Rect ( 200, 200, 400, 400 );
LEADImage1->J2KXTsiz = 100;
LEADImage1->J2KYTsiz = 100;
// Save the bitmap to disk
LEADImage1->Save ( "c:\\image1.j2k", FILE_J2K, 24, 2, SAVE_OVERWRITE ) ;
}


JBIG2SaveFlags example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nRet;

LEADImage1->JBIG2SaveFlags = FLAG_JBIG2_TPON;
LEADImage1->JBIG2TemplateType = 2;
LEADImage1->JBIG2GBATX1 = 3;
LEADImage1->JBIG2GBATY1 = -1;
LEADImage1->JBIG2GBATX2 = -3;
LEADImage1->JBIG2GBATY2 = -1;
LEADImage1->JBIG2GBATX3 = 2;
LEADImage1->JBIG2GBATY3 = -2;
LEADImage1->JBIG2GBATX4 = -2;
LEADImage1->JBIG2GBATY4 = -2;

nRet= LEADImage1->Save ("c:\\Output.jb2", FILE_JBIG2, 24, 2, SAVE_OVERWRITE);
if(nRet == SUCCESS)
ShowMessage("Saved Successfully");
else
ShowMessage("Error Saving: " + IntToStr(nRet));
}


LensFlare Example for C++ Builder

void __fastcall TForm1::LensFlareClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /4);
ptCenter.y= (int)(LEADImage1->BitmapHeight /4);
LEADImage1->LensFlare( ptCenter, 100, LNS_TYPE_1, RGB(100, 150, 10));
}


LevelLowBit example for C++ Builder

This is also the example for LevelHighBit.

This example sets LevelLowBit and LevelHighBit to display the image using only the eight least significant bits.

//Grayscale image to 12-bit
Lead1->GrayScale(12);
Lead1->AutoRepaint = False;
//use least significant 8 bits
Lead1->LevelLowBit = 0;
Lead1->LevelHighBit = 7;

Lead1->AutoRepaint = True;


LevelLUT example for C++ Builder

This is also the example for MinVal property and MaxVal property.

The following example sets LevelLowBit and LevelHighBit to use all bits, gets the minimum and maximum bits and intensity values for the image, and then sets the LUT so that pixels with values in the minimum range are mapped to the color RED, while pixels with values in the maximum range are mapped to BLUE.

long int min;
long int max;
long int i;

Lead1->AutoRepaint = False;
//use all bits
Lead1->LevelLowBit = 0;
Lead1->LevelHighBit = Lead1->BitmapBits - 1;

Lead1->GetMinMaxBits();
Lead1->GetMinMaxVal();
max = Lead1->MaxVal;
min = Lead1->MinVal;

//set LUT so that min range maps to RED and max range maps to BLUE
for (i = min; i <= min+100; i++)
Lead1->LevelLUT[i] = RGB(255, 0, 0);
for (i = max-100; i <= max; i++)
Lead1->LevelLUT[i] = RGB(0, 0, 255);

Lead1->AutoRepaint = True;


LevelLUTLength example for C++ Builder

This example writes out the number of entries in the LUT.

Edit1->Text = IntToStr(Lead1->LevelLUTLength);


Light Example for C++ Builder

int max(int value1, int value2)
{
return ( (value1 > value2) ? value1 : value2);
}

int min(int value1, int value2)
{
return ( (value1 < value2) ? value1 : value2);
}

void __fastcall TForm1::LightClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);

LEADImage1->Light( ptCenter, (int)(max(LEADImage1->BitmapHeight, LEADImage1->BitmapWidth)/2), (int)(min(LEADImage1->BitmapHeight, LEADImage1->BitmapWidth)/2), 0, 50, 0, RGB(255, 255, 255 100, LGT_SPOTLIGHT, 1, 100, 100, RGB(255,255,255) );
}


LightControl Example for C++ Builder

void __fastcall TForm1::LightControlClick(TObject *Sender)
{
L_UINT LowerAvr [3];
L_UINT Average [3];
L_UINT UpperAvr [3];

LowerAvr[0]= 100;/*for blue, gray or yuv*/
LowerAvr[1]= 120;/*for green*/
LowerAvr[2]= 80; /*for red*/

Average [0]= 150;/*for blue, gray or yuy*/
Average [1]= 140;/*for green*/
Average [2]= 128;/*for red*/

UpperAvr[0]= 190;/*for blue, gray or yuv*/
UpperAvr[1]= 200;/*for green*/
UpperAvr[2]= 220;/*for red*/

LEADImage1->LightControl( LowerAvr, Average, UpperAvr, RGB_SPACE );
}


LineProfile example for C++ Builder

LineProfile C++ Builder Example

void __fastcall TForm1::Button7Click(TObject *Sender)
{

L_PINT pRed= NULL;
L_PINT pGreen= NULL;
L_PINT pBlue= NULL;
TPoint FirstPoint, SecondPoint;

LEADImage1->LineProfile(FirstPoint, SecondPoint, pRed, pGreen, pBlue );

// … use the colors in the arrays here

// free the three buffers
GlobalFreePtr ( pRed );
GlobalFreePtr ( pGreen );
GlobalFreePtr ( pBlue );
}


LineRemove example for C++ Builder

void __fastcall TForm1::Button6Click(TObject *Sender)
{
int nRet;
//Line Remove
//This examples removes vertical lines that are at least 200 pixels in length
//and no more than 5 pixels in width
//The lines can have gaps up to two pixels in length
//The LineRemove Event is used to display information about each line removed
LEADImage1->DocCleanSuccess = SUCCESS_REMOVE;
nRet = LEADImage1->LineRemove(LINE_USE_GAP, 200, 5, 7, 1, 2, 0, LINEREMOVE_HORIZONTAL);
}

void __fastcall TForm1::LEADImage1LineRemove (TObject *Sender,
int nStartRow, int nStartCol, int nLength, L_HRGN hRgnLine)
{
AnsiString strTemp;
strTemp = "Line at " + IntToStr(nStartRow) + "," + IntToStr(nStartCol) +
" Length=" + IntToStr(nLength);
OutputDebugString(strTemp.c_str());
}


LoadDatabase example for C++ Builder

LEADImgList1->LoadDatabase ("c:\\temp\\image1.tif");


LoadFast example for C++ Builder

LoadFileTile example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADImage1->LoadFast= true;
LEADImage1->Load(“c:\\image1.abc”, 0, 0, -1);
}


LoadFileTile example for C++ Builder

LEADImage1->GetFileInfo("f:\\samples\\TestofMagGlass\\Testing.fpx", 1);
LEADImage1->LoadFileTile("f:\\samples\\TestofMagGlass\\Testing.fpx", 0, 1, 1, (int)(LEADImage1->InfoWidth/ 4), (int)(LEADImage1->InfoHeight/ 4), (int)(LEADImage1->InfoWidth / 2), (int)(LEADImage1->InfoHeight / 2));


LoadFromFile (ImageList Control) example for C++ Builder

/*Insert all pages from a multipage file*/
LEADImgList1->LoadFromFile ("d:\\temp\\img\\test1.tif", 0, 0, -1);
ShowMessage("Inserted " + IntToStr(LEADImgList1->Count) + " Items!");


LoadIFD example for C++ Builder

void __fastcall TForm1::LoadIfdClick(TObject *Sender)
{
// All examples will assume that "test.tif" has over 1002 images
// This example will load pages 1000 and 1001 after getting the information for page 1000:

LEADImage1->GetFileInfo("test.tif", 1000);
// Setting LoadIFD to InfoIFD indicates that 1000 is treated as page 1

LEADImage1->LoadIFD = LEADImage1->InfoIFD;
LEADImage1->Load ("test.tif", 0, 1, 2);
// Reset LoadIFD to 0 so other TIF files will be handled properly
LEADImage1->LoadIFD = 0;
}


LoadMarkers example for C++ Builder

void __fastcall TForm1::LoadMarkersClick(TObject *Sender)
{
LEADImage1->Load ( "e:\\image1.jpg", 0, 0, 1 );
LEADMarker1->MethodErrorsEnabled = true;
try
{
LEADMarker1->LoadMarkers ( "e:\\image11.jpg", 0 );
}
catch ( ... )
{
ShowMessage("File load failed\nError No " + IntToStr(LEADMarker1->Error) );
return;
}
LEADImage1->SetMarkers ( LEADMarker1, 0 );
LEADImage1->Save ( "e:\image2.jpg", FILE_EXIF_JPEG, 24, 2, 0 );
}


LoadMemory example for C++ Builder

This example uses Windows API calls to load a file into memory, then uses the LoadMemory method to load the memory-resident file into a bitmap.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
HGLOBAL hMem;
int hf, iSize;
void *lpMem=0;

// Load the file into memory.
hf = FileOpen("c:\\lead\\images\\image1.cmp", fmOpenRead);
if(hf == HFILE_ERROR)
{
MessageDlg("Error opening file!", mtError, TMsgDlgButtons() << mbOK, 0);
goto quit_loadmemory;
}
iSize = FileSeek(hf, 0, 2);
FileSeek(hf, 0, 0);
hMem = GlobalAlloc(GMEM_MOVEABLE, iSize);
if(hMem == 0)
{
FileClose(hf);
MessageDlg("Not enough memory to hold the file in memory!", mtError, TMsgDlgButtons() << mbOK, 0);
goto quit_loadmemory;
}
lpMem=GlobalLock(hMem);
if(!lpMem)
{
FileClose(hf);
GlobalFree(hMem);
MessageDlg("Not enough memory to hold the file in memory!", mtError, TMsgDlgButtons() << mbOK, 0);
goto quit_loadmemory;
}
if(FileRead(hf, lpMem, iSize) < iSize)
{
FileClose(hf);
GlobalUnlock(hMem);
GlobalFree(hMem);
MessageDlg("Error reading file!", mtError, TMsgDlgButtons() << mbOK, 0);
goto quit_loadmemory;
}
GlobalUnlock(hMem);
FileClose(hf);
//Load the bitmap from the memory-resident file.
if(Lead1->LoadMemory((int)hMem, 0, 0, iSize) != SUCCESS)
MessageDlg ("Error calling LoadMemory", mtError, TMsgDlgButtons() << mbOK, 0);
else
MessageDlg ("LoadMemory succeeded", mtInformation, TMsgDlgButtons() << mbOK, 0);
GlobalFree(hMem);
quit_loadmemory:
}


LoadMemoryTile example for C++ Builder

int TForm1::LoadMemoryTile(AnsiString szFilename, int nLeft, int nTop, int nWidth, int nHeight)
{
int nRet;
int iSize;
int hFileInMemory = 0;

// Check the passed parameter
if (szFilename == "")
{
return ERROR_INV_PARAMETER;
}
// Load a bitmap at its own bits per pixel
LEADImage1->Load(szFilename, 0, 1, 1);
// Save the image as a CMP file in memory
LEADImage1->SaveMemory(hFileInMemory, FILE_CMP, 24, 2, iSize);
// Free the temporary bitmap
LEADImage1->Bitmap = 0;
// Get the pointer to the memory-resident file
GlobalLock((HGLOBAL)hFileInMemory);
// Load the required bitmap tile
nRet= LEADImage1->LoadMemoryTile((L_HANDLE)hFileInMemory, 0, 1, 1, iSize, nLeft, nTop, nWidth, nHeight);
// Clean up
GlobalUnlock ((HGLOBAL)hFileInMemory);
GlobalFree ((HGLOBAL)hFileInMemory);
return nRet;
}


LoadResize example for C++ Builder

LEADImage1->LoadResize ("v:\\images\\image1.cmp", 80, 80, SIZE_RESAMPLE, 0);


LoadUseViewPerspective example for C++ Builder

Note:

This topic is for Document/Medical editions only.

This example times the loading of a bitmap with and without changing the internal view perspective.

void __fastcall TForm1::TestBtnClick(TObject *Sender)
{
/* Declare local variables */
TDateTime StartTime, DeltaTime;
Word Hour, Min, Sec, MSec;

/* Do not include paints when measuring time. */
Lead1->AutoRepaint = False;
/* Time the load using the bitmap"s view perspective. */
Lead1->LoadUseViewPerspective= True;
StartTime = Now();
Lead1->Load ("d:\\lead\\images\\rotated.tif", 0, 0, 1);
DeltaTime = Now() - StartTime;
DecodeTime(DeltaTime, Hour, Min, Sec, MSec);
ShowMessage("As is, rotated: " + IntToStr(Sec) + " seconds + " +IntToStr(MSec) + " milliseconds");
/* Time the load that converts the bitmap"s view perspective. */
Lead1->LoadUseViewPerspective = False;
StartTime = Now();
Lead1->Load ("d:\\lead\\images\\rotated.tif", 0, 0, 1);
DeltaTime = Now() - StartTime;
DecodeTime(DeltaTime, Hour, Min, Sec, MSec);
ShowMessage("Converted to top left: " + IntToStr(Sec) + " seconds + " +IntToStr(MSec) + " milliseconds");
}


LocalHistoEqualize Example for C++ Builder

void __fastcall TForm1::LocalHistoEqualizeClick(TObject *Sender)
{
LEADImage1->LocalHistoEqualize( 15, 15, 100, 100, YUV_SPACE, 2 );
}


MagGlassPaintContrast Example for C++ Builder

void __fastcall TForm1::btnStartMagnifyingGlassClick(TObject *Sender)
{
L_INT nStatus;

// Setting the Magnifying Glass Paint contrast, gamma and intensity
LEADImage1->MagGlassPaintContrast= LEADImage1->MagGlassPaintContrast + 100;
LEADImage1->MagGlassPaintGamma = LEADImage1->MagGlassPaintGamma + 100;
LEADImage1->MagGlassPaintIntensity = LEADImage1->MagGlassPaintIntensity + 100;

// Starting the Magnifying Glass
nStatus= LEADImage1->StartMagGlass(100, 100, 400, (TColor)RGB(255, 0, 0), (TColor)RGB(128, 128, 128), False, 1, False, CROSSHAIR_FINE, True, True);

if ( nStatus != SUCCESS )
ShowMessage ( "Error Starting the Magnifying Glass, Error: " + IntToStr(nStatus) );
}


MagGlassPointer example for C++ Builder

This example shows how to add custom cursors to an application. It assumes that a custom cursor with the name NewCursor has been added to the resources (.RC file) of the application.

const crNewCursor = 10;

void __fastcall TForm1::FormCreate(TObject *Sender)
{
Screen->Cursors[crNewCursor] = LoadCursor(HInstance, 'NewCursor');
LeadImage1->MagGlassPointer = crNewCursor;
}


MathFunction Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* This example loads a bitmap and applies a Log method over the loaded image. */

/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/* Apply Log method to this bitmap */
LEADImage1->MathFunction(MF_LOG, 100);
}


MaxFilter example for C++ Builder

Note:

This topic is for Document/Medical editions only.

This example erodes dark objects and repaints the image.

Lead1->MaxFilter(3);
Lead1->ForceRepaint();


Median example for C++ Builder

This example applies a median filter with a 3x3 neighborhood and redisplays the bitmap.

Lead1->Median(3);
Lead1->ForceRepaint();


MinFilter example for C++ Builder

Note:

This topic is for Document/Medical editions only.

This example dilates dark objects and repaints the image.

Lead1->MinFilter(3);
Lead1->ForceRepaint();


Mosaic example for C++ Builder

This example applies a mosaic effect with 8x8 tiles and redisplays the bitmap.

Lead1->Mosaic(8);
Lead1->ForceRepaint();


MotionBlur example for C++ Builder

LEADImage1->MotionBlur4500, False);


Multiply Example for C++ Builder

void __fastcall TForm1::MultiplyClick(TObject *Sender)
{
LEADImage1->Multiply( 151 );
}


MultiScaleEnhancement Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

// Apply multiscale enhancement
LEADImage1->MultiScaleEnhancement( 2000, 3, MSE_DEFAULT, 5, 0, MSE_GAUSSIAN + MSE_EDGEENH);
}


Ocean Example for C++ Builder

void __fastcall TForm1::OceanClick(TObject *Sender)
{
LEADImage1->Ocean( 20, 6, false );
}


OCXBitmap example for C++ Builder

long lRet;
// assign the bitmap for OCR
LEADOCR1->Bitmap = LeadImage1->OCXBitmap;
lRet = LEADOCR1->RecognizeOCR(OCRFLAG_CALLBACK_AUTO);
Screen->Cursor = crDefault;
if(lRet != 0)
{
MessageBox(NULL, "Error during recognition", "Error", MB_OK);
LEADOCR1->ClearDoc(); // clear the document
}


Oilify example for C++ Builder

This example applies an oil-painting effect and repaints the image.

Screen->Cursor = crHourGlass;
Lead1->Oilify(10);
Lead1->ForceRepaint();
Screen->Cursor = crDefault;


OnAnimate Event Example for C++ Builder

This example shows how the OnAnimate event can be used to toggle the use of a button to start and stop the animation.

procedure TForm1.Lead1Animate(Sender: TObject; bEnable: Wordbool);
{
if( bEnable == True)
Button1->Caption = "Stop Animation" ;
else
Button1->Caption = "Start Animation";
}
procedure TForm1.Button1Click(Sender: TObject);
{
if( Lead1->AnimationEnable == True)
Lead1->AnimationEnable = False;
else
Lead1->AnimationEnable = True;
}


OnAnnChange Example for C++ Builder

OnAnnChange Event Example for C++ Builder

//This example tests the OnAnnChange event.
void __fastcall TForm1::LEADAnn1AnnChange (L_HANDLE hObject)
{
AnsiString Msg;

Msg= " This is a change for the button tagged " + IntToStr(LEADAnn1->AnnGetTag (hObject));
ShowMessage ( Msg ) ;
}


OnAnnEnumerate example for C++ Builder

//This example is also for:
// AnnEnumerate method

//This event is fired for each annotation
//Displays the handle for each annotation
void __fastcall TForm1::LEADAnn1AnnEnumerate (L_HANDLE hObject)
{
AnsiString Msg;

Msg= "hObject: " + IntToStr (LEADAnn1->AnnGetTag (hObject));
ShowMessage (Msg);
}

//Load image and annotation file and then enumerate all the annotations
void __fastcall TForm1::Button1Click(TObject *Sender)
{
LEADAnn1->Load ("D:\\pictures\\Test.cmp", 0, 0, 1);
LEADAnn1->AnnLoad ("D:\\pictures\\Test.ann", 0);
LEADAnn1->AnnUserMode = ANNUSERMODE_RUN;
LEADAnn1->AnnEnumerate (LEADAnn1->AnnContainer,
ANNFLAG_RECURSE + ANNFLAG_NOTTHIS, NULL);

}


OnAnnLocked example for C++ Builder

//The following is an example of an OnAnnLocked event.
void __fastcall TForm1::LEADAnn1AnnLocked (L_HANDLE hObject)
{
AnsiString Msg;

Msg= "AnnObject: " + IntToStr(hObject) + " was locked!";
ShowMessage ( Msg );
}


OnAnnMenu example for C++ Builder

// This Example is for also for:
// Count Property, ItemString Property, ItemID Property, ItemType Property,
// ItemChecked Property, ItemEnabled Property, DeleteItem method,
// AddItem method, GetSubMenu method, OnAnnUserMenu event
void __fastcall TForm1::LEADAnn1AnnMenu(TAnnMenu *AnnMenu)
{
int nID;
int x;
TAnnMenu * PopupMenuItem;
AnsiString Msg;

Msg= "There are " + IntToStr (AnnMenu->Count) + " Items";
ShowMessage (Msg);

Msg= "Original Text for item#2: " + AnnMenu->ItemString [1];
ShowMessage (Msg);
//set new string
AnnMenu->ItemString [1]= "TestText";
Msg= "Custom Text for item#2: " + AnnMenu->ItemString [1];
ShowMessage (Msg);

//make 3rd and 4th menu items have the same command id
nID= AnnMenu->ItemID[3];
AnnMenu->ItemID [2]= nID;

//check all unchecked menu items that are not popup submenus
//disable all enabled menu items that are not popup submenus
for (x= 0; x < AnnMenu->Count - 1; x ++ )
{
if ( AnnMenu->ItemType[x] == ANNMENUITEMTYPE_NORMAL )
{
if (AnnMenu->ItemChecked [x] == false)
AnnMenu->ItemChecked [x]= true;
if (AnnMenu->ItemEnabled[x]== true)
AnnMenu->ItemEnabled [x]= false;
}
}

//insert 2 user-defined menu items
AnnMenu->AddItem ("&Flip", ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST, AnnMenu->Count);
AnnMenu->AddItem ("Test&2", ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST + 1, AnnMenu->Count);

//delete the last menu item
AnnMenu->DeleteItem (AnnMenu->Count - 1);
//delete the first menu item
AnnMenu->DeleteItem (0);

//insert a popup menu
AnnMenu->AddItem ("&Popup1", ANNMENUITEMTYPE_SUBMENU, 0, AnnMenu->Count);
//get the new item, and add some items to it
PopupMenuItem= AnnMenu->GetSubMenu(AnnMenu->Count - 1);
PopupMenuItem->AddItem ("Test&1", ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST + 2, PopupMenuItem->Count);
PopupMenuItem->AddItem ("Test&2", ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST + 3, PopupMenuItem->Count);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::LEADAnn1AnnUserMenu (int nID)
{
AnsiString Msg;
if (nID == LTANNEVENT_MENUFIRST)
LEADAnn1->AnnFlip (false, 0, true);
else
{
Msg= "nID = LTANNEVENT_MENUFIRST + " + IntToStr (nID - LTANNEVENT_MENUFIRST);
ShowMessage (Msg);
}
}


OnAnnMouseDown example for C++ Builder

// This example is also for:
// AnnAddUndoNode method, AnnCreate method, AnnDefine method,
// AnnSetAutoDefaults method
// AnnSetSelected method
// SetMousePos method
// OnAnnMouseMove event
// OnAnnMouseUp event

long x0, y0;
L_HANDLE hRectObject, hEllipseObject;
.
.
.
void __fastcall TForm1::LEADAnn1AnnMouseDown (int Button, int Shift, int x,
int y)
{
x0= x;
y0= y;

switch (LEADAnn1->AnnTool)
{
case ANNTOOL_USER_FIRST:
{
//create the objects
LEADAnn1->AnnSetSelected (LEADAnn1->AnnContainer, False, True);
LEADAnn1->AnnAddUndoNode ();
hRectObject= LEADAnn1->AnnCreate (ANNOBJECT_RECT, True, True);
hEllipseObject= LEADAnn1->AnnCreate (ANNOBJECT_ELLIPSE, True, True);
// set the automation defaults to the objects newly created
LEADAnn1->AnnSetAutoDefaults (hRectObject, 0);
LEADAnn1->AnnSetAutoDefaults (hEllipseObject, 0);
//start defining them from the x, y coordinate
LEADAnn1->AnnDefine (hRectObject, x, y, ANNDEFINE_BEGINSET);
LEADAnn1->AnnDefine (hEllipseObject, x, y, ANNDEFINE_BEGINSET);
}
}
}
//---------------------------------------------------------------------------

void __fastcall TForm1::LEADAnn1AnnMouseMove (int Button, int Shift,
int x, int y)
{
if ( Button == 1 )
{
switch ( LEADAnn1->AnnTool )
{
case ANNTOOL_USER_FIRST:
{
//update the objects from the x, y coordinate
LEADAnn1->AnnDefine (hRectObject, x, y, ANNDEFINE_UPDATE);
LEADAnn1->AnnDefine (hEllipseObject, x, y, ANNDEFINE_UPDATE);
}
break;

case ANNTOOL_RECT:
{
AdjustMousePos (Shift, x, y);
}
break;

case ANNTOOL_ELLIPSE:
{
AdjustMousePos (Shift, x, y);
}
break;

}
}
}
//---------------------------------------------------------------------------

void __fastcall TForm1::LEADAnn1AnnMouseUp (int Button, int Shift,
int x, int y)
{
switch (LEADAnn1->AnnTool)
{

case ANNTOOL_USER_FIRST:
{
LEADAnn1->AnnDefine (hRectObject, x, y, ANNDEFINE_END);
LEADAnn1->AnnDefine (hEllipseObject, x, y, ANNDEFINE_END);
LEADAnn1->AnnSetSelected (hRectObject, true, false);
LEADAnn1->AnnSetSelected (hEllipseObject, true, false);
LEADAnn1->AnnGroup (LEADAnn1->AnnContainer, ANNFLAG_RECURSE + ANNFLAG_SELECTED, NULL);
hEllipseObject= 0;
hRectObject= 0;
}
break;

case ANNTOOL_RECT:
{
AdjustMousePos (Shift, x, y);
}
break;

case ANNTOOL_ELLIPSE:
{
AdjustMousePos (Shift, x, y);
}
break;
}
}
//---------------------------------------------------------------------------
void TForm1::AdjustMousePos(int Shift, long x, long y)
{
long dx, dy;

//if shift key is down, draw rectangles or circles
if ( Shift == 1 )
{
//if shift key is down, force the creation of squares
dx= abs(x - x0);
dy= abs(y - y0);
if (dx > dy)
{
// adjust y to be as far from y0 as x is from x0
if ( y > y0)
y = y0 + dx;
else
y = y0 - dx;
}
else
{
//adjust x to be as far from x0 as y is from y0
if ( x > x0 )
x= x0 + dy;
else
x= x0 - dy;
}
// set the mouse cursor and update its position
LEADAnn1->SetMousePos (x, y, False);
}
}


OnAnnSelect example for C++ Builder

// This example for the OnAnnSelect event displays a message box showing the number
// of selected annotation objects. It then goes through the array of selected objects
// to see if any of them are polygons.
void __fastcall TForm1::LEADAnn1AnnSelect (L_PHANDLE phObjects, int iCount)
{
int nType;
int x;
bool bSelected;

bSelected= False;
ShowMessage (IntToStr (iCount) + " objects were selected");
for ( x= 1; x <= iCount; x ++ )
{
nType= LEADAnn1->AnnGetType (LEADAnn1->AnnGetItemHandle ( phObjects, x - 1));
if ( nType == ANNOBJECT_POLYGON )
bSelected= True;
}
if ( !bSelected)
ShowMessage ("No Polygon Objects were selected");
}


OnAnnToolChecked Example for C++ Builder

void __fastcall TForm1::LEADAnn1AnnToolChecked (int iTool)
{
AnsiString TestString;

switch (iTool)
{
case ANNTOOL_SELECT:
{
TestString= "Selection pointer tool";
}
break;

case ANNTOOL_LINE:
{
TestString= "Line tool";
}
break;

case ANNTOOL_RECT:
{
TestString= "Rectangle tool";
}
break;
case ANNTOOL_ELLIPSE:
{
TestString= "Ellipse tool";
}
break;

//.
//.
//.
default:
TestString= "User defined tool";
}
ShowMessage ( TestString );
}


OnAnnToolDestroy Example for C++ Builder

void __fastcall TForm1::LEADAnn1AnnToolDestroy ()
{
ShowMessage ("You have closed the toolbar.");
}


OnAnnUnlocked Example for C++ Builder

The following is an example of an OnAnnUnlocked event.
void __fastcall TForm1::LEADAnn1 AnnUnlocked (L_HANDLE hObject)
{
ShowMessage ("AnnObject: " + IntToStr (hObject) + " was unlocked!");
}


OnBitmapDataPathClosed example for C++ Builder

bool gBtmpClosed; // Global Variable
void __fastcall TForm1::LEADImage1BitmapDataPathClosed ()
{
gBtmpClosed= false;
ShowMessage ( "Closed" ) ;
}

void __fastcall TForm1::Button1Click(TObject *Sender)
{
gBtmpClosed= true;
LEADImage1->BitmapDataPath = "http://www.leadtools.com/Home2/vertmkts/images/v13web.jpg";
while ( gBtmpClosed )
Application->ProcessMessages ( ) ;

LEADImage1->BitmapDataPath= "http://www.leadtools.com/images/end-user.jpg";
}


OnChange example for C++ Builder

Typically, you would use this event to flag changed image data and prompt the user to save the changes before closing a window or exiting an application. That use of the event cannot be tested properly without writing a complete application; so this example just shows you a simple test of the event.

void __fastcall TForm1::Lead1Change (TObject *Sender)
{
ShowMessage("Image data has changed");
}


OnEnumerateMarkers example for C++ Builder

void __fastcall TForm1::EnumMarkersClick(TObject *Sender)
{
LEADMarker1->LoadMarkers ( "e:\\image1.jpg", 0 );
LEADMarker1->EnumMarkers ( );
}

void __fastcall TForm1::LEADMarker1EnumerateMarkers(DWORD uType,
DWORD uElementCount)
{
int i;
ShowMessage ( "Marker Type= " + IntToStr(uType) + "\n" +
"Marker Element Count= " + IntToStr(uElementCount) );
for (i= 0; i<uElementCount; i ++)
{
LEADMarker1->Element[i];
}
}


OnFilePage Event Example for C++ Builder

This example shows how the OnFilePage event can be used to size and position a lead control when an image is loaded.

void __fastcall TForm1::Lead1FilePage(TObject *Sender)
{
int HeightFactor, WidthFactor, /*Factors for aspect ratio */
HeightAllowed, WidthAllowed, /*Maximum width and height */
nWidth, nHeight, nLeft, nTop; /* control dimensions */
RECT rcWindow;

/* Set the variables used for preserving the aspect ratio. */
/* Allow for a border of 1/8 of the form size. */
HeightFactor = Lead1->InfoHeight;
WidthFactor = Lead1->InfoWidth;
HeightAllowed = (ClientHeight * 3) / 4;
WidthAllowed = (ClientWidth * 3) / 4;

/* Center the LEAD control on the form, preserving the aspect ratio. */
/* Check to see if using the maximum width will make the image too tall. */
/* Set the dimensions based on the result. */

if((((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed))
{
nLeft = ClientWidth / 8;
nWidth = WidthAllowed;
nHeight = (nWidth * HeightFactor) / WidthFactor;
nTop = (ClientHeight - nHeight) / 2;
}
else
{
nTop = ClientHeight / 8;
nHeight = HeightAllowed;
nWidth = (nHeight * WidthFactor) / HeightFactor;
nLeft = (ClientWidth - nWidth) / 2;
}
rcWindow=Rect(0, 0, nWidth, nHeight);
OffsetRect(&rcWindow, nLeft, nTop);
Lead1->Left=rcWindow.left;
Lead1->Top=rcWindow.top;
Lead1->Height=rcWindow.bottom - rcWindow.top;
Lead1->Width=rcWindow.right - rcWindow.left;
/* Turn off scroll bars to make sure we use the full client area. */
Lead1->AutoScroll=False;
/* Set the image display size to match the LEAD control */
Lead1->SetDstRect(0, 0,Lead1->Width, Lead1->Height);
Lead1->SetDstClipRect(0, 0, Lead1->Width, Lead1->Height);
Lead1->ForceRepaint();
}


OnItemSelected (ImageList Control) example for C++ Builder

void __fastcall TForm1::LEADImgList1ItemSelected (TObject *Sender,

int nIndex)

{

ShowMessage(LEADImgList1->Item[nIndex]->Text + " was selected!");

}


OnLoadInfo... example for C++ Builder

Take the following steps to exercise the OnLoadInfo event and LoadInfo... properties. The example creates a raw FAX file, then loads the file it just created. (Getting format information from an unfamiliar file is beyond the scope of this example.)

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declarations to the private section of the Unit1 header file. In online help, you can copy the block of code and paste it into your application.

//Declare variables for demonstrating raw FAX.
int MyInfoBits;
int MyInfoFlags;
int MyInfoFormat;
int MyInfoHeight;
long MyInfoOffset;
int MyInfoWidth;
int MyInfoXRes;
int MyInfoYRes;

3.

Add a CommandButton control and code its click procedure as follows:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*Make the image look OK as a 1-bit image.*/
Lead1->Size(Lead1->Width, Lead1->Height, SIZE_RESAMPLE);
Lead1->Halftone(HT_VIEW, 45);
/*Set the form-level variables to the values we will use when loading.*/
MyInfoBits = 1;
MyInfoFlags = LOADINFO_TOPLEFT;
MyInfoFormat = FILE_FAX_G3_2D;
MyInfoHeight = Lead1->BitmapHeight;
MyInfoOffset = 0;
MyInfoWidth = Lead1->BitmapWidth;
MyInfoXRes = Lead1->BitmapXRes;
MyInfoYRes = Lead1->BitmapYRes;
/*Save the image as raw FAX;) load the saved file.*/
/*Format information will be supplied in the OnLoadInfo event.*/
Lead1->Save("C:\\lead\\IMAGES\\TMP.Tif(", FILE_FAX_G3_2D, 1, 1, SAVE_OVERWRITE);
Lead1->Load("C:\\lead\\IMAGES\\TMP.Tif(", 0, 0, 1);
/*Repaint the newly loaded image.*/
Lead1->ForceRepaint();
}

4.

Code the Lead1 control's OnLoadInfo event as follows:

void __fastcall TForm1::Lead1LoadInfo(TObject *Sender)
{
/*Use the form-level variables to supply format information.*/
Lead1->LoadInfoBits = MyInfoBits;
Lead1->LoadInfoFlags = MyInfoFlags;
Lead1->LoadInfoFormat = MyInfoFormat;
Lead1->LoadInfoHeight = MyInfoHeight;
Lead1->LoadInfoOffset = MyInfoOffset;
Lead1->LoadInfoWidth = MyInfoWidth;
Lead1->LoadInfoXRes = MyInfoXRes;
Lead1->LoadInfoYRes = MyInfoYRes;
}

5.

Run your program to test it.


OnOLECompleteDrag (ImageList Control) example for C++ Builder

This example is to be used with the EnableOLEDragMethod (ImageList Control) example.

void __fastcall TForm1::LEADImgList2OLECompleteDrag(TMouseButton Button, TShiftState Shift, int X, int Y)
{
AnsiString str;

str= "LEADImgList2: OLE Complete Drag at pos X = " + IntToStr (X) + " and pos Y = " + IntToStr (Y);
ShowMessage ( str );
}

void __fastcall TForm1::LEADImgList1OLEDragOver(TMouseButton Button, TShiftState Shift, int X, int Y)
{
AnsiString str;
str= "LEADImgList1: OLE Drag Over at pos X = " + IntToStr (X) + " and pos Y = " + IntToStr (Y);
ShowMessage ( str );
}

void __fastcall TForm1::LEADImgList1OLEStartDrag(TMouseButton Button, TShiftState Shift, int X, int Y)
{
AnsiString str;

str = "LEADImgList1: OLE Start Drag at pos X = " + IntToStr(X) + " and pos Y = " + IntToStr (Y);
ShowMessage ( str );
}


OnOLECompleteDrag (Main Control) example for C++ Builder

This example is to be used with the EnableOLEDragMethod (Main Control) example.

void __fastcall TForm1::LEADImage2OLECompleteDrag(TMouseButton Button, TShiftState Shift, int X, int Y)
{
AnsiString str;

str= " LEADImage2: OLE Complete Drag at pos X = " + IntToStr (X) + " and pos Y = " + IntToStr (Y);
ShowMessage ( str );
}

void __fastcall TForm1::LEADImage1OLEDragOver(TMouseButton Button, TShiftState Shift, int X, int Y)
{
AnsiString str;
str= " LEADImage1: OLE Drag Over at pos X = " + IntToStr (X) + " and pos Y = " + IntToStr (Y);
ShowMessage ( str );
}

void __fastcall TForm1::LEADImage1OLEStartDrag(TMouseButton Button, TShiftState Shift, int X, int Y)
{
AnsiString str;

str = " LEADImage1: OLE Start Drag at pos X = " + IntToStr(X) + " and pos Y = " + IntToStr (Y);
ShowMessage ( str );
}


OnPaint event example for C++ Builder

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following line to Unit1.h:

#include <stdlib.h>

3.

Add the following declarations to the private section of the Unit1.h file:

RECT MyRect; /*Used with the OnPaint event example*/
POINT MyPoint; /*Used with the OnPaint event example*/

4. | Add a button to the top of your main form, and in the Object Inspector box, change both its name and caption to Toggle.
5. | Add an edit box to the top of your form, and in the Object Inspector box, change its name to Directions, and change its Text property to the following:

Use the Toggle button to turn on or turn off Click-Splat

6.

Code the Toggle button's Click procedure as follows. This code uses the Enabled property to toggle the LEAD control's ability to respond to click events.

void __fastcall TForm1::ToggleClick(TObject *Sender)
{
if(!Lead1->Enabled)
{
Lead1->Enabled = True;
Directions->Text = "Click on the image for a splat";
Toggle->Caption = "Disable";
}
else
{
Lead1->Enabled = False;
Directions->Text = "Click does nothing";
Toggle->Caption = "Enable";
}
}

7.

Code the LEAD control's Click procedure as follows. When the Enabled property is true, this code uses a Windows API call to generate an OnPaint event.

void __fastcall TForm1::Lead1Click(TObject *Sender)
{
THandle hCtl;

/*Do not use this event until the user enables it.*/
if (Toggle->Caption != "Disable")
return ;
/* Use InvalidateRect to generate a paint message*/
MyRect.left = 0;
MyRect.top = 0;
MyRect.bottom = Lead1->Height;
MyRect.right = Lead1->Width;

hCtl = (THandle)Lead1->Handle;
InvalidateRect((HWND)hCtl, &MyRect, TRUE);
}

8.

Code the LEAD control's Paint procedure as follows. The procedure uses Windows GDI functions to draw random lines on the control whenever there is an OnPaint event.

void __fastcall TForm1::Lead1Paint (TObject *Sender)
{
int i, xStart, yStart, xDelta, yDelta, xEnd, yEnd ;
HDC LeadClientDC;

/*Do not use this event until the user enables it.*/
if( Toggle->Caption != "Disable")
return;
MyPoint.x = 0;
MyPoint.y = 0;
/* Create a device context for the control that the GDI functions can access*/
LeadClientDC = (HDC)Lead1->GetClientDC();
/* Draw random lines on the control. This is an overlay that does not affect the bitmap.*/
xStart = random(Lead1->Width + 1);
yStart = random(Lead1->Height + 1);
MoveToEx(LeadClientDC, xStart, yStart, &MyPoint);
for (i=1; i<=50; i++)
{
xDelta = random(81) - 40;
yDelta = random(81) - 40;
xEnd = xStart + xDelta;
yEnd = yStart + yDelta;
LineTo(LeadClientDC, xEnd, yEnd);
MoveToEx(LeadClientDC, xStart, yStart, &MyPoint);
}

/* Remove the lock from the device control*/
Lead1->ReleaseClientDC();
}

9.

Run your program to test it.


OnRgnChange example for C++ Builder

void __fastcall TForm1::Lead1RgnChange(TObject *Sender)
{
/* Declare a local variable. */
AnsiString MyText;

MyText = "Number of pixels in region: " + IntToStr(Lead1
 >GetRgnArea());
Edit1->Text = MyText;
}


OnScroll event example for C++ Builder

Before using this example you must add an Edit control to your form. Then, you can exercise this example by coding a command button that loads an image with the AutoScroll property set to True.

void __fastcall TForm1::Lead1Scroll(TObject *Sender, short sCode, int sPos, int sInc)

{

Edit1->Text = "Image origin: " + IntToStr((int)Lead1->DstLeft) +',' + IntToStr((int)Lead1->DstTop);

}


OnZoomInDone example for C++ Builder

This example triggers the OnZoomInDone event and displays a message that the ZoomIn image has been captured.

void __fastcall TForm1::Lead1ZoomInDone(TObject *Sender, int x, int y)
{
char msg[256] ;

memset(&msg,0,sizeof(msg)) ;
sprintf(msg,"ZoomIn Captured: %d, %d",x,y);
ShowMessage(msg);
}


OwnerDrawItem event example for C++ Builder

void __fastcall TForm1::LEADImgList1OwnerDrawItemEvent(int nIndex, HDC h_DC,
int ItemLeft, int ItemTop, int ItemRight, int ItemBottom,
int ItemBackLeft, int ItemBackTop, int ItemBackRight,
int ItemBackBottom)
{
//use Windows GDI to custom paint the items

AnsiString szText;
szText = LEADImgList1->Item[nIndex]->Text;

Ellipse((HDC)h_DC, ItemLeft, ItemTop, ItemRight, ItemBottom);
TextOut((HDC)h_DC, ItemLeft, ItemTop, szText.c_str(), strlen( szText.c_str()));
}


OwnerDrawItems example for C++ Builder

//toggle OwnerDraw
LEADImgList1->OwnerDrawItems = ! LEADImgList1->OwnerDrawItems;


PageCount (ImageList Control) example for C++ Builder

Write OnScroll event handler as follows:

void __fastcall TForm1::LEADImgList1Scroll(TObject *Sender)

{
ShowMessage("Page: " + IntToStr(LEADImgList1->CurrentPage) + " of " +
IntToStr(LEADImgList1->PageCount));
}


PaintContrast example for C++ Builder

This example increases the contrast for painting images.

Lead1->PaintContrast = Lead1->PaintContrast + 100;
Lead1->ForceRepaint();


PaintDither (ImageList Control) example for C++ Builder

/*set the control to use error diffusion*/
LEADImgList1->PaintDither = pdDiffusion;


PaintDither example for C++ Builder

This example turns on error diffusion and redisplays the bitmap.

Lead1->PaintDither = pdDiffusion;
Lead1->ForceRepaint();


PaintEffect example for C++ Builder

The following modules use the KeyDown and KeyUp events to repaint the image with effects:

procedure TForm1->Lead1KeyDown (Sender: TObject; var Key: Word; Shift: TShiftState);
{

if (Key == 116) //Code for F5
{
Lead1->AutoRepaint = False;
Lead1->BackErase = True;
Lead1->EffectGrain = 20;
Lead1->EffectDelay = 50;
Lead1->WandSize = 5;
Lead1->WandColor = RGB(255,255,0); //Yellow Wand
Lead1->PaintEffect = EFX_EFFECT_WIPE_L_TO_R;
Lead1->ForceRepaint();
}
}

procedure TForm1->Lead1KeyUp (Sender: TObject; var Key: Word; Shift: TShiftState);
{

if (Key == 116) //Code for F5
{
Lead1->PaintEffect = EFX_EFFECT_WIPE_R_TO_L;
Lead1->ForceRepaint();
Lead1->PaintEffect = EFX_EFFECT_NONE;
}
}


PaintGamma example for C++ Builder

This example increases the gamma correction for painting images.

Lead1->PaintGamma = Lead1->PaintGamma + 100;
Lead1->ForceRepaint();


PaintIntensity example for C++ Builder

This example increases the intensity for painting images.

Lead1->PaintIntensity = Lead1->PaintIntensity + 100;
Lead1->ForceRepaint();


PaintMaxPasses example for C++ Builder

This example includes two procedures. First, a button click starts a multi-pass paint effect; then LEAD's OnPaintNotify event changes the direction of the effect on each pass.

void __fastcall TForm1::PaintPassesClick(TObject *Sender)
{
Lead1->AutoRepaint = False;
/*Set the effect*/
Lead1->PaintEffect = EFX_EFFECT_WIPE_L_TO_R;
Lead1->PaintMaxPasses = 5; /*5 total passes*/
Lead1->PaintPass = 1; /*Start with pass number 1*/
Lead1->PaintNotificationDelay = 200; /*Delay 200 milliseconds between passes*/
Lead1->EffectDelay = 10;
Lead1->Load("c:\\lead\\images\\image1.cmp", 0, 0, 1); /*load the image*/
Lead1->AutoRepaint = True;
}

void __fastcall TForm1::Lead1PaintNotify (TObject *Sender, DWORD uPass, DWORD uType)
{
/*if the first pass is complete, toggle the effect from left_to_right to right_to_left */
if((uType == EFX_NOTIFY_IMAGE) && (uPass > 0))
if(Lead1->PaintEffect == EFX_EFFECT_WIPE_L_TO_R)
Lead1->PaintEffect = EFX_EFFECT_WIPE_R_TO_L;
else
Lead1->PaintEffect = EFX_EFFECT_WIPE_L_TO_R;
}


PaintPalette example for C++ Builder

This example sets the paint palette to the palette of each Lead control. It then loads two images and dithers them to 8 bits per pixel with optimized palettes, and displays them side by side. In 8-bit display mode, you can see the palette problems that result when you do not use a fixed palette.

void __fastcall TForm1::Button3Click(TObject *Sender)
{
int HeightFactor1, WidthFactor1,
HeightFactor2, WidthFactor2,
HeightAllowed, WidthAllowed;
//Let the controls use the bitmaps' own palettes.
Lead1->PaintPalette = ppAuto;
Lead2->PaintPalette = ppAuto;
//Disable automatic repainting of the image.
Lead1->AutoRepaint = False;
Lead2->AutoRepaint = False;
//Turn off scroll bars to make sure we use the full client area.
Lead1->AutoScroll = False;
Lead2->AutoScroll = False;
//Clear the bitmaps from memory
Lead1->Bitmap = 0;
Lead2->Bitmap = 0;
Screen->Cursor = crHourGlass;
//Load the bitmaps. These hard-coded path names may be different on your system.
Lead1->Load("C:\\lead\\IMAGES\\IMAGE1.CMP", 0, 0, 1);
Lead2->Load("C:\\lead\\IMAGES\\IMAGE2.CMP", 0, 0, 1);
//Change the bitmaps to 8 BPS with optimized palettes
Lead1->ColorRes(8, CRF_OPTIMIZEDPALETTE, CRF_FLOYDSTEINDITHERING, 0);
Lead2->ColorRes(8, CRF_OPTIMIZEDPALETTE, CRF_FLOYDSTEINDITHERING, 0);
//Make the controls visible so that we can size and position them.
//They will not really appear until we load an image and paint it.
Lead1->Visible = True;
Lead2->Visible = True;
//Set the variables used for preserving the aspect ratio.
HeightFactor1 = Lead1->BitmapHeight;
WidthFactor1 = Lead1->BitmapWidth;
HeightFactor2 = Lead2->BitmapHeight;
WidthFactor2 = Lead2->BitmapWidth;
HeightAllowed = (ClientHeight * 8) / 10;
WidthAllowed = (ClientWidth * 45) / 100;
//Center each LEAD control on half of the form, preserving the aspect ratio.
//Check to see if using the maximum width will make the image too tall.
//Set the dimensions based on the result.
if ((WidthAllowed * HeightFactor1) / WidthFactor1 < HeightAllowed)
{
Lead1->Left =  (ClientWidth / 4) - (WidthAllowed / 2);
Lead1->Width = WidthAllowed;
Lead1->Height = (Lead1->Width * HeightFactor1) / WidthFactor1;
Lead1->Top = (ClientHeight - Lead1->Height) / 2;
}
else
{
Lead1->Top = (ClientHeight - HeightAllowed) / 2;
Lead1->Height = HeightAllowed;
Lead1->Width = (Lead1->Height * WidthFactor1) / HeightFactor1;
Lead1->Left = (ClientWidth / 4) - (Lead1->Width / 2);
}

if ((WidthAllowed * HeightFactor2) / WidthFactor2 < HeightAllowed)
{
Lead2->Left = (ClientWidth * 3/4) - (WidthAllowed / 2);
Lead2->Width = WidthAllowed;
Lead2->Height = (Lead2->Width * HeightFactor2) / WidthFactor2;
Lead2->Top = (ClientHeight - Lead2->Height) / 2;
}
else
{
Lead2->Top = (ClientHeight - HeightAllowed) / 2;
Lead2->Height = HeightAllowed;
Lead2->Width = (Lead2->Height * WidthFactor2) / HeightFactor2;
Lead2->Left = (ClientWidth * 3 / 4) - (Lead2->Width / 2);
}

//Set the image display sizes to match the LEAD controls
Lead1->SetDstRect(0, 0, Lead1->BitmapWidth, Lead1->BitmapHeight);
Lead1->SetDstClipRect(0, 0, Lead1->BitmapWidth, Lead1
 >BitmapHeight);
Lead2->SetDstRect(0, 0, Lead2->BitmapWidth, Lead2->BitmapHeight);
Lead2->SetDstClipRect(0, 0, Lead2->BitmapWidth, Lead2
 >BitmapHeight);
//Display the images
Lead1->ForceRepaint();
Lead2->ForceRepaint();
Screen->Cursor = crDefault;
}


PaintRgnOnly example for C++ Builder

void __fastcall TForm1::Test(TObject *Sender)
{
Lead1->SetRgnEllipse(0, 0, 200, 200, L_RGN_SET);
Lead1->PaintRgnOnly = true;
}


PaintROP3 example for C++ Builder

This example demonstrates the PaintROP3 property.

// Paint an inverted image.
Lead1->PaintROP3 = SRCINVERT;
Lead1->ForceRepaint();


PaintScaling example for C++ Builder (ImageList Control)

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*toggle through the paint scale modes*/
switch(LEADImgList1->PaintScaling)
{
case psNormal:
LEADImgList1->PaintScaling = psResample;
Edit1->Text = "Resample";
break;
case psResample:
LEADImgList1->PaintScaling = psBicubic;
Edit1->Text = "Bicubic" ;
break;
case psBicubic:
LEADImgList1->PaintScaling = psNormal;
Edit1->Text = "Normal";
break;
}
}


PaintScaling Example for C++ Builder (Main Control)

/*This example sets the display to use bilinear interpolation*/
LeadImage1->PaintScaling = psResample;


PaintSizeMode Example for C++ Builder

This example shows how to set the PaintSizeMode property so that the control uses only a vertical scroll bar.

Lead1->AutoScroll=True;
Lead1->AutoSetRects=True;
Lead1->PaintSizeMode= smFitSides;
Lead1->ForceRepaint();


PaintSizeUseDPI example for C++ Builder

This example toggles the PaintSizeUseDPI property.

if (Lead1->PaintSizeUseDPI == False)
Lead1->PaintSizeUseDPI = True;
else
Lead1->PaintSizeUseDPI = False;


PaintWhileLoad example for C++ Builder

This example causes the LEAD control to paint the image as it loads.

void __fastcall TForm1::Button3Click(TObject *Sender)
{
float HeightFactor, WidthFactor, HeightAllowed, WidthAllowed;
int ImageHeight, ImageWidth, BitmapHeight, BitmapWidth;

Lead1->PaintWhileLoad = True;
//Get information about the image so that we can size the control.
Lead1->GetFileInfo("c:\\lead\\images\\image2.cmp", 0);
//Set the variables used for preserving the aspect ratio.
//Allow for a border of 1/8 of the form size.
HeightFactor = Lead1->InfoHeight;
WidthFactor = Lead1->InfoWidth;
HeightAllowed = ClientHeight * 3/4;
WidthAllowed = ClientWidth * 3/4;
//Center the LEAD control on the form, preserving the aspect ratio.
//Check to see if using the maximum width will make the image too tall.
//Set the dimensions based on the result.
if (((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed )
{
Lead1->Left = (ClientWidth / 8);
Lead1->Width = (WidthAllowed);
Lead1->Height = ((Lead1->Width * HeightFactor) / WidthFactor);
Lead1->Top = ((ClientHeight - Lead1->Height) / 2);
}
else
{
Lead1->Top = (ClientHeight / 8);
Lead1->Height = (HeightAllowed);
Lead1->Width = ((Lead1->Height * WidthFactor) / HeightFactor);
Lead1->Left = ((ClientWidth - Lead1->Width) / 2);
}
//Set the image display sizes
ImageHeight = Lead1->Height;
ImageWidth = Lead1->Width;
BitmapHeight = Lead1->InfoHeight;
BitmapWidth = Lead1->InfoWidth;
Lead1->SetSrcRect(0, 0, BitmapWidth, BitmapHeight);
Lead1->SetSrcClipRect(0, 0, BitmapWidth, BitmapHeight);
Lead1->SetDstRect(0, 0, ImageWidth, ImageHeight);
Lead1->SetDstClipRect(0, 0, ImageWidth, ImageHeight);
//Turn off the automatic adjustment of display rectangles
Lead1->AutoSetRects = False;
//Load the file
Lead1->Load("c:\\lead\\images\\image2.cmp", 0, 0, 1);

//Turn on the automatic adjustment of display rectangles for future use
Lead1->AutoSetRects = True;
}


PaintZoomFactor Example for C++ Builder

This example shows how to set the PaintZoomFactor property so that image is scaled 200 percent for display.

Lead1->AutoScroll=False;
Lead1->AutoSetRects=True;
Lead1->PaintSizeMode= smZoom;
Lead1->PaintZoomFactor=200;
Lead1->ForceRepaint();


PatternStyle example for C++ Builder

This example paints a transition with a diagonal cross pattern.

Lead1->AutoRepaint = False;
Lead1->EffectDelay = 50;
Lead1->Load ("c:\\lead\\images\\image1.cmp", 0, 0, 1);
Lead1->TransitionEffect = EFX_EFFECT_WIPE_RECTANGLE_OUT;
Lead1->TransitionStyle = etsPattern;
Lead1->PatternStyle = epsDiagCross;
Lead1->PatternBackColor = (TColor)RGB(255, 0, 0);
Lead1->PatternForeColor = (TColor)RGB(0, 0, 255);
Lead1->AutoRepaint = True;


PCDRes example for C++ Builder

This example checks for a high resolution image and loads it if possible.

System::AnsiString myfile, msg;

myfile = "v:\\images\\img0024.pcd"; //No PCD sample image is
 included with LEADTOOLS
Lead1-> GetFileInfo (myfile,
 0);
if(Lead1-> InfoPCDRes [L_PCD_4BASE]
 == True)
{
Lead1-> PCDRes
 = L_PCD_4BASE;
msg = "Loading 1024 x 1536 resolution";
}
else
{
Lead1-> PCDRes
 = L_PCD_BASE;
msg = "Loading 512 x 768 resolution";
}
ShowMessage(msg);
Screen.Cursor = crHourGlass;
//Turn on the automatic display rectangles and the scroll bars.
Lead1-> AutoSetRects
 = True;
Lead1-> AutoScroll
 = True;
//Load the file.
Lead1-> Load (myfile, 0, 0, 1);
Lead1-> ForceRepaint ();
Screen->Cursor = crDefault;


PDFEncryptFlags example for C++ Builder

LEADImage1->PDFUserPassword= "UserPassword";
LEADImage1->PDFOwnerPassword= "OwnerPassword";
LEADImage1->PDFEnable128bit= true;
LEADImage1->PDFEncryptFlags= PDF_SECURITYFLAGS_REV2_PRINTDOCUMENT;

LEADImage1->Save ( "c:\\test.PDF", FILE_RAS_PDF, 0, 0, SAVE_OVERWRITE );


PDFInitDir example for C++ Builder

void __fastcall TForm1::GetPDFInitDirClick(TObject *Sender)
{
ShowMessage(LEADImage1->PDFInitDir);
}

void __fastcall TForm1::SetPDFInitDirClick(TObject *Sender)
{
LEADImage1->PDFInitDir= "c:\\Runtime PDF\\PDF";
}


PDFSaveUseDPI example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
//Use image DPI when saving as PDF .
LEADImage1->PDFSaveUseDPI= True;
//Save image as Raster PDF with CCITT G4 compression
LEADImage1->Save ("c:\\temp\\test.pdf", FILE_RAS_PDF_G4, 1, 1, SAVE_OVERWRITE ) ;
}


PDFXResolution example for C++ Builder

{
//This example does the following:
// 1- Changes the horizontal and vertical PDF resolutions to 150 dpi.
// 2- Sets the pixel depth to 8.
// 3- Disables both font and graphics anti-aliasing.
// 4- Forces the PDF module to use it's own installed fonts.
// 5- Loads a PDF file using the new settings.
//Set horizontal resolution
LEAD1->PDFXResolution = 150;
//Set vertical resolution
LEAD1->PDFYResolution = 150;
//Set Display depth
LEAD1->PDFDisplayDepth = 8;
// No font anti-aliasing
LEAD1->PDFTextAlpha = 1;
// No graphics anti-aliasing
LEAD1->PDFGraphicsAlpha = 1;
// Use fonts installed by the PDF module
LEAD1->PDFUseLibFonts = True;
//Load the PDF file
LEAD1->Load ( "C:\test.pdf", 0, 0, 1 );
}


Picturize example for C++ Builder

/*Replace the current image in the main control with an image created from all the images present in c:\lead\images. Resize all images present in that directory to 24x24 pixels and load them all in memory before proceeding */

Screen->Cursor = crHourGlass;
LEAD1->Picturize("c:\\images", PICTURIZE_LOADALL+PICTURIZE_RESIZE, 24, 24);
Screen->Cursor = crDefault;


PicturizeBitmapList example for C++ Builder

LEADImage1->PicturizeBitmapList15, 200, LEADImage3->BitmapList


PicturizeSingle example for C++ Builder

LEADImage2->Load\images\\image1.cmp", 0, 1, 1);
LEADImage1->PicturizeSingleImage2->Bitmap, 200);


Pixel example for C++ Builder

void __fastcall TForm1::Lead1MouseDown (TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
long xycolor;
float xfraction, yfraction;
int xPixel, yPixel, xWidth;

Lead1->AutoRepaint = False;
//Translate mouse coordinates to fractions of the destination width and height
xfraction = float(X - Lead1->DstLeft) / Lead1->DstWidth;
yfraction = float(Y - Lead1->DstTop) / Lead1->DstHeight;
//Convert fractions to bitmap pixel coordinates
xPixel = (Lead1->SrcWidth * xfraction) + Lead1->SrcLeft;
yPixel = (Lead1->SrcHeight * yfraction) + Lead1->SrcTop;
//Make the whole line the same color as the pixel
xycolor = Lead1->Pixel[xPixel][yPixel];
xWidth = Lead1->BitmapWidth;
Y = yPixel;
for(X=0 ; X<xWidth; X++)
Lead1->Pixel[X][Y] = xycolor;
Lead1->ForceRepaint();
}


Pixelate Example for C++ Builder

void __fastcall TForm1::PixelateClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth/2);
ptCenter.y= (int)(LEADImage1->BitmapHeight/2);

LEADImage1->Pixelate( 5, 10, 100, ptCenter, PIX_AVR | PIX_RAD | PIX_WPER | PIX_HPER );
}


Plane Example for C++ Builder

void __fastcall TForm1::PlaneClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)( LEADImage1->BitmapWidth /2 );
ptCenter.y= (int)( LEADImage1->BitmapHeight /2 );

LEADImage1->Plane( ptCenter, 0, (int)(LEADImage1->BitmapHeight), (int)(LEADImage1->BitmapWidth/2), -1, 0, 25, 0, 0, 50, RGB(255,0,255), RGB(0,0,0), PLANE_RIGHT | PLANE_LEFT | PLANE_FILL_CLR );
}


PlaneBend Example for C++ Builder

void __fastcall TForm1::PlaneBendClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)( LEADImage1->BitmapWidth );
ptCenter.y= (int)( LEADImage1->BitmapHeight /2 );

LEADImage1->PlaneBend(ptCenter, 0, (int)(LEADImage1->BitmapHeight), (int)(LEADImage1->BitmapWidth/2), -1, 0, 25, 100, 0, 0, 50, RGB(255,0,0), RGB(0,0,0), PLANE_DOWN | PLANE_UP | PLANE_FILL_CLR);
}


PLTPenColor example for C++ Builder

void __fastcall TForm1::Button2Click(TObject *Sender)
{
L_UINT uPen;
L_UINT uWidth;
COLORREF crColor;

for ( uPen= 0; uPen < 8; uPen++)
{
uWidth= ceil(uPen/2) + 1;
switch ( uWidth )
{
case 1:
{
crColor= RGB ( 255, 0, 0 );
}
break;
case 2:
{
crColor= RGB ( 0, 255, 0 );
}
break;
case 3:
{
crColor= RGB ( 0, 0, 255 );
}
break;
case 4:
{
crColor= RGB ( 255, 255, 0 );
}
break;
default:
{
crColor= RGB ( 255, 0, 255 );
}
break;
}

/* Change Pen width */
LEADImage1->PLTPenWidth[uPen]= uWidth;

/* Change Pen color */
LEADImage1->PLTPenColor[uPen]= crColor;
}
/* Now load the PLT file */
LEADImage1->Load( "c:\\image1.plt", 0, 0, 1 );
}


Polar Example for C++ Builder

void __fastcall TForm1::PolarClick(TObject *Sender)
{
LEADImage1->Polar( 0, FILL_RPT | CART_TO_POL );
}


Posterize example for C++ Builder

This example applies a six-color poster effect and redisplays the image.

Lead1->Posterize(6);
Lead1->ForceRepaint();


PreferredLoadFormat example for C++ Builder

LEADImage1->PreferredLoadFormat = FILE_CMP;


PreLoadFilters Example for C++ Builder

This example shows how to preload filters.

/* preload the BMP, PCX, FAX, and TIFF filters, */
/* and allow 1 filter to be cached, while always */
/* keeping 3 loaded. */
Lead1->PreLoadFilters(3, 1, "BMP,PCX,FAX,TIF");


ProgressivePasses Example for C++ Builder

This example shows how to save and load a progressive file.

void __fastcall TForm1::Button8Click(TObject *Sender)
{
// Save the current image as a progressive CMP file.
Lead1->ProgressivePasses = 8;
Lead1->Save("c:\\lead\\images\\TMP.cmp", FILE_CMP, 24, PQ2, SAVE_OVERWRITE);
// Set properties to show progressive paints when we load.
Lead1->PaintWhileLoad = True;
Lead1->AutoSetRects = False;
// Load the file we just saved.
Lead1->ProgressivePasses = PROGRESSIVEPASSES_WHEN_MEANINGFUL;
Lead1->Load("c:\\lead\\images\\TMP.cmp", 0, 0, 1);
// Restore the default behavior.
Lead1->ProgressivePasses = 0;
}


PTKResolution example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Set new PTK option */
LEADImage1->PTKResolution= 120;

/* Now load the PTK file */
LEADImage1->Load( "c:\\Image1.ptk", 0, 1, 1 );
}


Punch Example for C++ Builder

void __fastcall TForm1::PunchClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth/2);
ptCenter.y= (int)(LEADImage1->BitmapHeight/2);

LEADImage1->Punch( 100, 100, ptCenter, 0, FILL_RPT | FILL_WOUTROT );
}


PuzzleEffect Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

/* Apply Puzzle Effect to this bitmap */
LEADImage1->PuzzleEffect(10, 10, 0, RGB(100,0,0), PUZZLE_BORDER + PUZZLE_SHUFFLE + PUZZLE_COUNT + BITMAP_RESIZE);
}


RadialBlur Example for C++ Builder

void __fastcall TForm1::RadialBlurClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight/2);

LEADImage1->RadialBlur( 50, 10, ptCenter );
}


RadWave Example for C++ Builder

void __fastcall TForm1::RadWaveClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight/2);

LEADImage1->RadWave( 5, 25, 0, ptCenter, 0, FILL_RPT | DIS_FRQ );
}


RasterizeViewportWidth Example for C++ Builder

{
// This example will set the current viewport mode to //L2D_USE_WIDTH_AND_HEIGHT,
// sets the current viewport size to 400*400 pixels and then loads a DXF file

// Set viewport mode to L2D_USE_WIDTH_HEIGHT
LEAD1->RasterizeViewMode = L2D_USE_WIDTH_HEIGHT ;
// Set viewport size to 400*400 pixels
LEAD1->RasterizeViewportWidth = 400 ;
LEAD1->RasterizeViewportHeight = 400 ;
// Load a DXF file
LEAD1->Load ( "c:\Test.dxf", 0, 0, 1 );
}


RawLoad example for C++ Builder

//This example loads RAW data into a LEAD control.
//Raw data parameters are set in the LoadInfo event, which gets called
//when the file format is FILE_RAW, or any unrecognized file format.
//The LoadInfo event obtains information through private variables.
Add these variables and procedure declarations to the private section of the Form1.

//variables used in the LoadInfo event
int nWidth; //width of image
int nHeight; //height of image
int nBitsPerPixel; // bits per pixel of image--if palettized, a gray palette is generated
int nViewPerspective; //view perspective of raw data (TOP_LEFT, BOTTOM_LEFT, etc)
bool bOrderBGR; //TRUE if order BGR, FALSE if order RGB
int nOffset; //offset into file where raw data begins
bool bPadding; //TRUE if each line of data is padded to four bytes
bool bReverseBits; //TRUE if the bits of each byte are reversed
void LoadRawData(AnsiString strFileName);

void TForm1::LoadRawData(AnsiString strFileName)
{
int nRet;
//Fill in the values of the private variables
//The priavte variables will get access in the LoadInfo event

nWidth= 294;
nHeight= 415;
nBitsPerPixel= 24;
nViewPerspective= BOTTOM_LEFT;
bOrderBGR= True;
nOffset= 100;
bPadding= True;
bReverseBits= True;

nRet= LEADImage1->Load(strFileName, nBitsPerPixel, 0, 1);
if(nRet == SUCCESS)
ShowMessage("SUCCESS file load: " + strFileName);
else
ShowMessage("FAILED--file load: " + strFileName);
}

void __fastcall TForm1::LEADImage1LoadInfo(TObject *Sender)
{
int i;
byte nGray;
int nColors;

LEADImage1->LoadInfoFormat= FILE_RAW;
LEADImage1->LoadInfoWidth= nWidth;
LEADImage1->LoadInfoHeight= nHeight;
LEADImage1->LoadInfoBits= nBitsPerPixel;
LEADImage1->LoadInfoXRes= 150;
LEADImage1->LoadInfoYRes= 150;
LEADImage1->LoadInfoOffset= nOffset;
LEADImage1->LoadInfoFlags= 0;

if(bPadding)
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_PAD4;

if(!bOrderBGR)
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_ORDERRGB;

if(bReverseBits)
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_LSB;

switch (nViewPerspective)
{
case TOP_LEFT:
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_TOPLEFT;
break;

case BOTTOM_LEFT:
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_REVERSE;
break;

case TOP_RIGHT: //BOTTOM_LEFT180
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_BOTTOMLEFT180;
break;

case BOTTOM_RIGHT: //TOP_LEFT180
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_TOPLEFT180;
break;

case RIGHT_TOP: //TOP_LEFT90
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_TOPLEFT90;
break;

case LEFT_BOTTOM: //TOP_LEFT270
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_TOPLEFT270;
break;

case LEFT_TOP: //BOTTOM_LEFT90
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_BOTTOMLEFT90;
break;

case RIGHT_BOTTOM: //BOTTOM_LEFT270
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_BOTTOMLEFT270;
break;
}

//if image is palettized create a grayscale palette
if(nBitsPerPixel <= 8)
{
nColors= (2 ^ nBitsPerPixel);
LEADImage1->LoadInfoFlags= LEADImage1->LoadInfoFlags | LOADINFO_PALETTE;

for(i= 0; i < nColors; i ++)
{
nGray= (i * 256) / nColors;
LEADImage1->UserPalette[i]= RGB(nGray, nGray, nGray);
}
}
}


RawSave example for C++ Builder

//This example saves a LEAD TBitmapHandle as RAW data starting at offset uOffset.
//The data is padded so that each line of bytes is evenly divided by 4.
//The bits in each byte are reversed before saving.
//The bits per pixel of the raw data is the same as the bits per pixel of Bitmap property.
//If LEADImage1->Bitmap is a palettized image, the palette is not saved--only the raw data.

void TForm1::SaveRawData(AnsiString strFileName, unsigned uOffset)
{
int nRet;

LEADImage1->SaveLSB= true;
LEADImage1->SavePad4= true;
nRet= LEADImage1->SaveOffset(strFileName, uOffset, FILE_RAW, 0, 0, 0);
if(nRet == SUCCESS)
ShowMessage("SUCCESS file save: " + strFileName + " Size Written: " + IntToStr(LEADImage1->FileSizeWritten));
else
ShowMessage("FAILED--file save: " + strFileName);
}


ReadLoadResolutions Example for C++ Builder

This example shows how to use the methods and properties for FlashPix files.

   AnsiString InfoStr;  /* For composing message strings */
int i; /* Loop counter */
/* Initialize the display */
Lead1->AutoScroll = False;
Lead1->AutoSetRects = True;
Lead1->PaintSizeMode = smFit;
Lead1->GetFileInfo("v:\\images\\image5.fpx", 0);
/* Update information about the available resolutions. */
Lead1->ReadLoadResolutions("v:\\images\\image5.fpx");
/* Display a message box that shows the available sizes. */
InfoStr = "Available dimensions:\n";
for(i = 0; i<Lead1->LoadResolutionCount; i++)
InfoStr = InfoStr + IntToStr(Lead1->LoadResolutionWidth[i]) + " x " + IntToStr(Lead1->LoadResolutionHeight[i]) + "\n";
Application->MessageBox(InfoStr.c_str(), "File Information", MB_OK);
/* Set the size to load, the largest size in this case. */
Lead1->SetLoadResolution(Lead1->InfoFormat, Lead1->LoadResolutionWidth[Lead1->LoadResolutionCount - 1], Lead1->LoadResolutionHeight[Lead1->LoadResolutionCount - 1]);
/* Get the dimensions that we just set and display them. */
Lead1->GetLoadResolution(Lead1->InfoFormat);

InfoStr = AnsiString("Size that will be loaded:\n\n") + IntToStr(Lead1
 >LoadResolutionWidth[0]) + " x " + IntToStr(Lead1
 >LoadResolutionHeight[0]) + "\n";
Application->MessageBox(InfoStr.c_str(), "File Information", MB_OK);
/* Load the bitmap, keeping the bits per pixel of the file. */
Lead1->Load("v:\\images\\image5.fpx", 0, 0, 1);


ReadTagMemory example for C++ Builder

#define DATACOUNT 4
void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_INT nRet;
L_UINT16 LogoPosition= 0x8001; /* my private tag */
Variant vTagData;
Variant vSavedData;
L_HANDLE hFileInMemory= NULL; /* memory handle for the file */
L_INT32 nMemSize= 0; /* size of the file in memory */

vTagData= VarArrayCreate(OPENARRAY(int,(0,DATACOUNT-1)),varWord);

// initialize the array
vTagData.PutElement(5,0);
vTagData.PutElement(5,1);
vTagData.PutElement(24,2);
vTagData.PutElement(37,3);

/* Set the tag data to be saved */
LEADImage1->SetTag( LogoPosition, TAG_SSHORT, DATACOUNT, vTagData );
/* Save the image as a TIFF file in memory */
LEADImage1->SaveMemory(hFileInMemory, FILE_TIF, LEADImage1->BitmapBits, 0, nMemSize );

/* Get the tagged data */
nRet= LEADImage1->ReadTagMemory( hFileInMemory, nMemSize, 1, LogoPosition );
if ( nRet == SUCCESS )
{
/* Display a message showing the data */
if ( (LEADImage1->GetTagType(LogoPosition) == TAG_SSHORT) && (LEADImage1->GetTagCount(LogoPosition) == DATACOUNT) )
{
vSavedData= LEADImage1->GetTagData(0);
ShowMessage ( "X = " + IntToStr((int)vSavedData.GetElement(0)) + "\n" +
"Y = " + IntToStr((int)vSavedData.GetElement(1)) + "\n" +
"nWidth = " + IntToStr((int)vSavedData.GetElement(2)) + "\n" +
"nHeight = " + IntToStr((int)vSavedData.GetElement(3)) );
}
}

/* Free memory that we no longer need */
if (hFileInMemory != NULL )
GlobalFree ((void*)hFileInMemory );
}


ReadyState Example for C++ Builder

This example shows how to use the ReadyState property to test whether an asynchronous load is in progress.

if(Lead1->ReadyState== rsLoading)
ShowMessage("Still loading the image");


RemapHue example for C++Builder

/*
This example considers that the image you are working with is 24 bpp.
This example changes all green hues(and hues near green) to the hue of crNewColor
*/
L_UINT Increment(L_UINT x)
{
return ((x + 1) % 256);
}

L_UINT Decrement(L_UINT x)
{
return ((x + 255) % 256);
}

L_UINT Add(int x, int y)
{
return ((x + y) % 256);
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
L_INT i;
L_INT nHueGreen;
L_INT nHueNewColor;
L_INT nHueChange;
COLORREF crNewColor;
L_UINT uCount;

for (i= 0; i < 256; i ++ )
{
LEADImage1->MaskTable[i]= 0;
LEADImage1->HTable[i]= i;
}

//Get the hue for green
nHueGreen= LEADImage1->HSV_HfromRGB(RGB(0, 255, 0));

//Obtain new hue (crNewColor can be any color)
crNewColor= RGB(255, 255, 0);
nHueNewColor= LEADImage1->HSV_HfromRGB(crNewColor);
nHueChange= nHueNewColor - nHueGreen;

if (nHueChange < 0)
nHueChange= nHueChange + 256;

//Set values in uHueTable, uMaskTable
LEADImage1->HTable[nHueGreen]= LEADImage1->HTable[nHueGreen] + (nHueChange);
LEADImage1->MaskTable[nHueGreen]= 1;

//set the hues near green (+/- 5)
uCount= 0;
i= Increment(nHueGreen);
while (uCount < 5)
{
LEADImage1->HTable[i]= Add(Integer(LEADImage1->HTable[i]), nHueChange);
LEADImage1->MaskTable[i]= 1;
i= Increment(i);
uCount++;
}

uCount= 0;
i= Decrement(nHueGreen);
while (uCount < 5)
{
LEADImage1->HTable[i]= Add(Integer(LEADImage1->HTable[i]), nHueChange);
LEADImage1->MaskTable[i]= 1;
i= Decrement(i);
uCount++;
}

LEADImage1->RemapHue( True, True, False, False ) ;
}


RemapTableSize example for C++ Builder

if (((LEADImage1->BitmapBits == 16) &&
(LEADImage1->IsGrayScale)) ||
(LEADImage1->BitmapBits == 64) ||
(LEADImage1->BitmapBits == 48))
LEADImage1->RemapTableSize = 65536;
else
{
if (LEADImage1->BitmapBits == 12)
LEADImage1->RemapTableSize= 4096;
else
LEADImage1->RemapTableSize= 256;
}


Remove (ImageList Control) example for C++ Builder

/*remove the last item from the ImageList Control*/
LEADImgList1->Remove (LEADImgList1->Count – 1);


RemoveRedeye example for C++ Builder

LEADImage1->SetRgnEllipse (80, 55, 35, 30, L_RGN_SET);
LEADImage1->RemoveRedeye (RGB (5, 20, 10), 125, 100);


RenderCenter Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
//Declare the variables for print-area measurements.
int SkipSpace;
float UsableWidth, UsableHeight, MaxImageHeight;
//Declare the variables for sizing and positioning the image.
int PrintHeight, PrintWidth;
//Declare variables used for preserving aspect ratios.
float WidthFactor, HeightFactor;

//Set the variables used for preserving the aspect ratio
HeightFactor = LEADImage1->BitmapHeight;
WidthFactor = LEADImage1->BitmapWidth;
//Set the pointer to an hourglass
Screen->Cursor = crHourGlass;
//Establish some print-area dimensions. These are arbitrary values.
SkipSpace = Printer()->PageHeight / 30;
UsableWidth = Printer()->PageWidth - (SkipSpace * 4);
UsableHeight = Printer()->PageHeight - (SkipSpace * 4);
//Get the maximum height of one image,
//assuming two equal-size images and space between them.
MaxImageHeight = (UsableHeight - (2 * SkipSpace)) / 2;

//Size and position the first image, preserving the aspect ratio.
//Check to see if using the maximum width makes the image too tall.
//Set the dimensions based on the result.
if(((UsableWidth * HeightFactor) / WidthFactor) < MaxImageHeight)
{
PrintWidth = UsableWidth;
PrintHeight = (PrintWidth * HeightFactor) / WidthFactor;
}
else
{
PrintHeight = MaxImageHeight;
PrintWidth = (PrintHeight * WidthFactor) / HeightFactor;
}

//Start Printing
Printer()->BeginDoc();
// Set the RenderCenter property to False, so we can print
// the image starting from the point (0, 0)
LEADImage1->RenderCenter= false;
// Print the Image
LEADImage1->Render((int)Printer()->Canvas->Handle, 0, 0, PrintWidth, PrintHeight);
// End Printing
Printer()->EndDoc();
//Set the mouse pointer back to the default
Screen->Cursor= crDefault;
}


RepaintRect example for C++ Builder

Lead1->AutoRepaint=False;
Lead1->Flip();
Lead1->RepaintRect(0, 0, Lead1->BitmapWidth, Lead1->BitmapHeight / 2, false);
ShowMessage("Click OK for full repainting");
Lead1->ForceRepaint();


ResizeRgn example for C++ Builder

LEADImage1->RgnFrameType = ftAnimated;
LEADImage1->SetRgnRect (40, 60, 280, 200, L_RGN_SET);
ShowMessage ("About to resize") ;
LEADImage1->ResizeRgn (20, RGN_CONTRACT, False);


RevEffect Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image3.cmp", 0, 1, 1 );

/* Apply Rev effect on the image*/
LEADImage1->RevEffect(3, 37);
}


Reverse example for C++ Builder

This example reverses the image, producing a mirror image, and displays it.

Lead1->Reverse();
Lead1->ForceRepaint();


RGBfromHSV example for C++Builder

//Takes an HSV, displays the HSV components, and displays the RGB components
void TForm1::HSVtoRGB( short nH, short nS, short nV)
{
TColorRef cr;
int nRed, nGreen, nBlue;

cr= LEADImage1->RGBfromHSV((short)nH, (short)nS, (short)nV);
nRed= GetRValue(cr);
nGreen= GetGValue(cr);
nBlue= GetBValue(cr);
ShowMessage ( "HSV("+IntToStr(nH)+ ", "+
IntToStr(nS)+ ", "+
IntToStr (nV) + " )" +
" is RGB(" + IntToStr (nRed) + ", "+
IntToStr (nGreen) + ", "+
IntToStr (nBlue) + ")");
}


RgnFrameColor example for C++ Builder

LEADImage1->RgnFrameColor = clBlue ;
LEADImage1->RgnFrameType = ftColor;
LEADImage1->SetRgnRect (10, 10, 200, 200, L_RGN_SET);


RgnFrameType example for C++ Builder

void __fastcall TForm1::Test(TObject *Sender)
{
Lead1->SetRgnEllipse(0,0,200,200,L_RGN_SET);
Lead1->RgnFrameType= ftStatic;
}


RgnHeight example for C++ Builder

void __fastcall TForm1::Test(TObject *Sender)
{
if( Lead1->HasRgn)
{
Edit1->Text = "Region Bounds : (Top, Left), (Width, Height) : (" + IntToStr(Lead1->RgnTop) + ", " + IntToStr(Lead1->RgnLeft)+ "), (" + IntToStr(Lead1->RgnWidth) + ", " + IntToStr(Lead1->RgnHeight) + ")";
}
}


RgnMarkingMode example for C++ Builder

void __fastcall TForm1::Test(TObject *Sender)
{
Lead1->RgnMarkingMode = mmRectangle;
Lead1->RgnFrameType = ftStatic;
}


RingEffect Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );

L_UINT uXorg = (L_UINT)(LEADImage1->BitmapWidth/2);
L_UINT uYorg = (L_UINT)(LEADImage1->BitmapHeight/2);
L_UINT uRadius = uXorg;

/* Apply a ring effect to this bitmap with origin (uXorg, uYorg).
The maximum ring radius is equal to half of the bitmap? width. Draw 10 rings,
fill the undefined areas with the Black color and the shift angle is equal
to 1 degrees. Note that you will have undefined areas only if the bitmap width
is greater than the bitmap height. */
LEADImage1->RingEffect( uXorg, uYorg, uRadius, 10, 0, RGB(0,0,0), 100, RING_COLOR + RING_FIXEDANGLE + RING_MAXRADIUS );
}


Ripple Example for C++ Builder

void __fastcall TForm1::RippleClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);

LEADImage1->Ripple( 20, 10, 0, 0, ptCenter, 0, FILL_RPT );
}


Rotate example for C++ Builder

This example rotates the bitmap 45 degrees and redisplays the image. It resizes the bitmap to accommodate the rotation and uses blue as the fill color.

LeadImage1->Rotate(4500, ROTATE_RESIZE, RGB(0,0,255));
LeadImage1->AutoSetRects = true; /*Make sure the display rectangles are adjusted*/
LeadImage1->ForceRepaint();


RowCount (ImageList Control) example for C++ Builder

long LinesPerPage;

if( (LEADImgList1->ScrollStyle == SCROLLSTYLE_VERTICAL))
LinesPerPage = LEADImgList1->RowCount / LEADImgList1->PageCount;
else
LinesPerPage = LEADImgList1->ColumnCount / LEADImgList1->PageCount;


RTFPaperHeight example for C++ Builder

/* This example loads a RTF file, with a custom top margin, bottom margin, left margin, right margin, Paper width, and Paper height */

void __fastcall TForm1::Button3Click(TObject *Sender)
{
/* Change margin values */
LEADImage1->RTFTopMarg= 0.9;
LEADImage1->RTFBottomMarg= 0.9;
LEADImage1->RTFLeftMarg= 1.3;
LEADImage1->RTFRightMarg= 1.3;

LEADImage1->RTFPaperWidth= 8.25;
LEADImage1->RTFPaperHeight= 11.5;

/* Now load the RTF file */
LEADImage1->Load("c:\\image1.rtf", 0, 1, 1 );
}


SampleTarget Example for C++ Builder

void __fastcall TForm1::SampleTargetClick(TObject *Sender)
{
LEADImage1->SampleTarget( RGB(50, 100, 150), RGB(60, 90 , 150), SAMP_RED | SAMP_MID );
}


Saturation example for C++ Builder

This example increases the saturation of colors in the bitmap and redisplays the image.

Lead1->Saturation(1000);
Lead1->ForceRepaint();


Save example for C++ Builder

This example determines whether a bitmap is grayscale, saves it appropriately, loads the new file, and redisplays the bitmap.

Screen->Cursor = crHourGlass;
if(Lead1->IsGrayScale == GRAY_NO)
Lead1->Save("C:\\lead\\IMAGES\\TMP.CMP", FILE_CMP, 24, PQ2, SAVE_OVERWRITE);
else
Lead1->Save("C:\\lead\\IMAGES\\TMP.CMP", FILE_CMP,8, PQ2, SAVE_OVERWRITE);
Lead1->Load("C:\\lead\\IMAGES\\TMP.CMP", 0, 0, 1);
Lead1->ForceRepaint();
Screen->Cursor = crDefault;


SaveBuffer example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
void * pBuffer;
unsigned int uImageSize;
unsigned int uFinalBufSize;
int nRet;
int hf;

// Loading an image
LEADImage1->Load ( "v:\\images\\image1.cmp", 0, 1, 1 ) ;
// Calculate the Image Size so we can can allocate enough Buffer to hold it.
uImageSize= ceil((LEADImage1->BitmapWidth * LEADImage1->BitmapHeight * 24)/8);
// Allocate a buffer to hold the Bitmap
pBuffer= (void*) malloc (uImageSize) ;
if ( !pBuffer)
{
ShowMessage ( "Not enough Memory" ) ;
return;
}
// Saving the Bitmap in Memory
nRet = LEADImage1->SaveBuffer (pBuffer, uImageSize, FILE_CMP, 24, 2, &uFinalBufSize );
if ( nRet == SUCCESS )
{
// Create a file on Disk
hf = FileCreate("c:\\temp\\SaveBuf.cmp");
if (hf == -1)
{
free ( pBuffer ) ;
MessageDlg ("Can not create file", mtError, TMsgDlgButtons() << mbOK, 0);
return;
}
// Writing the File in Memory to Disk
if( FileWrite(hf, pBuffer, uFinalBufSize) != (int)uFinalBufSize)
MessageDlg ("Error calling FileWrite", mtError, TMsgDlgButtons() << mbOK, 0);
else
{
MessageDlg ("The file was saved successfully on disk.", mtInformation, TMsgDlgButtons() << mbOK, 0);
nRet= SUCCESS;
}
FileClose (hf);
if (pBuffer)
free ( pBuffer );
// Loading the Saved Bitmap from Disk
if ( nRet == SUCCESS )
LEADImage2->Load ("c:\\temp\\SaveBuf.cmp", 0, 1, 1 ) ;
return;
}
// Free the Buffer
if (pBuffer)
free ( pBuffer );
}


SaveDatabase example for C++ Builder

LEADImgList1->SaveDatabase ("c:\\temp\\testdb7.tif", false);


SaveIFD example for C++ Builder

void __fastcall TForm1::SaveIFDClick(TObject *Sender)
{
// This example will add 100 pages to a file faster by continuously using the IFD of the last page
int Page;
int nRet;
// Save page 1, to make sure the file exists
nRet = LEADImage1->Save ("test.tif", FILE_TIF, 0, 0, SAVE_APPEND);

for (Page = 2; Page <= 100 ;Page ++)
{
// get the IFD of the last page
nRet = LEADImage1->GetFileInfo ("test.tif", 0);
LEADImage1->SaveIFD = LEADImage1->InfoIFD;
nRet = LEADImage1->Save ("test.tif", FILE_TIF, 0, 0, SAVE_APPEND);
}
// reset the SaveIFD property so the other Save calls will work properly
LEADImage1->SaveIFD = 0;
}


SaveInterlaced example for C++ Builder

This example saves the current image as an interlaced GIF file, then loads the saved image with a paint-while-load effect that shows the interlaced behavior.

/*Save the current image as an interlaced GIF file.*/
Lead1->SaveInterlaced = True;
Lead1->Save ("c:\\temp\\tmp.gif", FILE_GIF, 8, 1, SAVE_OVERWRITE);
/*Clear the bitmap so that we can see the paint-while-load effect.*/
Lead1->Bitmap = 0;
/*Paint the image while loading, showing that it is interlaced.*/
Lead1->PaintWhileLoad = True;
Lead1->Load("c:\\temp\\tmp.gif", 0, 0, 1);


SaveLayers example for C++ Builder

int i;
// Save all the extra bitmaps in the bitmap list as layers
LEADImage1->SaveLayers = True;
for (i= 1; i < (int)LEADImage1->BitmapListCount; i ++ )
{
// reset the layer info so all the layers are saved from 0,0 offset
LEADImage1->LayerLeft [i]= 0;
LEADImage1->LayerTop[i] = 0;
LEADImage1->LayerBlendModeKey[i]= "dark";
LEADImage1->LayerClipping[i]= 0;
LEADImage1->LayerOpacity[i] = 40;
LEADImage1->LayerMaskBitmap[i]= 0;
}
// set the active bitmap to be the first in the list
LEADImage1->Save ("c:\\temp\\layers.psd", FILE_PSD, 0, 0, SAVE_OVERWRITE);


SaveLSB example for C++ Builder

/* This example saves a bitmap compatible with the requirements
of the TIFF Class F format make sure we are using pixels*/

LEAD1->SaveLSB = true;
LEAD1->SavePageNumberTag = true;
LEAD1->BitmapXRes = 204;
LEAD1->BitmapYRes = 196;
/* scale the bitmap (preserving the aspect ratio) to have a width of 1728 pixels*/
LEAD1->Size (1728, LEAD1->BitmapHeight * 1728 / LEAD1->BitmapWidth , 0);
LEAD1->Save ("c:\\i\\lsb.tif", FILE_CCITT_GROUP3_1DIM, 1, 0, SAVE_OVERWRITE);


SaveMemory example for C++ Builder

void __fastcall TForm1::SaveMemory1Click(TObject *Sender)
{
L_HANDLE hMem = 0;
int hf, iSize;
void *lpMem;
AnsiString cMsg, cTemp;

if(Lead1->SaveMemory (hMem, FILE_CMP, 24, 2, iSize) != SUCCESS)
{
MessageDlg ("Error calling SaveMemory", mtError, TMsgDlgButtons() << mbOK, 0);
return;
}
if( Lead1->GetMemoryInfo (hMem, 0, iSize) != SUCCESS)
{
GlobalFree ((HGLOBAL)hMem);
return;
}
// Ask for a confirmation to save this file
cMsg = "Write this file on disk?\n\nFile info:\n";
cMsg += IntToStr(Lead1->InfoWidth) + " x ";
cMsg += IntToStr(Lead1->InfoHeight) + " x ";
cMsg += IntToStr(Lead1->InfoBits)+ " BPP\n";
cMsg += "Size in memory: " + IntToStr(Lead1->InfoSizeMem);
cMsg += "\nSize on disk : " + IntToStr(Lead1->InfoSizeDisk);
if(MessageDlg(cMsg, mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0) != mrYes)
{
GlobalFree ((HGLOBAL)hMem);
return;
}
lpMem = GlobalLock((HGLOBAL)hMem);

if(lpMem==0)
{
GlobalFree ((HGLOBAL)hMem);
MessageDlg ("Error calling GlobalLock", mtError, TMsgDlgButtons() << mbOK, 0);
return;
}
hf = FileCreate("c:\\savemem.cmp");
if(hf==-1)
{
GlobalUnlock ((HGLOBAL)hMem);
GlobalFree ((HGLOBAL)hMem);
MessageDlg ("Error calling GlobalLock", mtError, TMsgDlgButtons() << mbOK, 0);
return;
}
if( FileWrite(hf, lpMem, iSize) != iSize)
MessageDlg ("Error calling FileWrite", mtError, TMsgDlgButtons() << mbOK, 0);
else
MessageDlg ("The file was saved successfully on disk.", mtInformation, TMsgDlgButtons() << mbOK, 0);
FileClose (hf);
GlobalUnlock ((HGLOBAL)hMem);
GlobalFree ((HGLOBAL)hMem);

}


SaveOffset example for C++ Builder

{This example saves a TBitmapHandle as RAW data starting at offset nOffset.

The data is padded so that each line of bytes is evenly divided by 4.

The bits in each byte are reversed before saving. The bits per pixel of the raw data is the same as the BitmapBits Property. If the Bitmap is a palletized image, the palette is not saved--only the raw data.}

void TForm1::SaveRawData ( AnsiString szFileName, int nOffset )
{
int nRet;

LEADImage1->SaveLSB = true;
LEADImage1->SavePad4 =true;
nRet= LEADImage1->SaveOffset( szFileName, nOffset, FILE_RAW, 0, 0, 0 );
if ( nRet == SUCCESS )
ShowMessage ( "SUCCESS file save: " + szFileName + " Size Written: " + IntToStr(LEADImage1->FileSizeWritten) );
else
ShowMessage ( "FAILED--file save: " + szFileName );
}


SavePage example for C++ Builder

/* replace page 1 from TEST.TIF */
Lead1->SavePage = 1;
Lead1->Save("TEST.TIF", FILE_TIF, 8, 0, SAVE_REPLACE);


SaveResolutionCount example for C++ Builder

unsigned uCount;
/* assume that our bitmap is 800 x 600 */
/* save 3 resolutions*/
Lead1->SaveResolutionCount = 3;
Lead1->SaveResolutionWidth[0] = 800;
Lead1->SaveResolutionHeight[0] = 600;
Lead1->SaveResolutionWidth[1] = 400;
Lead1->SaveResolutionHeight[1] = 300;
Lead1->SaveResolutionWidth[2] = 200;
Lead1->SaveResolutionHeight[2] = 150;
/* get the SaveResolution info*/
ShowMessage("SaveResolutionCount = " + IntToStr( Lead1
 >SaveResolutionCount));
for(uCount = 0; uCount < Lead1->SaveResolutionCount; uCount++)
ShowMessage("SaveResolution[" + IntToStr(uCount) + "] = " +
IntToStr(Lead1->SaveResolutionWidth[uCount]) + " x " +
IntToStr(Lead1->SaveResolutionHeight[uCount]));


SaveTileWidth example for C++ Builder

/*save TIF files with a tile size of 512x512*/
LEADImage1->SaveTileWidth = 512;
LEADImage1->SaveTileHeight = 512;
LEADImage1->Save ("c:\\temp\\tiled.tif", FILE_CCITT_GROUP4, 0, 0, SAVE_OVERWRITE);


SaveToFile (ImageList Control) example for C++ Builder

/*save all selected items to a multipage file*/

LEADImgList1->SaveToFile ("d:\\temp\\testing.tif", FILE_TIF, 0, 0, True);

/*clear list*/

LEADImgList1->Clear();

/*"reload file*/

LEADImgList1->LoadFromFile ("d:\\temp\\testing.tif", 0, 1, -1);


SaveWithStamp example for C++ Builder

This example saves the image in a JPEG file that includes a thumbnail (stamp) image. It then loads the thumbnail from the new file.

Lead1->SaveWithStamp("C:\\lead\\IMAGES\\STAMP.JPG", FILE_JFIF, 24, 30, 150, 100, 24);
Lead1->LoadStamp("C:\\lead\\IMAGES\\STAMP.JPG");
Lead1->ForceRepaint();


ScrollItems (ImageList Control) example for C++ Builder

/*scroll items down 2 lines*/
LEADImgList1->ScrollItems (2);


ScrollStyle (ImageList Control) example for C++ Builder

/*Set scroll style to horizontal*/

LEADImgList1->ScrollStyle = SCROLLSTYLE_HORIZONTAL;


Segment Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/* segment the bitmap */
LEADImage1->Segment(20, SGM_RGB);
}


SelectAll (ImageList Control) example for C++ Builder

/*select all items*/

LEADImgList1->SelectAll (True);

ShowMessage("wait");

/*deselect allitems*/

LEADImgList1->SelectAll (False);


SelectData Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmaps */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
LEADImage2->Load ("e:\\image2.cmp", 0, 1, 1 );
LEADImage2->GrayScale(16);

// Call the method
LEADImage1->SelectData(LEADImage2->Bitmap, RGB(233, 10, 77), 2 /* uSrcLowBit */, 6 /* uSrcHighBit */, 25 /* uThreshold */, TRUE);
// Now we have the resulted image in DstBitmap
}


SelectedItems example for C++ Builder

long x;
x = LEADImgList1->SelectedCount;
while(x > 0)
{
LEADImgList1->SelectedItems[0]->Selected= false;
x = LEADImgList1->SelectedCount;
}


SelectionColor (ImageList Control) example for C++ Builder

LEADImgList1->SelectionColor = clRed;/*set to RED*/


SelectionStyle (ImageList Control) example for C++ Builder

/*show selected items as pressed buttons*/
LEADImgList1->SelectionStyle = SELECTIONSTYLE_PRESSEDBUTTON;


SelectiveColor Example for C++ Builder

void __fastcall TForm1::SelectiveColor1Click(TObject *Sender)
{
TLEADSelClrInfoArr selColors;

// Initialize selClr to zeros.
FillMemory ( selColors, sizeof(SELECTIVECOLORINFO)*9, 0 );

/* Manipulate values */
selColors[SELCLR_RED].cCyan= -100; // Change the "Red selected color"
selColors[SELCLR_YELLOW].cCyan= 34; // Change the "Yellow selected color"
selColors[SELCLR_YELLOW].cMagenta= 100;
selColors[SELCLR_YELLOW].cYellow= 40;
selColors[SELCLR_GREEN].cBlack= 100; // Change the "Green selected color"
selColors[SELCLR_NEUTRAL].cCyan= -65; // Change the "neutral selected color"
selColors[SELCLR_NEUTRAL].cMagenta= -39;
selColors[SELCLR_NEUTRAL].cYellow= 63;
// Call the function
LEADImage1->SelectiveColor( selColors );
}


SetMemoryThresholds example for C++ Builder

/* Allocate tiled bitmaps when more than 75% of the computer memory is used, or for bitmaps larger than 100MB. */

LEADImage1->SetMemoryThresholds(-25, 100 *1024 * 1024, 0, 0, 0, MEM_TILEDTHRESHOLD + MEM_MAXCONVSIZE );


SetRgn... example for C++ Builder

This example demonstrates the SetRgnEllipse, SetRgnRect, SetRgnRoundRect, and SetRgnPolygon methods by simulating client area coordinates. Normally, you would get the coordinates interactively from mouse events and would use Windows GDI functions to outline the shape of each region before it is created.

To create the polygonal region, this example uses the PolygonSize and PolygonPoint properties.

Also, to demonstrate the SetRgnColor method, it uses the Fill method to fill the region with a solid color, then uses the fill color to create a new region.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*Set up arrays to use as client area grid values for drawing a polygon.*/
int xPoint[]= {0, -1, 2, 1, 1, 2, -1, -2};
int yPoint[]= {0, -1, -1, 1, -1, 1, 1, 1};
/*Declare local variables.*/
float ZoomFactorX; /*Used for translating positioning information*/
float ZoomFactorY; /*Used for translating positioning information*/
int OffsetX, OffsetY, CurrentX, CurrentY; /*To simulate mouse coordinates*/
int SimLeft, SimTop, SimWidth, SimHeight; /*To simulate mouse coordinates*/
int LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, eW, eH; /*For bitmap coordinates*/
int i; /*Loop counter*/
TPoint polyPoint;

/*Initialize the variables that we will manipulate to simulate mouse coordinates.*/
OffsetX = Lead1->Width / 15;
OffsetY = Lead1->Height / 15;
CurrentX = OffsetX;
CurrentY = OffsetY;
/*Set the zoom factors. */
ZoomFactorX = Lead1->DstWidth / (float)Lead1->SrcWidth;
ZoomFactorY = Lead1->DstHeight / (float)Lead1->SrcHeight;
/*Start by simulating the drawing of a rectangle.*/
SimLeft = CurrentX;
SimTop = CurrentY;
SimWidth = OffsetX * 2;
SimHeight = OffsetY * 2;

/*Translate the simulated client coordinates to bitmap coordinates.*/
LBRgnLeft = (SimLeft / ZoomFactorX) - (Lead1->DstLeft / ZoomFactorX) + Lead1->SrcLeft;
LBRgnTop = (SimTop / ZoomFactorY) - (Lead1->DstTop / ZoomFactorY) + Lead1->SrcTop;
LBRgnWidth = SimWidth / ZoomFactorX;
LBRgnHeight = SimHeight / ZoomFactorY;
/*Create the rectangular region, outline it, and display a message so that we can see what happened.*/
Lead1->SetRgnRect(LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, L_RGN_SET);
Lead1->RgnFrameType = ftStatic;
ShowMessage("Here is the rectangular region");

/*Move the current mouse position so that we overlap the existing region. */
CurrentX = CurrentX + OffsetX;
CurrentY = CurrentY + OffsetY;
/*Next, simulate the drawing of an ellipse.*/
SimLeft = CurrentX;
SimTop = CurrentY;
SimWidth = OffsetX * 3;
SimHeight = OffsetY * 2;
/*Translate the simulated client coordinates to bitmap coordinates.*/
LBRgnLeft = (SimLeft / ZoomFactorX) - (Lead1->DstLeft / ZoomFactorX) + Lead1->SrcLeft;
LBRgnTop = (SimTop / ZoomFactorY) - (Lead1->DstTop / ZoomFactorY) + Lead1->SrcTop;
LBRgnWidth = SimWidth / ZoomFactorX;
LBRgnHeight = SimHeight / ZoomFactorY;

/*Add the elliptical region, using a Boolean OR,and display a message so that we can see what happened. */
Lead1->SetRgnEllipse(LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, L_RGN_OR);
Lead1->RgnFrameType = ftStatic;
ShowMessage("Here is the added ellipse, with a Boolean OR");
/*Move the current mouse position so that we overlap the existing region.*/
CurrentX = CurrentX + OffsetX;
CurrentY = CurrentY + OffsetY;
/*Next, simulate the drawing of a rounded rectangle.*/
SimLeft = CurrentX;
SimTop = CurrentY;
SimWidth = OffsetX * 3;
SimHeight = OffsetY * 2;

/*Translate the simulated client coordinates to bitmap coordinates.*/
LBRgnLeft = (SimLeft / ZoomFactorX) - (Lead1->DstLeft / ZoomFactorX) + Lead1->SrcLeft;
LBRgnTop = (SimTop / ZoomFactorY) - (Lead1->DstTop / ZoomFactorY) + Lead1->SrcTop;
LBRgnWidth = SimWidth / ZoomFactorX;
LBRgnHeight = SimHeight / ZoomFactorY;
/*Define an ellipse to use for the corners.*/
eW = LBRgnWidth / 4;
eH = LBRgnHeight / 4;
/*Add the rounded rectangular region, using a Boolean exclusive OR, and display a message so that we can see what happened. */
Lead1->SetRgnRoundRect(LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, eW, eH, L_RGN_XOR);
ShowMessage("Here is the rounded rectangle, with a Boolean XOR");

/*Move the current mouse position so that we overlap the existing region.*/
CurrentX = CurrentX + (2 * OffsetX);
CurrentY = CurrentY + (2 * OffsetY);
/*Initialize the polygon size using an arbitrary number.*/
/*This number will be increased dynamically. */
Lead1->PolygonSize= 5;
/*Fill in the array for the polygon. This simulates a user’s mouse clicks.*/
for(i = 0;i<=7;i++)
{
CurrentX = CurrentX + (xPoint[i] * OffsetX);
CurrentY = CurrentY + (yPoint[i] * OffsetY);
polyPoint.x = (CurrentX / ZoomFactorX) - (Lead1->DstLeft / ZoomFactorX) + Lead1->SrcLeft;
polyPoint.y = (CurrentY / ZoomFactorY) - (Lead1->DstTop / ZoomFactorY) + Lead1->SrcTop;
Lead1->PolygonPoint[i] = polyPoint;

if( i + 1 == Lead1->PolygonSize)
Lead1->PolygonSize = Lead1->PolygonSize + 5;
}

/*Adjust the polygon size to the actual number of points.*/
Lead1->PolygonSize = i;
/*Add the polygonal region, using a Boolean OR, and display a message so that we can see what happened.*/
Lead1->SetRgnPolygon(L_POLY_WINDING, L_RGN_OR);
ShowMessage("Here is the added polygon, with a Boolean OR");
/*Fill the resulting polygon with red, and display a message. */
Lead1->Fill(RGB(255, 0, 0));
Lead1->RgnFrameType = ftNone;
Lead1->ForceRepaint();
ShowMessage("Using SetRgnColor and L_RGN_SETNOT, all else will become blue.");

/*Clean up memory*/
Lead1->FreeRgn();
/*Do the final region.*/
Lead1->SetRgnColor(RGB(255, 0, 0), L_RGN_SETNOT);
Lead1->Fill(RGB(0, 0, 255));
Lead1->ForceRepaint();
/*Clean up memory*/
Lead1->FreeRgn();
Lead1->PolygonSize= 0;
}


SetRgnBorder example for C++ Builder

void TForm1::SetRgn ( L_INT x, L_INT y, COLORREF crBorder )
{
LEADImage1->SetRgnBorder( x, y, crBorder, RGB(20,30,15), RGB(15,30,10), L_RGN_SET );
LEADImage1->RgnFrameType= ftAnimated;
}


SetRgnColorHSVRange example for C++Builder

int H0;
int S0;
int V0;
int H1;
int S1;
int V1;

/*This example sets a region corresponding to all pure green (Hue = 85)
and colors near green (+/- 10)
where Saturation is at least 40 and Value is at least 40*/

H0= 75;
S0= 40;
V0= 40;

H1= 95;
S1= 255;
V1= 255;

LEADImage1->SetRgnColorHSVRange ( H0, S0, V0, H1, S1, V1, L_RGN_SET ) ;
LEADImage1->RgnFrameType= ftAnimated;


SetRgnColorRGBRange example for C++Builder

/*This example sets a region corresponding to all colors that
have an rgb that includes red but no green and no blue*/
TColorRef rgbLo;
TColorRef rgbHi;

rgbLo= RGB (1, 0, 0);
rgbHi= RGB (255, 0, 0);
LEADImage1->SetRgnColorRGBRange (rgbLo, rgbHi, L_RGN_SET);
LEADImage1->RgnFrameType= ftAnimated;


SetRgnFromMask example for C++ Builder

/*This example sets and colored a region into LEADImage1 using a 1-bit black-and-white mask image.*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nRet= LEADImage1->Load("IMAGE1.CMP", 0, 1, 1);
if(nRet == SUCCESS)
{
nRet= LEADMask->Load ("MASK.TIF", 0, 1, 1);
if(nRet == SUCCESS)
{
LEADImage1->MaskBitmap= LEADMask->Bitmap;
LEADImage1->SetRgnFromMask(L_RGN_SET);
LEADImage1->Fill(RGB(0, 255, 0));
}
}
}


SetRgnMagicWand example for C++ Builder

// handle OnMouseUp event.
void __fastcall TForm1::LEADImage1MouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
{
LEADImage1->SetRgnMagicWand(X, Y, RGB(20,30,15), RGB(15,30,10), L_RGN_SET );
LEADImage1->RgnFrameType = ftAnimated;
}


SetRgnRect example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*Declare local variables.*/
int OffsetX, OffsetY;
HRGN SavedRegion;
/*Initialize the variables that we will manipulate to simulate mouse coordinates.*/
OffsetX = Lead1->BitmapWidth / 8;
OffsetY = Lead1->BitmapHeight / 6;
/*Create an elliptical region.*/
Lead1->SetRgnRect(OffsetX, OffsetY, OffsetX, OffsetY, L_RGN_SET);
/*Save a copy of the region.*/
SavedRegion = (HRGN)Lead1->GetRgnHandle();
/*Add the saved region to the bitmap, offsetting it so that we can see it.*/
Lead1->SetRgnHandle((L_HRGN)SavedRegion, OffsetX, OffsetY, L_RGN_OR);
/*Delete the saved region.*/
Lead1->DeleteRgnHandle((L_HRGN)SavedRegion);
/*Fill the bitmap region with blue.*/
Lead1->Fill(RGB(0, 0, 255));
/*Free the bitmap region.*/
Lead1->FreeRgn();
/*Repaint the image so that we can see how the image was updated. */
Lead1->ForceRepaint();
}


SetRgnRoundRect example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/*Declare local variables.*/
int OffsetX, OffsetY;

/*Initialize the variables that we will manipulate to simulate mouse coordinates.*/
OffsetX = Lead1->BitmapWidth / 8;
OffsetY = Lead1->BitmapHeight / 6;
/*Create an elliptical region.*/
Lead1->SetRgnRoundRect(OffsetX, OffsetY, OffsetX, OffsetY, OffsetX / 4 , OffsetY / 4 , L_RGN_SET);
Lead1->RgnFrameType = ftStatic;
/*Apply Emboss effect on the bitmap region */
Lead1->Emboss(EMBOSS_E,600);
/*Repaint the image so that we can see how the image was updated.*/
Lead1->ForceRepaint();
}


SetSelectionBitmap example for C++ Builder

LEADImage1->Load("d:\\temp\\flagsel.bmp", 0, 0, 1);
LEADImgList1->SetSelectionBitmap(RGB(0, 255, 0), LEADImage1->Bitmap);
LEADImgList1->SelectionStyle = SELECTIONSTYLE_USERBITMAP;


SetSrcClipRect example for C++ Builder

void__fastcall TForm1::SetSrcClipRect1Click(TObject *Sender)
{
int NewLeft, NewTop, NewWidth, NewHeight;
NewLeft = LEADImage1->SrcClipLeft + LEADImage1->SrcClipWidth * 0.1;
NewTop = LEADImage1->SrcClipTop + LEADImage1->SrcClipHeight * 0.1;
NewWidth = LEADImage1->SrcClipWidth * 0.8;
NewHeight = LEADImage1->SrcClipHeight * 0.8;
if ((NewWidth > 1) && (NewHeight >1))
LEADImage1->SetSrcClipRect(NewLeft, NewTop, NewWidth, NewHeight);
LEADImage1->BackErase = true;
LEADImage1->ForceRepaint();
}


SetSrcRect example for C++ Builder

This example zooms in on the image by reducing the source rectangle and repaints the image.

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int NewLeft, NewTop, NewWidth, NewHeight;
NewLeft = Lead1->SrcLeft+ Lead1->SrcWidth / 10;
NewTop = Lead1->SrcTop + Lead1->SrcHeight / 10;
NewWidth = Lead1->SrcWidth * 8 / 10;
NewHeight = Lead1->SrcHeight * 8 / 10;
if( (NewWidth > 1) && (NewHeight >1))
Lead1->SetSrcRect(NewLeft, NewTop, NewWidth, NewHeight);
Lead1->ForceRepaint();
}


SetTag example for C++ Builder

//---------------------------------------------------------------------------

void __fastcall TForm1::SetAndReadClick(TObject *Sender)
{
Variant myArray(OPENARRAY(int,(0,4)),varByte);
int nRet;
// initialize the array
myArray.PutElement(1,0);
myArray.PutElement(2,1);
myArray.PutElement(3,2);
myArray.PutElement(127,3);
// set a tag using one of the following:
LEADImage1->SetTag (32768, TAG_BYTE, 4, myArray);
// Write the tag
nRet = LEADImage1->WriteTag(Edit1->Text.c_str(), 1);
ReadTagClick(this);

LEADImage1->SetTag(32768, TAG_ASCII, 0, "My text string");
nRet = LEADImage1->WriteTag(Edit1->Text.c_str() , 1);
ReadTagClick(this);

}
//---------------------------------------------------------------------------
void __fastcall TForm1::ReadTagClick(TObject *Sender)
{
// read the tag back
LEADImage1->ReadTag(Edit1->Text.c_str(), 1, 32768);
GetAndDisplayTag(0);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::GetAndDisplayTag(int lTag)
{
Variant myVar;
AnsiString Msg;
long i;
long count;

// This sub will get a certain tag and display it according to the tag type.

myVar = LEADImage1->GetTagData (lTag);
count = LEADImage1->GetTagCount (lTag);

Msg = "Type = " + IntToStr((LEADImage1->GetTagType (lTag)));
Msg = Msg + "\n" + "count = " + IntToStr((int)count);

if (LEADImage1->GetTagType(lTag) == TAG_ASCII)
Msg = Msg + "\n" + "Data = " + myVar;
else if ((LEADImage1->GetTagType(lTag) == TAG_RATIONAL) || (LEADImage1->GetTagType(lTag) == TAG_SRATIONAL))
for (i = 0; i <= count - 1; i++)
Msg = Msg + "\n" + "Data(" + IntToStr((int)i) + ") = " + IntToStr((int)myVar.GetElement(i * 2)) + "/" + IntToStr((int)myVar.GetElement(i * 2 + 1));
else
for (i = 0; i <= count - 1; i++)
Msg = Msg + "\n" + "Data(" + IntToStr((int)i) + ") = " + VarToStr(myVar.GetElement(i));

MessageBox(Handle,Msg.c_str(),"test",0);

}


Sharpen example for C++ Builder

This example increases the sharpness of the bitmap and redisplays the image.

Lead1->Sharpen(100);
Lead1->ForceRepaint();


Shear example for C++ Builder

This example shears the bitmap 5 degrees horizontally and redisplays the image. It uses blue as the fill color.

Lead1->Shear(500, True, RGB(0,0,255));
Lead1->ForceRepaint();


ShiftData Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmaps */
LEADImage1->Load("e:\\image1.cmp", 0, 1, 1 );
LEADImage2->Load ("e:\\image2.cmp", 0, 1, 1 );
LEADImage2->GrayScale (16);

/* Move 5 bits starting from bit 2 into the high bits of the destination bitmap */
LEADImage1->ShiftData( LEADImage2->Bitmap, 2 /* uSrcLowBit */,6 /* uSrcHighBit*/,3 /* uDstLowBit */,8 /* uDstBitsPerPixel */ );
}


ShowMagGlass Example for C++ Builder

#define crNewCursor 10
// Global variable
bool gbLeftButton;

void __fastcall TForm1::FormCreate(TObject *Sender)
{
LEADImage1->EnableMethodErrors= False;
// Load "Image1.cmp" file
LEADImage1->Load ( "e:\\image1.cmp", 0, 1, 1 );
// Load the Same Image in LEADImage2
LEADImage2->Load ( "e:\\image1.cmp", 0, 1, 1 );
// Invert the Bitmap
LEADImage2->Invert ( );
// Set the MagGlassFlags
LEADImage1->MagGlassFlags= MAGGLASS_MANUAL_UPDATE;
// Load our cursor to be the MagGlass Curosr
Screen->Cursors[crNewCursor]= LoadCursorFromFile ( "e:\\cursor1.cur" );
LEADImage1->MagGlassPointer= (TCursor)crNewCursor;

// Starting the Magnifying Glass
LEADImage1->StartMagGlass ( 100,
100,
400,
(TColor)RGB(255, 0, 0),
(TColor)RGB(128, 128, 128),
False,
1,
False,
CROSSHAIR_FINE,
True,
True );

// Updating the Magnifying Glass bitmap of 1st control with bitmap of the
// 2nd control that has the same width and height.
LEADImage1->UpdateMagGlassFromHandle ( LEADImage2->Bitmap, true );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::LEADImage1MagGlassCursor(TObject *Sender)
{
// Check if the left button is not down and the Magnifying Glass is started
if ((!gbLeftButton) && (LEADImage1->HasMagGlass))
{
Cursor= LEADImage1->MagGlassPointer;
}
}
//---------------------------------------------------------------------------

void __fastcall TForm1::LEADImage1MouseDown(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
L_INT nStatus;

// Check if this is a left button and the Magnifying Glass is started
if ((Button != mbLeft) || (!LEADImage1->HasMagGlass) )
return;

// Move the Magnifying Glass to the hit position
nStatus= LEADImage1->SetMagGlassPos (X, Y);
if ( nStatus != SUCCESS )
{
ShowMessage ( "Error while displaying Magnifying Glass. Error: " + IntToStr(nStatus) );
return;
}

// Show the Magnifying Glass
nStatus= LEADImage1->ShowMagGlass (true);
if ( nStatus != SUCCESS )
{
ShowMessage ( "Error while displaying Magnifying Glass. Error: " + IntToStr(nStatus) );
return;
}

// Left button is currently pressed
gbLeftButton= true;

// Call this Windows API function to hide the cursor
ShowCursor ( false );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::LEADImage1MouseMove(TObject *Sender,
TShiftState Shift, int X, int Y)
{
L_INT nStatus;

// Check if the left button is down and the Magnifying Glass is started
if ( !LEADImage1->HasMagGlass )
return;

// Move the Magnifying Glass to the mouse position
nStatus= LEADImage1->SetMagGlassPos(X, Y);
if ( nStatus != SUCCESS )
ShowMessage ( "Error while moving Magnifying Glass. Error: " + IntToStr(nStatus) );
}
//---------------------------------------------------------------------------
void __fastcall TForm1::LEADImage1MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
L_INT nStatus;

// Check if the left button is down and the Magnifying Glass is started
if ((Button != mbLeft) || (!LEADImage1->HasMagGlass) )
return;

// Show the Magnifying Glass
nStatus= LEADImage1->ShowMagGlass ( false );
if ( nStatus != SUCCESS )
ShowMessage ( "Error while hiding Magnifying Glass. Error: " + IntToStr(nStatus) );

// Left button is released
gbLeftButton= true;

// Call this Windows API function to show the cursor
ShowCursor ( true );
}
//---------------------------------------------------------------------------


Skeleton Example for C++ Builder

void __fastcall TForm1::SkeletonBitmap1Click(TObject *Sender)
{
LEADImage1->EdgeDetector( 60, EDG_SOBEL_ALL );
LEADImage1->Skeleton( 128 );
}


SkipFile example for C++ Builder

void __fastcall TForm1::LEADThumb1ThumbnailEvent(TObject *Sender,
TBitmapHandle Bitmap, AnsiString FileName, int nStatusCode,
int nPercent)
{
AnsiString szMsg;
char * p = NULL;
AnsiString StrTmp ;

if (nStatusCode == SUCCESS) //successful thumbnail generation
{
//save thumbnails in a multipage TIFF file
LEADImage1->Bitmap= Bitmap;
LEADImage1->Save ("c:\\temp\\thumbs.tif", FILE_TIF, 24, 0, SAVE_APPEND ) ;
szMsg= FileName + "\n";
szMsg= szMsg + "Format= " + IntToStr(LEADThumb1->InfoFormat) + "\n";
szMsg= szMsg + "Compression= " + LEADThumb1->InfoCompression + "\n";
szMsg= szMsg + "Bits= " + IntToStr(LEADThumb1->InfoBits) + "\n";
szMsg= szMsg + "Width= " + IntToStr(LEADThumb1->InfoWidth) + "\n";
szMsg= szMsg + "Height= " + IntToStr(LEADThumb1->InfoHeight) + "\n";
szMsg= szMsg + "Page= " + IntToStr(LEADThumb1->InfoPage) + "\n";
szMsg= szMsg + "TotalPages= " + IntToStr(LEADThumb1->InfoTotalPages) + "\n";
szMsg= szMsg + "SizeDisk= " + IntToStr(LEADThumb1->InfoSizeDisk) + "\n";
szMsg= szMsg + "SizeMem= " + IntToStr(LEADThumb1->InfoSizeMem) + "\n";
szMsg= szMsg + "XRes= " + IntToStr(LEADThumb1->InfoXRes) + "\n";
szMsg= szMsg + "YRes= " + IntToStr(LEADThumb1->InfoYRes) + "\n";
ShowMessage ( szMsg ) ;
}
else
{
if (nStatusCode == BROWSE_PRELOAD)
{
//check the extension, if it is '.DOC', then skip
StrTmp=UpperCase(FileName);
p = StrRScan( PChar ( StrTmp.c_str() ), '.');
if ( ! strcmp ( p, ".DOC"))
{
LEADThumb1->SkipFile= True;
ShowMessage ( "skipping - " + FileName ) ;
}
}
}
LEADThumb1->ContinueBrowse= true ;//continue the browse oper}
}


SmoothEdges Example for C++ Builder

void __fastcall TForm1::SmoothEdgesClick(TObject *Sender)
{
LEADImage1->SmoothEdges( 75, 0 );
}


Solarize example for C++ Builder

This example applies a solarize effect and repaints the image.

Lead1->Solarize(100);
Lead1->ForceRepaint();


Sort (ImageList Control) example for C++ Builder

/*Sort the items in ascending order*/
LEADImgList1->Sort (True);


SortExt example for C++ Builder

void __fastcall TForm1::btnSortExtClick(TObject *Sender)
{
LEADImgList1->SortExt(true, true,
 false, 0);
}


SpatialFilter example for C++ Builder

This example applies Laplacian line detection and redisplays the image.

Lead1->SpatialFilter(FLT_LAPLACE_1);
Lead1->ForceRepaint();


Spherize Example for C++ Builder

void __fastcall TForm1::SpherizeClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);

LEADImage1->Spherize( 100, ptCenter, 0, FILL_RPT | FILL_WOUTROT );
}


Src... example for C++ Builder

This example uses the source rectangle properties to zoom in on the image.

/*Calculate the values to zoom in by 10 percent and center the image.*/
if((Lead1->SrcWidth > 1) && (Lead1->SrcHeight > 1))
{
Lead1->SrcWidth = Lead1->SrcWidth * 0.9;
Lead1->SrcHeight = Lead1->SrcHeight * 0.9;
Lead1->SrcTop = (Lead1->BitmapHeight - Lead1->SrcHeight) / 2;
Lead1->SrcLeft = (Lead1->BitmapWidth - Lead1->SrcWidth) / 2;
}
/*Set the clipping area to the same as the destination rectangle*/
Lead1->SrcClipWidth = Lead1->SrcWidth;
Lead1->SrcClipHeight = Lead1->SrcHeight;
Lead1->SrcClipTop = Lead1->SrcTop;
Lead1->SrcClipLeft = Lead1->SrcLeft;

/*Redisplay the image*/
Lead1->ForceRepaint();


STable example for C++Builder

/*
This example considers that the image you are working with is 24 bpp.
*/
{
L_INT i;
L_UINT uVal;
AnsiString Msg;

LEADImage1->RemapHueTablesSize = 256;
/*This example remaps the saturation of each color to one half its original*/
for ( i= 0; i < 256; i ++ )
{
LEADImage1->STable[i]= (i/2);
uVal= LEADImage1->STable[i];
Msg= Msg + IntToStr ( uVal )+ " ";
}
ShowMessage ( Msg );
LEADImage1->RemapHue( False, False, True, False );
}


StartMagGlass example for C++ Builder

/* set the color mask to mask out a few shades of black */
LeadImage1->MagGlassMaskCount = 3;
LeadImage1->MagGlassMask[0] = RGB(0, 0, 0);
LeadImage1->MagGlassMask[1] = RGB(1, 1, 1);
LeadImage1->MagGlassMask[2] = RGB(2, 2, 2);
LeadImage1->RgnFrameType = ftNone;
LeadImage1->MagGlassPaintPalette = LeadImage1->PaintPalette;
LeadImage1->MagGlassBitonalScaling = LeadImage1->BitonalScaling;
LeadImage1->MagGlassPaintDither= LeadImage1->PaintDither;
LeadImage1->MagGlassPaintScaling = LeadImage1->PaintScaling;
LeadImage1->MagGlassFlags = MAGGLASS_MASK_NORMAL;
LeadImage1->StartMagGlass (100, 100, 400, RGB(255, 0, 0), RGB(128, 128, 128), True, 1, False, CROSSHAIR_FINE, True, True);

HRGN hRoundRectRgn = CreateRoundRectRgn(0, 0, 100, 100, 25, 25);
LeadImage1->UpdateMagGlassShape(MAGGLASS_SHAPE_HRGN, L_HANDLE(hRoundRectRgn));
DeleteObject(hRoundRectRgn);
/*.......some other work..............*/
/*.......some other work..............*/
/* Stop the MagGlass */
LeadImage1->StopMagGlass();


StretchIntensity example for C++ Builder

This example stretches the intensity and redisplays the image.

Lead1->StretchIntensity();
Lead1->ForceRepaint();


SubtractBackground Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load the bitmap, keeping the bits per pixel of the file */
LEADImage1->Load("image3.cmp", 0, 1, 1 );

/* Apply Subtract Background effect on the image*/
LEADImage1->SubtractBackground( 50, SBK_DEPEND, 50, SBK_BG_DARK + SBK_RES_SHOW );
}


SwapColors example for C++ Builder

SwapColors C++ Builder Example

/*This example assumes there is a bitmap loaded*/
LEADImage1->SwapColors (SWAP_RG);


Swirl Example for C++ Builder

void __fastcall TForm1::SwirlClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);

LEADImage1->Swirl( 180, ptCenter );
}


TextFont example for C++ Builder

This example, in an OnMouseUp event, determines the size of a rectangle for a string in the specified font. It then draws the rectangle and draws the text on top of the rectangle.

void __fastcall TForm1::Lead1MouseUp(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y)
{
const AnsiString OutputString = "This is my text.";
int TextWidth, TextHeight;

/*Specify the font, and styles*/
Lead1->TextFont->Name = "Times New Roman";
Lead1->TextFont->Size = 16;
Lead1->TextFont->Color = (TColor)RGB(0, 0, 255); /*Blue*/
Lead1->TextStyle = etsNormal;
Lead1->TextAlign = etaHcenterVcenter;
/*Get the width and height of the text to be drawn.*/
TextWidth = Lead1->DrawTextWidth(OutputString);
TextHeight = Lead1->DrawTextHeight(OutputString);
/*set the location for the text*/
Lead1->TextTop = Y;
Lead1->TextLeft = X;
Lead1->TextWidth = TextWidth;
Lead1->TextHeight = TextHeight;
/*Set the properties for drawing a rectangle behind the text.*/
Lead1->DrawPenStyle = psSolid;
Lead1->DrawMode = pmCopy;
Lead1->DrawFillColor = (TColor)RGB(0, 255, 0); /*Green*/
/*Draw on the screen, not on the bitmap.*/
Lead1->DrawPersistence = False;
/*Draw the rectangle, then draw the text.*/
Lead1->DrawRectangle(X, Y, TextWidth, TextHeight);
Lead1->DrawTextStr(OutputString, 0);
}


TextPointerFixed example for C++ Builder

void TForm1::ExampleTextPointerFixed ( HANNOBJECT hObject )
{
L_INT nObjectType;
bool bTextPointerFixed;

nObjectType= LEADAnn1->AnnGetType(hObject);

if (nObjectType != ANNOBJECT_TEXT)
ShowMessage( "This object is not a Text Object");

bTextPointerFixed = LEADAnn1->AnnTextPointerFixed[hObject];
if (bTextPointerFixed == true)
bTextPointerFixed = false;
else
bTextPointerFixed = true;

LEADAnn1->AnnTextPointerFixed[hObject] = bTextPointerFixed;
}


TextureAlphaBlend Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Load both bitmaps, at 24 bits per pixel */
LEADImage1->Load("E:\\IMAGE1.CMP", 24, ORDER_BGR, 1);
LEADImage2->Load("E:\\IMAGE2.cmp", 24, ORDER_BGR, 1);

/* Load the fade mask bitmaps */
LEADImage3->Load("E:\\IMAGE1.CMP", 24, ORDER_BGR, 1);//FADEMASK
LEADImage3->Invert( );
/* Combine BitmapSrc with BitmapDst, with fade mask bitmap and a 100 opacity*/
LEADImage1->TextureAlphaBlend(0, 0, LEADImage1->BitmapWidth, LEADImage1->BitmapHeight, LEADImage2->Bitmap, 0, 0, LEADImage3->Bitmap, 100, 0, NULL );
}


TextWordWrap example for C++ Builder

This example wraps text inside the rectangle that is specified for the text object.

/* Text location */
Lead1->TextTop = 10;
Lead1->TextLeft = 10;
Lead1->TextWidth = 150;
Lead1->TextHeight = 150;
/* Text alignment and angle */
Lead1->TextAlign = etaLeftVcenter;
Lead1->TextAngle = 0;
/* Enable word wrap */
Lead1->TextWordWrap = True;
Lead1->DrawTextStr("LEADTOOLS 11 Supports WordWrap when drawing text", 0);


TransitionEffect example for C++ Builder

This example paints a transition with a 255-step grayscale gradient.

Lead1->AutoRepaint = False;
Lead1->EffectDelay = 50;
Lead1->Load("c:\\lead\\images\\image1.cmp", 0, 0, 1);
Lead1->TransitionEffect = EFX_EFFECT_WIPE_RECTANGLE_OUT;
Lead1->TransitionStyle = etsGradient;
Lead1->GradientStyle = EFX_GRADIENT_ANGLE_TO_LT;
Lead1->GradientEndColor = (TColor)RGB(0, 0, 0);
Lead1->GradientStartColor = (TColor)RGB(255, 255, 255);
Lead1->GradientSteps = 255;
Lead1->AutoRepaint = True;


TransparentColor example for C++ Builder

This example sets white as a transparent color; then loads a test image and paints it.

Lead1->AutoRepaint= False;
/* Enable transparency */
Lead1->UseTransparentColor= True;
/* Make white the transparent color */
Lead1->TransparentColor= RGB(255, 255, 255);
Lead1->Load("d:\\ltwin11\\images\\image1.cmp", 0, 0, 1);
Lead1->ForceRepaint();


Trim example for C++ Builder

This example trims one-tenth from the bitmap and repaints the image.

int NewLeft, NewTop, NewWidth, NewHeight;

NewLeft = Lead1->BitmapWidth / 10;
NewTop = Lead1->BitmapHeight / 10;
NewWidth = (Lead1->BitmapWidth * 8) / 10;
NewHeight = (Lead1->BitmapHeight * 8) / 10;
Lead1->Trim(NewLeft, NewTop, NewWidth, NewHeight);

// Set the image display size to match the LEAD control
Lead1->SetDstRect(0, 0, Lead1->BitmapWidth, Lead1->BitmapHeight);
Lead1->SetDstClipRect(0, 0, Lead1->BitmapWidth, Lead1->BitmapHeight);
Lead1->ForceRepaint();


Tunnel Example for C++ Builder

void __fastcall TForm1::TunnelClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)( LEADImage1->BitmapWidth /2 );
ptCenter.y= (int)( LEADImage1->BitmapHeight /2 );
LEADImage1->Tunnel( ptCenter, 0, (int)(LEADImage1->BitmapHeight/2), (int)(LEADImage1->BitmapWidth/2), 1, 0, 25, 100, 0, 2000, RGB(255,0,0), RGB(0,0,0), TUN_AXIS_WIDTH | PLANE_FILL_CLR );
}


Underlay example for C++ Builder

This example loads a bitmap into Lead2 and uses it as a tiled underlay for Lead1.

Lead2->Visible = False;
Lead2->Load("c:\\lead\\images\\ulay1.bmp", 0, 0, 1);
Lead1->Underlay(Lead2->Bitmap, UB_TILE);
Lead1->ForceRepaint();


UnlockSupport (ImageList Control) example for C++ Builder

BOOL bRet;

bRet = LEADImgList1->IsSupportLocked(L_SUPPORT_OCR);
if( (bRet))
LEADImgList1->UnlockSupport (L_SUPPORT_OCR, "yourstringhere");


UnlockSupport (ISIS Control) example for C++Builder 4.0

/* Unlock OCR support. */
/* Note that this is a sample key, which will not work in your toolkit. */
LeadIsis1->UnlockSupport(L_SUPPORT_OCR, "TestKeyXYZ");


UnlockSupport (Thumbnail Browser Control) example for C++ Builder

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Boolean bRet;
bRet = LEADThumb1->IsSupportLocked(L_SUPPORT_OCR);
if( bRet == true)
LEADThumb1->UnlockSupport (L_SUPPORT_OCR, "yourstinghere");
}


UnSharpMask example for C++ Builder

UnsharpMask C++ Builder Example

LEADImage1->UnsharpMask (200, 15, 50, RGB_SPACE);


UseLUT Example for C++ Builder

void __fastcall TForm1::Button1Click(TObject *Sender)
{
int nRet;
int nLow;
int nHigh;

LEADImage1->UnlockSupport(L_SUPPORT_MEDICAL, "TestKey");
nRet= LEADImage1->Load("c:\\16.jpg", 16, 0, 1);
if(nRet == SUCCESS)
{
LEADImage1->GetMinMaxBits();
LEADImage1->GetMinMaxVal();

LEADImage1->LevelLowBit= 0;
LEADImage1->LevelHighBit= LEADImage1->BitmapBits - 1;

nLow= LEADImage1->MinBit;
nHigh= 1 << (LEADImage1->MaxBit - LEADImage1->MinBit + 1);
//allocate the LUT
LEADImage1->LevelLUT[nHigh - 1]= (TColor)0;

//fill the entire LUT with gradient from RED to BLUE
LEADImage1->WindowLevelFillLUT(clRed,
clBlue,
nLow,
nHigh,
LEADImage1->MinBit,
LEADImage1->MaxBit,
LEADImage1->MinVal,
LEADImage1->MaxVal,
0,
FILLLUT_INSIDE | FILLLUT_LINEAR);
}
else
ShowMessage("Unable to Load File");
}

void __fastcall TForm1::Button2Click(TObject *Sender)
{
LEADImage1->UseLUT= False;
LEADImage1->ColorRes(24, CRF_BYTEORDERBGR, CRF_NODITHERING, 0);
}


UserFilter Example for C++ Builder

/*In this example the high pass filter will be applied using user defined matrix*/
void __fastcall TForm1::Button1Click(TObject *Sender)
{
/* Allocate the user filter matrix. We need a (3x3) matrix with 9 elements. */
L_INT ufltMatrix[3*3];
L_INT i, j;
TPoint pt;

/* Load a bitmap at its own bits per pixel */
LEADImage1->Load("image1.cmp", 0, 1, 1 );

/* Initialize the array with factor used to apply the high pass filter */
for(i = 0; i < 3; i++)
{
for(j = 0; j < 3; j++)
{
if(j == 1 || i == 1)
{
if(j == 1 && i == 1)
ufltMatrix[i * 3 + j] = 5;
else
ufltMatrix[i * 3 + j] = -1;
}
else
ufltMatrix[i * 3 + j] = 0;
}
}

pt.x = 1;
pt.y = 1;

/* Apply the high pass custom filter */
LEADImage1->UserFilter(3, 3, pt, 1, 0, ufltMatrix, UD_SUM);
}


UserPalette and BitmapPalette example for C++ Builder

This example demonstrates the UserPalette and BitmapPalette properties.

//Specify a blue and white user palette
Lead1->UserPalette[0] = RGB(0, 0, 255);
Lead1->UserPalette[1] = RGB(255, 255, 255);

//Implement the user palette
Lead1->ColorRes(1, CRF_USERPALETTE, CRF_ORDEREDDITHERING, 2);

//Display the blue and white image
Lead1->ForceRepaint();

ShowMessage("This is the user palette. Click OK to change the bitmap palette. ");

//Change the bitmap palette to red and white
Lead1->BitmapPalette[0] = RGB(255, 0, 0);
Lead1->BitmapPalette[1] = RGB(255, 255, 255);

//Display the red and white image
Lead1->ForceRepaint();


Version... example for C++ Builder

This example puts the version information into a string and displays the string in a message box.

void __fastcall TForm1::Button3Click(TObject *Sender)

{
System::AnsiString LevelStr, cMsg;

if (Lead1->VersionLevel == TOOLKIT_LEVEL_EXP)
LevelStr = "Document/Medical editions ";
else
LevelStr = "Professional Edition";
cMsg = Lead1->VersionProduct + "\n" + LevelStr + "\n";
cMsg = cMsg + "Version: " + IntToStr(Lead1->VersionMajor) + ".";
cMsg = cMsg + IntToStr(Lead1->VersionMinor) + "\n";
cMsg = cMsg + "Date produced: " + Lead1->VersionDate + "\n";
cMsg = cMsg + "Time produced: " + Lead1->VersionTime + "\n";

// Display the message box
Application->MessageBox(cMsg.c_str(), "Version Info", MB_OK);

}


ViewSize example for C++ Builder

long nSize;
long nFirst;
long nLast;
long nCols;
long nCount;

//NOTE: assume scroll style = SCROLLSTYLE_VERTICAL
//get the view size
nSize = LEADImgList1->ViewSize;
//get the first visible item
nFirst = LEADImgList1->FirstVisibleItem;
//get the column count
nCols = LEADImgList1->ColumnCount;
//calculate the index of last visible item
nLast = nFirst + (nSize * nCols) - 1; //0 based index
nCount = LEADImgList1->Count;
if (nLast > nCount - 1)
nLast = nCount - 1;


VScrollStep example for C++ Builder

Lead1->VScrollStep = 2 ;


VTable example for C++Builder

/*This example considers that the image you are working with is 24 bpp.*/
{
L_INT i;
L_UINT uVal;
AnsiString Msg;

LEADImage1->RemapHueTablesSize = 256;
/*This example remaps the "value" of each color to one half its original*/
for ( i= 0; i < 256; i ++ )
{
LEADImage1->VTable [i]= (i/2);
uVal= LEADImage1->VTable [i];
Msg= Msg + IntToStr(uVal)+ " ";
}
ShowMessage (Msg);
LEADImage1->RemapHue(False, False, False, True);
}


Wave Example for C++ Builder

void __fastcall TForm1::WaveClick(TObject *Sender)
{
LEADImage1->Wave( 20, 25, 0, 100 , 100, 0, FILL_RPT | DIS_PER | WV_SIN );
}


Wind Example for C++ Builder

void __fastcall TForm1::WindClick(TObject *Sender)
{
LEADImage1->Wind( 40, 4500, 0 );
}


WindowLevel example for C++ Builder

This example converts a bitmap to 12-bit grayscale and then performs window leveling on the eight least significant bits of the image.

Lead1->Grayscale (12); //Grayscale image to 12-bit
//use least significant 8 bits
Lead1->LevelLowBit = 0;
Lead1->LevelHighBit = 7;
Lead1->WindowLevel();


WindowLevelBitmap example for C++ Builder

This example loads a 16-bit grayscale, fills the window level lookup table, and window levels the bitmap for display only

void __fastcall TForm1::WndLvlBmpClick(TObject *Sender)
{
int min, max, i;

// Load a 16-bit grayscale image
Lead1->Load("test.tif", 0, 0, 1);
Lead1->AutoRepaint = False;
// Use all bits
Lead1->LevelLowBit = 0;
Lead1->LevelHighBit = Lead1->BitmapBits - 1;
Lead1->GetMinMaxBits();
Lead1->GetMinMaxVal();
max = Lead1->MaxVal;
min = Lead1->MinVal;
// Set LUT so it ranges from pure blue to pure red
for(i=min; i<max; i++)
Lead1->LevelLUT[i] = (TColor)RGB(i % 256, 0, 256 - i % 256);
//Window level for display only -- leave the bitmap data unchanged
Lead1->WindowLevelBitmap = True;
Lead1->WindowLevel();
Lead1->ForceRepaint();
}


WindowLevelFillLUT example for C++Builder

int nHigh;
int nLow;

LEADImage1->GetMinMaxBits ( ) ;
LEADImage1->GetMinMaxVal ( ) ;

LEADImage1->LevelLowBit = 0;
LEADImage1->LevelHighBit = LEADImage1->BitmapBits - 1;

nLow = LEADImage1->MinBit;
nHigh = pow(2, LEADImage1->MaxBit - LEADImage1->MinBit + 1);

//allocate the LUT
LEADImage1->LevelLUT[nHigh - 1] = (TColor)0;

//fill the entire LUT with gradient from RED to BLUE
LEADImage1->WindowLevelFillLUT ( RGB(255, 0, 0), RGB(0, 0, 255),
nLow, nHigh, LEADImage1->MinBit, LEADImage1->MaxBit,
LEADImage1->MinVal, LEADImage1->MaxVal, True);

//now use it
LEADImage1->WindowLevelBitmap = True;
LEADImage1->WindowLevel( ) ;


WMFResolution example for C++ Builder

This example displays the default resolution stored in a WMF, changes the resolution to 150 dpi, and then loads the image

void __fastcall TForm1::LoadWMFClick(TObject *Sender)
{
AnsiString fileName;

fileName = "test.wmf";
// Display resolution stored in WMF
Lead1->GetFileInfo(fileName, 0);
ShowMessage("InfoXRes: " + IntToStr(Lead1->InfoXRes) + "\n" + "InfoYRes: " + IntToStr(Lead1->InfoYRes));
// Set resolution so WMF is loaded at 150 dpi
Lead1->WMFResolutionX = 150;
Lead1->WMFResolutionY = 150;
Lead1->Load(fileName, 0, 0, 1);
}


WMFResolutionX Example for C++ Builder

This example displays the default resolution stored in a WMF, changes the resolution to 150 dpi, and then loads the image

void __fastcall TForm1::LoadWMFClick(TObject *Sender)
{
AnsiString fileName;

fileName = "test.wmf";
// Display resolution stored in WMF
LEADImage1->GetFileInfo(fileName, 0);
ShowMessage("InfoXRes: " + IntToStr(LEADImage1->InfoXRes) + "\n" + "InfoYRes: " + IntToStr(LEADImage1->InfoYRes));
// Set resolution so WMF is loaded at 150 dpi
LEADImage1->WMFResolutionX = 150;
LEADImage1->WMFResolutionY = 150;
LEADImage1->Load(fileName, 0, 0, 1);
}


WriteComment example for C++ Builder

// set the comment
LEADImage1->Comment[CMNT_SZARTIST] = "Me" ;

// write the comment into page 1 of TEST.TIF
LEADImage1->WriteComment("TEST.TIF", 1);

// read the comment and display it

MessageBox(Handle,VarToStr(LEADImage1->ReadComment("TEST.TIF", 1, CMNT_SZARTIST)).c_str(),
"Info",0);


WriteMarkerAction example for C++ Builder

void __fastcall TForm1::LEADImage1TransformMarker (int iMarker, int lSize,
Pointer pData, int iTransform)
{
// I will replace the comment present in the file with my own comment
if (iMarker == 0xFE)
{
LEADImage1->WriteMarkerAction= WRITEMARKER_IGNORE;
LEADImage1->WriteMarker (iMarker, 10, PChar("My comment"));
}
}
//Rotate the file 90 degrees
LEADImage1->TransformFile ("c:\\temp\\1.jpg", "c:\\temp\\2.jpg", FILE_TRANSFORM_ROTATE90, 1);


WriteMetaData example for C++ Builder

void __fastcall TForm1::WriteMetaDataClick(TObject *Sender)
{
LEADMarker1->LoadMarkers ( "e:\\image1.jpg", 0 );
LEADImage1->SetMarkers ( LEADMarker1, 0 );
LEADImage1->WriteMetaData ( "e:\\image2.tif", METADATA_ALL );
}


ZoomBlur Example for C++ Builder

void __fastcall TForm1::ZoomBlurClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);

LEADImage1->ZoomBlur( 50, 5, ptCenter );
}


ZoomIn example for C++ Builder

This example calls ZoomIn() method to zoom in on a captured image.

Lead1->ZoomIn();


ZoomWave Example for C++ Builder

void __fastcall TForm1::ZoomWaveClick(TObject *Sender)
{
TPoint ptCenter;

ptCenter.x= (int)(LEADImage1->BitmapWidth /2);
ptCenter.y= (int)(LEADImage1->BitmapHeight /2);

LEADImage1->ZoomWave( 20 , 10 , 0 , 0, ptCenter, 0, FILL_RPT );
}


Tutorial for Delphi Programmers

The following topics provide brief and simple examples to help you learn how to use the LEADTOOLS VCL.

Note:

These tutorial examples are intended to be easy to understand and easy to test. The example programs in the EXAMPLES subdirectory provide more in depth design and more detailed code.

Loading and Displaying an Image

Zooming Out and Zooming In

Dynamically Positioning the Control

Zooming In on a Selection

Outlining, Dragging, and Pasting a Region

Printing Multiple Images

Print a Real Image Size in Inches (Delphi 4)

Writing and Reading Multipage Files

Using Transparent Controls

Drawing Simple Lines and Shapes

Cropping a Displayed Image and Copying It to a Bitmap (Delphi)

Using LEADTOOLS with Data Controls

Loading and Saving Annotation Objects From/To Databases (Delphi 4.0)

Creating, Viewing, and Merging Color Separations

Updating a Gauge and Detecting a User Interrupt

Using a PanWindow


Loading and Displaying an Image (Delphi)

Take the following steps to start a project and to add some code that positions, scales, and displays an image on the main form:

1. | Start Delphi.
2. | In the File menu, choose New Application.
3. | On the Delphi toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEAD Main control on the VCL toolbar. Size and position the control as you want it to appear at run time, and change the name of the control to Lead1.
5. | Add a command button to your form and name it as follows:

Name | Caption
LoadLead | Load Image

6.

Code the main form's FormShow procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.FormShow(Sender: TObject);

begin

{ Set defaults for displaying the image. }
{ These are all persistent properties that can be set in the properties box. }
Lead1.BorderStyle := bsSingle;
Lead1.BackColor := RGB(255, 255, 125);
Lead1.PaintDither := pdDiffusion;
Lead1.PaintPalette := ppAuto;
Lead1.AutoRepaint := True;
Lead1.AutoSize := False;
Lead1.AutoSetRects := True;
Lead1.PaintSizeMode := smFit;

end;

7.

Code the LoadLead button's click procedure as follows:

procedure TForm1.LeadLoadClick(Sender: TObject);
begin
Lead1.Load('c:\lead\images\image1.cmp', 0, 0, 1);
end;

8.

At the beginning of the Unit1 file, add LEADUNT to the uses section. In order to use the constants in Delphi, you must add the LEADDEF unit to the uses section. For example:

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, LEADVCL, StdCtrls, LEADDEF

9. | Run your program to test it.
10. | Save the project to use as a starting point for other tasks in this tutorial.


Loading and Saving Annotation Objects From/To Databases (Delphi 4.0)

Note:

This topic is for Document/Medical only.

Take the following steps to create and run a program that loads and saves Annotation objects from/to a DataBase.

NOTE: You need to create a DataBase file (Annotations.mdb) with the following field to run this tutorial:

FieldName | Type
AnnBlob | OLE Object

1. | Start Delphi.
2. | On the Delphi toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
3. | Select the LEAD Annotation control on the VCL toolbar. Size and position the control as you want it to appear at run time.
4. | From the Delphi ADO tab, add an "ADOTable" component to your form.
5. | From the Delphi DataAccess tab, add a "DataSource" component to your form.
6. | Using the Object Inspector, set the following:

LEADAnn1.DataSource = DataSource1
DataSource1.DataSet = ADOTable1

7.

Add six buttons to your form away from the LEADAnn control and name them as follows:

Name | Caption
btnConnect | Connect To DataBase
btnDisconnect | Disconnect From DataBase
btnAdd | Add New Record
btnDelete | Delete Current Record
btnLoadNext | Load Next Record
btnLoadPrevious | Load Previous Record

8.

Handle the Form1 OnCreate event, and code the FormCreate procedure as follows:

procedure TForm1.FormCreate(Sender: TObject);
var
nRet: Integer;
strDataBasePath: String;
strConnectionString: String;
begin
try
{ Note that these are sample keys, which will not work
 in your toolkit. }
LEADAnn1.UnlockSupport(L_SUPPORT_DOCUMENT,
 'TestKey');
LEADAnn1.Load('C:\Program
 Files\LEAD Technologies, Inc\LEADTOOLS14\Images\Image2.cmp', 0, 1, 1);
LEADAnn1.AnnUserMode:=
 ANNUSERMODE_DESIGN;
nRet:= LEADAnn1.AnnToolbar.CreateTB(0,
 0, ANNTOOLALIGN_LEFT + ANNTOOLALIGN_TOP);
if(nRet = SUCCESS)then
begin
LEADAnn1.AnnToolBar.Visible:= True;
//change the sDBPath
 to point to your database!
strDataBasePath :=
 'C:\Program Files\LEAD Technologies, Inc\LEADTOOLS14\Images\Annotations.mdb';
strConnectionString
 := 'Provider=Microsoft.Jet.OLEDB.4.0;Data Source=' + strDataBasePath +
 ';Persist Security Info=False';
ADOTable1.ConnectionString:=
 strConnectionString;
ADOTable1.TableName:=
 'Annotations';
DataSource1.DataSet:=
 ADOTable1;
LEADAnn1.DataSource:=
 DataSource1;
end;
finally
UpdateButtons();
end;
end;

9.

Handle the Form1 OnClose event, and code the FormClose procedure as follows:

procedure TForm1.FormClose(Sender: TObject; var Action:
 TCloseAction);
begin
// DeActivate the connection if it is already active.
if(ADOTable1.State = dsBrowse)then
ADOTable1.Active:= False;
end;

10.

Handle the btnConnect OnClick event, and code the btnConnectClick procedure as follows:

procedure TForm1.btnConnectClick(Sender: TObject);
begin
try
// Activate the connection.
ADOTable1.Active:= True;
finally
UpdateButtons();
end;
end;

11.

Handle the btnDisconnect OnClick event, and code the btnDisconnectClick procedure as follows:

procedure TForm1.btnDisconnectClick(Sender: TObject);
begin
try
// DeActivate the connection.
if(ADOTable1.State = dsBrowse)then
ADOTable1.Active:=
 False;
finally
UpdateButtons();
end;
end;

12.

Handle the btnAdd OnClick event, and code the btnAddClick procedure as follows:

procedure TForm1.btnAddClick(Sender: TObject);
var
hMem: L_HANDLE;
phMem: L_PHANDLE;
uAnnSize: L_INT32;
annStream: TMemoryStream;
nSavedBytes: Integer;
begin
try
// Add new record
ADOTable1.Append();
// Save the current annotations into
 memory
hMem:= 0;
LEADAnn1.AnnSaveMemory(@hMem,
 ANNFMT_NATIVE, False, @uAnnSize, SAVE_OVERWRITE, 1);
// Globallock the data in memory.
phMem:= GlobalLock(hMem);
if(phMem <> Nil)then
begin
// write the Annotation
 data into a memory stream
annStream:= TMemoryStream.Create();
nSavedBytes:= annStream.Write(phMem^,
 uAnnSize);
if(nSavedBytes =
 uAnnSize)then
begin
//
 Save the BLOB into DataBase
TBlobField(ADOTable1.FieldByName('AnnBlob')).LoadFromStream(annStream);
ADOTable1.FieldByName('AnnSize').AsInteger:=
 uAnnSize;
//
 Apply the DataBase changes.
ADOTable1.Post();
end
else
ShowMessage('Error
 Writing To DataBase');
// Unlock and Free
 the Global Data
GlobalUnlock(hMem);
GlobalFree(hMem);
end;
finally
UpdateButtons();
end;
end;

13.

Handle the btnDelete OnClick event, and code the btnDeleteClick procedure as follows:

procedure TForm1.btnDeleteClick(Sender: TObject);
begin
try
// Delete the Current Record data.
ADOTable1.Delete();
// Load the Annotations for the new
 active record.
LoadAnnotations();
finally
UpdateButtons();
end;
end;

14.

Handle the btnloadNext OnClick event, and code the btnLoadNextClick procedure as follows:

procedure TForm1.btnLoadNextClick(Sender: TObject);
begin
try
// Move to the next record
ADOTable1.Next();
// Load the Annotations for the new
 active record.
LoadAnnotations();
finally
UpdateButtons();
end;
end;

15.

Handle the btnLoadPrevious OnClick event, and code the btnLoadPreviousClick procedure as follows:

procedure TForm1.btnLoadPreviousClick(Sender: TObject);
begin
try
// Move to the previous record
ADOTable1.Prior();
// Load the Annotations for the new
 active record.
LoadAnnotations();
finally
UpdateButtons();
end;
end;

16.

Add the following methods declaration to the private section of Form1:

Procedure UpdateButtons();

Procedure LoadAnnotations();

17.

Add the code of UpdateButtons and LoadAnnotations methods to Form1.

Procedure TForm1.UpdateButtons();
begin
// Enable/Disable the buttons according to the current
 state.
btnConnect.Enabled:= Not ADOTable1.Active;
btnDisconnect.Enabled:= ADOTable1.Active;
btnAdd.Enabled:= ADOTable1.Active;
btnDelete.Enabled:= ((ADOTable1.Active) And (ADOTable1.RecordCount
 > 0));
btnLoadNext.Enabled:= ((ADOTable1.Active) And (ADOTable1.RecordCount
 > 0) And (ADOTable1.RecNo + 1 <=    ADOTable1.RecordCount));
btnLoadPrevious.Enabled:= ((ADOTable1.Active) And (ADOTable1.RecNo
 - 1 > 0));
end;

Procedure TForm1.LoadAnnotations();
var
annStream: TMemoryStream;
begin
if(ADOTable1.RecordCount > 0)then
begin
// Save the current active record annotations
 data into MemoryStream.
annStream:= TMemoryStream.Create();
TBlobField(ADOTable1.FieldByName('AnnBlob')).SaveToStream(annStream);
// If the load succeeded
if(annStream.Size <> 0)then
begin
// Load the Annotations
 into the VCL Annotation control.
LEADAnn1.AnnLoadMemory(L_HANDLE(GlobalHandle(annStream.Memory)),
 annstream.Size, 1);
end
else
// Something wrong
 !
ShowMessage('Error Reading From DataBase');
end;
end;

18. | Add "LEADDef" and "LEADTyp" to the uses section of Unit1.
19. | Run your program to test it.


Zooming Out and Zooming In (Delphi)

Take the following steps to add code that can reduce and enlarge the displayed size of the image. This demonstrates the scaling properties that are normally used for zooming in and zooming out. It emphasizes the relationship of the displayed rectangle to the LEAD control.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add two command buttons to your form and name them as follows:

Name | Caption
ZoomIn | Zoom In
ZoomOut | Zoom Out

3.

Code the ZoomIn button's click procedure as follows:

procedure TForm1.ZoomInClick(Sender: TObject);
begin
Lead1.AutoSetRects := True;
Lead1.PaintSizeMode := smZoom;
Lead1.PaintZoomFactor := Lead1.PaintZoomFactor + 10;
end;

4.

Code the ZoomOut button's click procedure as follows:

procedure TForm1.ZoomOutClick(Sender: TObject);
begin
Lead1.AutoSetRects := True;
Lead1.PaintSizeMode := smZoom;
If Lead1.PaintZoomFactor > 10 Then
begin
Lead1.PaintZoomFactor := Lead1.PaintZoomFactor - 10;
end;
end;

5.

Run your program to test it.


Dynamically Positioning the Control (Delphi)

Take the following steps to dynamically scale and position the LEAD control when loading an image. This example scales the control to use most of the form's area while preserving the image's aspect ratio.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Modify the LeadLoad button's click procedure so that it appears as follows. For a general explanation of how images are positioned and scaled, refer to Displaying an Image.

procedure TForm1.LeadLoadClick(Sender: TObject);
var
{ Declare variables used for preserving aspect ratios. }
HeightFactor, WidthFactor, HeightAllowed, WidthAllowed: Integer;
ImageFile: String;
begin
{ This hard-coded path name may be different on your system. }
ImageFile := 'c:\lead\images\image1.cmp';

{ Get information about the image. }
Lead1.GetFileInfo(ImageFile, 0);

{ Set the variables used for preserving the aspect ratio.
Allow for a border of 1/8 of the form size. }
HeightFactor := round(Lead1.InfoHeight);
WidthFactor := round(Lead1.InfoWidth);
HeightAllowed := round(ClientHeight * 3/4);
WidthAllowed := round(ClientWidth * 3/4);

{ Center the LEAD control on the form, preserving the aspect ratio.
Check to see if using the maximum width will make the image too tall.
Set the dimensions based on the result. }
If ((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed Then
begin
Lead1.Left := round(ClientWidth / 8);
Lead1.Width := WidthAllowed;
Lead1.Height := round((Lead1.Width * HeightFactor) / WidthFactor);
Lead1.Top := round((ClientHeight - Lead1.Height) / 2);
end
Else
begin
Lead1.Top := round(ClientHeight / 8);
Lead1.Height := HeightAllowed;
Lead1.Width := round((Lead1.Height * WidthFactor) / HeightFactor);
Lead1.Left := round((ClientWidth - Lead1.Width) / 2);
End;

{ Set the automated behavior so that we control the display size. }
Lead1.AutoSetRects := False;
Lead1.AutoRepaint := True;
Lead1.AutoScroll := False;

{ Set the image display size to match the LEAD control }
Lead1.SetSrcRect(0, 0, Lead1.InfoWidth, Lead1.InfoHeight);
Lead1.SetSrcClipRect(0, 0, Lead1.InfoWidth, Lead1.InfoHeight);
Lead1.SetDstRect(0, 0, Lead1.ClientWidth, Lead1.ClientHeight);
Lead1.SetDstClipRect(0, 0, Lead1.ClientWidth, Lead1.ClientHeight);

{ Load the bitmap. }
Lead1.Load(ImageFile, 0, 0, 1 );
Lead1.ForceRepaint;

end;

3.

Run your program to test it.


Zooming In on a Selection (Delphi)

Take the following steps to add code that lets you select an area with a mouse, and zoom in on the selected area.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add Code to the main form's FormShow procedure as follows.

.
.
{enable AutoRubberBand}
Lead1.AutoRubberBand := True;
{Set the pointer to a crosshair}
Lead1.Cursor := crCross;
.
.

3.

Code the LEAD control's RubberBand procedure as follows.

procedure TForm1.Lead1RubberBand(Sender: TObject);
var
zoomleft, zoomtop, zoomwidth, zoomheight : integer;
begin
{Zoom in on the selection.}
zoomleft := Lead1.RubberBandLeft;
zoomtop := Lead1.RubberBandTop;
zoomwidth := Lead1.RubberBandWidth;
zoomheight := Lead1.RubberBandHeight;
Lead1.ZoomToRect(zoomleft, zoomtop, zoomwidth, zoomheight);
Lead1.Refresh();
end;

4.

Run your program to test it.


Outlining, Dragging, and Pasting a Region (Delphi)

Take the following steps to add code that lets you outline an area with a mouse, drag a copy of the selected area, and paste the copy into another part of the bitmap:

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add a second LEAD control, name it Lead2, and set its Visible property to False.
3. | Add the following declarations to the private section of the Unit1 file. In online help, you can copy the block of code and paste it into your application.

ReadyToDrag: Boolean; {The state after marking the region but before dragging }
Dragging: Boolean; {The state when the mouse is used for dragging the floater }
StartX: Integer; {Starting X position in screen pixels }
StartY: Integer; {Starting Y position in screen pixels }
FloaterX: Integer; {Floater X position in screen pixels }
FloaterY: Integer; {Floater Y position in screen pixels }
ZoomFactorX: Single; {Used for translating positioning information }
ZoomFactorY: Single; {Used for translating positioning information }

4.

At the top of your main form, add two command buttons and name them as follows:

Name | Caption
SelectRgn | Select Region
PasteFloater | Paste Floater

5.

Code the SelectRgn control's Click procedure as follows:

procedure TForm1.SelectRgnClick(Sender: TObject);
begin
Lead1.RgnMarkingMode := mmFreeHand;
ShowMessage('Draw a freehand region');
end;

6.

Code the PasteFloaterBtn control's Click procedure as follows:

procedure TForm1.PasteFloaterClick(Sender: TObject);
var
{Declare the variable for the Combine operation. }
MyOp: Integer;

{Declare variables for the client area coordinates. }
LCRgnX, LCRgnY , LCRgnWidth, LCRgnHeight: Integer;

{Declare variables for the bitmap coordinates. }
LBRgnX, LBRgnY , LBRgnWidth, LBRgnHeight: Integer;

begin
{Do nothing if there is no floater. }
If Lead1.Floater = 0 Then Exit;

{Get the floater into another bitmap }
Lead2.Bitmap := Lead1.Floater;

{Get the floater's client coordinates into local variables. }
LCRgnX := Lead1.FloaterDstLeft;
LCRgnY := Lead1.FloaterDstTop;
LCRgnWidth := Lead1.FloaterDstWidth;
LCRgnHeight := Lead1.FloaterDstHeight;

{Delete the floater. }
Lead1.FloaterVisible := False;
Lead1.Floater := 0;

{Translate the client coordinates to bitmap coordinates. }
LBRgnX := Round((LCRgnX - Lead1.DstLeft) / ZoomFactorX) + Lead1.SrcLeft;
LBRgnY := Round((LCRgnY - Lead1.DstTop) / ZoomFactorY) + Lead1.SrcTop;
LBRgnWidth := Round(LCRgnWidth / ZoomFactorX);
LBRgnHeight := Round(LCRgnHeight / ZoomFactorY);

{Reposition the region to use it as a mask for the Combine method. }
Lead1.OffsetRgn(LBRgnX - Lead1.RgnLeft, LBRgnY - Lead1.RgnTop);

{Use the Combine method to paste the Lead2 bitmap into the Lead1 bitmap. }
MyOp := CB_OP_ADD or CB_DST_0; {Operation flags for a simple paste. }
Lead1.Combine(LBRgnX, LBRgnY, LBRgnWidth, LBRgnHeight,
Lead2.Bitmap, 0, 0, MyOp);

{Repaint the part of the client area that has changed. }
Lead1.RepaintRect(LCRgnX, LCRgnY, LCRgnWidth, LCRgnHeight, False);

{Free the region. }
Lead1.FreeRgn;

end;

7.

In the LEAD1 control's OnMouseDown procedure, add the following code.

procedure TForm1.Lead1MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var

{Declare local variables. }
BitmapX, BitmapY: Integer;
NewX, NewY, NewWidth, NewHeight: Integer;

begin
{Do nothing if we are drawing a region. }
If Lead1.RgnMarkingMode <> mmNone Then Exit;

{ Save the starting position, in case we need it. }
StartY := Y;
StartX := X;

{If we are ready to drag the selection, get a floater. }
If ReadyToDrag = True Then
begin
{Translate the current mouse coordinates. }
{These coordinates account for the zoom factor and offset. }
ZoomFactorX := Lead1.DstWidth / Lead1.SrcWidth;
ZoomFactorY := Lead1.DstHeight / Lead1.SrcHeight;
BitmapX := Round((x / ZoomFactorX) - (Lead1.DstLeft / ZoomFactorX) + Lead1.SrcLeft);
BitmapY := Round((y / ZoomFactorY) - (Lead1.DstTop / ZoomFactorY) + Lead1.SrcTop);

{Continue to create the floater if the mouse is pointing to
the region we marked. }
If Lead1.IsPtInRgn(BitmapX, BitmapY) Then
begin
{Hide the region frame. }
Lead1.RgnFrameType := ftNone;

{Create the floater bitmap, which will be the part of the main }
{bitmap that is in the region's bounding rectangle. }
Lead1.Floater := Lead1.Bitmap;

{Translate the bitmap region coordinates to client area coordinates. }
NewY := Round((Lead1.RgnTop - Lead1.SrcTop) * ZoomFactorY + Lead1.DstTop);
NewX := Round((Lead1.RgnLeft - Lead1.SrcLeft) * ZoomFactorX + Lead1.DstLeft);
NewWidth := Round(Lead1.RgnWidth * ZoomFactorX);
NewHeight := Round(Lead1.RgnHeight * ZoomFactorY);

{Set the initial display position of the floater. }
Lead1.SetFloaterDstRect(NewX, NewY, NewWidth, NewHeight);

{Set form-level variables. }
FloaterY := Lead1.FloaterDstTop;
FloaterX := Lead1.FloaterDstLeft;
Lead1.FloaterVisible := True;
Dragging := True;
ReadyToDrag := False;
end;
end;

end;

8.

In the LEAD1 control's MouseMove procedure, add the following code.

procedure TForm1.Lead1MouseMove (Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
{Declare variables for repositioning the floater. }
NewX, NewY, NewWidth, NewHeight, XDelta, YDelta: Integer;

begin
{Do nothing if we are drawing a region. }
If Lead1.RgnMarkingMode <> mmNone Then Exit;

{Reposition the floater if we are dragging it. }
If Dragging And (Shift = [ssLeft]) And (Lead1.Floater <> 0) Then
If Lead1.IsPtInFloater(X, Y) Then
begin
{Update the position variables. }
XDelta := X - StartX;
YDelta := Y - StartY;
NewX := FloaterX + XDelta;
NewY := FloaterY + YDelta;
NewWidth := Lead1.FloaterDstWidth;
NewHeight := Lead1.FloaterDstHeight;

{Reposition the floater. }
Lead1.SetFloaterDstRect(NewX, NewY, NewWidth, NewHeight);

{Save the form-level position variables. }
FloaterY := NewY;
FloaterX := NewX;
StartY := Y;
StartX := X;
end;
end;

9.

In the LEAD1 control's MouseUp procedure, add the following code.

procedure TForm1.Lead1MouseUp (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
{ If we were drawing a region, set up for the next operation. }
If Lead1.RgnMarkingMode <> mmNone Then
begin
Lead1.RgnMarkingMode := mmNone;
Lead1.RgnFrameType := ftStatic;
ReadyToDrag := True;
ShowMessage('Now, drag the selection to another place.');
end;

end;

10.

Run your program to test it.


Printing Multiple Images (Delphi)

Take the following steps to add code that prints two images on one page. This code shows you how to control the size and position of images on the page.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
3. | Change the Button control's Caption property to Print 2 on 1 Page.
4. | Add Printers to the Uses section of the main unit.
5. | Code the Print 2 on 1 Page button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.Button1Click(Sender: TObject);

var
{Declare the variable for printed text.}
Msg: String;

{Declare the variables for print-area measurements.}
SkipSpace: Integer;
UsableWidth, UsableHeight, MaxImageHeight: Single;

{Declare the variables for sizing and positioning the image.}
PrintLeft, PrintTop, PrintHeight, PrintWidth: Integer;

{Declare variables used for preserving aspect ratios.}
WidthFactor, HeightFactor: Single;

begin
{Set the variables used for preserving the aspect ratio}
HeightFactor := Lead1.BitmapHeight;
WidthFactor := Lead1.BitmapWidth;

{Set the pointer to an hourglass}
Screen.Cursor := crHourglass;

{Establish some print-area dimensions. These are arbitrary values.}
SkipSpace := round(Printer.PageHeight / 30);
UsableWidth := round(Printer.PageWidth) - (SkipSpace * 4);
UsableHeight := round(Printer.PageHeight) - (SkipSpace * 4);

{Get the maximum height of one image,}
{assuming two equal-size images and space between them.}
MaxImageHeight := round( (UsableHeight - (2 * SkipSpace)) / 2);

{Print a title at the top of the page}
Msg := 'This is a print example using the LEADTOOLS VCL.';
Printer.BeginDoc;
Printer.Canvas.TextOut( SkipSpace * 2, SkipSpace * 2, Msg);

{Size and position the first image, preserving the aspect ratio.}
{Check to see if using the maximum width will make the image too tall.}
{Set the dimensions based on the result.}
If ((UsableWidth * HeightFactor) / WidthFactor) < MaxImageHeight Then
begin
PrintLeft := Round(SkipSpace * 2);
PrintTop := Round(Printer.Canvas.PenPos.Y + SkipSpace);
PrintWidth := Round(UsableWidth);
PrintHeight := Round((PrintWidth * HeightFactor) / WidthFactor);
end
Else
begin
PrintLeft := Round(SkipSpace * 2);
PrintTop := Round(Printer.Canvas.PenPos.Y + SkipSpace);
PrintHeight := Round(MaxImageHeight);
PrintWidth := Round((PrintHeight * WidthFactor) / HeightFactor);
End;

{Print the first image}
Lead1.Render(Printer.Canvas.HANDLE, PrintLeft, PrintTop, PrintWidth, PrintHeight);

{Update the current printing position}
Printer.Canvas.MoveTo( SkipSpace, Printer.Canvas.PenPos.Y +
(PrintHeight) + (2 * SkipSpace));

{Print the second line of text.}
Msg := 'This is the second picture, which is modified before printing:';
Printer.Canvas.TextOut( SkipSpace * 2, Printer.Canvas.PenPos.Y, Msg);

{Modify the bitmap for the second printing}
{to show the difference between the second picture and the first.}
Lead1.HistoContrast(200);

{Size and position the second image, preserving the aspect ratio.}
{The coding is the same as for the first image.}
If ((UsableWidth * HeightFactor) / WidthFactor) < MaxImageHeight Then
begin
PrintLeft := Round(SkipSpace * 2);
PrintTop := Round(Printer.Canvas.PenPos.Y + SkipSpace);
PrintWidth := Round(UsableWidth);
PrintHeight := Round((PrintWidth * HeightFactor) / WidthFactor);
end
Else
begin
PrintLeft := Round(SkipSpace * 2);
PrintTop := Round(Printer.Canvas.PenPos.Y + SkipSpace);
PrintHeight := Round(MaxImageHeight);
PrintWidth := Round((PrintHeight * WidthFactor) / HeightFactor);
End;

{Print the second image}
Lead1.Render(Printer.Canvas.HANDLE, PrintLeft, PrintTop, PrintWidth, PrintHeight);

{Finish the page and finish the print job}
Printer.EndDoc;

{Set the mouse pointer back to the default}
Screen.Cursor := crDefault;

end;

6.

Run your program to test it.


Writing and Reading Multipage Files (Delphi)

Take the following steps to create a multipage file, then load and display the images from the file. For a list of formats that support multipage file operations, see the iModify parameter of the Save method.

1. | Start Delphi.
2. | In the File menu, choose New Application.
3. | On the Delphi toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEAD control on the LEAD toolbar, and add two LEAD Main controls to your main form and name them Lead1 and Lead2. The size and position do not matter.
5. | Add the LEAD VCL LEADDEF unit to the uses section of unit1.
6. | Code the main form's FormShow procedure as follows. In online help, you can copy the block of code and paste it into your application. For a general explanation of how images are positioned and scaled, refer to Displaying an Image.

procedure TForm1.FormShow(Sender: TObject);

var

HeightFactor1, WidthFactor1, HeightFactor2, WidthFactor2: Single;
HeightAllowed, WidthAllowed: Single;
ImageWidth1, ImageWidth2, ImageHeight1, ImageHeight2: Integer;

begin

{Disable automatic repainting of the image.}
Lead1.AutoRepaint := False;
Lead2.AutoRepaint := False;

{Turn off scroll bars to make sure we use the full client area.}
Lead1.AutoScroll := False;
Lead2.AutoScroll := False;

{ Position and size the main form so that it takes up most of the screen. }
Width := Round(Screen.Width * 0.9);
Height := Round(Screen.Height* 0.8);
Left := Round((Screen.Width - Width) / 2);
Top := Round((Screen.Height - Height) / 2);

{Display the form and set the mouse pointer to an hourglass.}
Show;
Screen.Cursor := crHourglass;

{Load the bitmaps. These hard-coded path names may be different on your system.}
Lead1.Load('C:\lead\IMAGES\IMAGE1.CMP', 0, 0, 1);
Lead2.Load('C:\lead\IMAGES\IMAGE2.CMP', 0, 0, 1);

{Save the bitmaps to a single multipage TIFF file}
Lead1.Save('C:\lead\IMAGES\COMBINED.MPT', FILE_TIF, 24, 0, SAVE_OVERWRITE);
Lead2.Save('C:\lead\IMAGES\COMBINED.MPT', FILE_TIF, 24, 0, SAVE_APPEND);

{Get information about the images so that we can size the controls.}
Lead1.GetFileInfo('C:\lead\IMAGES\COMBINED.MPT', 1);
Lead2.GetFileInfo('C:\lead\IMAGES\COMBINED.MPT', 2);

{Clear the bitmaps from memory}
Lead1.Bitmap := 0;
Lead2.Bitmap := 0;

{Make the controls visible so that we can size and position them.}
{They will not really appear until we load an image and paint it.}
Lead1.Visible := True;
Lead2.Visible := True;

{Set the variables used for preserving the aspect ratio.}
HeightFactor1 := Lead1.InfoHeight;
WidthFactor1 := Lead1.InfoWidth;
HeightFactor2 := Lead2.InfoHeight;
WidthFactor2 := Lead2.InfoWidth;
HeightAllowed := ClientHeight * 0.8;
WidthAllowed := ClientWidth * 0.45;

{Center each LEAD control on half of the form, preserving the aspect ratio.}
{Check to see if using the maximum width will make the image too tall.}
{Set the dimensions based on the result.}
If (WidthAllowed * HeightFactor1) / WidthFactor1 < HeightAllowed Then
begin
Lead1.Left := Round((ClientWidth / 4) - (WidthAllowed / 2));
Lead1.Width := Round(WidthAllowed);
Lead1.Height := Round((Lead1.Width * HeightFactor1) / WidthFactor1);
Lead1.Top := Round((ClientHeight - Lead1.Height) / 2);
end
Else
begin
Lead1.Top := Round((ClientHeight - HeightAllowed) / 2);
Lead1.Height := Round(HeightAllowed);
Lead1.Width := Round((Lead1.Height * WidthFactor1) / HeightFactor1);
Lead1.Left := Round((ClientWidth / 4) - (Lead1.Width / 2) );
End;

If (WidthAllowed * HeightFactor2) / WidthFactor2 < HeightAllowed Then
begin
Lead2.Left := Round((ClientWidth * 3/4) - (WidthAllowed / 2) );
Lead2.Width := Round(WidthAllowed);
Lead2.Height := Round((Lead2.Width * HeightFactor2) / WidthFactor2);
Lead2.Top := Round((ClientHeight - Lead2.Height) / 2);
end
Else
begin
Lead2.Top := Round((ClientHeight - HeightAllowed) / 2);
Lead2.Height := Round(HeightAllowed);
Lead2.Width := Round((Lead2.Height * WidthFactor2) / HeightFactor2);
Lead2.Left := Round((ClientWidth * 3 / 4) - (Lead2.Width / 2) );
End;

{Load the bitmaps from the multipage TIFF file}
Lead1.Load('C:\lead\IMAGES\COMBINED.MPT', 24, 1, 1);
Lead2.Load('C:\lead\IMAGES\COMBINED.MPT', 24, 2, 1);

{Set the image display sizes to match the LEAD controls}
ImageWidth1 := Lead1.Width;
ImageHeight1 := Lead1.Height;

Lead1.SetDstRect( 0, 0, ImageWidth1, ImageHeight1);
Lead1.SetDstClipRect(0, 0, ImageWidth1, ImageHeight1);

{Set the image display sizes to match the LEAD controls}
ImageWidth2 := Lead2.Width;
ImageHeight2 := Lead2.Height;

Lead2.SetDstRect(0, 0, ImageWidth2, ImageHeight2);
Lead2.SetDstClipRect(0, 0, ImageWidth2, ImageHeight2);

{Display the images}
Lead1.ForceRepaint();
Lead2.ForceRepaint();

{Set the mouse pointer back to the default}
Screen.Cursor := crDefault;

End;

7.

Run your program to test it.


Using Transparent Controls (Delphi)

Take the following steps to add transparent controls, with special effects. The transparent controls are added as child controls so that they will scroll with the parent image.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add two LEAD controls, which you will set to be transparent at run time. (At design time, you can make the controls easier to see by setting the BackColor property of each control to a different color.) Add the controls as follows:

a. | Add a control named Lead2 as a child control to Lead1. In other words, draw it inside the Lead1 control.
b. | Add a control named Lead3 as a child control to Lead2. In other words, draw it inside the Lead2 control.

3.

Add a command button and code its click event as follows:

procedure TForm1.Button1Click(Sender: TObject);
begin
Lead1.EnableMethodErrors := False;
Lead1.AutoRepaint := False;
Lead2.AutoRepaint := False;
Lead3.AutoRepaint := False;
{Make Lead2 and Lead3 Transparent}
Lead2.Transparent := True;
Lead3.Transparent := True;
{Give each control a different effect}
Lead1.PaintEffect := EFX_EFFECT_WIPE_RECTANGLE_OUT;
Lead2.PaintEffect := EFX_EFFECT_WIPE_RECTANGLE_IN;
Lead3.PaintEffect := EFX_EFFECT_WIPE4_R_B_L_B;
Lead1.EffectDelay := 20;
Lead2.EffectDelay := 10;
Lead3.EffectDelay := 10;
Lead1.EffectGrain := 1;
Lead2.EffectGrain := 5;
Lead3.EffectGrain := 1;
{Position Lead2 and Lead3 inside Lead1}
Lead2.Width := Round(Lead1.Width / 2);
Lead2.Height := Round(Lead1.Height / 2);
Lead2.Left := Round((Lead1.Width - Lead2.Width) / 2);
Lead2.Top := Round((Lead1.Height - Lead2.Height) / 2);
Lead3.Top := 0;
Lead3.Left := 0;
Lead3.Width := Lead2.Width;
Lead3.Height := Lead2.Height;
{We will be drawing into the bitmaps}
Lead2.DrawPersistence := True;
Lead3.DrawPersistence := True;

{First, we need some bitmaps}
Lead2.CreateBitmap(Lead2.Width, Lead3.Height, 24);
Lead3.CreateBitmap(Lead3.Width, Lead3.Height, 24);
{Fill them with black, which we will make transparent}
Lead2.Fill(RGB(0, 0, 0));
Lead3.Fill(RGB(0, 0, 0));
Lead2.UseTransparentColor := True;
Lead3.UseTransparentColor := True;
Lead2.TransparentColor := RGB(0, 0, 0);
Lead3.TransparentColor := RGB(0, 0, 0);

{Draw a shape into Lead2}
{Shape background}
Lead2.ShapeBackgroundStyle := sbsTranslucent;
{Shape location}
Lead2.ShapeTop := 0;
Lead2.ShapeLeft := 0;
Lead2.ShapeWidth := Lead2.BitmapWidth;
Lead2.ShapeHeight := Lead2.BitmapHeight;
{Shape border}
Lead2.ShapeBorderColor := RGB(255, 0, 0);
Lead2.ShapeBorderStyle := sbrSolid;
Lead2.ShapeBorderThickness := 5;
Lead2.PatternStyle := epsTransparent;

{Draw the shape}
Lead2.DrawShape(EFX_SHAPE_STAR4, 0);
{Draw text into Lead3}
{Specify the text, font, and styles}
Lead3.TextFont.Name := 'Arial';
Lead3.TextFont.Size := 40;
Lead3.TextAngle := 450;
Lead3.TextFont.Color := RGB(0, 0, 255); {Blue}
Lead3.TextStyle := etsNormal;
Lead3.TextAlign := etaHcenterVcenter;
{Set the location for the text}
Lead3.TextTop := 0;
Lead3.TextLeft := 0;
Lead3.TextWidth := Lead3.BitmapWidth;
Lead3.TextHeight := Lead3.BitmapHeight;

{Set the properties for drawing a rectangle behind the text.}
Lead3.DrawPenStyle := psSolid;
Lead3.DrawPenColor := RGB(255, 255, 0);
Lead3.DrawMode := pmCopy;
{Draw the rectangle, then draw the text.}
Lead3.DrawRectangle(0, 0, Lead3.BitmapWidth, Lead3.BitmapHeight);
Lead3.DrawTextStr('Text', 0);
{Load an image into Lead1}
Lead1.Load('c:\lead\images\image1.cmp', 0, 0, 1);
Lead1.PaintSizeMode := smZoom;
Lead1.PaintZoomFactor := 150;
Lead1.ForceRepaint();

{Turn off the effects.}
Lead1.PaintEffect := EFX_EFFECT_NONE;
Lead2.PaintEffect := EFX_EFFECT_NONE;
Lead3.PaintEffect := EFX_EFFECT_NONE;
end;

4.

Run your program to test it.


Drawing Simple Lines and Shapes (Delphi)

Take the following steps to add code that lets you draw a line, rectangle and ellipse on the bitmap.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declarations to the private section of the Unit1 file:

DrawObject : Integer; {The object we are drawing}
StartX : Integer; {Starting X position}
StartY : Integer; {Starting Y position}
EndX : Integer; {Ending X position}
EndY : Integer; {Ending Y position}
Drawing : boolean;

3.

Add the following initialization code to the main form's FormShow procedure:

DrawObject := 0;
Drawing := False;

4.

Code the LEAD control's MouseDown event as follows. This code selects a different drawing object each time the event occurs.

procedure TForm1.Lead1MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
//Temp. Disable Scrolling
Lead1.EnableKeyboard:= False;
Lead1.EnableScroll:= False;
Drawing := True;

{Save the starting position.}
StartX := X;
StartY := Y;
EndX := X;
EndY := Y;

{Cycle through the types of drawing objects.}
case DrawObject of
0:
DrawObject := 1; {Line}
1:
DrawObject := 2; {Rectangle}
2:
DrawObject := 0; {Ellipse}
end;
end;

5.

Code the LEAD control's MouseMove event as follows. This code uses pmNot for the DrawMode, which means that pixel colors are inverted. Thus, the drawing methods can erase the previous object and draw a new one.

procedure TForm1.Lead1MouseMove (Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
OldEndX, OldEndY : Integer;
OldDrawX, OldDrawY, OldWidth, OldHeight : Integer;
DrawX, DrawY, NewWidth, NewHeight : Integer;

begin
if (Drawing = True) then
begin
{Set the drawing styles.}
Lead1.DrawPenStyle := psSolid;
Lead1.DrawMode := pmNot;
Lead1.DrawFillStyle := bsClear;
Lead1.DrawPersistence := False; {On the window, not the bitmap}

{Save the previous ending mouse position.}
OldEndX := EndX;
OldEndY := EndY;

{Get the current mouse position.}
EndX := X;
EndY := Y;

{Calculate the origin of the current object.}
if (EndX > StartX) then
DrawX := StartX
else
DrawX := EndX;
if (EndY > StartY) then
DrawY := StartY
else
DrawY := EndY;

{Calculate the origin of the previous object.}
if (OldEndX > StartX) then
OldDrawX := StartX
else
OldDrawX := OldEndX;
if (OldEndY > StartY) then
OldDrawY := StartY
else
OldDrawY := OldEndY;

{Calculate the height and width of the current object.}
NewHeight := Abs(StartY - EndY);
NewWidth := Abs(StartX - EndX);

{Calculate the height and width of the previous object.}
OldHeight := Abs(StartY - OldEndY);
OldWidth := Abs(StartX - OldEndX);

{Erase the old object and draw the new one.}
case DrawObject of
0: {Ellipse}
begin
Lead1.DrawEllipse(OldDrawX, OldDrawY, OldWidth, OldHeight);
Lead1.DrawEllipse(DrawX, DrawY, NewWidth, NewHeight);
end;
1: {Line}
begin
Lead1.DrawLine(StartX, StartY, OldEndX, OldEndY);
Lead1.DrawLine(StartX, StartY, EndX, EndY);
end;
2: {Rectangle}
begin
Lead1.DrawRectangle(OldDrawX, OldDrawY, OldWidth, OldHeight);
Lead1.DrawRectangle(DrawX, DrawY, NewWidth, NewHeight);
end;
end;
end;
end;

6.

Code the LEAD control's MouseUp event as follows. This code sets the drawing style and draws the object on the bitmap.

procedure TForm1.Lead1MouseUp (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
DrawX, DrawY, NewWidth, NewHeight : Integer;
begin
//Restore scrolling
Lead1.EnableKeyboard:= True;
Lead1.EnableScroll:= True;
Drawing := False;
{Set the drawing style.}
Lead1.DrawPenStyle := psSolid;
Lead1.DrawPenWidth := 2;
Lead1.DrawPenColor := RGB(255, 0, 0); {Red}
Lead1.DrawMode := pmCopy;
Lead1.DrawFillColor := RGB(0, 255, 0); {Green}
Lead1.DrawFillStyle := bsHorizontal;
Lead1.DrawPersistence := True; {On the bitmap}

{Get the current mouse position}
EndX := X;
EndY := Y;

{Determine the origin of the object.}
if (EndX > StartX) then
DrawX := StartX
else
DrawX := EndX;
if (EndY > StartY) then
DrawY := StartY
else
DrawY := EndY;

{Determine the height and width of the object.}
NewHeight := Abs(StartY - EndY);
NewWidth := Abs(StartX - EndX);

{Draw the object}
case DrawObject of
0: {Ellipse}
Lead1.DrawEllipse(DrawX, DrawY, NewWidth, NewHeight);
1: {Line}
Lead1.DrawLine(StartX, StartY, EndX, EndY);
2: {Rectangle}
Lead1.DrawRectangle(DrawX, DrawY, NewWidth, NewHeight);
end;
end;

7.

Run your program to test it.


Cropping a Displayed Image and Copying It to a Bitmap (Delphi)

Take the following steps to add code that lets you select an area with a mouse, crop the display to show only that area, and trim the bitmap to match the selected area. (This example uses both cropping and trimming, so that you can see the difference.)

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declarations to the private section of the Unit1 file:

Cropping: Boolean; {The state when the mouse is used for cropping}
StartX: Integer; {Starting X position in screen pixels}
StartY: Integer; {Starting Y position in screen pixels }
EndX: Integer; {Ending X position in screen pixels }
EndY: Integer; {Ending Y position in screen pixels }

3. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
4. | In the Object Inspector box, change the Button control's Caption property to Select Rectangle, and change the name to RectButton.
5. | Code the Select Rectangle button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.RectButtonClick(Sender: TObject);

begin
{Initialize cropping so that you can do it more than once}
if Cropping = True Then
begin
{Set the clipping area to match the image.}
Lead1.SetDstClipRect(Lead1.DstLeft, Lead1.DstTop,
Lead1.DstWidth, Lead1.DstHeight);
{Display the image}
Lead1.ForceRepaint
end;

{Set a form variable to let other events know that you are cropping}
Cropping := True;

{Set the pointer to a crosshair}
Lead1.Cursor := crCross;

end;

6.

Code the LEAD control's MouseDown procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.Lead1MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
{Save the starting position}
StartX := X;
StartY := Y;
{Make the rubberband invisible until the mouse moves}
Lead1.RubberBandVisible := False;
end;

7.

Code the LEAD control's MouseMove procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.Lead1MouseMove (Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var
rbX: Integer;
rbY: Integer;
rbHeight: Integer;
rbWidth: Integer;

begin
If (Cropping = True) And (Shift = [ssLeft]) Then
begin
{Get the current mouse position}
EndX := X;
EndY := Y;

{Determine the origin of the rubberband rectangle,
regardless of which way the mouse moves.}
If EndX > StartX Then rbX := StartX Else rbX := EndX;
If EndY > StartY Then rbY := StartY Else rbY := EndY;

{Determine the height and width of the rubberband rectangle}
rbHeight := Abs(StartY - EndY);
rbWidth := Abs(StartX - EndX);

{Set the rubberband rectangle};
Lead1.SetRubberBandRect(rbX, rbY, rbWidth, rbHeight);
{Alternatively, you could use the following properties to set the
rubberband rectangle:
Lead1.RubberBandHeight := rbHeight;
Lead1.RubberBandLeft := rbX;
Lead1.RubberBandTop := rbY;
Lead1.RubberBandWidth := rbWidth; }

{Make the rubberband rectangle visible}
Lead1.RubberBandVisible := True;
end;

end;

8.

Code the LEAD control's MouseUp procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.Lead1MouseUp (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
CropLeft: Integer;
CropTop: Integer;
CropWidth: Integer;
CropHeight: Integer;

begin
{Quit if we are not selecting an area to crop.}
If Cropping = False Then Exit;

{Get the current mouse position}
EndX := X;
EndY := Y;

{Get the origin of the rubberband rectangle.
Allow for different mouse drag directions}
If StartX < EndX Then CropLeft := StartX Else CropLeft := EndX;
If StartY < EndY Then CropTop := StartY Else CropTop := EndY;

{Get the height and width of the cropped area}
CropWidth := Abs(EndX - StartX);
CropHeight := Abs(EndY - StartY);

if (CropWidth < 1) Or (CropHeight < 1) Then
begin
Lead1.RubberBandVisible := False;
Exit;
End;

{Crop and repaint the image}
Lead1.SetDstClipRect(CropLeft, CropTop, CropWidth, CropHeight);
Lead1.ForceRepaint;
Lead1.RubberBandVisible := False;
Lead1.Cursor := crDefault; {Default}

End;

9. | Select the Button control; then add another control to your main form. Put the control at the top of the form to keep it away from the image.
10. | In the Object Inspector box, change the Button control's Caption property to Trim. and change its Name property to TrimButton. This command button will be used to trim the bitmap in memory and redisplay the bitmap.
11. | Code the Trim button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.TrimButtonClick(Sender: TObject);

var
XFactor: Single;
YFactor: Single;
NewTop: Single;
NewLeft: Single;
NewWidth: Single;
NewHeight: Single;
HeightFactor: Single;
WidthFactor: Single;
HeightAllowed: Single;
WidthAllowed: Single;

begin

Screen.Cursor := crHourglass; {hourglass}

{Use the clipping rectangle's percentage offsets in the image rectangle}
{to determine the trimmed rectangle in the bitmap.}
{Using percentages allows for the possibility that the image is zoomed.}
XFactor := Lead1.BitmapWidth / Lead1.DstWidth;
YFactor := Lead1.BitmapHeight / Lead1.DstHeight;
NewTop := (Lead1.DstClipTop - Lead1.DstTop) * YFactor;
NewLeft := (Lead1.DstClipLeft - Lead1.DstLeft) * XFactor;
NewWidth := Lead1.DstClipWidth * XFactor;
NewHeight := Lead1.DstClipHeight * YFactor;

{Make sure display rectangles are automatically adjusted.}
Lead1.AutoSetRects := True;

{Trim the bitmap.}
Lead1.Trim(Round(NewLeft), Round(NewTop), Round(NewWidth), Round(NewHeight));

{Size and redisplay the control, using the new bitmap size.}
{Set the variables used for preserving the aspect ratio.}
{Allow for a border of 1/8 of the form size.}
{The units of measure do not matter, since we are calculating proportions.}
HeightFactor := Lead1.BitmapHeight;
WidthFactor := Lead1.BitmapWidth;
HeightAllowed := ClientHeight - (ClientHeight / 4);
WidthAllowed := ClientWidth - (ClientWidth / 4);

{Center the LEAD control on the form, preserving the aspect ratio.}
{Check to see if using the maximum width will make the image too tall.}
{Set the dimensions based on the result.}
if ((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed Then
begin
Lead1.Left := round(ClientWidth / 8);
Lead1.Width := round(WidthAllowed);
Lead1.Height := round((Lead1.Width * HeightFactor) / WidthFactor);
Lead1.Top := round((ClientHeight - Lead1.Height) / 2);
end
Else
begin
Lead1.Top := round(ClientHeight / 8);
Lead1.Height := round(HeightAllowed);
Lead1.Width := round((Lead1.Height * WidthFactor) / HeightFactor);
Lead1.Left := round((ClientWidth - Lead1.Width) / 2);
End;

{Turn off scroll bars to make sure we use the full client area.}
Lead1.AutoScroll := False;

{Set the image display size to match the LEAD control}
Lead1.SetDstRect(0, 0, Lead1.Width, Lead1.Height);
Lead1.SetDstClipRect(0, 0, Lead1.Width, Lead1.Height);

{Display the image}
Lead1.ForceRepaint;
Screen.Cursor := crDefault; {Default}

End;

12.

Run your program to test it.


Using LEADTOOLS with Data Controls (Delphi)

You can associate the LEAD control with a data control so that the LEAD control's bitmap is bound to a specified field in the data control's data set.

Take the following steps to start a project and to add some code that associates the LEAD control with a data control:

1. | Start Delphi.
2. | On the Project menu, select Remove From Project and remove Unit1 and Form1.
3. | On the Database menu, choose Form Wizard. In the first wizard dialog, select the following options and click Next:

Create a simple form

Create a form using TTable Object

4. | In the second wizard dialog, select the file IMAGES.DB shipped with LEADTOOLS and click Next.
5. | In the following dialog, click the ">>" button to select both fields, then click Next.
6. | In the following dialog, choose Vertically, then click Next.
7. | In the following dialog, choose Top, then click Next.
8. | In the last dialog, make sure that the options are as follows, then click Finish.

Generate a main form

Form Only

9. | Click on the ImageBMP control and delete it. In its place, insert a LEAD Main VCL Control (LEADImage) from the LEADTOOLS tab and position it as you would like it to appear in your application.
10. | Change the following properties of the LEAD Main Control as follows:

Property | Value
DataSource | DataSource1
DataField | BMP

You must assign the DataSource before the DataField.

11. | From the LEADTOOLS tab, add a LEADDlgFile control and a LEADDlgService control to the form.
12. | Add a Button control to the form and change its name to btnFlip.
13. | Add the following code to the FormCreate procedure. Do not delete code that already exists in the procedure.

LEADImage1.BorderStyle := bsSingle;
LEADImage1.BackColor := RGB(255, 255, 125);
LEADImage1.AutoRepaint := True;
LEADImage1.AutoSize := False;
LEADImage1.AutoSetRects := True;
LEADImage1.PaintSizeMode := smFit;
LEADImage1.DataLoadBits := 0;
LEADDlgService1.InitDialogs(0);

14.

Handle the DBNavigator OnClick event, and code the DBNavigatorClick procedure as follows:

procedure TForm1.DBNavigatorClick(Sender: TObject; Button: TNavigateBtn);
begin
if (Button <> nbInsert) then { do nothing }
Exit;
LEADDlgFile1.DlgFlags := 0;
LEADDlgFile1.DialogTitle := 'Add an image';
LEADDlgFile1.PreviewEnabled := True;
LEADDlgFile1.Filter := 'All |*.*|CMP|*.cmp|JPEG|*.jpg';
LEADDlgFile1.FilterIndex := 2; {look for *.cmp first}
LEADDlgFile1.InitialDir := 'C:\Program Files\LEAD Technologies, Inc\LEADTOOLS14\Images\';
LEADDlgFile1.LoadPasses := 0;
LEADDlgFile1.LoadRotated := True;
LEADDlgFile1.LoadCompressed := False;
LEADDlgFile1.DlgFlags :=
DLG_OPEN_SHOW_PROGRESSIVE +
DLG_OPEN_SHOW_MULTIPAGE +
DLG_OPEN_SHOW_LOADROTATED +
DLG_OPEN_SHOW_LOADCOMPRESSED +
DLG_OPEN_SHOW_FILEINFO +
DLG_OPEN_SHOW_PREVIEW +
DLG_OPEN_SHOW_DELPAGE +
DLG_OPEN_VIEWTOTALPAGES +
DLG_OPEN_LOADBITMAP;
LEADDlgFile1.LEADImage := LEADImage1; {assign the main control for processing}
LEADDlgFile1.EnableMethodErrors := False;
{ when the user does not load and image, abort the process }
If (LEADDlgFile1.ShowOpenDlg (Self) <> SUCCESS_DLG_OK) then
begin
Table1.Cancel();
Exit;
end;
{ Enable image processing before posting to the database }
btnFlip.Enabled := True;
{ Specify the appropriate properties for saving the image in the database }
case (LEADImage1.BitmapBits) of
1:
begin
LEADImage1.DataSaveBits := 1;
LEADImage1.DataSaveFormat := FILE_LEAD1BIT;
end;
4:
begin
LEADImage1.DataSaveBits := 4;
LEADImage1.DataSaveFormat := FILE_PCX;
end;
else
begin
if (LEADImage1.IsGrayScale = GRAY_NO) then { save as color }
LEADImage1.DataSaveBits := 24
else {save as grayscale}
LEADImage1.DataSaveBits := 8;
LEADImage1.DataSaveFormat := FILE_CMP;
LEADImage1.DataSaveQuality := QMS;
end;
end; {of case statement }
EditNAME.SetFocus();
end;

15.

Handle the btnFlip OnClick event, and code the btnFlipClick procedure as follows:

procedure TForm1.btnFlipClick(Sender: TObject);
begin
LEADImage1.Flip();
end;

16.

Handle the LEADImage1 OnChange event, and code the LEADImage1Change procedure as follows:

procedure TForm1.LEADImage1Change(Sender: TObject);
begin
{ Avoid processing events that occur before the bitmap is fully loaded }
if (LEADImage1.Bitmap = 0) then
Exit;
{ Demonstrate how the DataChanged property works }
if (LEADImage1.DataChanged And (DataSource1.State <> dsInsert)) then
ShowMessage('You flipped the image');
end;

17.

Handle the DataSource1 OnStateChange event, and code the DataSource1StateChange procedure as follows:

procedure TForm1.DataSource1StateChange (Sender: TObject);
begin
btnFlip.Enabled := (DataSource1.State = dsEdit);
end;

18. | Add LEADDef to the uses section of Unit1.
19. | Run your program to test it.


Creating, Viewing, and Merging Color Separations (Delphi)

Take the following steps to add code that creates CMYK color separations, displays each of the color planes, merges the planes, and displays the result. The code increases the contrast of the K plane to demonstrate how you can manipulate the color separations.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declaration to the private section of the Unit1 file:

ClickCount: Integer; {Used with the Color Separations example}

3. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
4. | In the Object Inspector box, change the Button control's Caption property to Do Separations.
5. | Code the Do Separations button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.

procedure TForm1.Button1Click(Sender: TObject);

begin
Screen.Cursor := crHourglass;

{Turn off the automatic display rectangles.}
Lead1.AutoSetRects := False;

{Use the ClickCount form variable to step through the actions.}
If ClickCount = 0 then
begin
Lead1.ColorSeparate(COLORSEP_CMYK);
{Just for fun, add contrast to the K plane}
Lead1.Bitmap := Lead1.ColorPlanes[3]; {Copy the K plane}
Lead1.Contrast(300); {Increase the contrast}
Lead1.ColorPlanes[3] := Lead1.Bitmap; {Update the K plane}
ShowMessage('Separated. Keep clicking to see separations, then merge');
end;
if ClickCount = 1 then
begin
Lead1.Bitmap := Lead1.ColorPlanes[0]; {Cyan}
Lead1.ForceRepaint;
end;
if ClickCount = 2 then
begin
Lead1.Bitmap := Lead1.ColorPlanes[1]; { Magenta}
Lead1.ForceRepaint;
end;
if ClickCount = 3 then
begin
Lead1.Bitmap := Lead1.ColorPlanes[2]; { Yellow}
Lead1.ForceRepaint;
end;
if ClickCount = 4 then
begin
Lead1.Bitmap := Lead1.ColorPlanes[3]; { K}
Lead1.ForceRepaint;
end;
if ClickCount = 5 then
begin
Lead1.ColorMerge(COLORSEP_CMYK);
Lead1.ForceRepaint;
Lead1.ColorPlanes[0] := 0;
Lead1.ColorPlanes[1] := 0;
Lead1.ColorPlanes[2] := 0;
Lead1.ColorPlanes[3] := 0;
ShowMessage('Merged, with more contrast in the K plane');
end;
if ClickCount = 6 then
begin
ClickCount := -1;
ShowMessage('Cycle is finished');
end;

ClickCount := ClickCount + 1;
Screen.Cursor := crDefault;
end;

6.

Run your program to test it. Notice that you can click the button several times to create the separations, view each of them, and merge them to recreate the original bitmap.


Updating a Gauge and Detecting a User Interrupt (Delphi)

Take the following steps to update a gauge during processing and detect a user interrupt:

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Select the Button control; then add the control to your main form. Put the control at the top of the form to keep it away from the image.
3. | In the Object Inspector box, change the Button control's Caption property to Do Median.
4. | Select the Button control; then add another control to your main form. Put the control at the top of the form to keep it away from the image.
5. | In the Object Inspector box, change the Button control's Caption property to Quit.
6. | Build a gauge consisting of two rectangular shape objects (Shape1 and Shape2). Put the gauge at the top of the form next to the Quit button. Use Shape1 as the frame of the gauge. Use Shape2 as the fill color by putting it inside of Shape1, flush left. Change Shape2's brush color to any contrasting color, and change its Width property to 1.
7. | Add the following declarations to the private section of the Unit1 file:

fEscape: Boolean; {Used with the Gauge example}
fInProc: Boolean; {Used with the Gauge example}

8.

Code the Do Median button's Click procedure as follows:

procedure TForm1.Button1Click(Sender: TObject);

begin
{Enable the Status event}
Lead1.EnableProgressEvent := True;

{Initialize the indicators}
fEscape := False; {The user does not want to quit}
fInProc := True; {Processing is taking place}

{Perform a relatively slow median filter}
Lead1.Median(5);

{Clean up}
fInProc := False; {Processing is no longer taking place}
Lead1.ForceRepaint;
end;

9.

Code LEAD control's Status procedure as follows

procedure TForm1.Lead1Status(Sender: TObject;
Percent: Integer);
var
WinMsg: TMsg; {Windows message}

begin
{Are there any messages in the queue (like a mouse click) ?}
while( PeekMessage(WinMsg,Handle, 0, 0, PM_REMOVE) ) do
begin
TranslateMessage( WinMsg ); {Translates virtual key codes.}
DispatchMessage( WinMsg ); {Dispatches message to window.}
end;

If fEscape = False Then { Look for the Click on the Quit button}
Shape2.Width := round(Shape1.Width * Percent / 100) {Udpate the gauge}
Else
Lead1.EnableProgressEvent := False; {Cancel the task}
end;

10.

Code the Quit button's Click procedure as follows:

procedure TForm1.Button2Click(Sender: TObject);
begin
fEscape := True; {The user wants to quit}
Shape2.Width := 1; {Set the gauge back to the beginning}
end;

11.

Code the main form's CloseQuery procedure as follows:

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
If fInProc Then {If processing is taking place}
CanClose := False; {Do not let the user close the form}

end;

12.

Run your program to test it.


Using a PanWindow (Delphi)

1. | Start Delphi.
2. | In the File menu, choose New Application.
3. | On the Delphi toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEAD Main control on the VCL toolbar. Size and position the control as you want it to appear at run time, and change the name of the control to Lead1.
5. | Add a command button from the Standard toolbar to your form and name it as follows:

Name | Caption
PanWindow | Show Pan Window

6.

Add a Check box from the Standard toolbar to the form and name it as follows:

Name | Caption
Check1 | Pan Window

7.

Select the Unit1 tab in the Unit1.pas window. Add LEADUNT to the Uses Section in the Interface part of the unit1.

8.

Double click on the Show Pan Window button and code the PanWindowClick procedure as follows:

procedure TForm1.PanWindowClick(Sender: TObject);
begin
with LEAD1 do
begin
{set the location of the PanWindow}
PanWinX := 100;
PanWinY := 100;
{set the size of the PanWindow}
PanWinWidth := 150;
PanWinHeight := 200;
{set the type of mouse pointer}
PanWinPointer := 12;

PanWinTitle := 'PanWindow';
PanWinRectColor := RGB(0, 0, 255);
PanWinSysMenu := True;
{use the settings for LEAD1}
PanWinPaintPalette := PaintPalette;
PanWinBitonalScaling := BitonalScaling;
PanWinPaintDither := PaintDither;
PanWinPaintScaling := PaintScaling;
ShowPanWin(True);
end;
Check1.Checked := True;
end;

9.

Code the FormActivate procedure as follows:

procedure TForm1.FormActivate(Sender: TObject);
begin
{set the path and name to an image file on your system}
LEAD1.Load (' c:\lead\images\scn1.tif ', 0, 0, 1);
end;

10.

Code the Lead1OnPanWin procedure as follows:

procedure TForm1.Lead1PanWin(Sender: TObject; hPanWin: Cardinal;
iFlag: Integer);
begin
if (iFlag = PANWIN_DESTROYED) Then
Check1.Checked := False;
end;

11.

Run your program to test it.


Creating and Using Annotations (Delphi 4.0)

Take the following steps to add code that demonstrates the creation and deletion, saving and loading, and copying and pasting of annotation objects. This code also demonstrates the related events. Message boxes prompt for user actions that trigger events.

1. | Start Delphi.
2. | In the File menu, choose New Application.
3. | On the Delphi toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEADAnn control on the VCL toolbar. Size and position the control, as you want it to appear at run time.
5. | Add a command button to your form and name it as follows:

Name | Caption
LoadLead | Load Image

6.

Code the main form's FormShow procedure as follows. In the Windows-based help file, you can copy the block of code and paste it into your application.

procedure TForm1.FormShow(Sender: TObject);
begin
{ Unlock DOCUMENT support. }
{ Note that these are sample keys, which will not work in your toolkit. }
LEADAnn1.UnlockSupport (L_SUPPORT_DOCUMENT, 'TestKey');
LEADAnn1.AnnUserMode:= ANNUSERMODE_NONE;
{ Set defaults for displaying the image. }
{ These are all persistent properties that can be set in the properties box. }
LEADAnn1.BorderStyle := bsSingle;
LEADAnn1.BackColor := RGB(255, 255, 125);
LEADAnn1.PaintDither := pdDiffusion;
LEADAnn1.PaintPalette := ppAuto;
LEADAnn1.AutoRepaint := True;
LEADAnn1.AutoSize := False;
LEADAnn1.AutoSetRects := True;
LEADAnn1.PaintSizeMode := smFit;
end;

7.

Code the LoadLead button's click procedure as follows:

procedure TForm1.LeadLoadClick (Sender: TObject);
begin
LEADAnn1.Load ('D:\pictures\test.cmp', 0, 0, 1);
end;

8.

At the beginning of the Unit1 file, add LEADUNT, LEADTYP to the uses section. In order to use the constants in Delphi, you must add the LEADDEF unit to the uses section. For example:

uses

Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, LEADVCL, StdCtrls, LEADDEF, LEADTYP

9.

At the top of your main form, add four command buttons and name them as follows:

Name | Caption
AnnToggle | Start
IOToggle | Save
ClipboardToggle | Copy
Realize | Realize

10.

Code the AnnToggle control's Click procedure as follows.

procedure TForm1.AnnToggleClick (Sender: TObject);
begin
//Use the button to toggle between design mode and run mode
if ( AnnToggle.Caption = 'Start' ) then
begin
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;
LEADAnn1.AnnTool:= ANNTOOL_BUTTON;
//Make run mode the next thing.
AnnToggle.Caption:= 'Run Mode';
ShowMessage ( 'In design mode now. Draw a button object.') ;
end
else
begin
if ( AnnToggle.Caption = 'Design Mode' ) then
begin
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;
LEADAnn1.AnnTool:= ANNTOOL_BUTTON;
//Make run mode the next thing.
AnnToggle.Caption:= 'Run Mode';
end
else
begin
//The button takes us to run mode
LEADAnn1.AnnUserMode:= ANNUSERMODE_RUN;
ShowMessage ( 'Click on your new button' ) ;
AnnToggle.Caption:= 'Design Mode';
end;
end;
end;

11.

Code the IOToggle control's Click procedure as follows:

procedure TForm1.IOToggleClick(Sender: TObject);
var
nRet: Integer;
Msg: String;
begin
//Disable errors so that we can trap our own.
LEADAnn1.EnableMethodErrors:= False;
//Use the button to toggle between saving and loading annotations
if (IOToggle.Caption = 'Save' ) then
begin
//Do nothing if there are no annotations.
if LEADAnn1.AnnContainer = 0 then
Exit ;
//Save the selected annotations.
nRet:= LEADAnn1.AnnSave ('D:\pictures\tmp.ann', ANNFMT_NATIVE, True, SAVE_OVERWRITE, 0); nRet:= LEADAnn1.AnnSave ('D:\pictures\tmp.ann', ANNFMT_NATIVE, True);
if (nRet = SUCCESS )then
begin
//Make loading the next thing.
IOToggle.Caption:= 'Load';
ShowMessage ( 'Use the right mouse button to delete any annotations, then click Load' ) ;
end
else
begin
Msg:= 'Error code: ' + IntToStr(nRet);
ShowMessage ( Msg ) ;
end;
end
else
begin
//We are loading annotations
//Make sure we are in design mode
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;
//Load the annotations.
nRet:= LEADAnn1.AnnLoad ('D:\Pictures\tmp.ann', 1);
if (nRet = SUCCESS) then
IOToggle.Caption:= 'Save'
else
ShowMessage ( 'No annotations to load' ) ;
end;
end;

12.

Code the ClipboardToggle control's Click procedure as follows. (Note that Copy, Cut, and Paste are available as automated popup menu options. This code is for tailoring your application.)

procedure TForm1.ClipboardToggleClick(Sender: TObject);
var
nRet: Integer;
Msg: String;
begin
//Disable errors so that we can trap our own.
LEADAnn1.EnableMethodErrors:= False;
//Use the button to toggle between copying and pasting annotations
if (ClipboardToggle.Caption = 'Copy') then
begin
//Do nothing if there are no annotations.
if ( LEADAnn1.AnnContainer = 0 ) then
Exit;
//Copy the selected annotations to the clipboard.
nRet:= LEADAnn1.AnnCopy(ANNFMT_NATIVE, True, True);
if ( nRet = SUCCESS ) then
begin
//Make pasting the next thing.
ClipboardToggle.Caption:= 'Paste';
ShowMessage ( 'Use the right mouse button to delete any annotations, then click Paste' );
end
else
begin
Msg:= 'Error code: ' + IntToStr(nRet);
ShowMessage ( Msg );
end;
end
else
begin
//We are pasting annotations
//Make sure we are in design mode
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;
//Paste the annotations
if ( LEADAnn1.AnnPasteReady ) then
begin
LEADAnn1.AnnPaste ( ) ;
ClipboardToggle.Caption:= 'Copy';
end
Else
ShowMessage ( 'No annotations to paste' ) ;
end;
end;

13.

Code the Realize control's Click procedure (which renders the annotation objects to the bitmap) as follows:

procedure TForm1.RealizeClick(Sender: TObject);
begin
LEADAnn1.AnnRealize (False);
LEADAnn1.ForceRepaint ();
ShowMessage ('Annotations are now rendered to the bitmap');
End;

14.

Add the following declaration to the private section of Form1

NewTag: Integer;

15.

Code the LEADAnn1 control's OnAnnCreate event as follows:

procedure TForm1.LEADAnn1AnnCreate (hObject: L_HANDLE);
begin
//Update the tag if we need one.
if ((LEADAnn1.AnnGetType (hObject) = ANNOBJECT_BUTTON )Or
(LEADAnn1.AnnGetType (hObject) = ANNOBJECT_HOTSPOT)) then
begin
NewTag:= NewTag + 1;
LEADAnn1.AnnSetTag ( hObject, NewTag ) ;
end;
end;

16.

Code the LEADAnn1 control's OnAnnDrawn event as follows:

procedure TForm1.LEADAnn1AnnDrawn (hObject: L_HANDLE);
begin
LEADAnn1.AnnTool:= ANNTOOL_SELECT;
ShowMessage ( 'Use the right mouse button to modify this object; then click on Run Mode to test it.' ) ;
end;

17.

Code the LEADAnn1 control's OnAnnClicked event as follows:

procedure TForm1.LEADAnn1AnnClicked(hObject: L_HANDLE);
var
Msg: String;
begin
Msg:= 'This is what we do for the button tagged ' + IntToStr(LEADAnn1.AnnGetTag (hObject)) ;
ShowMessage (Msg);
end;

18.

Code the LEADAnn1 control's OnAnnDestroy Event as follows:

procedure TForm1.LEADAnn1AnnDestroy(hObject: L_HANDLE);
var
Msg: String;
begin
Msg:= 'The object tagged ' + IntToStr (LEADAnn1.AnnGetTag (hObject)) + ' is deleted.';
ShowMessage (Msg);
end;

19.

Run your program to test it.


Print a Real Image Size in Inches (Delphi)

Print a Real Image Size in Inches (Delphi 4)

Take the following steps to start a project and to add some code that prints an image:

1. | Start Delphi.
2. | In the File menu, choose New Application.
3. | On the Delphi toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Select the LEAD Main control on the VCL toolbar. Size and position the control, as you want it to appear at run time.
5. | Add a button control to your form and name it as follows:
 | Name | Caption
 | btnPrint | Print
6. | Declare the following variables in the private section of Form1.

fRealWidth: Single; //Image's real width in inches
fRealHeight: Single;// Image's real height in inches
XRes: Integer; // Number of pixels per logical inch along the screen width.
YRes: Integer; // Number of pixels per logical inch along the screen Height.

7.

Handle the btnPrint button's click procedure and add the following code to it to load the image.:

LEADImage1.Load('c:\image1.cmp', 0, 0, 1);

8.

Calculate the real width and height of the bitmap in inches. Add the following code to btnPrintClick procedure:

fRealWidth:= LEADImage1.BitmapWidth / LEADImage1.BitmapXres;
fRealHeight:= LEADImage1.BitmapHeight / LEADImage1.BitmapYRes;

9.

Print the image using its real size in inches. Add the following code to btnPrintClick procedure:

Printer.BeginDoc ( ) ;

//You should have the number of pixels per logical inch (XRes, YRes)
XRes:= GetDeviceCaps ( Printer.Canvas.Handle, LOGPIXELSX ) ;
YRes:= GetDeviceCaps ( Printer.Canvas.Handle, LOGPIXELSY ) ;

LEADImage1.Render( Printer.Canvas.Handle, 1, 1, Trunc(XRes * fRealWidth), Trunc(YRes * fRealHeight) ) ;

Printer.EndDoc;

10. | Add Printers to the Uses section of the Uint1.
11. | Run your program to test it.


Combining Images with Regions (Delphi)

1. | Start Delphi.
2. | In the File menu, choose New Application.
3. | On the Delphi toolbar, click the LEADTOOLS tab. If you have used a LEAD VCL control before, the icon appears on the toolbar. Otherwise, refer to Installing VCL before continuing with this tutorial.
4. | Add 2 of the LEAD Main VCL controls to your form. Size and position the controls, as you want them to appear at run time.
5. | Add a button to your form and name it as follows:
 | Name | Caption
 | btnCombine | Combine
6. | Handle the Form1 OnCreate event, and code FormCreate as follows:

procedure TForm1.FormCreate(Sender: TObject);
begin
LEADImage1.Load( 'r:\images\image1.cmp', 0, 1, 1 ) ;
LEADImage2.Load ( 'r:\images\image2.cmp', 0, 1, 1 ) ;
end;

7.

Handle the btnCombine button's OnClick event, and code the btnCombineClick procedure as follows:

procedure TForm1.btnCombineClick(Sender: TObject);
var
nDstLeft : Integer;
nDstTop : Integer;
nSrcLeft : Integer;
nSrcTop : Integer;
nDstWidth : Integer;
nDstHeight : Integer;
rClientArea : TRect;
begin
Windows.GetClientRect ( LEADImage1.Handle, rClientArea );
LEADImage1.SetRgnRect ( Trunc(rClientArea.right/8), Trunc(rClientArea.bottom/8), Trunc(rClientArea.right/2), Trunc(rClientArea.bottom/2), L_RGN_SET);

nDstLeft := Trunc(LEADImage1.BitmapWidth /8 );
nDstTop := Trunc(LEADImage1.BitmapHeight /8 );
nDstWidth := Trunc(LEADImage1.BitmapWidth );
nDstHeight := Trunc(LEADImage1.BitmapHeight );
nSrcLeft := 0;
nSrcTop := 0;

LEADImage1.Combine ( nDstLeft, nDstTop, nDstWidth, nDstHeight, LEADImage2.Bitmap, nSrcLeft, nSrcTop, CB_OP_ADD + CB_DST_0);
end;

8. | At the beginning of the Unit1 file, add LEADDef to the uses section.
9. | Run your program to test it.


Miscellaneous Examples (Delphi)

You can test any of the following examples by adding a command button to one of the previous lessons in the tutorial, and pasting the sample code in the Click procedure.

In most cases, you can add the button after the first lesson Loading and Displaying an Image. In cases where you need to zoom in or zoom out, you must first finish Zooming Out and Zooming In.

AboutBox example for Delphi

AdaptiveContrast Example for Delphi

AddBitmaps example for Delphi

AddBorder example for Delphi

AddFrame example for Delphi

AddMessage Example for Delphi

AddNoise example for Delphi

AddShadow Example for Delphi

AddWeightedBitmaps Example for Delphi

Aging Example for Delphi

AlphaBlend example for Delph

AnimationEnable Example for Delphi

AnnAddUserHandle example for Delphi

AnnAdjustPoint example for Delphi

AnnAutoCursor example for Delphi

AnnAutoDialogFontSize Example for Delphi

AnnAutoDrawEnable Example for Delphi

AnnAutomation Property Example for Delphi

AnnAutoHilightPen example for Delphi

AnnAutoMenuEnable Example for Delphi

AnnAutoResize example for Delphi

AnnAutoRotate example for Delphi

AnnBoundingRect... example for Delphi

AnnChangeUserHandle example for Delphi

AnnDataPath example for Delphi

AnnDefine2 example for Delphi

AnnDeletePage example for Delphi

AnnDeletePageMemory example for Delphi

AnnDeleteUserHandle example for Delphi

AnnDestroy example for Delphi

AnnEncryptApply example for Delphi

AnnEnumerateHandles example for Delphi

AnnEnumerateTextToken example for Delphi

AnnFixed example for Delphi

AnnGetAngle example for Delphi

AnnGetAutoMenuItemEnable Example for Delphi

AnnGetDistance example for Delphi

AnnGetDistance2 example for Delphi

AnnGetBitmapDpiX Example for Delphi

AnnGetGrouping example for Delphi

AnnGetHyperlinkParam example Delphi

AnnGetHyperlinkString example for Delphi

AnnGetHyperlinkType example for Delphi

AnnGetNameOffsetX example for Delphi

AnnGetNameRestrict example for Delphi

AnnGetNodes example for Delphi

AnnGetObjectFromTag example for Delphi

AnnGetPoint... example for Delphi

AnnGetPredefinedMetafile example for Delphi

AnnGetSecondaryMetafile example for Delphi

AnnGetSelectList example for Delphi

AnnGetTopContainer example for Delphi

AnnGetUserHandles example for Delphi

AnnGetVisible Example for Delphi

AnnGroup example for Delphi

AnnHandle example for Delphi

AnnHitTestExt example for Delphi

AnnHyperlinkMenuEnable example for Delphi

AnnInsert example for Delphi

AnnInsertTextTokenTable example for Delphi

AnnIsFixedRect example for Delphi

AnnLock example for Delphi

AnnMove example for Delphi

AnnNameBoundingRectLeft example for Delphi

AnnNameOptions example for Delphi

AnnNameRectLeft example for Delphi

AnnOptions Example for Delphi

AnnPointOptions example for Delphi

AnnPopFixedState example for Delphi

AnnPredefinedBitmap example for Delphi

AnnPushFixedState example for Delphi

AnnRectHeight example for Delphi

AnnRectLeft example for Delphi

AnnRectTop example for Delphi

AnnRectWidth example for Delphi

AnnRestrictCursor example for Delphi

AnnRestrictToContainer example for Delphi

AnnRotate example for Delphi

AnnRTFText example for Delphi

AnnSaveMemory for Delphi

AnnSaveTag example for Delphi

AnnSelectRect example for Delphi

AnnSetAutoMenuItemEnable Example for Delphi

AnnSetAutoText Example for Delphi

AnnSetBackColor example for Delphi

AnnSetBitmap example for Delphi

AnnSetFillMode example for Delphi

AnnSetFillPattern example for Delphi

AnnSetFontBold example for Delphi

AnnSetFontItalic example for Delphi

AnnSetFontName example for Delphi

AnnSetFontSize example for Delphi

AnnSetFontStrikeThrough example for Delphi

AnnSetFontUnderline example for Delphi

AnnSetForeColor example for Delphi

AnnSetGaugeLength example for Delphi

AnnSetGrouping example for Delphi

AnnSetHyperlinkMsg Example for Delphi

AnnSetLineStyle example for Delphi

AnnSetLineWidth example for Delphi

AnnSetMetafile example for Delphi

AnnSetPoints example for Delphi

AnnSetPolyFillMode example for Delphi

AnnSetROP2 example for Delphi

AnnSetScalarX example for Delphi

AnnSetSecondaryBitmap example for Delphi

AnnSetShowFlags example for Delphi

AnnSetText example for Delphi

AnnSetUnit example for Delphi

AnnSetUser Example for Delphi

AnnSetWnd example for Delphi

AnnShowLockedIcon Example for Delphi

AnnTextAlign example for Delphi

AnnTextExpandTokens example for Delphi

AnnTextRotate example for Delphi

AnnTicMarkLength example for Delphi

AnnUndo example for Delphi

AnnUndoDepth example for Delphi

AnnUndoEnable example for Delphi

AnnUngroup Example for Delphi

AnnUnlock Example for Delphi

AnnUnrealize Example for Delphi

AnnUserHandle example for Delphi

AntiAlias example for Delphi

ApplyMathLogic Example for Delphi

ApplyModalityLUT Example for Delphi

ApplyVOILUT Example for Delphi

AutoAnimate Example for Delphi

AutoBinary Example for Delphi

AutoCADFilesColorScheme Example for Delphi

AutoColorLevel Example for Delphi

AutoSize Example for Delphi

AutoTrim example for Delphi

Average example for Delphi

BackColor (ImageList Control) example for Delphi

BackColor example for Delphi

BackErase example for Delphi

BalanceColors Delphi Example

Bending Example for Delphi

BinaryFilter example for Delphi

BitmapAlpha example for Delphi

BitmapCompression example for Delphi

BitmapDataPath Example for Delphi

BitmapOrder example for Delphi

BitmapToClient example for Delphi

BitmapXres and BitmapYres example for Delphi

BitonalScaling (ImageList Control) example for Delphi

BitonalScaling example for Delphi

BorderColor (ImageList Control) example for Delphi

BorderRemove example for Delphi

BrowseDir (Thumbnail Browser Control) example for Delphi

BumpMap Example for Delphi

ButtonColumns example for Delphi

ButtonMenuTool example for Delphi

ButtonRows example for Delphi

ButtonVisible example for Delphi

CancelFloater example for Delphi

Capture example for Delphi

CenterImage example for Delphi

ChangeHueSatInt Example for Delphi

ChannelMix Example for Delphi

Clear (ImageList Control) example for Delphi

ClientToBitmap example for Delphi

ColorCount example for Delphi

ColorIntensityBalance Example for Delphi

ColorizeGray Example for Delphi

ColorLevel Example for Delphi

ColorReplace Example for Delphi

ColorResList Example for Delphi

ColorThreshold Example for Delphi

Combine example for Delphi

CombineExt example for Delphi

CombineWarp example for Delphi

Comment example for Delphi

ContinueBrowse (Thumbnail Browser Control) example for Delphi

ContourFilter example for Delphi

Contrast example for Delphi

ContrastBrightIntensity Example for Delphi

ConvertToColoredGray example for Delphi

ConvertUnsignedToSigned example for Delphi

CopyMarkers example for Delphi

Correlation Example for Delphi

CountLUTColors Example for Delphi

CreateBitmap, Size, and Combine example for Delphi

CreateMaskFromBitmapRgn Example for Delphi

CreateTB example for Delphi

CreateThumbnailFromFile example for Delphi

Creating and Saving an Animated GIF File example for Delphi

Cubism Example for Delphi

CurveToBezier example for Delphi

Cylindrical Example for Delphi

DDB example for Delphi

Deinterlace Example for Delphi

DeleteBitmapListItems example for Delphi

DeleteMarker example for Delphi

DeleteMarkerAt example for Delphi

DeletePage example for Delphi

Desaturate Example for Delphi

Deskew example for Delphi

Despeckle example for Delphi

DIB example for Delphi

DiceEffect Example for Delphi

DigitalSubtract Example for Delphi

DirectionEdgeStatistical Example for Delphi

DiscreteFourierTransformation Example for Delphi

DisplayFourierTransformation Example for Delphi

DJVResolution example for Delphi

DocCleanBitmap example for Delphi

DocCleanSuccess example for Delphi

DrawShape example for Delphi

DrawStar Example for Delphi

DrawTextStr example for Delphi

DropFilesAllowed example for Delphi

Dry Example for Delphi

Dst... example for Delphi

DynamicBinary Example for Delphi

EdgeDetectEffect Example for Delphi

EdgeDetector example for Delphi

EdgeDetectStatistical Example for Delphi

Emboss example for Delphi

EnableFloater example for Delphi

EnableKeyboard (ImageList Control) example for Delphi

EnableMethodErrors (ImageList Control) example for Delphi

EnableMethodErrors (Thumbnail Browser Control) example for Delphi

EnableMethodErrors example for Delphi

EnableOLEDragMethod (ImageList Control) example for Delphi

EnableOLEDragMethod (Main Control) example for Delphi

EnableZoomInRect example for Delphi

EnumTags Example for Delphi

Error (ImageList Control) example for Delphi

ErrorMsg (Main Control) Example for Delphi

Exif example for Delphi

ExportBitmapList example for Delphi

ExtractMessage Example for Delphi

FastFourierTransformation Example for Delphi

FastRotate example for Delphi

FeatherAlphaBlend example for Delphi

FeedLoad example for Delphi

Fill example for Delphi

Flip example for Delphi

FloaterDstClip... example for Delphi

Font (ImageList Control) example for Delphi

ForeColor (ImageList Control) example for Delphi

Frame... example for Delphi

FreeHandShear Example for Delphi

FreeHandWave Example for Delphi

FreePlaneBend Example for Delphi

FreeRadBend Example for Delphi

FrequencyFilter Example for Delphi

FrequencyFilterMask Example for Delphi

FunctionalLight Example for Delphi

GammaCorrect example for Delphi

GaussianFilter Delphi Example

GetBitmapClipSegments example for Delphi

GetBitmapDC example for Delphi

GetBitmapRow example for Delphi

GetBitmapRowCol example for Delphi

GetDIB example for Delphi

GetFeretsDiameter Example for Delphi

GetFileInfo example for Delphi

GetFloaterHandle example for Delphi

GetFunctionalLookupTable example for Delphi

GetHistogram example for Delphi

GetHistogramGray example for Delphi

GetLinearVOILUT Example for Delphi

GetMarkers example for Delphi

GetMemoryThresholds example for Delphi

GetMinMaxBits example for Delphi

GetMinMaxVal example for Delphi

GetObjectInfo Example for Delphi

GetPixelData example for Delphi

GetRgnBounds example for Delphi

GetRgnHandle example for Delphi

GetRgnPerimeterLength Example for Delphi

GetStatisticsInfo Example for Delphi

GetTransformationParameters Example for Delphi

GetUserLookupTable example for Delphi

GlassEffect Example for Delphi

GlowFilter Example for Delphi

Grayscale example for Delphi

GrayScaleExt Delphi Example

GrayScaleToDuotone Example for Delphi

GrayScaleToMultitone Example for Delphi

h_Wnd (AnnToolbar) example for Delphi

Halftone example for Delphi

HasMagGlass example for Delphi

HasRgn example for Delphi

hDocCleanRgn example for Delphi

HistoContrast example for Delphi

HistoEqualize example for Delphi

HistogramTableSize example for Delphi

HitTest (ImageList Control) example for Delphi

HolesRemovalRgn Example for Delphi

HScrollInfo example for Delphi

HScrollStep example for Delphi

HSV_HfromRGB example for Delphi

Hue example for Delphi

IgnoreFilters example for Delphi

ImportBitmapList example for Delphi

Impressionist Example for Delphi

InfoColorSpace Example for Delphi

InfoHasAlpha example for Delphi

InfoLayers example for Delphi

InfoViewPerspective example for Delphi

Insert (ImageList Control) example for Delphi

InsertAt (ImageList Control) example for Delphi

InsertBitmapListItem Example for Delphi

InsertFromBitmapList (ImageList Control) example for Delphi

InsertMarker example for Delphi

Intensity example for Delphi

IntensityDetect example for Delphi

Invert example for Delphi

InvertedText example for Delphi

ISISAcquire example for Delphi

ISISAcquireMulti example for Delphi

ISISGetASCIITag example for Delphi

ISISGetASCIITagChoiceCount example for Delphi

ISISGetTagChoiceCount example for Delphi

IsISISAvailable example for Delphi

ISISSelect example for Delphi

ISISSetScanOptions example for Delphi

IsPtInRgn example for Delphi

IsRegMark Example for Delphi

IsSigned example for Delphi

IsSupportLocked (ISIS Control) example for Delphi

Item (ImageList Control) example for Delphi

ItemBackgroundColor (ImageList Control) example for Delphi

ItemWidth (ImageList Control) example for Delphi

J2KCompressionControl example for Delphi

J2KCompressionRatio example for Delphi

J2KSetDefaults example for Delphi

J2KTargetFileSize example for Delphi

J2KUseROI example for Delphi

JBIG2SaveFlags Example for Delphi

LensFlare Example for Delphi

LevelLowBit example for Delphi

LevelLUT example for Delphi

LevelLUTLength example for Delphi

Light Example for Delphi

LightControl Example for Delphi

LineProfile Delphi Example

LineRemove example for Delphi

LoadDatabase example for Delphi

LoadFast example for Delphi

LoadFileTile example for Delphi

LoadFromFile (ImageList Control) example for Delphi

LoadIFD example for Delphi

LoadMarkers example for Delphi

LoadMemory example for Delphi

LoadMemoryTile example for Delphi

LoadResize example for Delphi

LoadUseViewPerspective example for Delphi

LocalHistoEqualize Example for Delphi

MagGlassPointer example for Delphi

MathFunction Example for Delphi

MaxFilter example for Delphi

Median example for Delphi

MinFilter example for Delphi

Mosaic example for Delphi

MotionBlur example for Delphi

Multiply Example for Delphi

MultiScaleEnhancement Example for Delphi

Ocean Example for Delphi

OCXBitmap example for Delphi

Oilify example for Delphi

OnAnimate Event Example for Delphi

OnAnnChange Event Example for Delphi

OnAnnEnumerate example for Delphi

OnAnnLocked example for Delphi

OnAnnMenu example for Delphi

OnAnnMouseDown example for Delphi

OnAnnSelect example for Delphi

OnAnnToolChecked Example for Delphi

OnAnnToolDestroy Example for Delphi

OnAnnUnlocked Example for Delphi

OnBitmapDataPathClosed Example for Delphi

OnChange example for Delphi

OnEnumerateMarkers for Delphi

OnFilePage Event Example for Delphi

OnItemSelected (ImageList Control) example for Delphi

OnLoadInfo... example for Delphi

OnOLECompleteDrag (ImageList Control) example for Delphi

OnOLECompleteDrag (Main Control) example for Delphi

OnPaint event example for Delphi

OnRgnChange example for Delphi

OnScroll event example for Delphi

OnZoomInDone example for Delphi

OwnerDrawItem event example for Delphi

OwnerDrawItems example for Delphi

PageCount (ImageList Control) example for Delphi

PaintContrast example for Delphi

PaintDither (ImageList Control) example for Delphi

PaintDither example for Delphi

PaintEffect example for Delphi

PaintGamma example for Delphi

PaintIntensity example for Delphi

PaintMaxPasses example for Delphi

PaintPalette example for Delphi

PaintRgnOnly example for Delphi

PaintROP3 example for Delphi

PaintScaling example for Delphi (ImageList Control)

PaintScaling example for Delphi (Main Control)

PaintSizeMode Example for Delphi

PaintSizeUseDPI example for Delphi

PaintWhileLoad example for Delphi

PaintZoomFactor Example for Delphi

PatternStyle example for Delphi

PCDRes example for Delphi

PDFInitDir example for Delphi

PDFSaveUseDPI example for Delphi

PDFXResolution example for Delphi

Picturize example for Delphi

PicturizeBitmapList example for Delphi

PicturizeSingle example for Delphi

Pixel example for Delphi

Pixelate Example for Delphi

Plane Example for Delphi

PlaneBend Example for Delphi

PLTPenColor example for Delphi

Polar Example for Delphi

Posterize example for Delphi

PreferredLoadFormat Example for Delphi

PreLoadFilters Example for Delphi

ProgressivePasses Example for Delphi

PTKResolution Example for Delphi

Punch Example for Delphi

PuzzleEffect Example for Delphi

RadialBlur Example for Delphi

RadWave Example for Delphi

RasterizeViewportWidth Example for Delphi

RawLoad Example for Delphi

RawSave Example for Delphi

ReadLoadResolutions Example for Delphi

ReadTagMemory Example for Delphi

ReadyState Example for Delphi

RemapHue example for Delphi

RemapTableSize example for Delphi

Remove (ImageList Control) example for Delphi

RemoveRedeye example for Delphi

RenderCenter Example for Delphi

RepaintRect event example for Delphi

ResizeRgn example for Delphi

RevEffect Example for Delphi

Reverse example for Delphi

RGBfromHSV example for Delphi

RgnFrameColor example for Delphi

RgnFrameType example for Delphi

RgnHeight example for Delphi

RgnMarkingMode example for Delphi

RingEffect Example for Delphi

Ripple Example for Delphi

Rotate example for Delphi

RowCount (ImageList Control) example for Delphi

RTFPaperHeight example for Delphi

SampleTarget Example for Delphi

Saturation example for Delphi

Save example for Delphi

SaveBuffer example for Delphi

SaveDatabase example for Delphi

SaveIFD example for Delphi

SaveInterlaced example for Delphi

SaveLayers example for Delphi

SaveLSB example for Delphi

SaveMemory example for Delphi

SaveOffset Example for Delphi

SavePage example for Delphi

SaveResolutionCount example for Delphi

SaveTileWidth example for Delphi

SaveToFile (ImageList Control) example for Delphi

SaveWithStamp example for Delphi

ScrollItems (ImageList Control) example for Delphi

ScrollStyle (ImageList Control) example for Delphi

Segment Example for Delphi

SelectAll (ImageList Control) example for Delphi

SelectData Example for Delphi

SelectedItemsExample for Delphi

SelectionColor (ImageList Control) example for Delphi

SelectionStyle (ImageList Control) example for Delphi

SelectiveColor Example for Delphi

SetMemoryThresholds example for Delphi

SetRgn... example for Delphi

SetRgnBorder example for Delphi

SetRgnColorHSVRange example for Delphi

SetRgnColorRGBRange example for Delphi

SetRgnFromMask Example for Delphi

SetRgnMagicWand example for Delphi

SetRgnRect example for Delphi

SetRgnRoundRect example for Delphi

SetSelectionBitmap example for Delphi

SetSrcClipRect example for Delphi

SetSrcRect example for Delphi

SetTag example for Delphi

Sharpen example for Delphi

Shear example for Delphi

ShiftData Example for Delphi

ShowMagGlass Example for Delphi

ShowMagGlass example for Delphi

Skeleton Example for Delphi

SkipFile example for Delphi

SmoothEdges Example for Delphi

Solarize example for Delphi

Sort (ImageList Control) example for Delphi

SortExt example example for Delphi

SpatialFilter example for Delphi

Spherize Example for Delphi

Src... example for Delphi

STable example for Delphi

StartMagGlass example for Delphi

StretchIntensity example for Delphi

SubtractBackground Example for Delphi

SwapColors Delphi Example

Swirl Example for Delphi

TextFont example for Delphi

TextPointerFixed example for Delphi

TextureAlphaBlend Example for Delphi

TextWordWrap example for Delphi

TransitionEffect example for Delphi

TransparentColor example for Delphi

Trim example for Delphi

Tunnel Example for Delphi

Underlay example for Delphi

UnlockSupport (ImageList Control) example for Delphi

UnlockSupport (ISIS Control) example for Delphi

UnlockSupport (Thumbnail Browser Control) example for Delphi

UnsharpMask Delphi Example

UseLUT Example for Delphi

UserFilter Example for Delphi

UserPalette and BitmapPalette example for Delphi

Version... example for Delphi

ViewSize example for Delphi

VScrollStep example for Delphi

VTable example for Delphi

Wave Example for Delphi

Wind Example for Delphi

WindowLevel example for Delphi

WindowLevelBitmap example for Delphi

WindowLevelFillLUT example for Delphi

WMFResolution example for Delphi

WMFResolutionX Example for Delphi

WriteComment example for Delphi

WriteMarkerAction example for Delphi

WriteMetaData example for Delphi

ZoomBlur Example for Delphi

ZoomIn example for Delphi

ZoomWave Example for Delphi


AboutBox example for Delphi

This example displays the LEADTOOLS VCL information.

Lead1.AboutBox;


AdaptiveContrast Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);

begin
{ This example loads a bitmap and applies Adaptive Contrast Enhancement }
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{ Apply Adaptive Contrast Enhancement }
LEADImage1.AdaptiveContrast(9, 200, ACE_LIN);
end;


AddBitmaps example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
for i:= 0 To 4 do
begin
LEADImage2.Bitmap:= LEADImage1.Bitmap;
LEADImage2.Rotate ( 7200 * i, 0, RGB(255, 0, 0) );
LEADImage3.InsertBitmapListItem (LST_APPEND, LEADImage2.Bitmap);
end;
LEADImage1.AddBitmaps ( LEADImage3.BitmapList, BC_AVG );
end;


AddBorder example for Delphi

LEADImage1.AddBorder (30, 30, 30, 30, BORDER_OUTSIDE,
BORDER_STYLE_OPAQUE,
BORDER_EFFECT_CURVEDIN,
0, BORDER_GRAD_INSIDEOUT,
RGB(200, 150, 150),
0, 200, False,
False, 0,
BORDER_SHADOW_LEFT, False);


AddFrame example for Delphi

LEADImage1.AddFrame (LEADImage2.Bitmap, False, False, 0, 0, FRAME_OUTSIDE, FRAME_QUALITY_LOW);


AddMessage Example for Delphi

procedure TForm1.AddMessageClick(Sender: TObject);
var
strMsg: String;
ptStart: TPoint;
begin
strMsg:= 'LEAD Technologies, Inc.';
ptStart.X:= 10;
ptStart.Y:= 10;
{Add the above message to image in the default position and with the default password }
LEADImage1.AddMessage( strMsg, '', '', ptStart );
end;


AddNoise example for Delphi

This example adds red noise and redisplays the bitmap.

Lead1.AddNoise(500, CHANNEL_RED);
Lead1.ForceRepaint;


AddShadow Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load a bitmap at its own bits per pixel }
LEADImage1.Load( 'IMAGE3.CMP', 0, 1, 1 );

{ Apply shadow effect to the image}
LEADImage1.AddShadow( SHADOW_SE, 0, SHADOW_CLR_GRAY );
end;


AddWeightedBitmaps Example for Delphi

procedure TForm1.AddWeightedBitmapsClick(Sender: TObject);
var
i: L_INT;
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load( 'e:\image1.cmp', 0, 1, 1 );

for i:= 0 to 3 do
begin
LEADImage1.Rotate( i * 720, ROTATE_RESIZE, RGB(255, 0, 0));
LEADImage2.InsertBitmapListItem( 0, LEADImage1.Bitmap);
end;

LEADImage1.AddWeightedBitmaps( LEADImage2.BitmapList, Nil, BC_AVG );
end;


Aging Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ( 'image1.cmp', 0, 1, 1 );
{ apply aging effect }
LEADImage1.Aging(10, 2, 50,2,5,6, RGB(255,255,0), RGB(0,0,0),
RGB(0,0,255), AGING_ADD_VSCRATCH + AGING_ADD_PITS + AGING_SCRATCH_INV + AGING_PITS_CLR);
end;


AlphaBlend example for Delphi

LEADImage2.Bitmap:= LEADImage1.Bitmap;
LEADImage2.IntensityDetect (150, 250) ;
LEADImage1.AlphaBlend (0, 0, LEADImage1.BitmapWidth, LEADImage1.BitmapHeight,
LEADImage2.Bitmap, 0, 0, 128);


AnimationEnable Example for Delphi

This example loads and plays an animated file. It assumes that the LEAD control has already been sized to the aspect ratio of the image.

{ Load all pages of an animated gif file. }
Lead1.Load('d:\ltwin10\images\eye.gif ', 0, 1, -1);
{ Set properties for a scaled animation. }
Lead1.AutoRepaint := True;
Lead1.AutoSetRects := False;
{ Set the image display size to match the LEAD control. }
Lead1.SetDstRect(0, 0, Lead1.Width, Lead1.Height);
Lead1.SetDstClipRect(0, 0, Lead1.Width, Lead1.Height);
{ Allow a continuous loop. }
Lead1.AnimationLoop := True;
{ Start the animation. }
Lead1.AnimationEnable := True;


AnnAddUserHandle example for Delphi

Procedure TForm1.ExampleAnnAddUserHandle ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
RectTop: L_INT32;
RectLeft: L_INT32;
RectWidth: L_INT32;
RectHeight: L_INT32;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);
if(nObjectType = ANNOBJECT_RECT ) then
begin
RectTop:= Trunc(LEADAnn1.AnnRectTop[hObject]);
RectLeft:= Trunc(LEADAnn1.AnnRectLeft[hObject]);
RectWidth:= Trunc(LEADAnn1.AnnRectWidth[hObject]);
RectHeight:= Trunc(LEADAnn1.AnnRectHeight[hObject]);

LEADAnn1.AnnHandle.ID:= 100;
LEADAnn1.AnnHandle.Visible:= true;
LEADAnn1.AnnHandle.PenColor:= RGB(0, 0, 0);
LEADAnn1.AnnHandle.FillColor:= RGB(255, 0, 0);
LEADAnn1.AnnHandle.Shape:= ANNHANDLE_SHAPE_CIRCLE;
LEADAnn1.AnnHandle.Cursor:= 0;

LEADAnn1.AnnHandle.Flags:= ANNHANDLE_ID +
ANNHANDLE_LOCATION +
ANNHANDLE_CONTAINER_COORDINATES +
ANNHANDLE_VISIBLE +
ANNHANDLE_PEN_COLOR +
ANNHANDLE_FILL_COLOR +
ANNHANDLE_SHAPE;

LEADAnn1.AnnHandle.ContainerX:= RectLeft + (RectWidth / 2);
LEADAnn1.AnnHandle.ContainerY:= RectTop;

LEADAnn1.AnnHandle.ContainerX:= RectLeft + (RectWidth / 2);
LEADAnn1.AnnHandle.ContainerY:= RectTop + RectHeight;

LEADAnn1.AnnAddUserHandle (hObject);
end
else
begin
ShowMessage ('Annotation object must be a rectangle');
end;
end;


AnnAdjustPoint example for Delphi

Procedure TForm1.ExampleAnnAdjustPoint ( hObject: HANNOBJECT , dAnchorX: L_DOUBLE, dAnchorY: L_DOUBLE, dMoveX: L_DOUBLE, dMoveY: L_DOUBLE, dAngle: L_DOUBLE);
begin
LEADAnn1.AnnAdjustPoint(dAnchorX, dAnchorY, dMoveX, dMoveY, dAngle, ANNADJUST_HORIZONTAL);
end;


AnnAutoCursor example for Delphi

This sample sets the Default and Move annotation cursors

Procedure TForm1.SampleAnnAutoCursors();
var
hCursorMove: L_HCURSOR;
hCursorDefault: L_HCURSOR;
begin
// load the cursors from files
hCursorDefault:= LoadCursorFromFile('c:\Default.cur');
hCursorMove:= LoadCursorFromFile('c:\Move.cur');

// Set
LEADAnn1.AnnAutoCursor[ANNAUTOCURSOR_DEFAULT]:= hCursorDefault;
LEADAnn1.AnnAutoCursor[ANNAUTOCURSOR_MOVE]:= hCursorMove;
end;


AnnAutoDialogFontSize Example for Delphi

// This example will set the dialog fonts to use Courier 15
LEADAnn1.AnnSetAutoText ( ANNAUTOTEXT_DIALOG_FONT, 'Courier New' ) ;
LEADAnn1.AnnAutoDialogFontSize:= 15;


AnnAutoDrawEnable Example for Delphi

This example toggles the AnnAutoDrawEnable property.

if (LEADAnn1.AnnAutoDrawEnable = True) Then
LEADAnn1.AnnAutoDrawEnable:= False
else
LEADAnn1.AnnAutoDrawEnable:= True


AnnAutomation Example for Delphi

AnnAutomation Property Example for Delphi

This example shows how you can use the AnnAutomation property to access the automation object through DLL functions.

Var
IsBold: L_BOOL; // Is the object's text bold
hAnnObject: Integer;
begin
hAnnObject:= LEADAnn1.AnnAutomation;
//Set the default font to bold, unless it already is
L_AnnGetFontBold ( hAnnObject, @IsBold ) ;
if (IsBold <> 0 )then
ShowMessage ( 'Already bold' )
else
L_AnnSetFontBold ( hAnnObject, 1, 0 ) ;


AnnAutoHilightPen example for Delphi

This Example assumes that you have a menu item named "_miHilightPen". By selecting this menu item and deselecting it, you can notice the effect of changing the AnnAutoHilightPen property value.

procedure TForm1.FormCreate(Sender: TObject);
var
hObject: HANNOBJECT;
begin
LEADAnn1.UnlockSupport(L_SUPPORT_DOCUMENT, 'TestKey');

LEADAnn1.Load('e:\Image1.bmp', 0, 0, 1);
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;

hObject:= LEADAnn1.AnnCreate(ANNOBJECT_RECT, True, True);
LEADAnn1.AnnRectHeight[hObject]:= 100;
LEADAnn1.AnnRectWidth[hObject]:= 200;
LEADAnn1.AnnRectLeft[hObject]:= 50;
LEADAnn1.AnnRectTop[hObject]:= 50;
_miHilightPen.Checked:= False;
end;

procedure TForm1._miHilightPenClick(Sender: TObject);
begin
_miHilightPen.Checked:= Not _miHilightPen.Checked;
if(_miHilightPen.Checked)then
LEADAnn1.AnnAutoHilightPen:= RGB($C0, $C0, $C0)
else
LEADAnn1.AnnAutoHilightPen:= RGB($FF, $FF, $FF);
end;


AnnAutoMenuEnable Example for Delphi

//This example toggles the AnnAutoMenuEnable property.
if (LEADAnn1.AnnAutoMenuEnable = True)then
LEADAnn1.AnnAutoMenuEnable:= False
else
LEADAnn1.AnnAutoMenuEnable:= True;


AnnAutoResize example for Delphi

//This example will double the size of the bitmap and annotations
LEADAnn1.AnnAutoResize:= True;
LEADAnn1.Size ( LEADAnn1.BitmapWidth * 2,
LEADAnn1.BitmapHeight * 2,
SIZE_RESAMPLE ) ;


AnnAutoRotate example for Delphi

//This example enables automatic rotation of annotations,
//then rotates the bitmap 2222 hundredths of degrees to demonstrate the automation:
LEADAnn1.AnnAutoRotate:= True;
LEADAnn1.Rotate ( 2222, ROTATE_RESIZE, RGB(0, 0, 255));


AnnBoundingRect... example for Delphi

Procedure TForm1. SampleAnnBoundingRect (hObject: L_HANDLE);
var
nLeft, nTop, nWidth, nHeight: Integer;
begin
nLeft := LEADAnn1.AnnBoundingRectLeft [hObject];
nTop := LEADAnn1.AnnBoundingRectTop [hObject];
nWidth := LEADAnn1.AnnBoundingRectWidth [hObject];
nHeight:= LEADAnn1.AnnBoundingRectHeight[hObject];
ShowMessage ('Ann Bounding Rect: Left[' + IntToStr(nLeft) + '], Top[' + IntToStr(nTop) + '], Width[' + IntToStr(nWidth) + '], Height[' + IntToStr(nHeight) + ']');
end;


AnnChangeUserHandle example for Delphi

Procedure TForm1.ExampleAnnChangeUserHandle ( hObject: HANNOBJECT );
var
nCount: L_INT32;
begin
LEADAnn1.AnnGetUserHandles (hObject);
nCount:= LEADAnn1.AnnUserHandlesCount;

if( nCount > 0 ) then
begin
LEADAnn1.AnnGetUserHandle(hObject, 0);
LEADAnn1.AnnHandle.ContainerX:= LEADAnn1.AnnHandle.ContainerX + 10;
LEADAnn1.AnnHandle.FillColor:= RGB(0, 0, 255);
LEADAnn1.AnnHandle.Shape:= ANNHANDLE_SHAPE_SQUARE;
LEADAnn1.AnnHandle.Flags:= (ANNHANDLE_FILL_COLOR +
ANNHANDLE_SHAPE +
ANNHANDLE_LOCATION);

LEADAnn1.AnnChangeUserHandle(hObject, 0);
end
else
begin
ShowMessage('No User Handle');
end;
end;


AnnDataPath example for Delphi

//This example shows how to load an annotation file.
LEADAnn1.AnnDataPath:= 'D:\pictures\Test.ann';


AnnDefine2 example for Delphi

//This example uses static variables to simulate user input to
//'rotate/resize a rectangle around a point on the bottom center line of the rectangle.
//'Intially the rectangle must not be rotated.
Procedure TForm1.ExampleAnnDefine2 ( hObject: HANNOBJECT );
var
hContainer: L_INT32;
nObjectType: L_INT;
dAngle: L_DOUBLE;
lCallCount: L_INT32;
dRectTop: L_DOUBLE;
dRectLeft: L_DOUBLE;
dRectWidth: L_DOUBLE;
dRectHeight: L_DOUBLE;
dRectRight: L_DOUBLE;
dRectBottom: L_DOUBLE;

dAnchorX: L_DOUBLE;
dAnchorY:L_DOUBLE;
dMoveX: L_DOUBLE;
dMoveY: L_DOUBLE;
dAnnPointX: L_DOUBLE;
dAnnPointY: L_DOUBLE;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);
lCallCount:=0;

if (nObjectType = ANNOBJECT_RECT ) then
begin
ShowMessage ('This object is not Rect Object');
end;

dAngle:= LEADAnn1.AnnRotateAngle[hObject];

if (dAngle = 0 ) then
begin
ShowMessage ('Object must not be rotated');
end;

lCallCount:= lCallCount + 1;
Case lCallCount of
1:
begin
dRectTop:= LEADAnn1.AnnRectTop[hObject];
dRectLeft:= LEADAnn1.AnnRectLeft[hObject];
dRectWidth:= LEADAnn1.AnnRectWidth[hObject];
dRectHeight:= LEADAnn1.AnnRectHeight[hObject];

dRectRight:= dRectWidth + dRectLeft;
dRectBottom:= dRectHeight + dRectTop;

dAnchorX:= (dRectLeft + dRectRight) / 2;
dAnchorY:= dRectBottom;

dAnnPointX:= (dRectLeft + dRectRight) / 2;
dAnnPointY:= dRectTop;

LEADAnn1.AnnDefine2(hObject, dAnchorX, dAnchorY, ANNDEFINE_SETANCHORPOINT);
LEADAnn1.AnnDefine2(hObject, dAnnPointX, dAnnPointY, ANNDEFINE_BEGINMOVEPOINT);
end;

2:
begin
dRectTop:= LEADAnn1.AnnRectTop[hObject];
dRectLeft:= LEADAnn1.AnnRectLeft[hObject];
dRectWidth:= LEADAnn1.AnnRectWidth[hObject];
dRectHeight:= LEADAnn1.AnnRectHeight[hObject];
dRectRight:= dRectWidth + dRectLeft;
dRectBottom:= dRectHeight + dRectTop;

LEADAnn1.PointsCount:= 1;
LEADAnn1.AnnContainerPointX[1]:= dRectRight;
LEADAnn1.AnnContainerPointY[1]:= dRectTop;

hContainer:= LEADAnn1.AnnContainer;

LEADAnn1.AnnConvert(hContainer, ANNCONVERT_TO_CLIENT);

dMoveX:= LEADAnn1.ClientPointX[0];
dMoveY:= LEADAnn1.ClientPointY[0];
LEADAnn1.AnnDefine2(hObject, dMoveX, dMoveY, ANNDEFINE_END);

lCallCount:= 0;
end;
end;
end;


AnnDeletePage example for Delphi

{This sample saves the annotations as the first page of a multipage annotation file
The format is specified by the uFormat parameter (either ANNFMT_NATIVE or ANNFMT_ENCODED)
The annotations are flipped, and saved as the second page
The annotations are rotated, and saved as the third page
Information is displayed about the annotation file
The second page is deleted, and information is again displayed about the annotation file}
Procedure TForm1.SampleAnnSave (strFileName: String; uFormat: Integer);
var
nRet: Integer;
strFormat: String;
strMsg: String;
begin

//Save as the first page of the annotation file
LEADAnn1.AnnSave (strFileName, uFormat, False, SAVE_OVERWRITE, 0);

//Flip the container, and save as the second page (insert before page 2)
LEADAnn1.AnnFlip (True, LEADAnn1.BitmapHeight / 2, False);
LEADAnn1.AnnSave (strFileName, uFormat, False, SAVE_INSERT, 2);

//Rotate the container, and save as the third page
//Here we could pass the SAVE_INSERT flag and 3 for nPage,
//but instead we will use the SAVE_APPEND flag
LEADAnn1.AnnRotate (False, LEADAnn1.BitmapWidth / 2, LEADAnn1.BitmapHeight / 2, 45, False);
LEADAnn1.AnnSave (strFileName, uFormat, False, SAVE_APPEND, 0);

//Verify contents of file
nRet:= LEADAnn1.AnnFileInfo (strFileName);
if (nRet = SUCCESS) Then
begin
Case LEADAnn1.AnnInfoFormat of

ANNFMT_NATIVE:
strFormat:= 'ANNFMT_NATIVE';
ANNFMT_WMF:
strFormat:= 'ANNFMT_WMF';
ANNFMT_ENCODED:
strFormat:= 'ANNFMT_ENCODED';
else
strFormat:= 'Unknown';
end;

strMsg := 'File: ' + strFileName + Chr(13);
strMsg := strMsg + 'Format: ' + strFormat + Chr(13);
strMsg := strMsg + 'Version: ' + IntToStr(LEADAnn1.AnnInfoVersion) + Chr(13);
strMsg := strMsg + 'Total Pages: ' + IntToStr(LEADAnn1.AnnInfoTotalPages) + Chr(13);

ShowMessage (strMsg);
end
else
ShowMessage ('Invalid Annotation File: ' + strFileName);

//Now delete the second page, and display information
LEADAnn1.AnnDeletePage (strFileName, 2);

//Verify contents of file
nRet := LEADAnn1.AnnFileInfo(strFileName);
if (nRet = SUCCESS) Then
begin
Case LEADAnn1.AnnInfoFormat of
ANNFMT_NATIVE: // Cut command.
strFormat := 'ANNFMT_NATIVE';
ANNFMT_WMF: // Copy command.
strFormat := 'ANNFMT_WMF';
ANNFMT_ENCODED: // Clear command.
strFormat := 'ANNFMT_ENCODED';
else
strFormat := 'Unknown';
end;

strMsg := 'File: ' + strFileName + Chr(13);
strMsg := strMsg + 'Format: ' + strFormat + Chr(13);
strMsg := strMsg + 'Version: ' + IntToStr(LEADAnn1.AnnInfoVersion) + Chr(13);
strMsg := strMsg + 'Total Pages: ' + IntToStr(LEADAnn1.AnnInfoTotalPages) + Chr(13);

ShowMessage (strMsg);
end
else
ShowMessage ('Invalid Annotation File: ' + strFileName);
end;


AnnDeletePageMemory example for Delphi

{This sample saves the annotations as the first page of a multipage annotation file in memory
The annotations are flipped, and saved as the second page
The annotations are rotated, and saved as the third page
Information is displayed about the annotation file
The second page is deleted, and information is again displayed about the annotation file}
//Assume this global declaration:
var
hMem: L_HANDLE;
procedure TForm1.SampleAnnFileInfoMemoryClick(Sender: TObject);
var
nRet: Integer;
strFormat: String;
strMsg: String;
lSize: Longint;
uFormat: Integer;

begin

uFormat:= ANNFMT_NATIVE;
//Save as the first page of the annotation file
hMem:= 0;
LEADAnn1.AnnSaveMemory (@hMem, uFormat, False, @lSize, SAVE_OVERWRITE, 0);

//Flip the container, and save as the second page (insert before page 2)
LEADAnn1.AnnFlip (True, LEADAnn1.BitmapHeight / 2, False);
LEADAnn1.AnnSaveMemory (@hMem, uFormat, False, @lSize, SAVE_INSERT, 2);

//Rotate the container, and save as the third page
//Here we could pass the SAVE_INSERT flag and 3 for nPage,
//but instead we will use the SAVE_APPEND flag
LEADAnn1.AnnRotate (False, LEADAnn1.BitmapWidth / 2, LEADAnn1.BitmapHeight / 2, 45, False);
LEADAnn1.AnnSaveMemory (@hMem, uFormat, False, @lSize, SAVE_APPEND, 0);

//Verify contents of file
nRet:= LEADAnn1.AnnFileInfoMemory (hMem, lSize);
if (nRet = SUCCESS) Then
begin
Case LEADAnn1.AnnInfoFormat of
ANNFMT_NATIVE:
strFormat := 'ANNFMT_NATIVE';
ANNFMT_WMF:
strFormat := 'ANNFMT_WMF';
ANNFMT_ENCODED:
strFormat := 'ANNFMT_ENCODED';
else
strFormat := 'Unknown';
end;

strMsg := '';
strMsg := strMsg + 'Format: ' + strFormat + Chr(13);
strMsg := strMsg + 'Version: ' + IntToStr(LEADAnn1.AnnInfoVersion) + Chr(13);
strMsg := strMsg + 'Total Pages: ' + IntToStr(LEADAnn1.AnnInfoTotalPages) + Chr(13);
strMsg := strMsg + 'Total Size: ' + IntToStr(lSize) + Chr(13);

ShowMessage (strMsg);
end
else
ShowMessage ('Invalid Annotation Memory File');

//Now delete the second page, and display information
LEADAnn1.AnnDeletePageMemory (hMem, @lSize, 2 );

//Verify contents of file
nRet := LEADAnn1.AnnFileInfoMemory (hMem, lSize);
if (nRet = SUCCESS) Then
begin
Case LEADAnn1.AnnInfoFormat of
ANNFMT_NATIVE: // Cut command.
strFormat := 'ANNFMT_NATIVE';
ANNFMT_WMF: // Copy command.
strFormat := 'ANNFMT_WMF';
ANNFMT_ENCODED: // Clear command.
strFormat := 'ANNFMT_ENCODED';
else
strFormat := 'Unknown';
end;

strMsg := '';
strMsg := strMsg + 'Format: ' + strFormat + Chr(13);
strMsg := strMsg + 'Version: ' + IntToStr(LEADAnn1.AnnInfoVersion) + Chr(13);
strMsg := strMsg + 'Total Pages: ' + IntToStr(LEADAnn1.AnnInfoTotalPages) + Chr(13);
strMsg := strMsg + 'Total Size: ' + IntToStr(lSize) + Chr(13);

ShowMessage (strMsg);
end
else
ShowMessage ('Invalid Annotation File');

//If finished with hMem, then free the memory by calling GlobalFree
end;


AnnDeleteUserHandle example for Delphi

//This example deletes the first user handle of an object.
Procedure TForm1.ExampleAnnDeleteUserHandle ( hObject: HANNOBJECT );
var
nCount: L_INT32;
begin
LEADAnn1.AnnGetUserHandles (hObject);
nCount:= LEADAnn1.AnnUserHandlesCount;

if( nCount > 0 ) then
begin
LEADAnn1.AnnDeleteUserHandle (hObject, 0);
end
else
begin
ShowMessage('No User Handle');
end;
end;


AnnDestroy example for Delphi

LEADAnn1.AnnDestroy (LEADAnn1.AnnContainer, ANNFLAG_RECURSE + ANNFLAG_SELECTED);


AnnEncryptApply example for Delphi

Procedure TForm1.ExampleAnnEncryptApply ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
nRet: L_INT;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);
if(nObjectType = ANNOBJECT_ENCRYPT) then
begin
ShowMessage('This object is not an encryptor object.');
Exit;
end;

LEADAnn1.AnnEncryptOptions.Flags:= ANNENCRYPT_ALL;
LEADAnn1.AnnGetEncryptOptions (hObject);

if (LEADAnn1.AnnEncryptOptions.EncryptBitmap = NULL) then
begin
ShowMessage('The encrypt object is not associated with a bitmap.');
Exit;
end;

if (LEADAnn1.AnnEncryptOptions.Encryptor = false) then
begin
ShowMessage('This object is a decryptor.');
end;

LEADAnn1.AnnEncryptOptions.Key:= 123;
LEADAnn1.AnnEncryptOptions.Flags:= ANNENCRYPT_KEY;
LEADAnn1.AnnEncryptOptions.SaveDecryptorKey:= true;
LEADAnn1.AnnEncryptOptions.SaveEncryptorKey:= true;
LEADAnn1.AnnEncryptOptions.ClearDecryptorKey:= true;
LEADAnn1.AnnEncryptOptions.ClearEncryptorKey:= true;
LEADAnn1.AnnEncryptOptions.NeverEncrypted:= false;
LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnSetEncryptOptions(hObject);

LEADAnn1.AnnEncryptApply(hObject, ANNENCRYPTAPPLY_ENCRYPTOR);

nRet:= Application.MessageBox('Encryptor has been applied. Would you like to remove the encryption?','', MB_YESNO);

if (nRet = IDYES) then
begin
LEADAnn1.AnnEncryptApply (hObject, ANNENCRYPTAPPLY_DECRYPTOR);
end;
end;


AnnEnumerateHandles example for Delphi

Procedure TForm1.ExampleAnnEnumerateHandles ( hObject: HANNOBJECT );
begin
LEADAnn1.AnnEnableEnumerateHandlesEvent:= True;
LEADAnn1.AnnEnumerateHandles(hObject);
end;

function TForm1.LEADAnn1AnnEnumerateHandles(hObject: HANNOBJECT;
AnnHandleInfo: TAnnHandleInfo): Integer;
begin
AnnHandleInfo.Visible:= True;
if (AnnHandleInfo.AnnType = ANNHANDLETYPE_DEFAULT_HANDLE) then
begin
AnnHandleInfo.Shape:= ANNHANDLE_SHAPE_SQUARE;
AnnHandleInfo.FillColor:= RGB(0, 0, 255);
AnnHandleInfo.PenColor:= RGB(0, 255, 0);
AnnHandleInfo.ID:= 100;
end
else
begin
AnnHandleInfo.Shape:= ANNHANDLE_SHAPE_CIRCLE;
AnnHandleInfo.FillColor:= RGB(0, 255, 0);
AnnHandleInfo.PenColor:= RGB(0, 0, 255);
AnnHandleInfo.ID:= 50;
end;
ShowMessage('The handle with index:= ' + IntToStr(AnnHandleInfo.Index) + 'was updated' );
ShowMessage('number of handles:= ' + IntToStr(AnnHandleInfo.TotalHandles));
LEADAnn1.AnnEnableEnumerateHandlesEvent:= False;
Result:= SUCCESS_CHANGE;
end;


AnnEnumerateTextToken example for Delphi

Procedure TForm1.ExampleAnnEnumerateTextToken ( hObject: HANNOBJECT );
begin
LEADAnn1.AnnEnableEnumerateHandlesEvent:= True;
LEADAnn1.AnnEnumerateHandles(hObject);
end;

procedure TForm1.LEADAnn1AnnEnumerateTextTokenTable(
nTextTokenCount: Integer; cToken: Char; strDescription,
strTokenString: String; nTokenType: Integer);
var
strType: String;
begin
strType:= 'Unknown';
Case ( nTokenType ) of
ANNTOKEN_NONE:
strType:= 'ANNTOKEN_NONE';

ANNTOKEN_SEPARATOR:
strType:= 'ANNTOKEN_SEPARATOR';

ANNTOKEN_TEXT:
strType:= 'ANNTOKEN_TEXT';

ANNTOKEN_DATE_YYYY:
strType:= 'ANNTOKEN_DATE_YYYY';

ANNTOKEN_DATE_YY:
strType:= 'ANNTOKEN_DATE_YY';

ANNTOKEN_DATE_MM:
strType:= 'ANNTOKEN_DATE_MM';

ANNTOKEN_DATE_DD:
strType:= 'ANNTOKEN_DATE_DD';

ANNTOKEN_DATE_MONTH_NAME:
strType:= 'ANNTOKEN_DATE_MONTH_NAME';

ANNTOKEN_DATE_DAY_OF_WEEK:
strType:= 'ANNTOKEN_DATE_DAY_OF_WEEK';

ANNTOKEN_TIME_HH_12:
strType:= 'ANNTOKEN_TIME_HH_12';

ANNTOKEN_TIME_HH_24:
strType:= 'ANNTOKEN_TIME_HH_24';

ANNTOKEN_TIME_MM:
strType:= 'ANNTOKEN_TIME_MM';

ANNTOKEN_TIME_SS:
strType:= 'ANNTOKEN_TIME_SS';

ANNTOKEN_TIME_MILLISECONDS:
strType:= 'ANNTOKEN_TIME_MILLISECONDS';

ANNTOKEN_AM_PM:
strType:= 'ANNTOKEN_AM_PM';
end;

ShowMessage ( 'Token= ' + cToken +
'strDescription= ' + strDescription +
'Token String= ' + strTokenString +
'Type= ' + strType );

LEADAnn1.AnnEnableEnumerateTextTokenTableEvent:= True;
end;


AnnFixed example for Delphi

Procedure TForm1.ExampleAnnFixed ( hObject: HANNOBJECT );
var
bFixed: Boolean;
begin
bFixed:= LEADAnn1.AnnFixed[hObject];
LEADAnn1.AnnEnableAdjust:= true;
bFixed:= Not bFixed;
LEADAnn1.AnnFixed[hObject]:= bFixed;
if (bFixed = true) then
begin
ShowMessage('Fixed');
end
else
begin
ShowMessage('Not Fixed');
end;
end;


AnnGetAngle example for Delphi

Procedure TForm1.AnnGetAngle();
var
hProtractor: HANNOBJECT;
hPolygon: HANNOBJECT;
points: Array[0..3] of ANNPOINT;
uArea: L_UINT;
dAngle: L_DOUBLE;
begin
hProtractor:= 0;
hPolygon:= 0;

LEADAnn1.AnnCreateItem(LEADAnn1.AnnContainer, ANNOBJECT_PROTRACTOR, True, hProtractor);
LEADAnn1.AnnCreateItem(LEADAnn1.AnnContainer, ANNOBJECT_POLYGON, True, hPolygon);

   // Assign values for x and y from 1 through
 3
points[1].X:= 10;
points[1].Y:= 20;
points[2].X:= 100;
points[2].Y:= 200;
points[3].X:= 200;
points[3].Y:= 100;

LEADAnn1.AnnSetPoints(hProtractor, @points[1], 3);

points[0].X:= 50;
points[0].Y:= 220; // SetPoints starts at 0 because No. of points set to 4

LEADAnn1.AnnSetPoints(hPolygon, @points[0], 4);
LEADAnn1.AnnSetFillMode(hPolygon, ANNFILLMODE_OPAQUE, False);
Caption:= 'Protractor Bounding Rectangle' +
', Left:' + IntToStr(LEADAnn1.AnnBoundingRectLeft[hProtractor]) +
', Top:' + IntToStr(LEADAnn1.AnnBoundingRectTop[hProtractor]) +
', Width:' + IntToStr(LEADAnn1.AnnBoundingRectWidth[hProtractor]) +
', Height:' + IntToStr(LEADAnn1.AnnBoundingRectHeight[hProtractor]);

   LEADAnn1.AnnBringToFront(hPolygon);
ShowMessage('Brought Polygon to front');
LEADAnn1.AnnGetArea(hPolygon,
 uArea);
Caption:= 'Polygon Area:' + IntToStr(uArea);
LEADAnn1.AnnSendToBack(hPolygon);
ShowMessage('Sent Polygon to back');
LEADAnn1.AnnCut(hPolygon,
 ANNFMT_WMF, False, True);
dAngle:= 0;
LEADAnn1.AnnGetAngle(hProtractor,
 dAngle);
Caption:= 'Angle:' + FloatToStr(dAngle);
end;


AnnGetAutoMenuItemEnable Example for Delphi

procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
begin
ShowMessage (IntToStr (LEADAnn1.AnnGetAutoMenuItemEnable (hObject, 0, ANNAUTOTEXT_MENU_DELETE)));
end;


AnnGetBitmapDpiX Example for Delphi

var
x: L_DOUBLE;
y: L_DOUBLE;
hAuto: HANNOBJECT;
begin
hAuto:= LEADAnn1.AnnCreate(ANNOBJECT_AUTOMATION, False, False);

LEADAnn1.AnnGetBitmapDpiX(hAuto, x);
LEADAnn1.AnnGetBitmapDpiY(hAuto, y);
ShowMessage(FloatToStr(x) + ', ' + FloatToStr(y));
LEADAnn1.AnnSetBitmapDpiX(hAuto, x + 2, False);
LEADAnn1.AnnSetBitmapDpiY(hAuto, y + 2, False);
LEADAnn1.AnnGetBitmapDpiX(hAuto, x);
LEADAnn1.AnnGetBitmapDpiY(hAuto, y);
ShowMessage(FloatToStr(x) + ', ' + FloatToStr(y));
end;


AnnGetDistance example for Delphi

Procedure TForm1.ExampleAnnGetDistance ( hObject: HANNOBJECT );
var
dDis1: L_DOUBLE;
dDis2: L_DOUBLE;
begin
LEADAnn1.AnnGetDistance ( hObject, dDis1, dDis2 );
ShowMessage ( 'Distance: ' + FloatToStr(dDis1) + Chr(13) +
'Gauge Length: ' + FloatToStr(dDis2) );
end;


AnnGetDistance2 example for Delphi

Procedure TForm1.ExampleAnnGetDistance2 ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
lCount: L_INT32;
dTotalDis: L_DOUBLE;
lTotalRulerUnit: L_INT32;
lTotalSmartUnit: L_INT32;
dDistance: L_DOUBLE;
lRulerUnit: L_INT32;
lSmartUnit: L_INT32;
i: L_INT;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);

if (nObjectType <> ANNOBJECT_RULER) then
begin
ShowMessage('This object is not an RULER Object');
end;
LEADAnn1.AnnGetDistance2(hObject);

lCount:= LEADAnn1.AnnDistanceCount;

dTotalDis:= LEADAnn1.AnnTotalDistance;
lTotalRulerUnit:= LEADAnn1.AnnTotalRulerUnit;
lTotalSmartUnit:= LEADAnn1.AnnTotalSmartUnit;
ShowMessage ( 'Total Distance:= ' + FloatToStr(dTotalDis) + Chr(13) +
'Total Ruler Unit:= ' + IntToStr(lTotalRulerUnit) + Chr(13) +
'Total Smart Unit:= ' + IntToStr(lTotalSmartUnit));

for i := 0 to lCount-1 do
begin
dDistance:= LEADAnn1.AnnDistance[I];
lRulerUnit:= LEADAnn1.AnnRulerUnit[i];
lSmartUnit:= LEADAnn1.AnnSmartUnit[i];

ShowMessage( 'Distance Index:= ' + IntToStr(i) + Chr(13) +
'Distance:= ' + FloatToStr(dDistance) + Chr(13) +
'Ruler Unit:= ' + IntToStr(lRulerUnit) + Chr(13) +
'Smart Unit:= ' + IntToStr(lSmartUnit));

end;
end;


AnnGetGrouping example for Delphi

//This example will toggle the grouping feature for all
//the sub-containers
//This event is fired for each annotation
//Toggles the Grouping feature for all the containers
procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
begin
if ( LEADAnn1.AnnGetType (hObject)= ANNOBJECT_CONTAINER ) then
LEADAnn1.AnnSetGrouping ( hObject,
not LEADAnn1.AnnGetGrouping (hObject),0 ) ;
end;

//Add sub-containers by selecting objects and grouping them
//before clicking on this button
//Note that after you disable the grouping you can select and change
//individual objects belonging to a group. When you re-enable
//the grouping, the objects act as a group again.
procedure TForm1.Button1Click(Sender: TObject);
begin
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;
LEADAnn1.AnnEnumerate (LEADAnn1.AnnContainer, ANNFLAG_RECURSE + ANNFLAG_NOTTHIS, Nil);
end;


AnnGetHyperlinkParam example Delphi

//This example retrieves parameters using AnnGetHyperlinkParam.
procedure TForm1.LEADAnn1AnnChange (hObject: L_HANDLE);
var
msgstr: string;
nType: Integer;
iParamCount: Integer;
lRet: longint;
begin
nType:= LEADAnn1.AnnGetHyperlinkType (hObject);
if (nType = ANNLINK_ANNEVENT5) then
begin
msgstr:= 'Params are: ' + Chr(13);
for iParamCount:= 0 to 4 do
begin
lRet:= LEADAnn1.AnnGetHyperlinkParam(hObject, iParamCount);
msgstr:= msgstr + ' Param' + IntToStr(iParamCount + 1) + ': ' + IntToStr(lRet) + Chr(13);
end;
end
else
msgstr:= 'Invalid Type';
ShowMessage ( msgstr ) ;
end;


AnnGetHyperlinkString example for Delphi 4.0

AnnGetHyperlinkString example for Delphi

// This example is also for:
// AnnSetHyperlinkString method
// AnnGetItemHandle method
//The following example places calls to both the AnnSetHyperlinkString method and the AnnGetHyperlinkString method.
//Set AnnHyperLink to a URL
procedure TForm1.LEADAnn1AnnHyperlinkMenu(phObjects: L_PHANDLE;
iCount: Integer);
var
i: Integer;
szLink: PChar;
strSize: Integer;
begin
for i:= 0 to iCount - 1 do
begin
LEADAnn1.AnnSetHyperlinkString ( LEADAnn1.AnnGetItemHandle(phObjects, i ), ANNLINK_WEBPAGE, PChar('http://www.leadtools.com'));
//get the string to see what got set
strSize:= LEADAnn1.AnnGetHyperlinkString(LEADAnn1.AnnGetItemHandle(phObjects, i ), Nil);
if ( strSize > 0 ) then
begin
szLink:= AllocMem (strSize+1);
LEADAnn1.AnnGetHyperlinkString (LEADAnn1.AnnGetItemHandle (phObjects, i), @szLink);
ShowMessage ( szLink ) ;
FreeMem ( szLink ) ;
end
else
ShowMessage ( 'Error setting Link' ) ;
end;
end;


AnnGetHyperlinkType example for Delphi

//The following is an example of OnAnnHyperlink event code, which includes a call to AnnGetHyperlinkType.
procedure TForm1.LEADAnn1AnnHyperlink (hObject: L_HANDLE; iParamCount,
lParam1, lParam2, lParam3, lParam4, lParam5: Integer);
var
msgstr: String;
nType: Integer;

begin
nType:= LEADAnn1.AnnGetHyperlinkType(hObject);
if ((nType = ANNLINK_ANNEVENT5) Or (nType = ANNLINK_ANNEVENT)) then
begin
if (iParamCount >= 0) then
msgstr:= IntToStr(iParamCount) + ' params are valid' + Chr(13);
if (iParamCount >= 1) then
msgstr:= msgstr + 'Param1: ' + IntToStr(lParam1) + Chr(13);
if (iParamCount >= 2) then
msgstr:= msgstr + 'Param2: ' + IntToStr(lParam2) + Chr(13);
if (iParamCount >= 3) then
msgstr:= msgstr + 'Param3: ' + IntToStr(lParam3) + Chr(13);
if (iParamCount >= 4) then
msgstr:= msgstr + 'Param4: ' + IntToStr(lParam4) + Chr(13);
if (iParamCount = 5) then
msgstr:= msgstr + 'Param5: ' + IntToStr(lParam5) + Chr(13);
end
else
msgstr:= 'Invalid Type';
ShowMessage ( msgstr ) ;
end;


AnnGetNameOffsetX example for Delphi

{This sample shifts the NameOffset of the annotation object hObject
two pixels in the X direction and one pixel in the Y direction}
Procedure TForm1.SampleNameOffset (hObject: L_HANDLE);
var
OffsetX: Integer;
OffsetY: Integer;
begin
OffsetX:= LEADAnn1.AnnGetNameOffsetX (hObject);
OffsetY:= LEADAnn1.AnnGetNameOffsetY (hObject);

OffsetX:= OffsetX + 2;
OffsetY:= OffsetY + 1;
ShowMessage ('Shifting Name Offset to ' + IntToStr (OffsetX) + ',' + IntToStr (OffsetY));

LEADAnn1.AnnSetNameOffsetX (hObject, OffsetX, False);
LEADAnn1.AnnSetNameOffsetY (hObject, OffsetY, False);
end;


AnnGetNameRestrict example for Delphi

{This sample toggles the bNameRestrict property of the annotation object hObject}
var
bNameRestrict: Boolean;
begin
bNameRestrict:= LEADAnn1.AnnGetNameRestrict (hObject);
if (bNameRestrict) then
ShowMessage ('Changing bNameRestrict property to False' )
else
ShowMessage ('Changing bNameRestrict property to True' );
LEADAnn1.AnnSetNameRestrict (hObject, Not bNameRestrict, False);
end;


AnnGetNodes example for Delphi

Procedure TForm1.AnnGetNodes(hPlgn: HANNOBJECT);
var
uNodes: L_UINT;
bShow: Boolean;
uFillPattern: L_UINT;
uFillMode: L_UINT;
uPolyFillMode: L_UINT;
uLineStyle: L_UINT;
dLineWidth: L_DOUBLE;
begin
uNodes:= 0;
bShow:= True;
uFillPattern:= 0;
uFillMode:= 0;
uPolyFillMode:= 0;
uLineStyle:= 0;
dLineWidth:= 0;

LEADAnn1.AnnGetFillPattern(hPlgn,
 uFillPattern);
LEADAnn1.AnnSetFillPattern(hPlgn,
 (uFillPattern+ 1) Mod 7, False);
LEADAnn1.AnnGetFillMode(hPlgn,
 uFillMode);
LEADAnn1.AnnSetFillMode(hPlgn,
 (uFillMode+ 1) Mod 3, False);
LEADAnn1.AnnGetPolyFillMode(hPlgn,
 uPolyFillMode);
LEADAnn1.AnnSetPolyFillMode(hPlgn,
 1 - uPolyFillMode, False);
LEADAnn1.AnnGetLineStyle(hPlgn,
 uLineStyle);
LEADAnn1.AnnSetLineStyle(hPlgn,
 (uLineStyle + 1) Mod 6, False);
LEADAnn1.AnnGetLineWidth(hPlgn,
 dLineWidth);
LEADAnn1.AnnSetLineWidth(hPlgn,
 (Trunc(dLineWidth) Mod 4 + 1), False);
LEADAnn1.AnnGetNodes(hPlgn,
 bShow, uNodes);
LEADAnn1.AnnSetNodes(hPlgn,
 (bShow = False), (uNodes + 1) Mod LEADAnn1.AnnGetPointCount(hPlgn),
 False);
end;


AnnGetObjectFromTag example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
hObject: L_HANDLE;
hTag: longint;
Msg: String;

begin
ShowMessage ('I Will Looking For an Object With Tag = 1');
LEADAnn1.EnableMethodErrors:= False;
hObject:= LEADAnn1.AnnGetObjectFromTag(LEADAnn1.AnnContainer, 1, false);
if ( hObject <> 0 ) then
begin
hTag:= LEADAnn1.AnnGetTag (hObject);
Msg:= 'There Is an Object With Tag= ' + IntToStr(hTag);
ShowMessage(Msg);
end
else
ShowMessage ('No Object Contain Tag = 1') ;
LEADAnn1.EnableMethodErrors:= True;
end;


AnnGetPointCount example for Delphi

// This is an example for the following methods and properties
// AnnGetPointCount method, AnnGetPointX method, AnnGetPointY method
// and Point Property

//In the OnAnnDrawn event, this example checks to see if the annotation object is a polygon.
//If it is a polygon,
//the example gets the number of points that define the object;
//then it gets the Xpoints and YPoints and displays them in a message box.
procedure TForm1.LEADAnn1AnnDrawn (hObject: L_HANDLE);
var
nType: Integer;
a: Integer;
nPoints: Longint; //number of points in the object
msg: String;
XPoints: TANNPOINTS;
YPoints: TANNPOINTS;
begin
nType:= LEADAnn1.AnnGetType (hObject);
if (nType = ANNOBJECT_POLYGON ) then //Is the object a polygon?
begin
ShowMessage ('Object is a Polygon');
nPoints:= LEADAnn1.AnnGetPointCount(hObject); //get the number of points
XPoints:= LEADAnn1.AnnGetPointX (hObject); //get the X coordinates
YPoints:= LEADAnn1.AnnGetPointY (hObject); //get the Y coordinates
msg:= '(';
for a:= 1 to nPoints do

begin
msg:= msg + '{' + FloatToStr (XPoints.Point[a - 1]^.x) + ',' + FloatToStr(YPoints.Point [a - 1]^.y) + '}';
end;

msg:= 'The Polygon"s ' + IntToStr(nPoints) + ' points are:' +Chr(13)+ msg + ')';
ShowMessage (msg);
XPoints.Free ();
YPoints.Free ();
end;
LEADAnn1.AnnTool:= ANNTOOL_SELECT;
end;


AnnGetPredefinedMetafile example for Delphi

Procedure TForm1.AnnSetMetaFile(hStamp: HANNOBJECT);
var
hMeta: HMETAFILE;
bEnhanced: Boolean;
begin
LEADAnn1.AnnGetPredefinedMetafile(ANNMETAFILE_IMPORTANT, bEnhanced, hMeta);
LEADAnn1.AnnSetPredefinedMetafile(ANNMETAFILE_TOPSECRET, hMeta);
LEADAnn1.AnnSetMetafile(hStamp, 0, ANNMETAFILE_TOPSECRET, False);
ShowMessage('Stamp set to TopSecret');

LEADAnn1.AnnGetMetafile(hStamp, hMeta);
Case (GetObjectType(hMeta)) of
OBJ_ENHMETAFILE:
ShowMessage('Type is EMF');

OBJ_METAFILE:
ShowMessage('Type is WMF');
end;
end;


AnnGetSecondaryMetafile example for Delphi

Procedure TForm1. AnnGetSecondaryMetafile ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
hMetafile1: HMETAFILE;
hMetafile2: HMETAFILE;
bEncryptorOriginal: Boolean;

begin
nObjectType:= LEADAnn1.AnnGetType(hObject);
if(nObjectType = ANNOBJECT_ENCRYPT) Then
begin
ShowMessage('This object is not an encryptor object.');
Exit;
end;

LEADAnn1.AnnGetMetafile(hObject, hMetafile1);
LEADAnn1.AnnGetSecondaryMetafile(hObject, hMetafile2);

LEADAnn1.AnnEncryptOptions.Flags:= ANNENCRYPT_ALL;
LEADAnn1.AnnGetEncryptOptions(hObject);

bEncryptorOriginal:= LEADAnn1.AnnEncryptOptions.Encryptor;

//Set state to Decryptor and set Decryptor metafile
LEADAnn1.AnnEncryptOptions.Flags:= ANNENCRYPT_TYPE;
LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnEncryptOptions.Encryptor:= TRUE;
LEADAnn1.AnnSetEncryptOptions (hObject);
LEADAnn1.AnnSetMetafile( hObject, hMetafile2, ANNMETAFILE_USER, FALSE);

//Set state to Decryptor and set Decryptor metafile
LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnEncryptOptions.Encryptor:= TRUE;
LEADAnn1.AnnSetEncryptOptions (hObject);
LEADAnn1.AnnSetMetafile (hObject, hMetafile2, ANNMETAFILE_USER, FALSE);

LEADAnn1.AnnEncryptOptions.Encryptor:= bEncryptorOriginal;
LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnSetEncryptOptions (hObject);
end;


AnnGetSelectList example for Delphi

//This example is also for:
// AnnGetSelectCount method,
//This example gets the number of selected annotation objects; then it gets an array of the
//selected object handles and checks to see if any of the objects in the array are polygons.

procedure TForm1.Button1Click(Sender: TObject);
var
nType: Integer;
a: Integer;
bSelected: Boolean;
Msg: String;
uCount: Integer;
phObjects: L_PHANDLE; //array for the selected object handles

begin
bSelected:= False;
uCount:= LEADAnn1.AnnGetSelectCount (); //get number of selected objects
if ( uCount > 0 ) then
begin
phObjects:= AllocMem ( uCount * sizeof ( L_HANDLE )) ;
if (phObjects= Nil ) then
begin
ShowMessage ('NO Memory') ;
Exit;
end;
LEADAnn1.AnnGetSelectList(phObjects); //get the handles of the selected objects
Msg:= IntToStr(uCount) + ' objects were selected';
ShowMessage (Msg);
for a:= 1 to uCount do
begin
nType:= LEADAnn1.AnnGetType (LEADAnn1.AnnGetItemHandle ( phObjects, a - 1));
if ( nType = ANNOBJECT_POLYGON ) then //Is the object a polygon?
bSelected:= True;
end;
if (bSelected = False ) then
ShowMessage ( 'No Polygon Objects were selected' ) ;
if ( phObjects <> Nil ) then
begin
FreeMem (phObjects);
end;
end
else
ShowMessage ( 'No Selected Objects' ) ;
end;


AnnGetTopContainer example for Delphi

Procedure TForm1.AnnTestTopContainer();
var
hPin: HANNOBJECT;
h1: HANNOBJECT;
h2: HANNOBJECT;
hContainer: HANNOBJECT;
begin
hContainer:= LEADAnn1.AnnCreate(ANNOBJECT_CONTAINER,
 True, False);
if(hContainer <> 0)then
begin
hPin:= 0;
LEADAnn1.AnnCreateItem(hContainer,
 ANNOBJECT_PUSHPIN, False, hPin);
LEADAnn1.AnnGetContainer(hContainer,
 h1);
LEADAnn1.AnnGetTopContainer(hPin,
 h2);
if((h1 = h2) And (h1 = LEADAnn1.AnnContainer))Then
ShowMessage('root
 container is same as that of LEADAnn1');
end;
end;


AnnGetUserHandles example for Delphi

Procedure TForm1.ExampleGetAnnUserHandles ( hObject: HANNOBJECT );
var
nCount: L_INT32;
strVisible: String;
begin
LEADAnn1.AnnGetUserHandles (hObject);
nCount:= LEADAnn1.AnnUserHandlesCount;

if( nCount > 0 ) then
begin
LEADAnn1.AnnGetUserHandle( hObject, 0);
if( LEADAnn1.AnnHandle.Visible = True) then
begin
strVisible:= 'True';
end
else
begin
strVisible:= 'False';
end;

ShowMessage ( 'uIndex = 0 ' + Chr(13) +
'nID = ' + IntToStr(LEADAnn1.AnnHandle.ID) + Chr(13) +
'ContainerX = ' + IntToStr(Trunc(LEADAnn1.AnnHandle.ContainerX)) + Chr(13) +
'ContainerY = ' + IntToStr(Trunc(LEADAnn1.AnnHandle.ContainerY)) + Chr(13) +
'CliantX = ' + IntToStr(LEADAnn1.AnnHandle.ClientX) + Chr(13) +
'ClientY = ' + IntToStr(LEADAnn1.AnnHandle.ClientY) + Chr(13) +
'bVisible = ' + strVisible + Chr(13) +
'PenColor = ' + IntToStr(LEADAnn1.AnnHandle.PenColor) + Chr(13) +
'FillColor = ' + IntToStr(LEADAnn1.AnnHandle.FillColor) + Chr(13) +
'Shape = ' + IntToStr(LEADAnn1.AnnHandle.Shape));
end
else
begin
ShowMessage('No User Handle');
end;
end;


AnnGetVisible Example for Delphi

procedure TMainFrm.LEADAnnCtrl1AnnEnumerate (hObject: L_HANDLE);
var
ghObject: L_HANDLE;
begin
//tests AnnGetVisible
if ( LEADAnnCtrl1.AnnGetVisible(hObject) ) then
ShowMessage ( IntToStr(LEADAnnCtrl1.AnnGetType (hObject))+ ' Visible'
else
ShowMessage ( IntToStr(LEADAnnCtrl1.AnnGetType (hObject))+ ' Not Visible');
end;


AnnGroup example for Delphi

LEADAnn1.AnnGroup (LEADAnn1.AnnContainer, ANNFLAG_SELECTED + ANNFLAG_RECURSE, nil);


AnnHandle example for Delphi

procedure TForm1.ExampleAnnUserHandle ( hObject: HANNOBJECT );
var
uCount: L_UINT;
strVisible: String;
begin
LEADAnn1.AnnGetUserHandles ( hObject );
uCount:= LEADAnn1.AnnUserHandlesCount;
if ( uCount > 0 ) then
begin
LEADAnn1.AnnGetUserHandle ( hObject, 0 );

if ( LEADAnn1.AnnHandle.Visible ) then
strVisible:= 'True'
else
strVisible:= 'False';

ShowMessage ( 'uIndex = 0' + Chr(13) +
'nID = ' + IntToStr(LEADAnn1.AnnHandle.ID) + Chr(13) +
'ContainerX = ' + FloatToStr(LEADAnn1.AnnHandle.ContainerX) + Chr(13) +
'ContainerY = ' + FloatToStr(LEADAnn1.AnnHandle.ContainerY) + Chr(13) +
'CliantX = ' + IntToStr(LEADAnn1.AnnHandle.ClientX) + Chr(13) +
'ClientY = ' + IntToStr(LEADAnn1.AnnHandle.ClientY) + Chr(13) +
'Visible = ' + strVisible + Chr(13) +
'PenColor = ' + IntToStr(LEADAnn1.AnnHandle.PenColor) + Chr(13) +
'FillColor = ' + IntToStr(LEADAnn1.AnnHandle.FillColor) + Chr(13) +
'Shape = ' + IntToStr(LEADAnn1.AnnHandle.Shape) + Chr(13) );
end
else
ShowMessage ( 'No User Handles' );
end;


AnnHitTestExt example for Delphi

//This example uses the caller's mouse coordinates to get the handle
// to the annotation object at the specified coordinates.
// The part of the clicked annotation is displayed in the Output window.
// If the result of the hit test is a user handle, additional information about the handle is displayed.
Procedure TForm1.ExampleAnnHitTestExt ( hObject: HANNOBJECT; hContainer: HANNOBJECT; lPointToTestX: L_INT32; lPointToTestY: L_INT32 );
var
strResult: AnsiString;
begin
LEADAnn1.AnnHitTestExt( hContainer, lPointToTestX, lPointToTestY);
if(LEADAnn1.AnnObjectHitHandle = 0 ) then
begin
ShowMessage ('There is no object to hit test.');
Exit;
end;

Case LEADAnn1.AnnPositionResult of

ANNHIT_NONE:
strResult:= 'ANNHIT_NONE';

ANNHIT_BODY:
strResult:= 'ANNHIT_NONE';

ANNHIT_NAME:
strResult:= 'ANNHIT_NAME';

ANNHIT_HANDLE:
strResult:= 'ANNHIT_HANDLE HandleIndex:= ' + IntToStr(LEADAnn1.AnnHandleIndex) + Chr(13) + 'HandleId:= ' + IntToStr(LEADAnn1.AnnHandleID);

ANNHIT_USER_HANDLE:
strResult:= 'ANNHIT_USER_HANDLE HandleIndex:= ' + IntToStr(LEADAnn1.AnnHandleIndex) + Chr(13) + 'HandleId:= ' + IntToStr(LEADAnn1.AnnHandleID);
end;
ShowMessage(strResult);
end;


AnnHyperlinkMenuEnable example for Delphi

//This example toggles the AnnHyperlinkMenuEnable property.
//toggle AnnHyperLinkMenu item and event
if (LEADAnn1.AnnHyperlinkMenuEnable) then
LEADAnn1.AnnHyperlinkMenuEnable:= false
else
LEADAnn1.AnnHyperlinkMenuEnable:= true;


AnnInsert example for Delphi

var
hEllipseObject: L_HANDLE;
.
.
.
hEllipseObject:= LEADAnn1.AnnCreate (ANNOBJECT_ELLIPSE, False, True);
LEADAnn1.AnnInsert (LEADAnn1.AnnContainer, hEllipseObject, False);


AnnInsertTextTokenTable example for Delphi

Procedure TForm1.ExampleAnnInsertTextTokenTable ( hObject: HANNOBJECT );
begin
LEADAnn1.AnnToken:= 'A';
LEADAnn1.AnnDescription:= 'Two Digit Month';
LEADAnn1.AnnTokenString:= '';
LEADAnn1.AnnTokenType:= ANNTOKEN_DATE_MM;

LEADAnn1.AnnInsertTextTokenTable();

LEADAnn1.AnnToken:= 'B';
LEADAnn1.AnnDescription:= 'Two Digit day';
LEADAnn1.AnnTokenString:= '';
LEADAnn1.AnnTokenType:= ANNTOKEN_DATE_DD;

LEADAnn1.AnnInsertTextTokenTable();

LEADAnn1.AnnToken:= 'C';
LEADAnn1.AnnDescription:= 'Two Digit day';
LEADAnn1.AnnTokenString:= '';
LEADAnn1.AnnTokenType:= ANNTOKEN_DATE_YYYY;

LEADAnn1.AnnInsertTextTokenTable();

LEADAnn1.AnnDeleteTextTokenTable('B');

LEADAnn1.AnnToken:= 'D';
LEADAnn1.AnnDescription:= '';
LEADAnn1.AnnTokenString:= '';
LEADAnn1.AnnTokenType:= ANNTOKEN_SEPARATOR;

LEADAnn1.AnnClearTextTokenTable();
end;


AnnIsFixedRect example for Delphi

Procedure TForm1.ExampleExampleAnnIsFixedRect ( hObject: HANNOBJECT; nLeft: L_INT; nTop: L_INT; nRight: L_INT; nBottom: L_INT);
var
bFixedInRect: Boolean;
begin
LEADAnn1.AnnFlags:= ANNFLAG_RECURSE;
bFixedInRect:= LEADAnn1.AnnIsFixedRect(hObject, nLeft, nTop, nRight , nBottom);
if(bFixedInRect = true) then
begin
ShowMessage('There are Fixed annotations visible.');
end
else
begin
ShowMessage('There are No Fixed annotations visible.');
end;
end;


AnnLock example for Delphi

This example locks objects of type ANNOBJECT_ELLIPSE using the key "LEADTOOLS".
procedure TForm1.Button1Click(Sender: TObject);

var
nType:Integer;
a: Integer;
bSelected: Boolean;
uCount: Integer;
phObjects: L_PHANDLE; //pointer to the array of the selected object handles
begin
//lock only the ellipse objects that are selected
bSelected:= False;
uCount:= LEADAnn1.AnnGetSelectCount (); //get number of selected objects
if ( uCount > 0 ) then
begin
phObjects:= AllocMem (uCount * sizeof (L_HANDLE)) ;
if (phObjects= Nil ) then
begin
ShowMessage ('NO Memory') ;
Exit;
end;
LEADAnn1.AnnGetSelectList (phObjects); //get the handles of the selected objects
for a:= 1 to uCount do
begin
nType:= LEADAnn1.AnnGetType (LEADAnn1.AnnGetItemHandle ( phObjects, a - 1));
if ( nType = ANNOBJECT_ELLIPSE ) then //Is the object a polygon?
Begin
bSelected:= True;
LEADAnn1.AnnLock ( LEADAnn1.AnnGetItemHandle ( phObjects, a - 1 ), 'LEADTOOLS', False );
end;
end;
if (bSelected = False ) then
ShowMessage ( 'No Ellipse Objects were selected' ) ;
if ( phObjects <> Nil ) then
begin
FreeMem (phObjects);
end;
end;
end;


AnnMove example for Delphi

//This example moves one or more selected annotation objects.
procedure TForm1.Button1Click(Sender: TObject);
var
DeltaX, DeltaY: Integer;
begin
//Specify arbitrary delta values.
DeltaX:= 200;
DeltaY:= 100;
//Move the selected annotations.
LEADAnn1.AnnMove (DeltaX, DeltaY, True);
end;


AnnNameBoundingRectLeft example for Delphi

Procedure TForm1. SampleAnnNameBoundingRect (hObject: L_HANDLE);
var
nLeft, nTop, nWidth, nHeight: Integer;
begin
nLeft := LEADAnn1.AnnNameBoundingRectLeft [hObject];
nTop := LEADAnn1.AnnNameBoundingRectTop [hObject];
nWidth := LEADAnn1.AnnNameBoundingRectWidth [hObject];
nHeight:= LEADAnn1.AnnNameBoundingRectHeight [hObject];
ShowMessage ('Ann Name Bounding Rect: Left[' + IntToStr(nLeft) + '], Top[' + IntToStr(nTop) + '], Width[' + IntToStr(nWidth) + '], Height[' + IntToStr(nHeight) + ']');
end;


AnnNameOptions example for Delphi

//This sample enumerates all objects in a container,
//changing the object name and displaying it.
//If the object is a button, the name is restricted to appear within the bitmap bounds.
//If the object is not a button, the name is not restricted.
Procedure TForm1.ExampleAnnNameOptions ( hObject: HANNOBJECT );

begin
LEADAnn1.AnnEnumerate ( hObject, ANNFLAG_RECURSE + ANNFLAG_NOTCONTAINER, '' );
end;

procedure TForm1.LEADAnn1AnnEnumerate(hObject: L_HANDLE);
var
nObjectType: L_INT;
begin
LEADAnn1.AnnNameOptions.Flags:= ANNNAME_ALL;
LEADAnn1.AnnGetNameOptions(hObject);

nObjectType:= LEADAnn1.AnnGetType(hObject);

if (nObjectType = ANNOBJECT_BUTTON) Then
begin
LEADAnn1.AnnNameOptions.ShowName:= False;
LEADAnn1.AnnNameOptions.AnnotationName:= 'Name Restricted';
LEADAnn1.AnnNameOptions.NameRestrict:= False;
LEADAnn1.AnnNameOptions.FontBold:= False;
LEADAnn1.AnnNameOptions.FontItalic:= False;
LEADAnn1.AnnNameOptions.FontStrikeOut:= False;
LEADAnn1.AnnNameOptions.FontUnderline:= False;
LEADAnn1.AnnNameOptions.NameBackTransparent:= False;
end
else
begin
LEADAnn1.AnnNameOptions.ShowName:= True;
LEADAnn1.AnnNameOptions.AnnotationName:= 'Name UnRestricted';
LEADAnn1.AnnNameOptions.NameRestrict:= True;
LEADAnn1.AnnNameOptions.FontBold:= True;
LEADAnn1.AnnNameOptions.FontItalic:= True;
LEADAnn1.AnnNameOptions.FontStrikeOut:= True;
LEADAnn1.AnnNameOptions.FontUnderline:= True;
LEADAnn1.AnnNameOptions.NameBackTransparent:= True;
end;

LEADAnn1.AnnNameOptions.NameOffsetX:= 10;
LEADAnn1.AnnNameOptions.NameOffsetY:= 10 ;
LEADAnn1.AnnNameOptions.FaceNameColor:= RGB(0, 0, 0);
LEADAnn1.AnnNameOptions.BackNameColor:= RGB(255, 255, 255);
LEADAnn1.AnnNameOptions.FontName:= 'Arial';
LEADAnn1.AnnNameOptions.FontSize:= 12;

LEADAnn1.AnnNameOptions.Flags:= ANNNAME_ALL;
LEADAnn1.AnnSetNameOptions(hObject);

end;


AnnNameRectLeft example for Delphi

Procedure TForm1.ExampleAnnNameRect (hObject: L_HANDLE);
var
nLeft, nTop, nWidth, nHeight: Integer;
begin
nLeft := LEADAnn1.AnnNameRectLeft [hObject];
nTop := LEADAnn1.AnnNameRectTop [hObject];
nWidth := LEADAnn1.AnnNameRectWidth [hObject];
nHeight:= LEADAnn1.AnnNameRectHeight [hObject];
ShowMessage ('Ann Name Rect: left[' + IntToStr(nLeft) + '], Top[' + IntToStr(nTop) + '], Width[' + IntToStr(nWidth) + '], Height[' + IntToStr(nHeight) + ']');
end;


AnnOptions Example for Delphi

// This example demonstrates how to enable/disable the new
//'side handle' annotation feature in version 14.5. To see how this works,
// paste this example into the main annotation demo, draw a rectangle,
// and select it before calling this function. The example toggles the feature.
Procedure TForm1.ExampleAnnOptions();
var
strMsg: String;
uOptions: Integer;
begin
uOptions:= LEADAnn1.AnnOptions;
if((uOptions AND OPTIONS_NEW_SIDE_HANDLES) = OPTIONS_NEW_SIDE_HANDLES)then
begin
uOptions:= uOptions AND Not OPTIONS_NEW_SIDE_HANDLES;
strMsg:= 'Draw a rectangular object and select it. Note there are no side handles. Run this example again to enable the side handles.';
end
else
begin
uOptions:= uOptions OR OPTIONS_NEW_SIDE_HANDLES;
strMsg:= 'Draw a rectangular object and select it. Note the side handles. Run this example again to disable the side handles.';
end;
LEADAnn1.AnnOptions:= uOptions;
ShowMessage(strMsg);
end;


AnnPointOptions example for Delphi

Procedure TForm1.ExampleAnnPointOptions ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
begin
nObjectType:= LEADAnn1.AnnGetType ( hObject );

if( nObjectType <> ANNOBJECT_POINT ) then
begin
ShowMessage('This object is not an Point Option') ;
end;

LEADAnn1.AnnPointOptions.Flags:= ANNPOINT_ALL;
LEADAnn1.AnnGetPointOptions (hObject);

if (LEADAnn1.AnnPointOptions.PointBitmap = 0) then
begin
ShowMessage('There is no raster associated');
Exit;
end;

if(LEADAnn1.AnnPointOptions.PointUseBitmap = True) then
begin
LEADAnn1.AnnPointOptions.PointUseBitmap:= False;
LEADAnn1.AnnPointOptions.PointFixedSize:= False;
LEADAnn1.AnnPointOptions.PointTransparentFill:= False;

LEADAnn1.AnnPointOptions.PointBorderColor:= RGB(0, 0, 0);
LEADAnn1.AnnPointOptions.PointFillColor:= RGB(255, 255, 0);
LEADAnn1.AnnPointOptions.PointRadius:= 12;

LEADAnn1.AnnPointOptions.Flags:= (ANNPOINT_USE_BITMAP +
ANNPOINT_RADIUS +
ANNPOINT_BORDER_COLOR +
ANNPOINT_FILL_COLOR +
ANNPOINT_TRANSPARENT_FILL +
ANNPOINT_FIXED_SIZE);
end
else
begin
//Change Point appearance to a bitmap
LEADAnn1.AnnPointOptions.PointUseBitmap:= True;
LEADAnn1.AnnPointOptions.PointBitmapTransparent:= True;
LEADAnn1.AnnPointOptions.PointBitmapTransparentColor:= RGB(255, 255, 255);
end;

LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnSetPointOptions(hObject);
end;


AnnPopFixedState example for Delphi

//This example enables the"fixed" property for all objects in the container that
//have been temporarily disabled with a call to AnnPushFixedState.
//For an example using the magnifying glass, see the source code
//for the main COM annotation demo.
Procedure TForm1.ExampleAnnPopFixedState ( hContainer: HANNOBJECT );
begin
LEADAnn1.AnnFlags:= ANNFLAG_RECURSE + ANNFLAG_NOINVALIDATE;
LEADAnn1.AnnPopFixedState (hContainer);
end;


AnnPredefinedBitmap example for Delphi

AnnPredifinedBitmap example for Delphi

//This example does the following:
//1. Gets the current point bitmap
//2. Inverts it
//3. Sets the inverted bitmap as the default point bitmap
Procedure TForm1.ExampleAnnPredefinedBitmap ( hObject: HANNOBJECT );
begin
LEADAnn2.Bitmap:= LEADAnn1.AnnPredefinedBitmap[ANNBITMAP_POINT];
LEADAnn2.Invert ( );
LEADAnn1.AnnPredefinedBitmap[ANNBITMAP_POINT]:= LEADAnn1.Bitmap;
end;


AnnPushFixedState example for Delphi

// This example temporarily disables the"fixed" property of all objects in the container.
// This is useful when fixed objects need to be temporarly painted larger or smaller than
// the fixed size. For an example using the magnifying glass, see the source code
// for the main COM annotation demo.
Procedure TForm1.ExampleAnnPushFixedState ( hContainer: HANNOBJECT );
begin
LEADAnn1.AnnFlags:= ANNFLAG_RECURSE + ANNFLAG_NOINVALIDATE;
LEADAnn1.AnnPushFixedState (hContainer);
end;


AnnRectHeight example for Delphi

procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
begin
LEADAnn1.AnnRectHeight [hObject]:= LEADAnn1.AnnRectHeight [hObject] + 50;
end;


AnnRectLeft example for Delphi

procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
begin
LEADAnn1.AnnRectLeft [hObject]:= LEADAnn1.AnnRectLeft [hObject] + 50;
end;


AnnRectTop example for Delphi

procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
begin
LEADAnn1.AnnRectTop [hObject]:= LEADAnn1.AnnRectTop [hObject] + 50;
end;


AnnRectWidth example for Delphi

procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
begin
LEADAnn1.AnnRectWidth [hObject]:= LEADAnn1.AnnRectWidth [hObject] + 50;
end;


AnnRestrictCursor example for Delphi

Procedure TForm1.ExampleAnnRestrictCursor ( hObject: HANNOBJECT );
var
hContainer: L_INT32;
nObjectType: L_INT;
dBoundsTop: L_DOUBLE;
dBoundsLeft: L_DOUBLE;
dBoundsWidth: L_DOUBLE;
dBoundsHeight: L_DOUBLE;
dBoundsRight: L_DOUBLE;
dBoundsBottom: L_DOUBLE;
rcClipOld: TRect;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);

if(( nObjectType = ANNOBJECT_AUTOMATION) And (nObjectType = ANNOBJECT_CONTAINER) ) then
begin
ShowMessage( 'This object is not an Automation Object and it is not a Container Object.');
end;

hContainer:= LEADAnn1.AnnContainer;

dBoundsTop:= LEADAnn1.AnnRectTop[hObject];
dBoundsLeft:= LEADAnn1.AnnRectLeft[hObject];
dBoundsWidth:= LEADAnn1.AnnRectWidth[hObject];
dBoundsHeight:= LEADAnn1.AnnRectHeight[hObject];

LEADAnn1.PointsCount:= 2;
LEADAnn1.AnnContainerPointX[2]:= dBoundsLeft;
LEADAnn1.AnnContainerPointY[2]:= dBoundsTop;
LEADAnn1.AnnConvert(hObject, ANNCONVERT_TO_CLIENT);

dBoundsLeft:= LEADAnn1.ClientPointX[0];
dBoundsTop:= LEADAnn1.ClientPointY[0];

dBoundsRight:= (dBoundsWidth + dBoundsLeft) + 10;
dBoundsBottom:= (dBoundsHeight + dBoundsTop) + 10;
dBoundsTop:= dBoundsTop - 10;
dBoundsLeft:= dBoundsLeft - 10;

LEADAnn1.AnnRestrictCursor(hContainer, Trunc(dBoundsLeft), Trunc(dBoundsTop), Trunc(dBoundsRight), Trunc(dBoundsBottom), 0, 0, FALSE);

rcClipOld.Top:= LEADAnn1.AnnTopPreviousClip;
rcClipOld.Left:= LEADAnn1.AnnLeftPreviousClip;
rcClipOld.Right:= LEADAnn1.AnnRightPreviousClip;
rcClipOld.Bottom:= LEADAnn1.AnnBottomPreviousClip;

// When done with the restricted cursor, use the line below
//ClipCursor ( @rcClipOld );
end;


AnnRestrictToContainer example for Delphi

//This example toggles the "restrict to container" property.
//If an object is restricted to the container, no part of it can be moved outside the container
Procedure TForm1.ExampleRestrictToContainer ( hObject: HANNOBJECT );
var
bRestrict: Boolean;
begin
bRestrict:= LEADAnn1.AnnRestrictToContainer[hObject];
bRestrict:= Not bRestrict;
LEADAnn1.AnnRestrictToContainer[hObject]:= bRestrict;
if (bRestrict = True) then
begin
ShowMessage ('Restricted To Container');
end
else
begin
ShowMessage ('Not Restricted To the Container');
end;
end;


AnnRotate example for Delphi

// This example is also for the following:
// AnnFlip method
// AnnReverse method
//This example uses the AnnFlip, AnnReverse, and AnnRotate methods.
//To code this example, add a command button named Test to the example you created in Loading
//and Displaying an Image. For best results when you run the example,
//draw two objects in opposite corners, and use the right mouse button to select
//all annotation objects. The command button then lets you cycle through the AnnFlip, AnnReverse, and AnnRotate methods.

procedure TForm1.TestClick (Sender: TObject);
var
MyCaption: String;
begin

MyCaption:= Test.Caption;
if ( MyCaption = 'Flip' ) then
begin
//Flip using the center of the bitmap, as the axis.
LEADAnn1.AnnFlip (True, LEADAnn1.BitmapHeight / 2, True);
Test.Caption:= 'Reverse';
Exit;
end;

if ( MyCaption = 'Reverse' ) then
begin
//Reverse using the center of the bitmap as the axis.
LEADAnn1.AnnReverse (True, LEADAnn1.BitmapWidth / 2, True);
Test.Caption:= 'Rotate';
Exit;
end;
if (MyCaption = 'Rotate') then
begin
//Rotate 90 degrees using the center of the bitmap as the axis.
LEADAnn1.AnnRotate (True, LEADAnn1.BitmapWidth / 2, LEADAnn1.BitmapHeight / 2, 90, True);
Test.Caption:= 'Flip';
Exit;
end;

Test.Caption:= 'Flip';
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;
LEADAnn1.AnnTool:= ANNTOOL_REDACT;
ShowMessage ('Draw two objects, use the right mouse button to select all, then click the command button');
end;


AnnRTFText example for Delphi

// This sample loads a rich text annotation object with text
//It illustrates how AnnRTFText can treat the text as Rich Text, or plain text

// hObject: the Rich Text annotation object
// uFormat: the format of the retrieved text--one of
// RTFFORMAT_TEXT
// RTFFORMAT_RTF
Procedure TForm1.ExampleAnnRTFText ( hObject: HANNOBJECT; uFormat: L_UINT);
var
strText: String;
strFormat: String;
begin
Case uFormat of
RTFFORMAT_TEXT:
strFormat:= 'Format: RTFFORMAT_TEXT';

RTFFORMAT_RTF:
strFormat:= 'Format: RTFFORMAT_RTF';
end;
strText:= LEADAnn1.AnnRTFText[hObject, uFormat];
Application.MessageBox ( PChar(strText), PChar(strFormat), MB_OK );
end;


AnnSaveMemory example for Delphi

This example is also for the AnnLoadMemory method

This example lets you save the current annotations to a file in memory, and lets you //load the annotations that were saved.

1. | Start with the project that you created in Creating and Using Annotations.
2. | Add the following to the declarations as private members in your main form.

hMem: L_HANDLE; // Memory handle.
iSize: Longint // size of the file in memory

3.

At the top of your main form, add two command buttons and name them as follows:

Name | Caption
AnnSaveMem | Save In Memory
AnnLoadMem | Load From Memory

4.

Code the AnnSaveMem button's Click procedure as follows:

procedure TForm1.AnnSaveMemClick(Sender: TObject);
begin
if ( LEADAnn1.AnnSaveMemory (@hMem, ANNFMT_NATIVE, False, @iSize, SAVE_OVERWRITE, 0) <> SUCCESS ) then
ShowMessage ('Error calling AnnSaveMemory');
end;

5.

Code the AnnLoadMem button's Click procedure as follows:

procedure TForm1.AnnLoadMemClick (Sender: TObject);
begin
//Load the annotations from the memory-resident file.
if ( LEADAnn1.AnnLoadMemory (hMem, iSize, 1) <> SUCCESS) then
ShowMessage ('Error calling AnnLoadMemory')
else
ShowMessage ('AnnLoadMemory succeeded');
Windows.GlobalFree (hMem);
end;

6.

Run your program to test it.


AnnSaveTag example for Delphi

The following example saves selected objects as a Wang compatible TIFF tag.
//Save only selected objects in Wang TIFF tag
LEADAnn1.AnnSaveTag (True, True);
LEADAnn1.Save ('d:\temp\testwang.tif', FILE_CCITT_GROUP4, 1, 2, SAVE_OVERWRITE);


AnnSelectRect example for Delphi

Procedure TForm1.AnnSelectRect(hPlgn: HANNOBJECT);
var
bSelected: Boolean;
rcSelect: TRect;
begin
LEADAnn1.AnnSelectRect(LEADAnn1.AnnContainer, Rect(10, 10, 200, 100));
LEADAnn1.AnnSelectPoint(LEADAnn1.AnnContainer, Point(300, 300));
LEADAnn1.AnnGetSelected(hPlgn, bSelected);
if(bSelected)then
begin
LEADAnn1.AnnRemove(hPlgn);
LEADAnn1.AnnSetSelected(hPlgn, False, False);
end
else
LEADAnn1.AnnInsert(LEADAnn1.AnnContainer, hPlgn, False);

LEADAnn1.AnnGetSelectRect(LEADAnn1.AnnContainer, rcSelect);
Caption:= 'Left:' + IntToStr(rcSelect.Left) +
', Top:' + IntToStr(rcSelect.Top) +
', Width:' + IntToStr(rcSelect.Right - rcSelect.Left) +
', Height:' + IntToStr(rcSelect.Bottom - rcSelect.Top);
end;


AnnSetAutoMenuItemEnable Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
//disable the Delete menu item from all the selected objects
LEADAnn1.AnnSetAutoMenuItemEnable ( LEADAnn1.AnnContainer, 0, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, ANNFLAG_RECURSE + ANNFLAG_SELECTED, '' ) ;
//disable the Delete menu item from all the ellipse objects
LEADAnn1.AnnSetAutoMenuItemEnable ( LEADAnn1.AnnAutomation, ANNOBJECT_ELLIPSE, ANNAUTOTEXT_MENU_DELETE, ANNMENU_DISABLED, 0, '' );
end;


AnnSetAutoText Example for Delphi

// This example is also for:
// AnnGetAutoText method.
//This example modifies the text string that is used for the undo option on the annotation pop-up menu.

procedure TForm1.Button1Click(Sender: TObject);
var
pTestText: PChar;
strSize: Integer;
begin

strSize:= LEADAnn1.AnnGetAutoText (ANNAUTOTEXT_MENU_UNDO, Nil);
if ( strSize > 0 ) then
begin
pTestText:= AllocMem ( strSize + 1 );
if ( pTestText = Nil ) then
begin
ShowMessage ('NO MEMORY');
Exit;
end;
LEADAnn1.AnnGetAutoText (ANNAUTOTEXT_MENU_UNDO, @pTestText);
StrCat (pTestText, PChar (' - New'));
LEADAnn1.AnnSetAutoText (ANNAUTOTEXT_MENU_UNDO, pTestText);
FreeMem (pTestText);
end;
end;


AnnSetBackColor example for Delphi

procedure TForm1.TestAnnBackColor ( hAnnObject: HANNOBJECT );
var
crColor: COLORREF; { Object background color }
begin
{ Invert the background color }
LEADAnn1.AnnGetBackColor ( hAnnObject, crColor );
LEADAnn1.AnnSetBackColor ( hAnnObject, crColor xor $00FFFFFF, False );
end;


AnnSetBitmap example for Delphi

Procedure TForm1.AnnSetBitmap(hStamp: HANNOBJECT; hPlgn:
 HANNOBJECT);
var
nRet: L_INT;
clTemp: TColor;
bTransparent: Boolean;
StampBitmap: TBitmapHandle;
begin
clTemp:= 0;
StampBitmap:= 0;
nRet:= LEADAnn2.Load('C:\flagsel.bmp',
 0, 1, 1);
if(nRet = SUCCESS)then
begin
LEADAnn1.AnnSetBitmap(hStamp,
 LEADAnn2.Bitmap, False);
LEADAnn1.AnnSetAutoBackColor(LEADAnn1.AnnAutomation, ANNOBJECT_ALL,
 TColor(RGB(40, 80, 160)));
LEADAnn1.AnnGetAutoBackColor(LEADAnn1.AnnAutomation,
 ANNOBJECT_POLYGON, clTemp);
ShowMessage('AutoBackColor: ' + ColorToString(clTemp));

LEADAnn1.AnnGetTransparent(hStamp,
 bTransparent);
if(Not(bTransparent))then
LEADAnn1.AnnSetTransparent(hStamp,
 True, False);

LEADAnn1.AnnSetTransparentColor(hStamp,
 clGreen, False);
LEADAnn1.AnnGetTransparentColor(hStamp,
 clTemp);
ShowMessage('TransparentColor: ' +
 ColorToString(clTemp));

LEADAnn1.AnnSetBackColor(hPlgn,
 TColor(RGB(255, 0, 255)), False);
LEADAnn1.AnnGetBackColor(hPlgn,
 clTemp);
ShowMessage('BackColor: ' + ColorToString(clTemp));

LEADAnn1.AnnSetForeColor(hPlgn,
 TColor(RGB(0, 255, 255)), False);
LEADAnn1.AnnGetForeColor(hPlgn,
 clTemp);
ShowMessage('ForeColor: ' + ColorToString(clTemp));
LEADAnn1.AnnGetBitmap(hStamp,
 StampBitmap);
LEADAnn1.Bitmap:= StampBitmap;
end;
end;


AnnSetFillMode example for Delphi

procedure TForm1.TestAnnFillMode ( hAnnObject: HANNOBJECT );
var
uFillMode: L_UINT; { Object fill mode }
begin
{ Set the fill mode to transparent, unless it already is }
LEADAnn1.AnnGetFillMode ( hAnnObject, uFillMode );
if ( uFillMode = ANNFILLMODE_TRANSPARENT ) then
ShowMessage ( 'Already transparent' )
else
LEADAnn1.AnnSetFillMode ( hAnnObject, ANNFILLMODE_TRANSPARENT, False );
end;


AnnSetFillPattern example for Delphi

Procedure TForm1.TestAnnFillPattern ( hAnnObject: HANNOBJECT );
var
uFillPattern: L_UINT; { Object fill pattern }
begin
{ Set the fill pattern to solid, unless it already is }
LEADAnn1.AnnGetFillPattern ( hAnnObject, uFillPattern );
if ( uFillPattern = ANNFILLPATTERN_SOLID ) then
ShowMessage ( 'Already solid' )
else
LEADAnn1.AnnSetFillPattern ( hAnnObject, ANNFILLPATTERN_SOLID, False );
end;


AnnSetFontBold example for Delphi

AnnSetFontBond example for Delphi

procedure TForm1.TestAnnFontBold ( hAnnObject: HANNOBJECT );
var
IsBold: Boolean;{ Is the object’s text bold }
begin
{ Set the font to bold, unless it already is }
LEADAnn1.AnnGetFontBold ( hAnnObject, IsBold );
if ( IsBold = TRUE ) then
ShowMessage ( 'Already bold' )
else
LEAdAnn1.AnnSetFontBold ( hAnnObject, True, False );
end;


AnnSetFontItalic example for Delphi

procedure TForm1.TestAnnFontItalic ( hAnnObject: HANNOBJECT );
var
IsItalic: Boolean; { Is the object’s text italic }
begin
{ Set the font to italic, unless it already is }
LEADAnn1.AnnGetFontItalic ( hAnnObject, IsItalic );
if ( IsItalic ) then
ShowMessage ( 'Already Italic' )
else
LEADAnn1.AnnSetFontItalic ( hAnnObject, true, false );
end;


AnnSetFontName example for Delphi

procedure TForm1.TestAnnFontName ( hAnnObject: HANNOBJECT );
var
strFontName: String;{ The object’s font name }
begin
{ Get the current font name }
LEADAnn1.AnnGetFontName(hAnnObject, strFontName);
{ Set the font to Times New Roman, unless it already is }
if ( strFontName = 'Times New Roman' ) then
ShowMessage ( 'Already Times New Roman' )
else
LEADAnn1.AnnSetFontName ( hAnnObject, 'Times New Roman', False );
end;


AnnSetFontSize example for Delphi

Procedure TForm1.TestAnnFontSize ( hAnnObject: HANNOBJECT );
var
FontSize: L_DOUBLE; { Object font size }
begin
{ Double the font size }
LEADAnn1.AnnGetFontSize ( hAnnObject, FontSize );
LEADAnn1.AnnSetFontSize ( hAnnObject, FontSize * 2, False );
end;


AnnSetFontStrikeThrough example for Delphi

procedure TForm1.TestAnnFontStrike ( hAnnObject: HANNOBJECT );
var
bStrikeThrough: Boolean;{ Strike-through property of the object’s text }
begin
{ Set the font to have a strike-through, unless it already has one }
LEADAnn1.AnnGetFontStrikeThrough ( hAnnObject, bStrikeThrough );
if ( bStrikeThrough = True ) then
ShowMessage ( 'Already has strike-through' )
else
LEADAnn1.AnnSetFontStrikeThrough ( hAnnObject, True, False );
end;


AnnSetFontUnderline example for Delphi

procedure TForm1.TestAnnFontUnderline ( hAnnObject: HANNOBJECT );
var
bUnderLine: Boolean; { Underline property of the object’s text }
begin
{ Set the font to have an underline, unless it already has one }
LEADAnn1.AnnGetFontUnderline ( hAnnObject, bUnderLine );
if ( bUnderLine = TRUE ) then
ShowMessage ( 'Already has an underline' )
else
LEADAnn1.AnnSetFontUnderline ( hAnnObject, True, False );
end;


AnnSetForeColor example for Delphi

procedure TForm1.TestAnnForeColor ( hAnnObject: HANNOBJECT );
var
crColor: COLORREF; { Object foreground color }
begin
{ Invert the foreground color }
LEADAnn1.AnnGetForeColor ( hAnnObject, crColor );
LEADAnn1.AnnSetForeColor ( hAnnObject, crColor xor $00FFFFFF, False );
end;


AnnSetGaugeLength example for Delphi

procedure TForm1.TestAnnGauge ( hAnnObject: HANNOBJECT; hContainer: HANNOBJECT );
var
dLength: L_DOUBLE;
begin
{ if gauge length setting
is longer than 5 pixels, then make it 5 pixels. }
LEADAnn1.AnnGetGaugeLength ( hAnnObject, dLength );
if ( dLength > 5.0 ) then
begin
LEADAnn1.AnnSetGaugeLength ( hAnnObject, 5.0, False );
end;
end;


AnnSetGrouping example for Delphi

// This example will temporarily disable the grouping in all objects
// and re-enable the grouping later.

// Disable grouping in all groups
LEADAnn1.AnnSetGrouping (LEADAnn1.AnnContainer, False, ANNFLAG_RECURSE);

//… you can now select and change individual objects from groups
//… you can also put the two calls to AnnSetGrouping in two
//… buttons

// re-enable grouping all groups
// note that we do NOT enable grouping in the topmost container!
// if you enable the grouping in the top container, then all the
// objects will act as a group!
LEADAnn1.AnnSetGrouping (LEADAnn1.AnnContainer, True, ANNFLAG_RECURSE+ANNFLAG_NOTTHIS);


AnnSetHyperlinkMsg Example for Delphi

//The following is an example of OnAnnHyperlinkMenu event code, which includes a call to AnnSetHyperlinkMsg.
procedure TForm1.LEADAnn1AnnHyperlinkMenu (phObjects: L_PHANDLE;
iCount: Integer);
var
x: Integer;
begin
//set HyperLink to type ANNLINK_ANNEVENT5
//and set the 5 params to some values.
for x := 0 to iCount - 1 do
LEADAnn1.AnnSetHyperlinkMsg (LEADAnn1.AnnGetItemHandle (phObjects, x), ANNLINK_ANNEVENT5, 5, 4, 3, 2, 1 ) ;
end;


AnnSetLineStyle example for Delphi

procedure TForm1.TestAnnLineStyle ( hAnnObject: HANNOBJECT );
var
uLineStyle: L_UINT; { Line style property of the object }
begin
{ Set the style to a dashed line, unless it is already dashed }
LEADAnn1.AnnGetLineStyle ( hAnnObject, uLineStyle );
if ( uLineStyle = ANNLINE_DASH ) then
ShowMessage ( 'Already dashed line' )
else
LEADAnn1.AnnSetLineStyle ( hAnnObject, ANNLINE_DASH, False );
end;


AnnSetLineWidth example for Delphi

procedure TForm1.TestAnnLineWidth ( hAnnObject: HANNOBJECT );
var
dLineWidth: L_DOUBLE; { Object line width }
begin
{ Double the line width }
LEADAnn1.AnnGetLineWidth ( hAnnObject, dLineWidth );
LEADAnn1.AnnSetLineWidth ( hAnnObject, dLineWidth * 2, False );
end;


AnnSetMetafile example for Delphi

Procedure TForm1.TestMetaFile(hStamp: HANNOBJECT);
var
hMeta: HMETAFILE;
bEnhanced: Boolean;
begin
LEADAnn1.AnnGetPredefinedMetafile(ANNMETAFILE_IMPORTANT, bEnhanced, hMeta);
LEADAnn1.AnnSetPredefinedMetafile(ANNMETAFILE_TOPSECRET, hMeta);
LEADAnn1.AnnSetMetafile(hStamp, 0, ANNMETAFILE_TOPSECRET, False);
ShowMessage('Stamp set to TopSecret');

LEADAnn1.AnnGetMetafile(hStamp, hMeta);
Case (GetObjectType(hMeta)) of
OBJ_ENHMETAFILE:
ShowMessage('Type is EMF');

OBJ_METAFILE:
ShowMessage('Type is WMF');
end;
end;


AnnSetPoints example for Delphi

procedure TForm1.AnnSetPointsExample ( hObj: HANNOBJECT; hObj2: HANNOBJECT );
var
uArea: L_UINT;
ptPoints: Array [ 0..3 ] of ANNPOINT;
begin
// Assign values for x and y from 1 through 3
ptPoints[1].x:= 10;
ptPoints[1].y:= 20;
ptPoints[2].x:= 100;
ptPoints[2].y:= 200;
ptPoints[3].x:= 200;
ptPoints[3].y:= 100;

LEADAnn1.AnnSetPoints ( hObj, @ptPoints, 3 );
ptPoints[0].x:= 50;
ptPoints[0].y:= 220; // SetPoints starts at 0 because No. of points set to 4

LEADAnn1. AnnSetPoints ( hObj2, @ptPoints, 4 );
LEADAnn1. AnnSetFillMode ( hObj2, ANNFILLMODE_OPAQUE, False );
Form1.Caption:= 'Protractor Bounding Rectangle' + Chr(13) +
' Left: ' + IntToStr(LEADAnn1. AnnBoundingRectLeft [hObj]) + Chr(13) +
' Top:' + IntToStr(LEADAnn1. AnnBoundingRectTop [hObj]) + Chr(13) +
' Width:' + IntToStr(LEADAnn1. AnnBoundingRectWidth [hObj]) + Chr(13) +
' Height:' + IntToStr(LEADAnn1. AnnBoundingRectHeight [hObj]);
LEADAnn1. AnnBringToFront ( hObj2 );
ShowMessage ( 'Brought Polygon to front' );
LEADAnn1.AnnGetArea(hObj2, uArea);
Form1.Caption:= 'Polygon Area:' + IntToStr(uArea);
LEADAnn1. AnnSendToBack ( hObj2 );
ShowMessage ( 'Sent Polygon to back' );
end;


AnnSetPolyFillMode example for Delphi

procedure TForm1.TestAnnPolyFillMode ( hAnnObject: HANNOBJECT );
var
uPolyFillMode: L_UINT;{ Object's polygonal fill mode }
begin
{ Change the fill mode }
LEADAnn1.AnnGetPolyFillMode ( hAnnObject, uPolyFillMode );
if ( uPolyFillMode = ANNPOLYFILLMODE_WINDING ) then
LEADAnn1.AnnSetPolyFillMode ( hAnnObject, ANNPOLYFILLMODE_ALTERNATE, False )
else
LEADAnn1.AnnSetPolyFillMode ( hAnnObject, ANNPOLYFILLMODE_WINDING, False );
end;


AnnSetROP2 example for Delphi

Procedure TForm1.AnnSetROP2(hAnnObject: HANNOBJECT);
var
uRop2: L_UINT; { ROP2 code }
begin
{ Get the current ROP2 code }
LEADAnn1.AnnGetROP2(hAnnObject, uRop2);

{ if the code is not ANNROP2_AND, make it so }
if(uRop2 <> ANNROP2_AND)then
begin
{ make sure the FillMode is set to Transparent }
LEADAnn1.AnnSetFillMode(hAnnObject, ANNFILLMODE_TRANSPARENT, True);

{ set ROP2 code }
LEADAnn1.AnnSetROP2(hAnnObject, ANNROP2_AND, True);
end;
end;


AnnSetScalarX example for Delphi

procedure TForm1.TestScalarsAndOffsets ( hContainer: HANNOBJECT );
var
dScalarX: L_DOUBLE;
dScalarY: L_DOUBLE;
dOffsetX: L_DOUBLE;
dOffsetY: L_DOUBLE;
begin
LEADAnn1.AnnGetScalarX ( hContainer, dScalarX );
LEADAnn1.AnnGetScalarY ( hContainer, dScalarY );
LEADAnn1.AnnGetOffsetX ( hContainer, dOffsetX );
LEADAnn1.AnnGetOffsetY ( hContainer, dOffsetY );

ShowMessage ( 'ScalarX: ' + FloatToStr(dScalarX) + Chr(13) +
'ScalarY: ' + FloatToStr(dScalarY) + Chr(13) +
'OffsetX: ' + FloatToStr(dOffsetX) + Chr(13) +
'OffsetY: ' + FloatToStr(dOffsetY) + Chr(13) );

LEADAnn1.AnnSetScalarX ( hContainer, 1.5, False );
LEADAnn1.AnnSetScalarY ( hContainer, 1.5, False );
LEADAnn1.AnnSetOffsetX ( hContainer, 10, False );
LEADAnn1.AnnSetOffsetY ( hContainer, 20, False );

LEADAnn1.AnnGetScalarX ( hContainer, dScalarX );
LEADAnn1.AnnGetScalarY ( hContainer, dScalarY );
LEADAnn1.AnnGetOffsetX ( hContainer, dOffsetX );
LEADAnn1.AnnGetOffsetY ( hContainer, dOffsetY );

ShowMessage ( 'ScalarX: ' + FloatToStr(dScalarX) + Chr(13) +
'ScalarY: ' + FloatToStr(dScalarY) + Chr(13) +
'OffsetX: ' + FloatToStr(dOffsetX) + Chr(13) +
'OffsetY: ' + FloatToStr(dOffsetY) + Chr(13) );
end;


AnnSetSecondaryBitmap example for Delphi

Procedure TForm1.AnnSetSecondaryBitmap(hPushPin: HANNOBJECT);
var
SecondaryBitmap: TBitmapHandle;
begin
LEADAnn1.AnnSetSecondaryBitmap(hPushPin,
 LEADAnn2.Bitmap, False);
LEADAnn1.AnnUserMode:=
 ANNUSERMODE_RUN;
ShowMessage('Secondary bitmap set');
LEADAnn1.AnnGetSecondaryBitmap(hPushPin,
 SecondaryBitmap);
LEADAnn1.Bitmap:= SecondaryBitmap;
end;


AnnSetShowFlags example for Delphi

Procedure TForm1.AnnSetShowFlags(hProt: HANNOBJECT);
var
fArcRadius: Single;
bAcute: Boolean;
nUnit: L_INT;
nPrecision: L_INT;
strAbbr: String;
uShowFlags: L_UINT;
begin
fArcRadius:= 0;
bAcute:= True;
nUnit:= 0;
nPrecision:= 0;
uShowFlags:= 0;

LEADAnn1.AnnGetProtractorOptions(hProt,
 bAcute, nUnit, strAbbr, nPrecision, fArcRadius);
LEADAnn1.AnnSetProtractorOptions(hProt,
 (bAcute = False), 1 - ANNANGLE_DEGREES, strAbbr, (nPrecision + 1) Mod
 5, fArcRadius, False);
LEADAnn1.AnnGetShowFlags(hProt,
 uShowFlags);
LEADAnn1.AnnSetShowFlags(hProt,
 (uShowFlags+ 1) Mod 4, False);
end;


AnnSetText example for Delphi

procedure TForm1.TestAnnSetText ( hAnnObject: HANNOBJECT );
var
strText: String; { The object’s text }
begin
{ Get the current text }
LEADAnn1.AnnGetText ( hAnnObject, strText );
{ Add " - New" to the end of the current text }
strText:= strText + ' - New';
LEADAnn1.AnnSetText ( hAnnObject, strText, False );
end;


AnnSetUnit example for Delphi

procedure TForm1.TestAnnSetUnit ( hCrossProd: HANNOBJECT );
var
uUnit: L_UINT;
uPrecision: L_UINT;
strUnitAbbrev: String;
begin
LEADAnn1.AnnGetUnit ( hCrossProd, strUnitAbbrev, uUnit, uPrecision );
uUnit:= (uUnit + 1) Mod 10;
LEADAnn1.AnnSetUnit ( hCrossProd, uUnit + ANNUNIT_DEF_ABBR, '', 2, False );
end;


AnnSetUser Example for Delphi

// This example is also for:
AnnSetVisible method
procedure TForm1.Button1Click(Sender: TObject);
begin
//hide the selected objects
LEADAnn1.AnnSetVisible ( LEADAnn1.AnnContainer, False, ANNFLAG_RECURSE + ANNFLAG_SELECTED, '' );
//set the selected objects to belong to user XXX
LEADAnn1.AnnSetUser ( LEADAnn1.AnnContainer, '', 'xxx', True);
end;


AnnSetWnd example for Delphi

{ This example updates the container object’s window handle if necessary. }
procedure TForm1.TestAnnWnd ( hContainer: HANNOBJECT; h_Wnd: HWND );
var
hObjectWnd: HWND;{ Container object's window }
begin
{ Set the container's window to the current window, unless it is already current }
LEADAnn1.AnnGetWnd ( hContainer, hObjectWnd );
if ( hObjectWnd = h_Wnd ) then
ShowMessage ( 'Already using the current window' )
else
LEADAnn1.AnnSetWnd ( hContainer, h_Wnd );
end;


AnnShowLockedIcon Example for Delphi

//This example toggles the AnnShowLockedIcon property.
//Toggle AnnShowLockedIcon
if (LEADAnn1.AnnShowLockedIcon = True) then
LEADAnn1.AnnShowLockedIcon:= False
else
LEADAnn1.AnnShowLockedIcon:= True ;


AnnTextAlign example for Delphi

Procedure TForm1.ExampleAnnTextAlign ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
nAlign: L_INT32;
begin

nObjectType:= LEADAnn1.AnnGetType(hObject);

if (nObjectType <> ANNOBJECT_TEXT) Then
begin
ShowMessage( 'This object is not a Text Object');
end;

nAlign:= LEADAnn1.AnnTextAlign[hObject];

if (nAlign = TEXTALIGN_CENTER ) Then
begin
nAlign:= TEXTALIGN_LEFT;
end
else
begin
nAlign:= TEXTALIGN_CENTER;
end;

LEADAnn1.AnnFlags:= 0;
LEADAnn1.AnnTextAlign[hObject]:= nAlign;
end;


AnnTextExpandTokens example for Delphi

Procedure TForm1.ExampleAnnTextExpandTokens ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
bTextExpandToken: Boolean;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);

if (nObjectType <> ANNOBJECT_TEXT) Then
begin
ShowMessage( 'This object is not a Text Object');
end;

bTextExpandToken:= LEADAnn1.AnnTextExpandTokens[hObject];
bTextExpandToken:= Not bTextExpandToken;
LEADAnn1.AnnTextExpandTokens[hObject]:= bTextExpandToken;

if (bTextExpandToken = true) Then
begin
ShowMessage( 'Text Expands Token');
end
else
begin
ShowMessage( 'Text Does Not Expand Token');
end;
end;


AnnTextRotate example for Delphi

Procedure TForm1.ExampleAnnTextRotate ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
nAngle: L_INT32;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);

if (nObjectType <> ANNOBJECT_TEXT) Then
begin
ShowMessage( 'This object is not a Text Object');
end;

nAngle:= LEADAnn1.AnnTextRotate[hObject];
nAngle:= nAngle + TEXTROTATE_90;
LEADAnn1.AnnFlags:= 0 ;
LEADAnn1.AnnTextRotate [hObject]:= nAngle;
end;


AnnTicMarkLength example for Delphi

Procedure TForm1.ExampleAnnTicMarkLength ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
Length: L_DOUBLE;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);

if ( (nObjectType <> ANNOBJECT_POLYRULER) And
(nObjectType <> ANNOBJECT_RULER) ) Then
begin
ShowMessage('This object is not a POLYRULER or a RULER Object');
end;

Length:= LEADAnn1.AnnTicMarkLength[hObject];

Length:= Length + 10;

LEADAnn1.AnnTicMarkLength[hObject]:= Length;
end;


AnnUndo example for Delphi

// Make some changes and then call this method.
// See how the last change is undone.
LEADAnn1.AnnUndo();


AnnUndoDepth example for Delphi

//This example increases the length of the undo stack
LEADAnn1.AnnUndoDepth:= LEADAnn1.AnnUndoDepth + 5;


AnnUndoEnable example for Delphi

//This example toggles the Undo feature
LEADAnn1.AnnUndoEnable:= Not LEADAnn1.AnnUndoEnable;


AnnUngroup Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
LEADAnn1.AnnUngroup ( LEADAnn1.AnnContainer, ANNFLAG_SELECTED + ANNFLAG_RECURSE, '' ) ;
end;


AnnUnlock Example for Delphi

This is also the example for AnnGetLocked method.

If an object is found to be locked, using AnnGetLocked method, the object is unlocked, by AnnUnlock, using the key "LEADTOOLS".

Var
ghObject: L_HANDLE;
bLocked: Boolean;
begin
//.
//.
//.
bLocked:= LEADAnn1.AnnGetLocked (ghObject);
if bLocked= True then
LEADAnn1.AnnUnlock ( ghObject, 'LEADTOOLS' ) ;
//.
//.
end;


AnnUnrealize Example for Delphi

The following example calls the AnnUnrealize method.

//Unrealize all redact objects in the container
LEADAnn1.AnnUnrealize (LEADAnn1.AnnContainer, False);


AnnUserHandle example for Delphi

Procedure TFOrm1.ExampleGetAnnUserHandles ( hObject: HANNOBJECT );
var
i: L_INT;
uCount: L_UINT;
strVisible: String;
begin
LEADAnn1.AnnGetUserHandles ( hObject );
uCount:= LEADAnn1.AnnUserHandlesCount;

if ( uCount > 0 ) then
begin
for i:= 0 to uCount - 1 do
begin
if ( LEADAnn1.AnnUserHandle[i].Visible ) then
strVisible:= 'bVisible = True'
else
strVisible:= 'bVisible = False';
ShowMessage ( 'uIndex = ' + IntToStr(i) + Chr(13) +
'nID = ' + IntToStr(LEADAnn1.AnnUserHandle[i].ID) + Chr(13) +
'ContainerX = ' + IntToStr(Trunc(LEADAnn1.AnnUserHandle[i].ContainerX)) + Chr(13) +
'ContainerY = ' + IntToStr(Trunc(LEADAnn1.AnnUserHandle[i].ContainerY)) + Chr(13) +
'CliantX = ' + IntToStr(LEADAnn1.AnnUserHandle[i].ClientX) + Chr(13) +
'ClientY = ' + IntToStr(LEADAnn1.AnnUserHandle[i].ClientY) + Chr(13) +
strVisible + Chr(13) +
'PenColor = ' + IntToStr(LEADAnn1.AnnUserHandle[i].PenColor) + Chr(13) +
'FillColor = ' + IntToStr(LEADAnn1.AnnUserHandle[i].FillColor) + Chr(13) +
'Shape = ' + IntToStr(LEADAnn1.AnnUserHandle[i].Shape) + Chr(13));
end;
end
else
ShowMessage ( 'No User Handles' );
end;


AntiAlias example for Delphi

LEADImage1.AntiAlias (128, 3, ANTIALIAS_1);


ApplyMathLogic Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{ Multiply the colors of the bitmap using a factor of 1.51 }
LEADImage1.ApplyMathLogic(151, AML_OP_MUL + CHANNEL_MASTER + AML_VALUE_NOP + AML_RES_NOP);
end;


ApplyModalityLUT Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
TestModalityLUT(False);
end;

Function TForm1.TestModalityLUT ( bLinear: Boolean ): L_INT;
var
LUT: Array[0..$FFFF] of L_UINT16;
nRet: L_INT;
i: L_INT;
nFirstStoredPixelValueMapped: L_INT;
uEntryBits: L_UINT;
uNumberOfEntries: L_UINT;
begin

LEADImage1.Load('e:\image1.cmp', 0, 1, 1 );

if (bLinear = True) then
begin
nRet:= LEADImage1.ApplyLinearModalityLUT(0.0, 0.5, 0);
end
else
begin
{ set a LUT which reduces the intensity of each pixel to half }
for i:= 0 to $FFFF do
begin
LUT[i]:= Trunc(i / 2);
end;

{ fill the LUTDescriptor structure }
nFirstStoredPixelValueMapped:= 0;
uEntryBits:= 16;
uNumberOfEntries:= $10000;

{ apply the LUT }
nRet:= LEADImage1.ApplyModalityLUT( @LUT, uNumberOfEntries, nFirstStoredPixelValueMapped, uEntryBits, M_LUT_UPDATE_MIN_MAX );
end;
Result:= nRet;
end;


ApplyVOILUT Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
TestVOILUT(True);
end;

Function TForm1.TestVOILUT ( bLinear: Boolean ): L_INT;
var
LUT: Array[0..$FFF] of L_UINT16;
nRet: L_INT;
i: L_INT;
nFirstStoredPixelValueMapped: L_INT;
uEntryBits: L_UINT;
uNumberOfEntries: L_UINT;
begin

LEADImage1.Load('e:\image1.cmp', 0, 1, 1 );

if (bLinear = True) then
begin
// Apply "Abdomen T1" window-level , high bit is assumed
// to be "11" and low bit "0.
nRet:= LEADImage1.ApplyLinearVOILUT(330.0, 600.0, 0);
end
else
begin
for i:= 0 to $1000 do
begin
if(i < 30) then
begin
LUT[i]:= 0;
end
else
if(i > 630) then
begin
LUT[i]:= 630;
end
else
begin
LUT[i]:= Trunc(i);
end;
end;

{ fill the LUTDescriptor structure }
nFirstStoredPixelValueMapped:= 0;
uEntryBits:= 16;
uNumberOfEntries:= $1000;

{ apply the LUT }
nRet:= LEADImage1.ApplyVOILUT( @LUT, uNumberOfEntries, nFirstStoredPixelValueMapped, uEntryBits, 0);
end;
Result:= nRet;
end;


AutoAnimate Example for Delphi

This example gets information about an animated file, uses the information to position the LEAD control, and plays the animation as it loads the file.

procedure TForm1.Button1Click(Sender: TObject);
var
HeightFactor,WidthFactor: Integer;
HeightAllowed,WidthAllowed: Integer;
begin
{ Force continued looping after the file loads. }
Lead1.AutoAnimationLoop := AUTOANIMATIONLOOP_INFINITE
Lead1.GetFileInfo('d:\ltwin11\images\eye.gif', 0);
{ Exit if this is not an animated file. }
if Lead1.InfoAnimation = False then
ShowMessage('Not an animated file!!')
else
begin
{ Calculate information for centering the LEAD control. }
{Set the variables used for preserving the aspect ratio. }
{Allow for a border of 1/8 of the form size. }
{The units of measure do not matter, since we are calculating proportions. }
HeightFactor := round(Lead1.InfoHeight);
WidthFactor := round(Lead1.InfoWidth);
HeightAllowed := round(ClientHeight * 3/4);
WidthAllowed := round(ClientWidth * 3/4);
{ Center the LEAD control on the form, preserving the aspect ratio.
Check to see if using the maximum width will make the image too tall.
Set the dimensions based on the result. }
If ((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed Then
begin
Lead1.Left := round(ClientWidth / 8);
Lead1.Width := WidthAllowed;
Lead1.Height := round((Lead1.Width * HeightFactor) / WidthFactor);
Lead1.Top := round((ClientHeight - Lead1.Height) / 2);
end
else
begin
Lead1.Top := round(ClientHeight / 8);
Lead1.Height := HeightAllowed;
Lead1.Width := round((Lead1.Height * WidthFactor) / HeightFactor);
Lead1.Left := round((ClientWidth - Lead1.Width) / 2);
end;
{ Set properties for playing the animation as is loads. }
Lead1.AutoAnimate := True;
Lead1.AutoRepaint := True;
{ Load the animated file. }
Lead1.Load('d:\ltwin11\images\eye.gif', 0, 0, -1);
end;
end;


AutoBinary Example for Delphi

procedure TForm1.AutoBinaryClick(Sender: TObject);
begin
LEADImage1.AutoBinary( );
end;


AutoCADFilesColorScheme example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ If the current AutoCAD color scheme is not black on white, change it }
if ( LEADImage1.AutoCADFilesColorScheme <> AUTOCADFILES_COLORSCHEME_BLACKONWHITE ) then
LEADImage1.AutoCADFilesColorScheme:= AUTOCADFILES_COLORSCHEME_BLACKONWHITE;

{ Load the DXF file }
LEADImage1.Load( 'c:\image1.dxf', 0, 1, 1 );
end;


AutoColorLevel Example for Delphi

procedure TForm1.AutoColorLevel1Click(Sender: TObject);
var
Master: LEVELCOLORINFO;
Red: LEVELCOLORINFO;
Green: LEVELCOLORINFO;
Blue: LEVELCOLORINFO;
begin
{ Apply "Auto Leveling" to the bitmap }
LEADImage1.AutoColorLevel( Master, Red, Green, Blue, DEFAULT_BLACK_CLIP, DEFAULT_WHITE_CLIP, AUTO_LEVEL );
ShowMessage ( 'Min and Max input values for the' + 'blue channel using auto level are ' + IntToStr(Blue.uMinInput) + 'and ' + IntToStr(Blue.uMaxInput) );

end;


AutoSize Example for Delphi

This example shows how the AutoSize property works when loading and when rotating an image.

Lead1.AutoSize:=True;
Lead1.Load('c:\lead\images\image1.cmp', 0, 0, 1);
ShowMessage('Control is sized to fit the loaded bitmap');
Lead1.Rotate(4500, True, RGB(0,0,0));
ShowMessage('Control is sized to fit the rotated bitmap');


AutoTrim example for Delphi

This example trims the bitmap with threshold of 10.

Lead1.AutoTrim(10);
Lead1.ForceRepaint;


Average example for Delphi

This example applies an average filter with a 3x3 neighborhood and redisplays the bitmap.

Lead1.Average(3);
Lead1.ForceRepaint;


BackColor (ImageList Control) example for Delphi

{This example sets the background color to red.}
LEADImgList1.BackColor := clRed;


BackColor example for Delphi

This example sets the background color to red. You can zoom out to see the background color.

Lead1.BackColor := RGB(255,0,0);


BackErase example for Delphi

This example turns off repainting of the background, then zooms out to show the effect when repainting.

Lead1.BackErase := False;
Lead1.AutoRepaint := False;
Lead1.AutoScroll := False;
{Calculate the values to zoom out by 10 percent and center the image.}
Lead1.DstWidth := Round(Lead1.DstWidth * 0.9);
Lead1.DstHeight := Round(Lead1.DstHeight * 0.9);
Lead1.DstTop := (Lead1.Height - Lead1.DstHeight) div 2;
Lead1.DstLeft := (Lead1.Width - Lead1.DstWidth) div 2;
{Set the clipping area to the same as the destination rectangle}
Lead1.DstClipWidth := Lead1.DstWidth;
Lead1.DstClipHeight := Lead1.DstHeight;
Lead1.DstClipTop := Lead1.DstTop;
Lead1.DstClipLeft := Lead1.DstLeft;
{Redisplay the image}
Lead1.ForceRepaint;


BalanceColors example for Delphi

BalanceColors Delphi Example

{This example assumes there is a bitmap loaded}
var
RedFact, GreenFact, BlueFact: COLORBALANCING;
begin
RedFact.toRed:= 0.25;
RedFact.toGreen:= 0.50;
RedFact.toBlue:= 0.25;
GreenFact.toRed:= 0.30;
GreenFact.toGreen:= 0.40;
GreenFact.toBlue:= 0.30;
BlueFact.toRed:= 0.10;
BlueFact.toGreen:= 0.60;
BlueFact.toBlue:= 0.30;
LEADImage1.BalanceColors ( RedFact, GreenFact, BlueFact );
end;


Bending Example for Delphi

procedure TForm1.BendingClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth/2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);
LEADImage1.Bending( 100, ptCenter, 0, FILL_RPT Or FILL_WOUTROT Or BND_NORM );
end;


BinaryFilter example for Delphi

This example does omni-directional erosion of black objects and repaints the image.

Lead1.BinaryFilter(BFLT_EROSION_OMNI);
Lead1.ForceRepaint;


BitmapAlpha example for Delphi

procedure TForm1.AlphaRGNClick(Sender: TObject);
var
rgntop : Integer;
rgnleft : Integer;
rgnwidth : Integer;
rgnheight : Integer;
hRGN : Longint;
test: Integer;
begin
LEADImage1.Load ('v:\images\image1.cmp', 0, 0, 1);
LEADImage1.AutoRepaint:= False;
{Get an alpha channel bitmap, and fill it with white}
LEADImage2.Bitmap:= LEADImage1.BitmapAlpha;
LEADImage2.SetRgnColor (RGB(0, 0, 0), L_RGN_SETNOT);
test:= LEADImage2.GetRgnArea ();
//test here is test = 0, then Alpha is all black
if (test = 0) then
ShowMessage ('Alpha image is all black');

LEADImage2.Fill (RGB(255, 255, 255));
rgntop := 0;
rgnleft := 0;
rgnwidth := LEADImage1.BitmapWidth;
rgnheight := LEADImage1.BitmapHeight;
{Create an elliptical region in the AlphaBitmap}
LEADImage2.SetRgnEllipse (rgntop, rgnleft, rgnwidth, rgnheight, L_RGN_SET);
{Fill the region with black}
LEADImage2.Fill(RGB(0, 0, 0));

{Free the region}
LEADImage2.FreeRgn ();
{Update the alpha channel in the main bitmap}
LEADImage1.BitmapAlpha:= LEADImage2.Bitmap;
{Save the bitmap as 32-bit TGA}
LEADImage1.Save ('test.tga', FILE_TGA, 32, 0, SAVE_OVERWRITE);
{Free the bitmaps}
LEADImage1.Bitmap:= 0;
LEADImage2.Bitmap := 0;
{Load the bitmap we just saved and get the alpha channel}
LEADImage1.Load ('test.tga', 0, 0, 1);
LEADImage2.Bitmap := LEADImage1.BitmapAlpha;

{Create a region in the AlphaBitmap that includes all of the black pixels}
LEADImage2.SetRgnColor (RGB(0, 0, 0), L_RGN_SET);
{get the region from the AlphaBitmap and set it into the main bitmap}
hRGN := LEADImage2.GetRgnHandle ();
LEADImage1.SetRgnHandle (hRGN, 0, 0, L_RGN_SET);
LEADImage1.PaintRgnOnly := True;
LEADImage1.ForceRepaint ();
end;


BitmapCompression example for Delphi

{This example toggles the bitmap's compression}
var
oldSize: longint;
begin
oldSize:= LEADImage1.BitmapSize;
if (LEADImage1.BitmapCompression = COMP_NONE) then
begin
{Compress the bitmap}
if (LEADImage1.BitmapBits = 24) then
LEADImage1.BitmapCompression:= COMP_SUPER
else
if LEADImage1.BitmapBits = 1 then
LEADImage1.BitmapCompression:= COMP_RLE
end
else
{Bitmap is compressed. Uncompress it}
LEADImage1.BitmapCompression:= COMP_NONE;

ShowMessage ('old Size = ' + IntToStr(oldSize) + Chr(13) + 'New Size = ' + IntToStr(LEADImage1.BitmapSize));
end;


BitmapDataPath Example for Delphi

This example shows how to load an image from the Internet. It uses the BitmapDataPath property to start the asynchronous load; then uses the OnReadyStateChanged event to paint the image when loading is complete.

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Start the asynchronous load. }
Lead1.BitmapDataPath := 'http://www.leadtools.com/images/newheadr.GIF';
end;

procedure TForm1.Lead1ReadyStateChanged(Sender: TObject; ReadyState: TReadyState);
begin
{ Paint the image when loading is complete. }
if ReadyState = rsComplete then
begin
Lead1.AutoSetRects := True;
Lead1.PaintSizeMode := smFit;
Lead1.ForceRepaint;
end;
end;.


BitmapOrder Example for Delphi

if ( LeadImage.BitmapOrder = ORDER_RGB ) then
label1.Caption := ' The Bitmap With RGB Order ' ;


BitmapToClient example for Delphi

var
szOut: String;
begin
//Test a bitmap location for its screen location
LEADImage1.BitmapToClient (50, 50);
szOut:= '';
szOut:= szOut + 'ClientX = ' + IntToStr(LEADImage1.ConvertX) + Chr(13);
szOut:= szOut + 'ClientY = ' + IntToStr(LEADImage1.ConvertY) + Chr(13);
ShowMessage ( szOut ) ;
end;


BitmapXres and BitmapYres example for Delphi

This example sets the bitmap's resolution to 300 x 600 DPI.

Lead1.BitmapXres := 300;
Lead1.BitmapYres := 600;


BitonalScaling (ImageList Control) example for Delphi

{set the control to use scale to gray}
LEADImgList1.BitonalScaling := btsScaleToGray ;


BitonalScaling example for Delphi

This example sets the display to use scale-to-gray and repaints the image. This affects only 1-bit images.

If Lead1.IsSupportLocked(L_SUPPORT_EXPRESS) Then
ShowMessage('No scale to gray - You need to unlock Document/Medical capabilities')
Else
begin
Lead1.BitonalScaling := btsScaleToGray;
Lead1.ForceRepaint;
End;


BorderColor (ImageList Control) example for Delphi

{This sets the border style to Fixed Single}
{And sets the border color to red.}
LEADImgList1.Ctl3D := false;
LEADImgList1.BorderStyle := bsSingle;
LEADImgList1.BorderColor := clRed;


BorderRemove example for Delphi

// add this to Form Private Section.
private
{ Private declarations }
{….}
hRgnAll : HRGN;

procedure TForm1.Button1Click(Sender: TObject);
var
nRet : Integer;
begin
{Border Remove}
{This example updates a region with the borders of a bitmap}
{For the example, windows regions are passed to the OnBorderRemove Event and combined.}
{In practice it would be easier and faster to just update a LEAD region representing the changes}
{The border is removed from the image}

{Create a NULL region}
hRgnAll := CreateRectRgn(0, 0, 0, 0);
nRet := LEADImage1.BorderRemove(BORDER_CALLBACK_REGION or BORDER_USE_VARIANCE, BORDER_TOP or BORDER_BOTTOM or BORDER_LEFT or BORDER_RIGHT, 20, 2, 5);

if (nRet = SUCCESS) then
begin
LEADImage1.FreeRgn ();
LEADImage1.SetRgnHandle (hRgnAll, 0, 0, L_RGN_SET);
LEADImage1.RgnFrameType := ftAnimated;
end;

{delete the Windows Rgn}

DeleteObject(hRgnAll);
end;

procedure TForm1.LEADImage1BorderRemove (Sender: TObject; hBorderRgn: L_HRGN;
uBorderToRemove, nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth,
nBoundingRectHeight: Integer);

var
sBorder : String;
crOut : String;
szTemp: array[0..255] of Char;
begin
CombineRgn(hRgnAll, hRgnAll, hBorderRgn, RGN_OR);
case uBorderToRemove of
BORDER_TOP:
sBorder := 'Top';
BORDER_LEFT:
sBorder := 'Left';
BORDER_RIGHT:
sBorder := 'Right';
BORDER_BOTTOM:
sBorder := 'Bottom';
end;
crOut := Format('Border - %s Bounds:%d,%d,%d,%d',
[sBorder,
nBoundingRectLeft,
nBoundingRectTop,
nBoundingRectWidth,
nBoundingRectHeight]);
OutputDebugString(StrPCopy(szTemp,crOut));
LEADImage1.DocCleanSuccess := SUCCESS_REMOVE;
end;


BrowseDir (Thumbnail Browser Control) example for Delphi

Note:

To compile this sample you must use LEADDef Unit.

LEADThumb1.EnableMethodErrors := True;
LEADThumb1.StopOnError := True;

LEADThumb1.Filter := '*.jpg'; {search for JPEG files;}

LEADThumb1.ThumbnailWidth := 150;
LEADThumb1.ThumbnailHeight := 150;
LEADThumb1.ThumbnailBitsPerPixel := 0;

LEADThumb1.MaintainAspect := True;
LEADThumb1.ForceSize := True;
LEADThumb1.ThumbnailBackgroundColor :=clGreen;

LEADThumb1.LoadStamp := True;
LEADThumb1.Resample := True;

LEADThumb1.IncludeSubDirectories := False;

LEADThumb1.ExpandMultipage := False;

LEADThumb1.MaxSizeDisk := 0; {no filesize limit}
LEADThumb1.MaxSizeMem := 4096000; {set a image size limit}

LEADThumb1.DitherFlags := CRF_STUCKIDITHERING;
LEADThumb1.PaletteFlags := CRF_FIXEDPALETTE;
try
LEADThumb1.BrowseDir ('f:\images\new');
except
if LEADThumb1.Error <> ERROR_USER_ABORT then
ShowMessage(LEADThumb1.ErrorMsg);
end;


BumpMap Example for Delphi

procedure TForm1.BumpMapClick(Sender: TObject);
begin
LEADImage1.BumpMap( LEADImage2.Bitmap, 5, 0, 3, 0, 0, 0, 0, True, 50, 0, Nil );
end;


ButtonColumns example for Delphi

Procedure TForm1.Button1Click (Sender: TObject);
begin
LEADAnn1.AnnToolbar.ButtonColumns:= LEADAnn1.AnnToolbar.ButtonColumns+ 1;
end;


ButtonMenuTool example for Delphi

// This example is also for:
// ButtonToolCount Property.
//make the first rubber stamp tool draw a rectangle
var
i: integer;
for i:= 0 to LEADAnn1.AnnToolbar.ButtonCount - 1 do
begin
//is this the button with the rubber stamps?
if (LEADAnn1.AnnToolbar.ButtonToolCount [i] > 1 )then
LEADAnn1.AnnToolbar.ButtonMenuTool [i, 0]:= ANNTOOL_RECT;
end;


ButtonRows example for Delphi

procedure TForm1.Button1Click (Sender: TObject);
begin
LEADAnn1.AnnToolbar.ButtonRows:= LEADAnn1.AnnToolbar.ButtonRows + 1;
end;


ButtonVisible example for Delphi

// hide/show the first toolbar button
LEADAnn1.AnnToolbar.ButtonVisible[0]:= Not LEADAnn1.AnnToolbar.ButtonVisible [0];


CancelFloater example for Delphi

1.

Add a command button to your main form and code the click procedure as follows:

procedure TForm1.Button1Click(Sender: TObject);
begin
Lead1.AutoFloater := True
Lead1.EnableFloater := True;
Lead1.RgnMarkingMode := mmRectangle;
end;

2.

Add a second command button and code the click procedure as follows:

procedure TForm1.Button2Click(Sender: TObject);
begin
Lead1.CancelFloater;
end;

3.

When you run the program, Click Button1 .Create a region using the mouse. Move the region with the mouse to a different location inside the bitmap.

a- | If you want to cancel the operation, click on Button2.
b- | If you want to paste the floater and create a new region, click on the bitmap outside the floater.


Capture example for Delphi

This example captures the current form and displays the captured image with scroll bars.

{Turn on the automatic display rectangles.}
Lead1.AutoSetRects := True;
Lead1.Capture( 0, Left, Top, Width, Height);
Lead1.AutoScroll := True;
Lead1.ForceRepaint;


CenterImage example for Delphi

//toggle CenterImage
LEADImage1.CenterImage:= Not LEADImage1.CenterImage;


ChangeHueSatInt Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
HsiData: HUESATINTDATA;{Color Range Information structure}
begin
{ Load a bitmap at 24 bits per pixel }
LEADImage1.Load('IMAGE1.CMP', 0, 1, 1 );
{Change bitmap hue, saturation, and brightness}
HsiData.nHue:= 18000;
HsiData.nSaturation:= 0;
HsiData.nIntensity:= 0;
HsiData.nOuterLow:= 315;
HsiData.nOuterHigh:= 45;
HsiData.nInnerLow:= 345;
HsiData.nInnerHigh:= 15;
{ change the red color to green }
LEADImage1.ChangeHueSatInt( 0, 0, 0, @HsiData, 1 );
end;


ChannelMix Example for Delphi

procedure TForm1.ChannelMixClick(Sender: TObject);
begin
LEADImage1.ChannelMix( 50, 0, 0, 0, 100, 100, 0, 0, 0, 0, 100, 0 );
end;


Clear (ImageList Control) example for Delphi

{empty the current list}
LEADImgList1.Clear;


ClientToBitmap example for Delphi

Procedure TForm1.LEADImage1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
BitmapX: Integer;
BitmapY: Integer;
begin
BitmapX:= x;
BitmapY:= y;
LEADImage1.ClientToBitmap ( BitmapX, BitmapY );

//Change that pixel to White
LEADImage1.Pixel[LEADImage1.ConvertX, LEADImage1.ConvertY]:= RGB(255, 255, 255 ) ;
end;


ColorCount example for Delphi

This example displays a message box showing the number of unique colors in the control's current bitmap.

var
szMessage: String;
NumberOfColors: Integer;
begin
{ Get the number of colors in the bitmap. }
NumberOfColors := Lead1.ColorCount;
{ Display the result in a message. }
szMessage := 'The bitmap has ' + IntToStr(NumberOfColors) + ' colors';
ShowMessage(szMessage);
end;


ColorIntensityBalance Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );
{ Balance the colors by increasing the red channel values }
LEADImage1.ColorIntensityBalance(60, 0, 0, 40, 0, 0, 70, 0, 0, FALSE);
end;


ColorizeGray Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
GrayColors: Array[0..5] of GRAYCOLOR;
begin

// Load the bitmap, keeping the bits per pixel of the file
LEADImage1.Load ('e:\\image1.cmp', 0, 1, 1 );

//Load the grayscale image bitmap, keeping the bits per pixel of the filesource.
LEADImage2.Load ('e:\\image2.cmp', 0, 1, 1 );
LEADImage2.GrayScale( 12 );

GrayColors[0].uThreshold:= 9999;
GrayColors[0].crColor.rgbRed:= 255;
GrayColors[0].crColor.rgbGreen:= 0;
GrayColors[0].crColor.rgbBlue:= 0;

GrayColors[1].uThreshold:= 19999;
GrayColors[1].crColor.rgbRed:= 0;
GrayColors[1].crColor.rgbGreen:= 255;
GrayColors[1].crColor.rgbBlue:= 0;

GrayColors[2].uThreshold:= 29999;
GrayColors[2].crColor.rgbRed:= 0;
GrayColors[2].crColor.rgbGreen:= 0;
GrayColors[2].crColor.rgbBlue:= 255;

GrayColors[3].uThreshold:= 39999;
GrayColors[3].crColor.rgbRed:= 0;
GrayColors[3].crColor.rgbGreen:= 255;
GrayColors[3].crColor.rgbBlue:= 255;

GrayColors[4].uThreshold:= 49999;
GrayColors[4].crColor.rgbRed:= 255;
GrayColors[4].crColor.rgbGreen:= 0;
GrayColors[4].crColor.rgbBlue:= 255;

GrayColors[5].uThreshold:= 59999; // This value will be ignored
GrayColors[5].crColor.rgbRed:= 255;
GrayColors[5].crColor.rgbGreen:= 255;
GrayColors[5].crColor.rgbBlue:= 0;

// Call the method
LEADImage1.ColorizeGray(LEADImage2.Bitmap, @GrayColors, 6 );
end;


ColorLevel Example for Delphi

procedure TForm1.ColorLevel1Click(Sender: TObject);
var
Master: LEVELCOLORINFO;
Red: LEVELCOLORINFO;
Green: LEVELCOLORINFO;
Blue: LEVELCOLORINFO;
begin
// Master will cause the image to be Inversed
Master.uMinInput:= 0;
Master.uMaxInput:= 255;
Master.uMinOutput:= 255;
Master.uMaxOutput:= 0;
Master.uGamma:= DEFAULT_GAMMA;

Red.uMinInput:= 0;
Red.uMaxInput:= 255;
Red.uMinOutput:= 255;
Red.uMaxOutput:= 0;
Red.uGamma:= DEFAULT_GAMMA;

Green.uMinInput:= 0;
Green.uMaxInput:= 255;
Green.uMinOutput:= 255;
Green.uMaxOutput:= 0;
Green.uGamma:= DEFAULT_GAMMA;

Blue.uMinInput:= 20;
Blue.uMaxInput:= 200;
Blue.uMinOutput:= 0;
Blue.uMaxOutput:= 255;
Blue.uGamma:= DEFAULT_GAMMA;

{ Level the Blue and Master channels }
LEADImage1.ColorLevel( Master, Red, Green, Blue, LEVEL_BLUE + LEVEL_MASTER );
end;


ColorReplace Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
ColorReplace: REPLACECOLOR; {replaced color structure information}
begin
{Load a bitmap at its own bits per pixel}
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{Change the red color by rotating its hue 90 degree}
ColorReplace.crColor:= RGB(200, 0, 35);
ColorReplace.uFuzziness:= 100;
LEADImage1.ColorReplace(9000, 0, 0, @ColorReplace, 1);
end;


ColorRes example for Delphi

This example checks to see if the bitmap is 8 bits per pixel and converts it if it is not.

If Lead1.BitmapBits <> 8 Then
begin
Screen.Cursor := crHourglass;
Lead1.ColorRes(8, CRF_OPTIMIZEDPALETTE, CRF_FLOYDSTEINDITHERING, 0);
Lead1.ForceRepaint;
Screen.Cursor := crDefault;
End;


ColorResList Example for Delphi

This example changes the hue of bitmaps in a list, then plays the list as an animation. When changing the hue, it preserves the transparent color.

var
i: Integer; { Loop Counter }
uCount: Integer; { Number of bitmaps in the list }
TransparentColor: LongInt; { Color used for transparency }
begin
TransparentColor :=Lead1.BitmapTransparentColor;
{ Avoid repaints while we modify the bitmaps. }
Lead1.AutoRepaint := False;
{ Change the hue of each bitmap in the list, }
{ and restore the transparent color as the last color in the palette. }
uCount := Lead1.BitmapListCount;
for i := 0 to uCount - 1 do
begin
Lead1.BitmapListIndex:= i;
Lead1.Hue(i * 10);
Lead1.BitmapPalette[255] := TransparentColor;
end;
{ Get an optimized palette for the whole list. }
Lead1.ColorResList(8, CRF_OPTIMIZEDPALETTE, CRF_NODITHERING, 0);
{ Update the palette that is used for playback. }
for i := 0 to 255 do
Lead1.AnimationPalette[i] := Lead1.BitmapPalette[i];
{ Start the animation. }
Lead1.AutoRepaint := True;
Lead1.AnimationEnable := True;
end;


ColorThreshold Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nI: L_INT;
CompData: TLEADCompDataArr;
begin

{ Load a bitmap at its own bits per pixel }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );

for nI:=0 to 2 do
begin
CompData[nI].nMinRange:= 128;
CompData[nI].nMaxRange:= 255;
CompData[nI].uFlags:= 0;
end;

{ Apply color Threshold effect on the image }
LEADImage1.ColorThreshold( CLTH_RGB_SPACE, CompData );
end;


Combine example for Delphi

This example copies the Lead1 bitmap to LeadTmp, trims and filters the copied image, and combines the filtered image with the original Lead1 bitmap. Trimming LeadTmp lets you see the difference between filtered and nonfiltered regions.

var
TrimLeft, TrimTop, TrimWidth, TrimHeight, DstLeft, DstTop, DstWidth, DstHeight, SrcLeft, SrcTop:Integer;
LeadTmp : TLeadImage;
begin
Screen.Cursor := crHourglass;
LeadTmp := TLeadImage.Create(Self);
LeadTmp.Visible := false;
LeadTmp.Parent := Self;
LeadTmp.Bitmap := Lead1.Bitmap;
TrimLeft := Round(LeadTmp.BitmapWidth * 0.2);
TrimTop := Round(LeadTmp.BitmapHeight * 0.2);
TrimWidth := Round(LeadTmp.BitmapWidth * 0.6);
TrimHeight := Round(LeadTmp.BitmapHeight * 0.6);
LeadTmp.Trim(TrimLeft, TrimTop, TrimWidth, TrimHeight);
LeadTmp.SpatialFilter(FLT_LINESEG_LTOR);
DstLeft := TrimLeft;
DstTop := TrimTop;
DstWidth := TrimWidth;
DstHeight := TrimHeight;
SrcLeft := 0;
SrcTop := 0;
Lead1.Combine(DstLeft, DstTop, DstWidth, DstHeight, LeadTmp.Bitmap, SrcLeft, SrcTop, CB_OP_ADD);
LeadTmp.Free;
Lead1.ForceRepaint;
Screen.Cursor := crDefault;
end;


CombineExt example for Delphi

This example copies the Lead1 bitmap to Lead2, trims and filters the copied image, and combines the filtered image with the original Lead1 bitmap image. Trimming Lead2 lets you see the difference between filtered and nonfiltered regions.

Var
TrimLeft: Integer;
TrimTop, TrimWidth, TrimHeight: Integer;
DstLeft, DstTop, DstWidth, DstHeight: Integer;
SrcLeft, SrcTop: Integer;
begin
LEADImage2.Bitmap := LEADImage1.Bitmap;
TrimLeft := Trunc(LEADImage2.BitmapWidth * 0.2);
TrimTop := Trunc(LEADImage2.BitmapHeight * 0.2);
TrimWidth := Trunc(LEADImage2.BitmapWidth * 0.6);
TrimHeight := Trunc(LEADImage2.BitmapHeight * 0.6);
LEADImage2.Trim (TrimLeft, TrimTop, TrimWidth, TrimHeight);
LEADImage2.SpatialFilter (FLT_LINESEG_HORZ);
DstLeft := TrimLeft;
DstTop := TrimTop;
DstWidth := TrimWidth;
DstHeight := TrimHeight;
SrcLeft := 0;
SrcTop := 0;
LEADImage1.CombineExt (DstLeft, DstTop, DstWidth, DstHeight, LEADImage2.Bitmap, SrcLeft, SrcTop, CB_OP_ADD);
LEADImage1.ForceRepaint();
end;


CombineWarp example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
ptSrc: TPoint;
aptsDest: TLEADCombineWarpDstPointsArray;

begin
LEADImage1.Load( 'e:\Master.jpg', 0, 1, 1 );
LEADImage2.Load ( 'e:\Slave.jpg', 0, 1, 1 );

ptSrc.X:= 0;
ptSrc.Y:= 0;

aptsDest [ 0 ].X:= 100;
aptsDest [ 0 ].Y:= 100;
aptsDest [ 1 ].X:= 200;
aptsDest [ 1 ].Y:= 75;
aptsDest [ 2 ].X:= 200;
aptsDest [ 2 ].Y:= 275;
aptsDest [ 3 ].X:= 100;
aptsDest [ 3 ].Y:= 175;

LEADImage1.CombineWarp(aptsDest, LEADImage2.Bitmap, ptSrc, LEADImage2.BitmapWidth, LEADImage2.BitmapHeight, CBW_BILINEAR );
end;


Comment example for Delphi

This example does the following:

1. | Loads an image from a TIFF file.
2. | Updates the current comment array by reading comments from the file.
3. | Modifies one of the comments.
4. | Modifies and saves the file.
5. | Reads the comment that was saved, and displays it in a message box.
 | This example handles only string comments. For more complex comments, refer to Exif Examples.

procedure TForm1.ReadComment1Click(Sender: TObject);
var
Empty: Variant; { For clearing comments }
MyCommentText: string; { String for CMNT_SZDESC }
NewCommentText: string; { String for CMNT_SZDESC that we read }
FilePath: string; { File to be updated }
i: Integer; { Counter }
nRet: Integer;
begin
{ Specify the file that we will update. }
FilePath := 'e:\image1.tif';
{ Specify the Empty variant for clearing comments. }
VarClear(Empty);
{ Get all of the current comments from the file. }
{ Temporarily disable method errors so that we do not fail when comments are missing. }
LeadImage1.EnableMethodErrors := False;
for i := 0 to CMNT_LAST do
begin
LeadImage1.Comment[i] := Empty;
LeadImage1.Comment[i] := LeadImage1.ReadComment(FilePath, 0, i);
end;
LeadImage1.EnableMethodErrors := True;
{ Load and modify the image. }
nRet:= LeadImage1.Load(FilePath, 0, 0, 1);
if(nRet = SUCCESS)then
begin
LeadImage1.Reverse();
{ Update the CMNT_SZDESC comment. }
MyCommentText := CHR(13) + 'This image has been reversed.';
LeadImage1.Comment[CMNT_SZDESC] := LeadImage1.Comment[CMNT_SZDESC] + MyCommentText;
{ Save the file and read the comment that we saved. }
LeadImage1.Save(FilePath, FILE_TIF, LeadImage1.BitmapBits, 0, SAVE_OVERWRITE);
NewCommentText := LeadImage1.ReadComment(FilePath, 0, CMNT_SZDESC);
{ Display the message. }
Application.MessageBox(PChar(NewCommentText), 'File Comments', mb_OK);
{ Clear the comments from memory. }
for i := 0 To CMNT_LAST do
LeadImage1.Comment[i] := Empty;
end;
end;


ContinueBrowse (Thumbnail Browser Control) example for Delphi

1.

Add the following units to the uses section:

LEADDef, LEADTyp.

2.

In the private section of the TForm1 class add the following decleration:

private

{ Private declarations }
…
nCount : Integer;
…

3.

Add the following to the TForm1.FormCreate procedure

procedure TForm1.FormCreate(Sender: TObject);
begin
…
nCount := 0 ;
…
end;

4.

Add the following code to the thumbnail event handler:

procedure TForm1.LEADThumb1ThumbnailEvent(Sender: TObject;
Bitmap: TBitmapHandle; FileName: String; nStatusCode, nPercent: Integer);
var
out : string;
begin
if (nStatusCode = 0) then {successful thumbnail generation}
begin
{save thumbnails in a multipage TIFF file}
LEADImage1.Bitmap := Bitmap;
LEADImage1.Save(‘c:\temp\thumbs.tif’, FILE_TIF, 24, 0, SAVE_APPEND);
nCount := nCount + 1;
if nCount > 20 then {allow max of 20 thumbnails}
begin
LEADThumb1.ContinueBrowse := False; {stop the browse}
nCount := 0;
exit;
end ;
out := FileName + #10;
out := out + 'Format: ' +IntToStr(LEADThumb1.InfoFormat)+ #10;
out := out + 'Compression: ' +LEADThumb1.InfoCompression + #10;
out := out + 'Bits: ' +IntToStr(LEADThumb1.InfoBits)+ #10;
out := out + 'Width: ' +IntToStr(LEADThumb1.InfoWidth)+ #10;
out := out + 'Height: ' +IntToStr(LEADThumb1.InfoHeight)+ #10;
out := out + 'Page: ' +IntToStr(LEADThumb1.InfoPage)+ #10;
out := out + 'TotalPages: ' +IntToStr(LEADThumb1.InfoTotalPages) + #10;
out := out + 'SizeDisk: ' +IntToStr(LEADThumb1.InfoSizeDisk) + #10;
out := out + 'SizeMem: ' +IntToStr(LEADThumb1.InfoSizeMem) + #10;
out := out + 'XRes: ' +IntToStr(LEADThumb1.InfoXRes) + #10;
out := out + 'YRes: ' +IntToStr(LEADThumb1.InfoYRes )+ #10;
ShowMessage(out);
end ;
LEADThumb1.ContinueBrowse := True; {continue the browse operation}
end;


ContourFilter example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: Integer;
begin
nRet:= LEADImage1.Load('e:\image1.cmp', 0, 1, 1);
if(nRet = SUCCESS)then
LEADImage1.ContourFilter(20, 35, 5, CONTOUR_APPROX_COLOR);
end;


Contrast example for Delphi

This example increases the contrast and repaints the image.

Lead1.Contrast(50);
Lead1.ForceRepaint;


ContrastBrightIntensity Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
LEADImage1.ContrastBrightIntensity(-146, 385, 240);
end;


ConvertToColoredGray example for Delphi

ConvertToColoredGray Delphi Example

{This example assumes there is a bitmap loaded}
var
RedFact, GreenFact, BlueFact, RedGrayFact, GreenGrayFact, BlueGrayFact: Integer;
begin
RedFact := 300;
GreenFact := 590;
BlueFact:= 110;
RedGrayFact:= 500;
GreenGrayFact:= 300;
BlueGrayFact:= 200;
// These arguments will transform the image into a grayscale image
LEADImage1.ConvertToColoredGray (RedFact, GreenFact, BlueFact, RedGrayFact, GreenGrayFact, BlueGrayFact);
end;


ConvertUnsignedToSigned example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
LEADImage1.LoadSigned:= True;
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load( 'c:\Image1.tif', 0, 0, 1 );

if ( Not LEADImage1.IsSigned) then
{ convert bitmap to signed }
LEADImage1.ConvertUnsignedToSigned( PROCESS_RANGE_ONLY );
end;


CopyMarkers example for Delphi

procedure TForm1.CopyMarkersClick(Sender: TObject);
var
i: Integer;
begin
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
LEADMarker2.CreateMarkers ( );
LEADImage1.CopyMarkers ( LEADMarker2, LEADMarker1 );

for i:= 0 to LEADMarker2.Count - 1 do
begin
LEADMarker2.GetMarker ( i );
ShowMessage ( 'Marker Type= ' + IntToStr(LEADMarker2.MarkerType) + Chr(13) +
'Marker Element Count= ' + IntToStr(LEADMarker2.ElementCount) );
end;
end;


Correlation Example for Delphi

procedure TForm1.Correlation1Click(Sender: TObject);
var
uNumOfPoints: L_UINT;
Points: Array [ 0..9 ] of TPoint;
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load( 'REDISTRIBUTABLE.CMP', 0, 1, 1 );
LEADImage2.Load ( 'T.CMP', 0, 1, 1 );

{Apply the correlation filter}
LEADImage1.Correlation( LEADImage2.Bitmap, @Points, 10, uNumOfPoints, 1, 2, 90 );
end;


CountLUTColors Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: L_INT;
uNumberOfEntries: L_UINT;
nFirstIndex: L_INT;
begin
{ check the linearity of the LUT and computes its window width and center
by using GetLinearVOILUT method. }

LEADImage1.Load('e:\image1.cmp', 0, 1, 1 );

if ( LEADImage1.IsSigned) then
begin
nRet:= LEADImage1.CountLUTColors( uNumberOfEntries, nFirstIndex, COUNT_LUT_SIGNED );
end
else
nRet:= LEADImage1.CountLUTColors ( uNumberOfEntries, nFirstIndex, COUNT_LUT_UNSIGNED );
if(nRet = SUCCESS) then
begin
ShowMessage( 'Number of entries = ' + IntToStr(uNumberOfEntries));
end;
end;


CreateBitmap, Size, and Combine example for Delphi

This example creates a bitmap for Lead2 (same size and BPS as Lead1) and fills it with green. It resizes the Lead1 bitmap, then uses a loop to do multiple combines with the Lead2 bitmap. It then copies the Lead2 bitmap to Lead1 and redisplays Lead1.

var
IntMyWidth, IntMyHeight, IntImageWidth, IntImageHeight, MyOp, MyBPS: Integer;
MyWidth, MyHeight, ImageWidth, ImageHeight, VFactor, HFactor: Single;
TestWidth, TestHeight, VSpacing, HSpacing: Integer;
SrcL, SrcT, DstT, DstL, DstW, DstH: Single;
begin
Screen.Cursor:= crHourGlass;
{ Create the Lead2 bitmap. (The control must already be on the form).}
MyWidth:= Lead1.BitmapWidth;
MyHeight:= Lead1.BitmapHeight;
MyBPS:= Lead1.BitmapBits;
Lead2.CreateBitmap(Round(MyWidth), Round(MyHeight), MyBPS);
Lead2.Fill(RGB(0, 255, 0)); { fill with green}
{ Resize the Lead1 bitmap}
ImageWidth:= round(MyWidth * 0.3);
ImageHeight:= round(MyHeight * 0.3);
Lead1.Size(Round(ImageWidth), Round(ImageHeight), SIZE_RESAMPLE);
{ Initialize the variables used for multiple combines.}
TestWidth:= round(MyWidth); { Used for horizontal positioning}
TestHeight:= round(MyHeight); { Used for vertical positioning}
IntMyWidth:= round(MyWidth); { Green bitmap width}
IntMyHeight:= round(MyHeight); { Green bitmap height}
IntImageWidth:= round(ImageWidth); { Resized bitmap width}
IntImageHeight:= round(ImageHeight); { Resized bitmap height}
VFactor:= round(MyHeight / ImageHeight) + 1; { Number spaces between images}
VSpacing:= round((IntMyHeight MOD IntImageHeight) / VFactor); { Pixels per space}
HFactor:= round(ClientWidth / ImageWidth) + 1; { Number spaces between images}
HSpacing:= round((IntMyWidth MOD IntImageWidth) / HFactor); { Pixels per space}
SrcL:= 0; { Left coordinate of the source rectangle}
SrcT:= 0; { Top coordinate of the source rectangle}
DstW:= ImageWidth; { Width of the destination rectangle}
DstH:= ImageHeight; { Height of the destination rectangle}
MyOp:= CB_OP_ADD or CB_DST_0; { Operation flags used when combining images}
{ Do the loop that does the multiple combines}
While TestHeight > IntImageHeight do { Vertical loop}
begin
DstT:= IntMyHeight - TestHeight + VSpacing;
TestHeight:= TestHeight - IntImageHeight - VSpacing;
While TestWidth > IntImageWidth do {Horizontal loop}
begin
DstL:= IntMyWidth - TestWidth + HSpacing;
TestWidth:= TestWidth - IntImageWidth - HSpacing;
Lead2.Combine(Round(DstL), Round(DstT), Round(DstW), Round(DstH), Lead1.Bitmap, Round(SrcL), Round(SrcT), MyOp);
end;
TestWidth:= IntMyWidth;
end;
{ Copy the Lead2 bitmap to Lead1}
Lead1.Bitmap:= Lead2.Bitmap;
Lead2.Bitmap := 0;
{Set the image display size to match the LEAD control}
Lead1.SetDstRect(0, 0, Lead1.BitmapWidth, Lead1.BitmapHeight);
Lead1.SetDstClipRect(0, 0, Lead1.BitmapWidth, Lead1.BitmapHeight);
Lead1.ForceRepaint; { Repaint the image}
Screen.Cursor:= crDefault;
end;


CreateMaskFromBitmapRgn Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: Integer;
begin
{ This example loads an image, sets a color region using black, }
{ and then creates a 1-bit mask image from that bitmap. }
nRet:= LEADImage1.Load ('IMAGE1.CMP', 0, 1, 1);
if(nRet = SUCCESS)then
begin
LEADImage1.SetRgnColor(RGB(0, 0, 0), L_RGN_SET);
nRet:= LEADImage1.CreateMaskFromBitmapRgn();
if(nRet = SUCCESS)then
LEADImage2.Bitmap:= LEADImage1.MaskBitmap;
end;
end;


CreateTB example for Delphi

// This example is also for:
// AutoSetTool Property, ButtonBitmapDown Property, ButtonBitmapUp Property,
// ButtonCount Property, ButtonMenuText Property, ButtonMenuTextID Property,
// ButtonTool Property, ButtonToolTipText Property, ButtonToolTipTextID Property,
// Visible Property, AnnToolbar Property

procedure TForm1.Button1Click(Sender: TObject);
begin
LEADAnn1.AnnToolbar.Visible:= False;
LEADAnn1.AnnToolbar.CreateTB (0, 0, ANNTOOLALIGN_TOP + ANNTOOLALIGN_LEFT);

LEADAnn1.AnnToolbar.AutoSetTool:= True;
LEADAnn1.AnnToolbar.ButtonTool [LEADAnn1.AnnToolbar.ButtonCount]:= ANNTOOL_USER_FIRST;

LEADAnn1.Load ('D:\Pictures\Ulay1.bmp', 0, 0, 1);
LEADAnn1.AnnToolbar.ButtonBitmapUp [LEADAnn1.AnnToolbar.ButtonCount]:= LEADAnn1.Bitmap;
LEADAnn1.Load ('D:\Pictures\Ulay2.bmp', 0, 0, 1 );
LEADAnn1.AnnToolbar.ButtonBitmapDown [LEADAnn1.AnnToolbar.ButtonCount]:= LEADAnn1.Bitmap;
LEADAnn1.Load ('D:\Pictures\Ulay3.bmp', 0, 0, 1);
LEADAnn1.AnnToolbar.ButtonToolTipTextID [LEADAnn1.AnnToolbar.ButtonCount]:= -1;
LEADAnn1.AnnToolbar.ButtonToolTipText [LEADAnn1.AnnToolbar.ButtonCount]:= 'User defined tool';

LEADAnn1.AnnToolbar.ButtonCount:= LEADAnn1.AnnToolbar.ButtonCount + 1;
LEADAnn1.AnnToolbar.Visible:= True;
LEADAnn1.AnnUserMode:= ANNUSERMODE_DESIGN;

LEADAnn1.AnnToolbar.ButtonMenuTextID [13, 1]:= -1;
LEADAnn1.AnnToolbar.ButtonMenuText [13, 1]:= 'My text
end;


CreateThumbnailFromFile example for Delphi

Procedure TForm1.Button1Click (Sender: TObject);
begin
LEADThumb1.LoadStamp:= False;
LEADThumb1.ForceSize:= True;
LEADThumb1.ThumbnailBackgroundColor:= RGB (0, 255, 0 ) ;
LEADThumb1.ThumbnailWidth:= 80;
LEADThumb1.ThumbnailHeight:= 40;

LEADThumb1.CreateThumbnailFromFile ('c:\temp\test.tif', 1);
LEADThumb1.CreateThumbnailFromFile ('c:\temp\test.tif', 2);
LEADThumb1.CreateThumbnailFromFile ('c:\temp\test.tif', 3);
end;

Procedure TForm1.LEADThumb1ThumbnailEvent (Sender: TObject;
Bitmap: TBitmapHandle; FileName: String; nStatusCode, nPercent: Integer);
Begin
if ((nStatusCode = 0) and (nPercent = 0) and (Bitmap <> 0)) then
begin
LEADImage1.Bitmap:= Bitmap;
ShowMessage ('pause');
end;
End;


Creating and Saving an Animated GIF File example for Delphi

The following example creates a multi-page file and saves it as an animated GIF image:

procedure TForm2.AnimateGIFClick(Sender: TObject);
var
nAngle: Integer;
begin
Lead1.Load('c:\lead\images\image1.cmp', 0, 0, 1);
Lead1.Size(Lead1.BitmapWidth div 5, Lead1.BitmapHeight div 5, SIZE_RESAMPLE);
Lead2.Bitmap := 0;
for nAngle := 1 to 36 do
begin
{ add a new page to the list }
Lead2.InsertBitmapListItem(LST_APPEND, Lead1.Bitmap);
{ make the new page active }
Lead2.BitmapListIndex := Lead2.BitmapListCount-1;
{ rotate each page 10 degrees more than the previous }
Lead2.Rotate(nAngle * 1000, False, clBlack);
Lead2.BitmapDelay := 100;
end;
Lead2.AnimationLoop := True;
Lead2.Save('c:\temp\Animated.gif', FILE_GIF, 8, 0, SAVE_OVERWRITE);
{ clear all the images in the list }
Lead2.BitmapList := 0;
{ start playing upon loading }
Lead1.AutoAnimate := True;
{ load the image that was saved }
Lead1.Load('c:\temp\Animated.gif', 0, 0, -1);
end;


Cubism Example for Delphi

procedure TForm1.CubismClick(Sender: TObject);
begin
LEADImage1.Cubism( 10, 20, 50, 4500, RGB(255,0,0), CUB_COLOR Or CUB_RECT Or CUB_RAND );
end;


CurveToBezier example for Delphi

var
i: Integer;
p: Array of TPOINT;
begin

LEADImage1.CurveClose:= CURVE_CLOSE;
LEADImage1.CurveSize := 4;
LEADImage1.CurveX[0] := 220;
LEADImage1.CurveY[0] := 10;
LEADImage1.CurveX[1] := 10;
LEADImage1.CurveY[1] := 30;
LEADImage1.CurveX[2] := 20;
LEADImage1.CurveY[2] := 240;
LEADImage1.CurveX[3] := 250;
LEADImage1.CurveY[3] := 260;
LEADImage1.CurveTension:= 0.35;
LEADImage1.CurveType:= CURVE_STANDARD;
LEADImage1.SetRgnCurve(L_POLY_WINDING, L_RGN_SET);
LEADImage1.RgnFrameType:= ftAnimated;

LEADImage1.CurveToBezier();
SetLength ( p, LEADImage1.BezierSize ) ;
for i:=0 to LEADImage1.BezierSize -1 do
begin
p[i].x:= LEADImage1.BezierX[i];
p[i].y:= LEADImage1.BezierY[i];
end;
Canvas.PolyBezier(p) ;
end;


Cylindrical Example for Delphi

procedure TForm1.CylindricalClick(Sender: TObject);
begin
LEADImage1.Cylindrical( 100, CYL_HORZ );
end;


DDB example for Delphi

This example copies the Lead1 bitmap to the clipboard as a DDB. It pastes the DDB into Lead2 and reverses the image. It then gets a DDB from Lead2, sets the same DDB to Lead1, and repaints.

procedure TForm1.Button3Click(Sender: TObject);
var
MyFlags: Integer;
MyDC, MyDDB, MyPalette: THandle;
begin
Screen.Cursor := crHourglass;
{Copy the bitmap to the clipboard}
MyFlags := COPY_EMPTY or COPY_DDB or COPY_PALETTE;
Lead1.Copy(MyFlags);
{Paste the image onto the second bitmap.}
If Lead2.Paste(PASTE_ISREADY) = 0 Then
begin
ShowMessage ('Invalid data on the clipboard');
end
Else
begin
Lead2.Paste(0);
end;
{Reverse the image so that we can see that it has changed.}
Lead2.Reverse;
{Make the second control visible so that we can get the client DC.}
Lead2.AutoScroll := False; {We do not need to see scrollbars.}
Lead2.Visible := True;
{Get the client DC and use it when creating a DDB.}
MyDC := Lead2.GetClientDC;
MyDDB := Lead2.GetDDB(MyDC);
{Get the palette handle.}
MyPalette := Lead2.GetBitmapPalette(MyDC);
{Keep the old display rectangles so that we do not have to recalculate.}
Lead1.AutoSetRects := False;
{Copy the DDB to the first control and repaint it.}
Lead1.SetDDB(MyDC, MyDDB, MyPalette);
Lead1.ForceRepaint;
{Clean up.}
Lead2.ReleaseClientDC;
Lead2.Visible := False;
Screen.Cursor := crDefault;
end;


Deinterlace Example for Delphi

procedure TForm1.DeinterlatedClick(Sender: TObject);
begin
LEADImage1.Deinterlace( DEINTERLACE_SMOOTH Or DEINTERLACE_ODD );
end;


DeleteBitmapListItems example for Delphi

This example deletes the first five bitmaps from the control's bitmap list. Then, it plays the animation to show that the bitmaps are missing.

{Delete the first five bitmaps.}
Lead1.DeleteBitmapListItems(0, 5);
{Play the animation without looping.}
Lead1.AnimationLoop := False;
Lead1.AnimationEnable := True;


DeleteMarker example for Delphi

procedure TForm1.DeleteMarkerClick(Sender: TObject);
begin
LEADImage1.Load ( 'e:\image1.jpg', 0, 0, 1 );
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
LEADMarker1.GetMarker ( 0 );
LEADMarker1.DeleteMarker ( LEADMarker1.MarkerType, 0 );
LEADImage1.SetMarkers ( LEADMarker1, 0 );
LEADImage1.Save ( 'e:\image2.jpg', FILE_EXIF_JPEG, 24, 2, 0 );
end;


DeleteMarkerAt example for Delphi

procedure TForm1.DeleteMarkerAtClick(Sender: TObject);
begin
LEADImage1.Load ( 'e:\image1.jpg', 0, 0, 1 );
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
LEADMarker1.GetMarker ( 0 );
LEADMarker1.DeleteMarkerAt ( 0 );
LEADImage1.SetMarkers ( LEADMarker1, 0 );
LEADImage1.Save ( 'e:\image2.jpg', FILE_EXIF_JPEG, 24, 2, 0 );

end;


DeletePage example for Delphi

{ delete page 1 from TEST.TIF }
LEAD1.DeletePage('C:\IMAGES\TEST.TIF', 1);


Desaturate Example for Delphi

procedure TForm1.DesaturateClick(Sender: TObject);
begin
LEADImage1.Desaturate( );
end;


Deskew example for Delphi

LEADImage1.Deskew (clBlack, DSKW_PROCESS + DSKW_NOFILL + DSKW_DOCUMENTIMAGE, Nil ) ;
LEADImage1.ForceRepaint ( ) ;


Despeckle example for Delphi

This example automatically removes specks from the bitmap and repaints the image. Use this on a 1-bit bitmap such as a scanned document.

Lead1.Despeckle;
Lead1.ForceRepaint;


DIB example for Delphi

This example copies the LEADImage1 bitmap to the clipboard as a DIB. It pastes the DIB into LEADTmp and reverses the image. It then gets a DIB from LEADTmp, sets the same DIB to LEADImage1, and repaints.

procedure TForm1.SetDIB1Click(Sender: TObject);
var
MyFlags: Integer;
MyDib: THandle;
LeadTmp: TLeadImage;
begin
Screen.Cursor := crHourglass;
LEADTmp := TLEADImage.Create(Self);
LEADTmp.Visible := False;
LEADTmp.Parent := self;
MyFlags := COPY_EMPTY + COPY_DIB + COPY_PALETTE;
LEADImage1.Copy(MyFlags);
if LEADTmp.Paste(PASTE_ISREADY) = 0 Then
ShowMessage('Invalid data on the clipboard')
else
LEADTmp.Paste(0);
LEADTmp.Reverse;
MyDib := LEADTmp.GetDIB(DIB_BITMAPV5HEADER);
LEADImage1.AutoSetRects := False;
LEADImage1.SetDIB(MyDib);
LEADTmp.Free();
LEADImage1.ForceRepaint();
Screen.Cursor := crDefault;
end;


DiceEffect Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('e:\\image1.cmp', 0, 1, 1 );

{ Apply Dice Effect for this bitmap }
LEADImage1.DiceEffect(16, 16, 0, RGB(0,0,0), BITMAP_RESIZE + DICE_SIZE + DICE_BORDER);
end;


DigitalSubtract Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmaps, keeping the bits per pixel of the file }
LEADImage1.Load ('Destination.cmp', 0, 1, 1 );
LEADImage2.Load ('source.cmp', 0, 1, 1 );
LEADImage1.DigitalSubtract (LEADImage2.Bitmap, DS_CONTRASTENH );
// Now we have the resulting image in LiveBmp
end;


DirectionEdgeStatistical Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);

begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );

{ Find the edges in the bitmap }
LEADImage1.DirectionEdgeStatistical(15, 128, 4500, RGB(255, 255, 255), RGB(0, 0, 0));

end;


DiscreteFourierTransformation Example for Delphi

{ This example loads a bitmap and applies DFT function. }
procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file *}
LEADImage1.Load ('image1.cmp', 0, 1, 1 );

{Allocate FT buffer}
LEADImage1.InitFourierTransformationData ();

{ Apply DFT }
LEADImage1.DiscreteFourierTransformation ( 0, 0, Trunc(LEADImage1.BitmapWidth / 4), Trunc(LEADImage1.BitmapHeight / 2), DFT_DFT + DFT_GRAY + DFT_RANGE + DFT_INSIDE_X + DFT_OUTSIDE_Y );

{ Free FT buffer }
LEADImage1. FreeFourierTransformationData( );
end;


DisplayFourierTransformation Example for Delphi

{This example loads a bitmap, applies the Discrete Fourier Transform function to it,
and displays the data}
procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('e:\image1.cmp', 0, 1, 1 );

{Initialize buffer}
LEADImage1.InitFourierTransformationData ();

{ apply DFT}
LEADImage1.DiscreteFourierTransformation ( 0, 0, Trunc(LEADImage1.BitmapWidth / 4), Trunc(LEADImage1.BitmapHeight / 2), DFT_DFT + DFT_GRAY + DFT_RANGE + DFT_INSIDE_X + DFT_OUTSIDE_Y );

{plot frequency magnitude}
LEADImage1.DisplayFourierTransformation( DSP_FT_MAG + DSP_FT_LOG );

{Frees buffer}
LEADImage1.FreeFourierTransformationData ( );
end;


DJVResolution example for Delphi

//Set new DJV resolution
LEADImage1.DJVResolution := 120;

//Now load the DJV file
LEADImage1.Load('c:\Image1.DJVU', 0, 1, 1);


DocCleanBitmap example for Delphi

procedure TForm1.Button2Click(Sender: TObject);
var
nRet : Integer;
begin
{Smooth}
{This example smooths all nicks and bumps up to 2 pixels in length}
{Long bumps/nicks are treated before short bumps/nicks}
{A LEAD region is updated to show all the changes}
{The Smooth Event is used to display information about bump or nick}

LEADImage1.DocCleanSuccess := SUCCESS_REMOVE;
nRet := LEADImage1.Smooth (2, SMOOTH_SINGLE_REGION Or
SMOOTH_LEAD_REGION Or SMOOTH_FAVOR_LONG);
If (nRet = SUCCESS) Then
begin
LEADImage1.FreeRgn;
LEADImage2.Bitmap := LEADImage1.DocCleanBitmap; {copy the result so we can get the rgn handle}
LEADImage1.SetRgnHandle (LEADImage2.GetRgnHandle, 0, 0, L_RGN_SET);
LEADImage2.Bitmap := 0; {no longer need copy}
LEADImage1. DocCleanBitmap := 0; {no longer need rgn either}
LEADImage1.RgnFrameType := ftAnimated;
end ;
end;

procedure TForm1.LEADImage1Smooth (Sender: TObject; nBumpOrNick, nStartRow,
nStartCol, nLength, uHorV: Integer);

var
sOutput : String;
sType : String;
sHorV : String;
szTemp : array[0..255]of Char;
begin
if (nBumpOrNick = SMOOTH_BUMP) then
sType := 'Bump'
else
sType := 'Nick';

if (uHorV = SMOOTH_HORIZONTAL_ELEMENT) then
sHorV := 'Horz.'
else
sHorV := 'Vert.';

sOutput := Format('Fount %s at %d,%d Length %d - %s',
[sType,nStartCol,nStartCol,nLength,sHorV]);

OutputDebugString(StrPCopy(szTemp,sOutput));
end;


DocCleanSuccess example for Delphi

procedure TForm1.Button3Click(Sender: TObject);
var
nRet : Integer;
begin

{This example updates a region with all 1x1 to 3x3 specks that are solid black}
{If a speck has any white pixels, it is NOT part of the updated region }
{The call is configured to update a single LEAD region with all changes}
{The image itself is unchanged}
{The DotRemove Event is used to display information about each speck that is removed}

nRet := LEADImage1.DotRemove (DOT_USE_SIZE Or DOT_SINGLE_REGION Or DOT_LEAD_REGION Or DOT_IMAGE_UNCHANGED, 1, 1, 3, 3);
if (nRet = SUCCESS) then
begin
LEADImage1.FreeRgn;
LEADImage2.Bitmap := LEADImage1.DocCleanBitmap; {copy the result so we can get the rgn handle}
LEADImage1.SetRgnHandle (LEADImage2.GetRgnHandle, 0, 0, L_RGN_SET);
LEADImage2.Bitmap := 0; {no longer need copy}
LEADImage1.DocCleanBitmap := 0; {no longer need rgn either}
LEADImage1.RgnFrameType := ftAnimated;
end;
end;

procedure TForm1.LEADImage1DotRemove (Sender: TObject; hDotRgn: L_HRGN;
nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth,
nBoundingRectHeight, iWhiteCount, iBlackCount: Integer);

var
nRet : LongInt;
sOutput : String;
szTemp : array[0..255] of Char;
begin
sOutput := Format('Dot Found at %d,%d,%d,%d WhiteCount= %d BlackCount= %d',
[nBoundingRectLeft,
nBoundingRectTop,
nBoundingRectWidth,
nBoundingRectHeight,
iWhiteCount,
iBlackCount]);

OutputDebugString(StrPCopy(szTemp,sOutput));
{Do not remove the speck if it contains any white pixels}

If (iWhiteCount > 0) Then
nRet := SUCCESS_NOREMOVE
Else
nRet := SUCCESS_REMOVE;

LEADImage1.DocCleanSuccess := nRet
end;


DrawShape example for Delphi

This example demonstrates most of the three-dimensional shape properties as it draws a rectangle on the current bitmap. For example purposes, both inner and outer bands are turned on. However, normal three-dimensional effects use inner bands or outer bands, but not both.

Lead1.AutoRepaint := False;
{Load an image for the main control}
Lead1.Load ('d:\ltwin11\images\image1.cmp', 0, 0, 1);
{Load an image for the background of the shape}
Lead2.Load ('d:\ltwin11\images\ulay1.bmp', 0, 0, 1);
{Shape background}
Lead1.ShapeBackgroundStyle := sbsTiledImage;
Lead1.BackgroundImageTop := 0;
Lead1.BackgroundImageLeft := 0;
Lead1.BackgroundImageWidth := Lead2.BitmapWidth;
Lead1.BackgroundImageHeight := Lead2.BitmapHeight;
{Shape location}
Lead1.ShapeTop := 50;
Lead1.ShapeLeft := 50;
Lead1.ShapeWidth := Lead1.DstWidth - 50;
Lead1.ShapeHeight := Lead1.DstHeight - 50;
{Shape border}
Lead1.ShapeBorderColor := RGB(255, 0, 0);
Lead1.ShapeBorderStyle := sbrSolid;
Lead1.ShapeBorderThickness := 10;
Lead1.ShapeInnerBandHiliteColor := RGB(255, 255, 255);
Lead1.ShapeInnerBandShadowColor := 0;
Lead1.ShapeInnerBandStyle := sibRaised;
Lead1.ShapeInnerBandThickness := 2;
Lead1.ShapeOuterBandHiliteColor := RGB(0, 255, 0);
Lead1.ShapeOuterBandShadowColor := RGB(128, 128, 128);
Lead1.ShapeOuterBandStyle := sobRaised;
Lead1.ShapeOuterBandThickness := 2;
{Make the shape a permanent part of the bitmap}
Lead1.DrawPersistence := True;
{Draw the shape}
Lead1.DrawShape (EFX_SHAPE_RECTANGLE, Lead2.Bitmap);
{Repaint}
Lead1.AutoRepaint := True;


DrawStar Example for Delphi

procedure TForm1.DrawStarClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.DrawStar ( ptCenter, 5, Trunc(LEADImage1.BitmapWidth/2), Trunc(LEADImage1.BitmapHeight/2), 50, 0, 0, 0, 0, 0, 0, RGB(255, 0, 255), RGB(0, 255, 255), 100, STR_INSIDE );
end;


DrawTextStr example for Delphi

This example demonstrates most of the properties of a three-dimensional text object as it draws rotated text on the current bitmap.

Lead1.AutoRepaint := False;
{Load an image for the main control}
Lead1.Load ('c:\lead\images\image1.cmp', 0, 0, 1);
{Load an image for the foreground of the text}
Lead2.Load ('c:\lead\images\ulay1.bmp', 0, 0, 1);
{Only TrueType fonts can be rotated}
Lead1.TextFont.Name := 'Times New Roman';
Lead1.TextFont.Size := 72;
{Text location}
Lead1.TextTop := 50;
Lead1.TextLeft := 50;
Lead1.TextWidth := Lead1.DstWidth - 50;
Lead1.TextHeight := Lead1.DstHeight - 50;
{The foreground image needs to be the correct size.}
Lead2.Size (Lead1.TextWidth, Lead1.TextHeight, 0);
{Text alignment and angle}
Lead1.TextAlign := etaHcenterVcenter;
Lead1.TextAngle := 450; {45 degrees}
{Text highlight color and style}
Lead1.TextHiliteColor := RGB(255, 255, 255);
Lead1.TextStyle := etsDropShadow;
{Text drop shadow}
Lead1.ShadowColor := RGB(0, 0, 0);
Lead1.ShadowXDepth := 5;
Lead1.ShadowYDepth := 5;
{Make the text a permanent part of the bitmap}
Lead1.DrawPersistence := True;
{Draw the text}
Lead1.DrawTextStr ('LEADTOOLS', Lead2.Bitmap);
Lead1.ForceRepaint();


DropFilesAllowed example for Delphi

Take the following steps to demonstrate the use of the Drag and Drop features of the main control:

1.

Add a button to the main form and code its click procedure as follows:

procedure TForm1.Button1Click(Sender: TObject);
begin
Lead1.DropFilesAllowed := not Lead1.DropFilesAllowed;

if (Lead1.DropFilesAllowed = TRUE) then
Lead1.DropAutoLoad:= TRUE
else
Lead1.DropAutoLoad:= FALSE;
end;

2.

Code the OnDropFile Event for the main control as follows:

procedure TForm1.Lead1DropFile(Sender: TObject; fName: String);
var
msg : string;
begin
msg := 'You have dropped the following file on the main control: ' + fName ;
ShowMessage(msg) ;
end;


Dry Example for Delphi

procedure TForm1.DryClick(Sender: TObject);
begin
LEADImage1.Dry( 5 );
end;


Dst... example for Delphi

Calculate the values to zoom in by 10 percent and center the image.

Lead1.AutoScroll := False;
Lead1.DstWidth := (Lead1.DstWidth * 110) div 100;
Lead1.DstHeight := (Lead1.DstHeight * 110) div 100;
Lead1.DstTop := (Lead1.Height - Lead1.DstHeight) div 2;
Lead1.DstLeft := (Lead1.Width - Lead1.DstWidth) div 2;
{Set the clipping area to the same as the destination rectangle}
Lead1.DstClipWidth := Lead1.DstWidth;
Lead1.DstClipHeight := Lead1.DstHeight;
Lead1.DstClipTop := Lead1.DstTop;
Lead1.DstClipLeft := Lead1.DstLeft;
{Redisplay the image}
Lead1.ForceRepaint;


DynamicBinary Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmaps, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{ convert it into a black and white image without changing its bits per pixel }
LEADImage1.DynamicBinary ( 8, 16);
end;


EdgeDetectEffect Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );
{ Apply find edges effect on the image }
LEADImage1.EdgeDetectEffect(50, 0, EDGE_SOFT);
end;


EdgeDetector example for Delphi

LEADImage1.EdgeDetector (60, EDG_SOBEL_ALL);


EdgeDetectStatistical Example for Delphi

procedure TForm1.EdgeDetectStaticClick(Sender: TObject);
begin
LEADImage1.EdgeDetectStatistical( 15, 128, RGB(255, 255, 255), RGB(0, 0, 0) );
end;


Emboss example for Delphi

This example applies an emboss effect and repaints the image.

Lead1.Emboss(EMBOSS_NE, 500);
Lead1.ForceRepaint;


EnableFloater example for Delphi

procedure TForm1.FormButton1Click(Sender: TObject);
Begin
Lead1.AutoFloater := True;
Lead1.RgnMarkingMode := mmRectangle;
Lead1.RgnFrameType:= ftStatic;
Lead1.EnableFloater := True;
ShowMessage('Use the mouse to create a floater and move it');
End;


EnableKeyboard (ImageList Control) example for Delphi

{disable keyboard processing}
LEADImgList1.EnableKeyboard := False;


EnableMethodErrors (ImageList Control) example for Delphi

procedure TForm1.LEADImgList1Click (Sender: TObject);
var
lIndex : LongInt;
MousePoint : TPoint;
begin
GetCursorPos(MousePoint);
MousePoint := LEADImgList1.ScreenToClient(MousePoint);
if LEADImgList1.AllowSelection = ALLOWSELECTION_NONE then {manual selection?}
begin
LEADImgList1.EnableMethodErrors:= False;
lIndex := LEADImgList1.HitTest (MousePoint.x,MousePoint.y); {did we hit an item?}
LEADImgList1.EnableMethodErrors:= True;
if ((lIndex >= 0) and (lIndex < LEADImgList1.Count)) then
begin
{ set item as selected}
LEADImgList1.SelectAll (False);
LEADImgList1.Item [lIndex].Selected := True; {make sure the item is selected}
end
end
end;


EnableMethodErrors (Thumbnail Browser Control) example for Delphi

{disable method errors}
LEADThumb1.EnableMethodErrors := false;


EnableMethodErrors example for Delphi

This example disables method errors temporarily so that it can give the user guidance about a particular error (an out-of-range shear angle in this case):

procedure TForm1.Button3Click(Sender: TObject);
var
ShearAngle, nRet: Integer;

begin
ShearAngle := 5500; { suppose user enters 55 degrees }
Lead1.EnableMethodErrors := False;
nRet := Lead1.Shear(ShearAngle, TRUE, RGB(0,0,255));
If nRet = ERROR_INV_PARAMETER Then
ShowMessage('The angle must be within +/- 45 degrees')
Else
Lead1.ForceRepaint;
Lead1.EnableMethodErrors := True;

end;


EnableOLEDragMethod (ImageList Control) example for Delphi

Note: | Add two LEAD Image List Controls to your Form (LEADImgList1, LEADImgList2).
Note: | Also add two buttons and name them btnStartDrag and btnStopDrag.

procedure TForm1.btnStartDragClick(Sender: TObject);
begin
LEADImgList1.LoadFromFile('c:\Image1.tif', 0, 0, -1);
LEADImgList1.AllowSelection := ALLOWSELECTION_SINGLE ;
LEADImgList1.EnableOLEDragMethod := True;
LEADImgList2.EnableOLEDragMethod := True;

LEADImgList1.OLEDragCursor := Self.Icon.Handle;
LEADImgList2.OLEDragCursor := Self.Icon.Handle;
end;

procedure TForm1.btnStopDragClick(Sender: TObject);
begin
LEADImgList1.EnableOLEDragMethod := False;
LEADImgList2.EnableOLEDragMethod := False;
end;

procedure TForm1.LEADImgList1OLEGiveFeedback(var bUseDefaultCursor: Boolean);
begin
bUseDefaultCursor:= False;
end;


EnableOLEDragMethod (Main Control) example for Delphi

Note: | Add two LEAD Main Controls to your Form (LEADImage1, LEADImage2).
Note: | Add two buttons and name them btnStartDrag and btnStopDrag.

procedure TForm1.btnStartDragClick(Sender: TObject);
begin
LEADImage2.Load('v:\images\image1.cmp', 0, 1, 1 );
LEADImage1.EnableOLEDragMethod := True;
LEADImage2.EnableOLEDragMethod := True;

LEADImage1.OLEDragCursor := Self.Icon.Handle;
LEADImage2.OLEDragCursor := Self.Icon.Handle;
end;

procedure TForm1.btnStopDragClick(Sender: TObject);
begin
LEADImage1.EnableOLEDragMethod:= False;
LEADImage2.EnableOLEDragMethod:= False;
end;

procedure TForm1.LEADImage1OLEGiveFeedback(var bUseDefaultCursor: Boolean);
begin
bUseDefaultCursor:= False ;
end;

procedure TForm1.LEADImage2OLEGiveFeedback(var bUseDefaultCursor: Boolean);
begin
bUseDefaultCursor:= False;
end;


EnableZoomInRect example for Delphi

This example toggles the EnableZoomInRect property.

{Toggle the ZoomInRect setting}
If (Lead1.EnableZoomInRect = True) Then
Lead1.EnableZoomInRect := False
Else
Lead1.EnableZoomInRect := True;


EnumTags Example for Delphi

procedure TForm1.btnEnumTagsClick(Sender: TObject);
begin
LEADImage1.EnumTags('clean.tif', 0, 0);
end;

procedure TForm1.LEADImage1EnumTags(uTag, uType: Word; uCount: Cardinal;
var bContinue: Boolean);
begin
// Displaying the Tag's Info.
ShowMessage('Tag = ' + IntToStr(uTag) + Chr(13) +
'Type = ' + IntToStr(uType) + Chr(13) +
'uCount = ' + IntToStr(uCount));

bContinue:= True; // Keep enumerating tags.
end;


Error (ImageList Control) example for Delphi

LEADImgList1.EnableMethodErrors:= true;

try
LEADImgList1.LoadFromFile ('d:\temp\img\test1.tif', 0, 0, -1);
except

ShowMessage('Error Code :' + IntToStr(LEADImgList1.Error) +#10+ LEADImgList1.ErrorMsg );
end;


ErrorMsg (Main Control) example for Delphi

Lead1.EnableMethodErrors := true;
try
Lead1.Load('c:\bad_name.xyz', 0, 0, 1);
except
ShowMessage('File load failed'#10'Error No ' + IntToStr(Lead1.Error) + #10 + Lead1.ErrorMsg);
end;


Exif example for Delphi

This example does the following:

1. | Reads all of the comments in an existing Exif file, updating the Comment array.
2. | Loads and modifies the file's image.
3. | Updates some of the comments in the comment array.
4. | Saves the file.
5. | Reads and displays the updated comments.

Note:

Comments for GIF, TIFF, and DICOM files are simpler than the ones in this Exif example. With those file types, all of the comments are strings that you can get and set with simple assignments.

To compile this example, you should add LEADDEF to the uses section of your unit file.

procedure TForm1.Button1Click(Sender: TObject);
var
Empty: Variant; { For clearing comments }
SubjectDistance: Variant; { Array for CMNT_SUBJECTDISTANCE }
NewSubjectDistance: Variant; { Array to be updated by ReadComment }
NewDateTime: string; { String to be updated by ReadComment }
MyComment: Variant; { Array for CMNT_USERCOMMENT }
MyCommentText: string; { String for CMNT_USERCOMMENT }
MyCommentSize: Integer; { Size of the comment array }
NewComment: Variant; { Array to be updated by ReadComment }
NewCommentText: string; { String for CMNT_USERCOMMENT that we read }
TmpString: string; { For parsing the comment string into bytes }
FilePath, DistanceString, ThisDate, ThisTime, MyMsg: string; {Miscellaneous }
ArraySize, LowerBound, UpperBound: Integer; { Array measurements }
i: Integer; { Counter }

begin
{ Create the Subject Distance arrays. }
SubjectDistance := VarArrayCreate([0, 1], varInteger);
NewSubjectDistance := VarArrayCreate([0, 1], varInteger);

{ Specify the file that we will update. }
FilePath := 'd:\lead\images\exif1.tif';

{ Specify the Empty variant for clearing comments. }
VarClear(Empty);

{ Get all of the current comments from an Exif file. }
{ Temporarily disable method errors so that we do not fail when comments are missing. }
Lead1.EnableMethodErrors := False;
for i := 0 to CMNT_LAST do
begin
Lead1.Comment[i] := Empty;
Lead1.Comment[i] := Lead1.ReadComment(FilePath, 0, i);
end;
Lead1.EnableMethodErrors := True;

{ Load and modify the image. }
Lead1.Load(FilePath, 0, 0, 1);
Lead1.Reverse();

{ Update the date when the file is generated. }
ThisDate := FormatDateTime('yyyy:mm:dd hh:nn:ss', Now);
Lead1.Comment[CMNT_SZDATETIMEDIGITIZED] := ThisDate;
Lead1.Comment[CMNT_SZSUBSECTIMEDIGITIZED] := Empty;

{ Change the subject distance to 4 1/3 meters. }
SubjectDistance[0] := 13;
SubjectDistance[1] := 3;
Lead1.Comment[CMNT_SUBJECTDISTANCE] := SubjectDistance;

{ Specify the user comment string. }
MyCommentText := 'This is my new comment.';
MyCommentSize := 8 + StrLen(PChar(MyCommentText));

{ Define the array for the user comment. }
MyComment := VarArrayCreate([0, MyCommentSize], varByte);

{ Fill in the ASCII prefix. }
MyComment[0] := Byte ('A');
MyComment[1] := Byte ('S');
MyComment[2] := Byte ('C');
MyComment[3] := Byte ('I');
MyComment[4] := Byte ('I');
MyComment[5] := Byte (0);
MyComment[6] := Byte (0);
MyComment[7] := Byte (0);

{ Fill in the rest of the comment. }
for i := 8 to (MyCommentSize - 1) do
begin
TmpString := Copy(MyCommentText, i-7, 1);
MyComment[i] := Byte (TmpString[1]);
end;
MyComment[MyCommentSize] := Byte (0);

{ Update the user comment. }
Lead1.Comment[CMNT_USERCOMMENT] := Empty;
Lead1.Comment[CMNT_USERCOMMENT] := MyComment;

{ Save the file and read the comments that we saved. }
Lead1.Save(FilePath, FILE_EXIF, 24, 0, SAVE_OVERWRITE);

NewDateTime := Lead1.ReadComment(FilePath, 0, CMNT_SZDATETIMEDIGITIZED);
NewSubjectDistance := Lead1.ReadComment(FilePath, 0, CMNT_SUBJECTDISTANCE);
NewComment := Lead1.ReadComment(FilePath, 0, CMNT_USERCOMMENT);

{ Interpret the Subject-Distance RATIONAL. }
DistanceString := FloatToStr(NewSubjectDistance[0] / NewSubjectDistance[1]);

{ Initialize the string for the message box. }
MyMsg := 'Subject Distance = ' + DistanceString + CHR(13) + 'Date/Time = ' + NewDateTime;

{ Add the ASCII comment if it is there. }
if NewComment[0] = Byte ('A') then
begin
UpperBound := VarArrayHighBound(NewComment, 1);
LowerBound := VarArrayLowBound(NewComment, 1);
ArraySize := UpperBound - LowerBound;
for i := 8 to ArraySize do
begin
NewCommentText := NewCommentText + Chr(Integer(NewComment[i]));
end;
MyMsg := MyMsg + CHR(13) + CHR(13) + NewCommentText;
end;

{ Display the message. }
Application.MessageBox(PChar(MyMsg), 'File Comments', mb_OK);

{ Clear the comments from memory. }
for i := 0 To CMNT_LAST do Lead1.Comment[i] := Empty;

end;


ExportBitmapList example for Delphi

procedure TForm1.btnExportBitmapListClick(Sender: TObject);
var
nRet: L_INT;
hExportedBitmapList: HBITMAPLIST;
begin
// Check if the ImageList control has more than 4 images.
if(LEADImgList1.Count > 4)then
begin
nRet:= LEADImgList1.ExportBitmapList (1, 2, hExportedBitmapList);
if(nRet = SUCCESS)then
begin
// Check if the hExportedBitmapList updated successfully.
if(hExportedBitmapList <> 0)then
begin
LEADImage1.BitmapList:= hExportedBitmapList;
end;
end
else
ShowMessage('Error: ' + IntToStr(nRet));
end
else
ShowMessage('Try to add more files to the image list control');
end;


ExtractMessage Example for Delphi

procedure TForm1.ExtractMessageClick(Sender: TObject);
var
nRet: L_INT;
strMsg: String;
strPassword: String;
strFileName: String;
strDirectory: String;
ptStart: TPoint;
begin
nRet:= LEADImage1.ExtractMessage( strMsg, strPassword, strFileName, strDirectory, ptStart );
{Check if the extracted message is a text or file }
if ( nRet = SUCCESS ) then
begin
MessageBox ( Handle, pChar(strMsg), 'Extracted Message', MB_OK )
end
else
MessageBox ( Handle, 'No message', 'Error', MB_OK );
end;


FastFourierTransformation Example for Delphi

{ This example loads a bitmap and applies a FFT transformation. }
procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{ Resize the bitmap to make sure the bitmap dimensions are power of two }
LEADImage1.Size(256, 512, SIZE_BICUBIC);

{Allocate FFT buffer}
LEADImage1.InitFourierTransformationData ( );

{Apply FFT }
LEADImage1. FastFourierTransformation( FFT_FFT + FFT_GRAY );

{ Free FFT buffer }
LEADImage1.FreeFourierTransformationData ( );
end;


FastRotate example for Delphi

Note:

This topic is for Document/Medical editions only.

This example uses fast rotation to rotate an image 90 degrees:

Lead1.FastRotate (90);


FeatherAlphaBlend example for Delphi

LEADImage2.CreateBitmap (800, 600, 24);
LEADImage2.SetRgnRoundRect (50, 50, 500, 500, 150, 150, L_RGN_SET);
LEADImage3.CreateFadedMask (LEADImage2.Bitmap, 60, 20, 3, 0, FADE_DUMPFILL + FADE_NOTRANSPARENCY, 255, RGB (0, 0, 255));
LEADImage2.Load ('v:\images\image2.cmp', 0, 1, 1);
LEADImage1.FeatherAlphaBlend (0, 0, LEADImage3.BitmapWidth, LEADImage3.BitmapHeight, LEADImage2.Bitmap, 0, 0, LEADImage3.Bitmap);


FeedLoad example for Delphi

This example uses StartFeedLoad, FeedLoad, and StopFeedLoad and loads a file through a buffer to simulate receiving a transmitted image.

procedure TForm1.Button1Click(Sender: TObject);
Const BUFFERSIZE = 1000;
Var
MyBufferPtr: Pointer;
BytesRead: Longint;
FileHandle: integer;
label quit_function;

begin
{ Declare a buffer that you will use to feed the file-load process.}
MyBufferPtr := AllocMem(BUFFERSIZE);

{ Declare other local variables.}
{ Open an image file and get its length.}
FileHandle := FileOpen( 'c:\lead\images\image1.cmp', fmOpenRead );
{ Set PaintWhileLoad so that we can watch the progress.}
Lead1.PaintWhileLoad := True;
{ Initialize the file-load process.}
{ Specify the default bits per pixel and first page}
If Lead1.StartFeedLoad(0, 0, 1) <> SUCCESS Then
begin
MessageDlg ('Error in StartFeedLoad !', mtError, [mbOK], 0);
GoTo quit_function
end;
{ Use FeedLoad in a loop to load the file into the bitmap.}
repeat
BytesRead := FileRead( FileHandle, MyBufferPtr^, BUFFERSIZE ); { read from the file}
If Lead1.FeedLoad(MyBufferPtr, BytesRead) <> SUCCESS Then
begin
MessageDlg ('Error in FeedLoad !', mtError, [mbOK], 0);
GoTo quit_function
end;
Until BytesRead <= 0;
{ Finish the file-load process.}
If Lead1.StopFeedLoad() <> SUCCESS Then
MessageDlg ('Error in StopFeedLoad !', mtError, [mbOK], 0);
quit_function:
{ Close the file.}
FreeMem(MyBufferPtr);
FileClose( FileHandle );
end;


Fill example for Delphi

This example fills the bitmap with blue and repaints the image.

Lead1.Fill(RGB(0, 0, 255));
Lead1.ForceRepaint;


Flip example for Delphi

This example flips the bitmap and repaints the image.

Lead1.Flip;
Lead1.ForceRepaint;


FloaterDstClip... example for Delphi

The following code adjusts the destination clipping rectangle of the floater. You can test it by adding it to a new command button for the lesson described in Outlining, Dragging, and Pasting a Region. By default, the destination clipping rectangle for the floater is the full client area. This code gets the current values and uses them to reduce the size of the clipping rectangle.

procedure TForm1.Button1Click(Sender: TObject);
var
{Declare local variables. }
AdjustX, AdjustY, NewLeft, NewTop, NewWidth, NewHeight: Integer;

begin
{Set variables to use for adjustment increments. }
AdjustX := Lead1.Width div 20;
AdjustY := Lead1.Height div 20;

{Determine new values, based on adjustments of current values. }
NewLeft := Lead1.FloaterDstClipLeft + AdjustX;
NewTop := Lead1.FloaterDstClipTop + AdjustY;
NewWidth := Lead1.FloaterDstClipWidth - (2 * AdjustX);
NewHeight := Lead1.FloaterDstClipHeight - (2 * AdjustY);

{Set the clipping rectangle to the new values. }
Lead1.SetFloaterDstClipRect(NewLeft, NewTop, NewWidth, NewHeight);
end;


Font (ImageList Control) example for Delphi

{change the font properties}
if fsBold in LEADImgList1.Font.Style then
LEADImgList1.Font.Style := LEADImgList1.Font.Style - [fsBold]

else
LEADImgList1.Font.Style := LEADImgList1.Font.Style + [fsBold];

LEADImgList1.Font.Size := 10;
LEADImgList1.Font.Name := 'Arial';


ForeColor (ImageList Control) example for Delphi

{set text color to green}
LEADImgList1.ForeColor := clGreen;


Frame... example for Delphi

This example sets the control's frame properties. For example purposes, both inner and outer bands are turned on. However, normal three-dimensional effects use inner bands or outer bands, but not both.

Lead1.AutoRepaint := False;
Lead1.FrameThickness := 2;
Lead1.FrameColor := RGB(0, 0, 0);
Lead1.FrameInnerStyle := fisInset;
Lead1.FrameOuterStyle := fosRaised;
Lead1.FrameInnerHiliteColor := RGB(255, 255, 0); {Yellow}
Lead1.FrameInnerShadowColor := RGB(128, 128, 128); {Dark Gray}
Lead1.FrameOuterHiliteColor := RGB(255, 0, 0); {Red}
Lead1.FrameOuterShadowColor := RGB(192, 192, 192); {Light Gray}
Lead1.FrameInnerThickness := 3;
Lead1.FrameOuterThickness := 3;
Lead1.AutoRepaint := True;


FreeHandShear Example for Delphi

procedure TForm1.FreeHandShearClick(Sender: TObject);
var
apUserPoint: Array [ 0..3 ] of TPoint;
papUserPoint: pPOINT;
Amplitudes: Array [ 0..12 ] of L_INT;
pAmplitudes: L_PINT;
nMax, i: L_INT;
begin
apUserPoint [0].x := 0;
apUserPoint [0].y := 0;

apUserPoint [1].x := 3;
apUserPoint [1].y := 10;

apUserPoint [2].x := 9;
apUserPoint [2].y := -10;

apUserPoint [3].x := 12;
apUserPoint [3].y := 0;

pAmplitudes:= @Amplitudes;
papUserPoint:= @apUserPoint;

LEADImage1.GetCurvePoints( papUserPoint, 4, pAmplitudes, Nil, GUB_LINEAR );

nMax:= 0;
for i:= 0 to 12 do
begin
if(nMax < Amplitudes [i]) then
nMax:= Amplitudes [i];
end;

if ( nMax > 0 ) then
begin
for i:= 0 to 12 do
begin
Amplitudes [i]:= Trunc((1000 * Amplitudes [i] / abs(nMax)));
end;
end;

LEADImage1.FreeHandShear( pAmplitudes, 13, 100, 0, FILL_RPT Or SHR_HORZ );
end;


FreeHandWave Example for Delphi

procedure TForm1.FreeHandWaveClick(Sender: TObject);
var
apUserPoint: Array [ 0..3 ] of TPoint;
papUserPoint: pPOINT;
Amplitudes: Array [ 0..12 ] of L_INT;
pAmplitudes: L_PINT;
begin
apUserPoint [0].x := 0;
apUserPoint [0].y := 0;

apUserPoint [1].x := 3;
apUserPoint [1].y := 10;

apUserPoint [2].x := 9;
apUserPoint [2].y := -10;

apUserPoint [3].x := 12;
apUserPoint [3].y := 0;

pAmplitudes:= @Amplitudes;
papUserPoint:= @apUserPoint;

LEADImage1.GetCurvePoints(papUserPoint, 4, pAmplitudes, Nil, GUB_LINEAR );

LEADImage1.FreeHandWave( pAmplitudes, 13, 100, 10, 0, 0, FILL_RPT Or DIS_FRQ );
end;


FreePlaneBend Example for Delphi

procedure TForm1.FreePlaneBendClick(Sender: TObject);
var
apUserPoint: Array [ 0..3 ] of TPoint;
Curve: Array [ 0..12 ] of L_INT;
begin
apUserPoint [0].x:= 0;
apUserPoint [0].y:= 0;

apUserPoint [1].x:= 3;
apUserPoint [1].y:= 10;

apUserPoint [2].x:= 9;
apUserPoint [2].y:= -10;

apUserPoint [3].x:= 12;
apUserPoint [3].y:= 0;

LEADImage1.GetCurvePoints( @apUserPoint, 4, @Curve, Nil, GUB_LINEAR );

LEADImage1.FreePlaneBend( @Curve, 13, 200, RGB(255,0,0), FILL_CLR Or FPB_VERT );
end;


FreeRadBend Example for Delphi

procedure TForm1.FreeRadBendClick(Sender: TObject);
var
apUserPoint: Array [ 0..3 ] of TPoint;
Curve: Array [ 0..12 ] of L_INT;
ptCenter: TPoint;
begin
{ Applay the filter }
apUserPoint [0].x:= 0;
apUserPoint [0].y:= 0;

apUserPoint [1].x:= 3;
apUserPoint [1].y:= 10;

apUserPoint [2].x:= 9;
apUserPoint [2].y:= -10;

apUserPoint [3].x:= 12;
apUserPoint [3].y:= 0;

LEADImage1.GetCurvePoints( @apUserPoint, 4, @Curve, Nil, GUB_LINEAR );

ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);
LEADImage1.FreeRadBend( @Curve, 13, 200, ptCenter, RGB(255,0,0), FILL_CLR Or FILL_ROT );

end;


FrequencyFilter Example for Delphi

{ This Example supposed that you have initialized the FT data
by calling InitFourierTransformationData method }

{ filters the frequencies}
LEADImage1.FrequencyFilter( 0, 0, Trunc(LEADImage1.BitmapWidth / 4), Trunc(LEADImage1.BitmapHeight / 2), FRQ_INSIDE_X + FRQ_INSIDE_Y );


FrequencyFilterMask Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
LEADImage1.InitFourierTransformationData ( );
LEADImage1.Load ( 'e:\Noisy.jpg', 0, 0, 1 );
LEADImage2.Load ( 'e:\Noisy.jpg', 0, 0, 1 );

LEADImage1.DiscreteFourierTransformation ( 0, 0, 0, 0, DFT_DFT + DFT_GRAY );

LEADImage1.Load ( 'e:\Mask.jpg', 0, 0, 1 );
// filter frequencies
LEADImage1.FrequencyFilterMask( True );

LEADImage1.Bitmap:= LEADImage2.Bitmap;

// apply inverse DFT
// After this call, the image should be clean
LEADImage1.DiscreteFourierTransformation ( 0, 0, 0, 0, DFT_IDFT + DFT_ALL + DFT_IDFT_SCL );

LEADImage1.FreeFourierTransformationData ( );
end;


FunctionalLight Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('e:\\image1.cmp', 0, 1, 1 );

{ Apply the linear lighting effect }

LEADImage1.FunctionalLight( 0, 75, 0, 0, 0, Trunc(LEADImage1.BitmapWidth /2), Trunc(LEADImage1.BitmapHeight /2), 0, Nil, 0, FL_LINEAR_QUADRATIC + FL_LINEAR_OUTER);
end;


GammaCorrect example for Delphi

This example applies a 2.2 gamma correction and repaints the image.

Lead1.GammaCorrect(220);
Lead1.ForceRepaint;


GaussianFilter example for Delphi

GaussianFilter Delphi Example

LEADImage1.GaussianFilter (20);


GetBitmapClipSegments example for Delphi

var
uSegments: Cardinal;
pSegments: Pointer;
i, j: Integer;
nStartVal, nEndVal: Integer;
begin
// get the maximum number of elements in a row, so I know how big the array of segments should be
LEADImage1.GetBitmapClipSegmentsMax(@uSegments);

// allocate an array large enough to store the maximum number of segments. Note that
// GetBitmapClipSegmentsMax took into account that each segment has two extremities.
pSegments:= GlobalAllocPtr (GMEM_MOVEABLE, uSegments * sizeof(Cardinal));
if(pSegments= Nil)then
begin
// not enough memory!!
ShowMessage ( 'Not Enough Memory' ) ;
Exit;
end;

// get the segments for the first row
LEADImage1.GetBitmapClipSegments(LEADImage1.RgnTop, pSegments, @uSegments);

// do something with the segments.
// to keep this example simple, we will set the pixels in the segment to 0
for i:= 0 to uSegments-1 do
begin
nStartVal:= Integer (PChar ( pSegments ) + (i * 2 * sizeof ( Integer )));
nEndVal:= Integer (PChar ( pSegments ) + ((i * 2 + 1)* sizeof ( Integer )));
for j:= nStartVal to nEndVal -1 do
LEADImage1.Pixel[LEADImage1.RgnTop, j]:= clBlack;
end;
// free the segments array
GlobalFreePtr (pSegments);
end;


GetBitmapDC example for Delphi

Take the following steps to demonstrate how GDI functions can be used to print text on the bitmap and on the control. The text printed on the bitmap is a permanent part of the bitmap and becomes permanent if the bitmap is saved; whereas the text on the control is superficial and does not affect the bitmap.

Note:

For an easier way of drawing text, refer to the DrawTextStr example.

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Select the Button control; then add the control to your main form
3. | Change the Button control's Caption property to GDI for Text.
4. | Code the GDI for Text button's Click procedure as follows. In online help, you can copy the block of code and paste it into your application.
 | Notice that the code prints in two different places: the bitmap and the control. You can see the difference when you run the program.

procedure TForm1.Button3Click(Sender: TObject);

var
LeadDC, LeadClientDC: HDC;
hfnt, hOldFont: THandle;
mystring: String;
myCString: array[0..80] of Char;

begin
{First, print text on the bitmap.}
{Create a device context for the bitmap that the GDI functions can access}
LeadDC := Lead1.GetBitmapDC;

{Get the system font and select it. The old font is saved so that it can be restored.}
{Using other fonts is more complex. Refer to the Windows API documentation.}
hfnt := GetStockObject(SYSTEM_FONT);
hOldFont := SelectObject(LeadDC, hfnt);

{Make the background transparent, so that the text will overlay the image}
SetBkMode(LeadDC, TRANSPARENT);

{Assign the string value}
mystring := 'Text on the bitmap';
StrPCopy(myCString, mystring);

{Print the text on the bitmap. This is a permanent change in the bitmap}
TextOut(LeadDC, 20, 40, myCstring, Length(mystring) );

{Restore the previous font}
SelectObject(LeadDC, hOldFont);

{Remove the lock from the device control}
Lead1.ReleaseBitmapDC;

{Repaint the part of the image that has changed}
Lead1.BackErase := False;
Lead1.ForceRepaint;

{Allow full repainting again}
Lead1.BackErase := True;

{Next, print text on the control.}
{Create a device context for the control that the GDI functions can access}
LeadClientDC := Lead1.GetClientDC;

{Get the system font and select it. The old font is saved so that it can be restored.}
{Using other fonts is more complex. Refer to the Windows API documentation.}
hfnt := GetStockObject(SYSTEM_FONT);
hOldFont := SelectObject(LeadDC, hfnt);

{Make the background transparent, so that the text will overlay the image}
SetBkMode(LeadClientDC, TRANSPARENT);

{Assign the string value}
mystring := 'Text on the LEAD control';
StrPCopy(myCString, mystring);

{Print the text on the control. This is an overlay that does not affect the bitmap.}
TextOut(LeadClientDC, 20, 80, myCstring, Length(mystring));

{Restore the previous font}
SelectObject(LeadClientDC, hOldFont);

{Remove the lock from the device control}
Lead1.ReleaseClientDC;

end;

5.

Run your program to test it. Notice that the text printed on the bitmap is scaled as part of the bitmap. If you zoom in, it becomes larger, and if you zoom out, it becomes smaller. The text printed on the control is the normal size for the system font and is not affected by zooming.


GetBitmapRow example for Delphi

Procedure TForm1.Button1Click(Sender: TObject);
var
pBuf : pChar ; // Buffer to hold the row
hBuf : HGLOBAL ; // Handle to the buffer
nRow : integer ; // Row counter
uByte: Cardinal; // Byte counter
begin
// Load the bitmap, at 24 bits per pixel */
LeadImage.Load ( 'v:\images\0.bmp', 24, 0,1);
// Allocate and lock the buffer
hBuf := GlobalAlloc(GMEM_MOVEABLE, LeadImage.BitmapBytesPerLine);
pBuf := GlobalLock( hBuf );
// Process each row in the bitmap
for nRow := 0 to LeadImage.BitmapHeight -1 do
Begin
LeadImage.GetBitmapRow( pBuf, nRow, LeadImage.BitmapBytesPerLine);
for uByte := 0 to LeadImage.BitmapBytesPerLine do
(pBuf + uByte)^ := Char(Integer(((pBuf + uByte)^)) xor Integer($FF));
LeadImage.PutBitmapRow ( pBuf, nRow, LeadImage.BitmapBytesPerLine);
end;
// Free memory that we no longer need
GlobalUnlock(hBuf);
GlobalFree(hBuf);
end;


GetBitmapRowCol example for Delphi

//Add LEADDef unit to the uses.

Procedure TForm1.Button1Click(Sender: TObject);
Var
XOffset : Integer ; // Column offset of the rectangle to process
XSize : Integer ; // Pixel width of the rectangle to process
YOffset : Integer ; // Row offset of the rectangle to process
YSize : Integer ; // Pixel height of the rectangle to process
pBuf : pChar ; // Buffer to hold the row
i, n : Integer ; // Counters
hBuf : HGLOBAl ;

Begin
// Load the bitmap, at 24 bits per pixel
LeadImage.Load ('v:\images\11.bmp', 24, 0, 1);
// Specify a rectangle in the top left part of the displayed image
XOffset := LeadImage.BitmapWidth div 8 ;
XSize := LeadImage.BitmapWidth div 3;
YOffset := LeadImage.BitmapHeight div 8;
YSize := LeadImage.BitmapHeight div 3;

// Allocate the buffer
hBuf := GlobalAlloc(GMEM_MOVEABLE, XSize * 3 ) ;
pBuf := GlobalLock( hBuf );
// Invert the colors of pixels in the rectangle
for i := YOffset to (YOffset + YSize) -1 do
Begin
LeadImage.GetBitmapRowCol ( pBuf, i, XOffset, XSize * 3 );
for n :=0 to (Xsize * 3 )-1 do
( pBuf+ n) ^ := Char(Integer(((pBuf + n)^)) xor Integer($FF));
LeadImage.PutBitmapRowCol ( pBuf, i, XOffset, Xsize * 3 );
End;
// Free memory that we no longer need
GlobalFree(hBuf);
end;


GetDIB example for Delphi

var
MyDIB: L_HANDLE;
begin
{This example gets the image from LEADImage1 as a V5 DIB
and then loads the DIB into LEADImage2}

{LEAD1 has an image at this point}
MyDIB:= LEADImage1.GetDIB(DIB_BITMAPV5HEADER);
LEADImage2.SetDIB (MyDIB);
{Free the DIB using the Windows API}
GlobalFree ( MyDIB ) ;
end;


GetFeretsDiameter Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: L_INT;
pPoints: pPoint;
uSize: L_UINT;
uFeretsDiam: L_UINT;
uFstIndex: L_UINT;
uSndIndex: L_UINT;
begin
{ Load a bitmap at its own bits per pixel }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );

LEADImage1.SetRgnEllipse( Trunc(LEADImage1.BitmapWidth / 4), Trunc(LEADImage1.BitmapHeight / 4), Trunc(LEADImage1.BitmapWidth), Trunc(LEADImage1.BitmapHeight), L_RGN_SET);

LEADImage1.GetRgnContourPoints (pPoints, uSize);
nRet:= LEADImage1.GetFeretsDiameter( pPoints, uSize, uFeretsDiam, uFstIndex, uSndIndex );
if ( nRet = SUCCESS ) then
ShowMessage ( 'Number of points = ' + IntToStr(uSize));
end;


GetFileInfo example for Delphi

This example gets information about the specified file.

procedure TForm1.Button1Click(Sender: TObject);

var
fname, cmp, cFmt, cMsg: String;
pg, fmt, width, height, bps, xres, yres, sizd, sizm: Integer;
begin
{ Initialize variables}
fname := 'c:\lead\images\image2.cmp';
pg :=0;
{ Update the variables}
Lead1.GetFileInfo(fname, pg);
{ Read the updated properties}
fmt := Lead1.InfoFormat;
width := round(Lead1.InfoWidth);
height := round(Lead1.InfoHeight);
bps := Lead1.InfoBits;
xres := Lead1.InfoXRes;
yres := Lead1.InfoYRes;
pg := Lead1.InfoPage;
sizd := Lead1.InfoSizeDisk;
sizm := Lead1.InfoSizeMem;
cmp := Lead1.InfoCompress;
{ Translate the meaning of the format constant}
Case fmt of
FILE_PCX: cFmt := 'ZSoft PCX';
FILE_GIF: cFmt := 'CompuServe GIF';
FILE_TGA: cFmt := 'TARGA';
FILE_PNG: cFmt := 'Portable Network Graphics';
FILE_PSD: cFmt := 'Adobe Photoshop 3.0';
FILE_BMP: cFmt := 'Windows BMP';
FILE_OS2: cFmt := 'OS/2 BMP version 1.x';
FILE_OS2_2: cFmt := 'OS/2 BMP version 2.x';
FILE_WMF: cFmt := 'Windows Meta File';
FILE_EPS: cFmt := 'Encapsulated PostScript';
FILE_TIF: cFmt := 'Tagged Image File Format (TIFF, TIFLZW, or CCITT file)';
FILE_JTIF: cFmt := 'Tagged Image File with JPEG compression';
FILE_FAX_G3_1D: cFmt := 'Raw FAX, compressed using CCITT group 3, 1 dimension';
FILE_FAX_G3_2D: cFmt := 'Raw FAX, compressed using CCITT group 3, 2 dimensions';
FILE_FAX_G4: cFmt := 'Raw FAX, compressed using CCITT group 4';
FILE_WFX_G3_1D: cFmt := 'WinFax, compressed using CCITT group 3, 1 dimension';
FILE_WFX_G4: cFmt := 'WinFax, compressed using CCITT group 4';
FILE_ICA_G3_1D: cFmt := 'IOCA, compressed using CCITT group 3, 1 dimension';
FILE_ICA_G3_2D: cFmt := 'IOCA, compressed using CCITT group 3, 2 dimensions';
FILE_ICA_G4: cFmt := 'IOCA, compressed using CCITT group 4';
FILE_CMP: cFmt := 'LEAD proprietary compression format';
FILE_LEAD_NOLOSS: cFmt := 'LEAD lossless compression format';
FILE_JFIF: cFmt := 'JPEG File Interchange Format';
FILE_WPG: cFmt := 'WordPerfect';
FILE_RAS: cFmt := 'Sun Raster';
FILE_CALS: cFmt := 'CALS Raster';
FILE_MAC: cFmt := 'MacPaint';
FILE_PCT: cFmt := 'Macintosh Pict';
FILE_MSP: cFmt := 'Microsoft Paint';
FILE_IMG: cFmt := 'GEM Image';
FILE_PCD: cFmt := 'Kodak PhotoCD';
FILE_EPSTIFF: cFmt := 'Encapsulated PostScript with an embedded TIFF file';
Else
cFmt := 'Unknown format';
end;
{ Create the message string}
cMsg := fname + CHR(13);
cMsg := cMsg + 'Page = ' + IntToStr(pg) + ' of ' + IntToStr(Lead1.InfoTotalPages) + CHR(13);
cMsg := cMsg + 'Format = ' + cFmt + CHR(13);
cMsg := cMsg + 'Width = ' + IntToStr(width) + CHR(13) + 'Height = ' + IntToStr(height) + CHR(13);
cMsg := cMsg + 'Bits per pixel = ' + IntToStr(bps) + CHR(13);
cMsg := cMsg + 'Size in memory = ' + IntToStr(sizm) + CHR(13);
cMsg := cMsg + 'Size on disk = ' + IntToStr(sizd) + CHR(13);
cMsg := cMsg + 'X resolution = ' + IntToStr(xres) + CHR(13) + 'Y resolution = ' + IntToStr(yres);
{ Display the message box}
Application.MessageBox(PChar(cMsg), 'File Info', mb_OK);

end;


GetFloaterHandle example for Delphi

The following is an alternative way of coding the PasteFloater button's click procedure in Outlining, Dragging, and Pasting a Region. This alternative uses the GetFloaterHandle and SetRgnHandle methods to specify the mask for the paste. It also shows how to use the HasRgn, FloaterWidth, and FloaterHeight properties.

procedure TForm1.PasteFloater2Click(Sender: TObject);
var
{Declare the variable for the Combine operation. }
MyOp: Integer;

{Declare the variable for the saved region. }
SavedRgn: L_HRGN;

{Declare the variables for the client area coordinates. }
LCRgnX, LCRgnY , LCRgnWidth, LCRgnHeight: Integer;

{Declare the variables for the bitmap coordinates. }
LBRgnX, LBRgnY, LBRgnWidth, LBRgnHeight: Integer;

begin
{Exit this routine if there is no region. }
If Lead1.HasRgn = False Then Exit;

{Save the region that is in the floater. }
SavedRgn := Lead1.GetFloaterHandle();

{Get the floater into another bitmap }
Lead2.Bitmap := Lead1.Floater;

{Get the floater's client coordinates into local variables. }
LCRgnX := Lead1.FloaterDstLeft;
LCRgnY := Lead1.FloaterDstTop;
LCRgnWidth := Lead1.FloaterDstWidth;
LCRgnHeight := Lead1.FloaterDstHeight;

{Translate the client coordinates to bitmap coordinates. }
LBRgnX := Round((LCRgnX - Lead1.DstLeft) / ZoomFactorX + Lead1.SrcLeft);
LBRgnY := Round((LCRgnY - Lead1.DstTop) / ZoomFactorY + Lead1.SrcTop);
LBRgnWidth := Lead1.FloaterWidth;
LBRgnHeight := Lead1.FloaterHeight;

{Delete the floater. }
Lead1.FloaterVisible := False;
Lead1.Floater := 0;

{Set the saved region to use as a mask for the Combine method. }
Lead1.SetRgnHandle(SavedRgn, LBRgnX, LBRgnY, L_RGN_SET);

{Use the Combine method to paste the Lead2 bitmap into the Lead1 bitmap. }
MyOp := CB_OP_ADD or CB_DST_0; {Operation flags for a simple paste. }
Lead1.Combine(LBRgnX, LBRgnY, LBRgnWidth, LBRgnHeight, Lead2.Bitmap, 0, 0, MyOp);

{Repaint the part of the client area that has changed. }
Lead1.RepaintRect(LCRgnX, LCRgnY, LCRgnWidth, LCRgnHeight, False);

{Free the region. }
Lead1.FreeRgn;

{Delete the region handle. }
Lead1.DeleteRgnHandle(SavedRgn);

end;


GetFunctionalLookupTable example for Delphi

LEADImage1.GetFunctionalLookupTable (0, 255, 5, FLT_EXP);
LEADImage1.RemapIntensity (CHANNEL_MASTER);


GetHistogram example for Delphi

The following code does a CMYK separation and uses a histogram to find the brightest and darkest intensities in the K plane of the bitmap. It then remaps the intensities to use the full range and merges the color planes to recreate the bitmap:

var
Brightest, Darkest, MyIndex, Offset, CurrentRange: Integer;

begin
Screen.Cursor := crHourglass;

{Do a CMYK color separation and copy the K plane to the bitmap}
LeadImage1.ColorSeparate(COLORSEP_CMYK);
LeadImage1.Bitmap := 0; {Free the bitmap}
LeadImage1.Bitmap := LeadImage1.ColorPlanes[3]; {Copy the K plane}

{Load the histogram}
LeadImage1.GetHistogram(CHANNEL_MASTER);

{Find the brightest and darkest intensities in the image}
MyIndex := 0;
Brightest := 0;
Darkest := -1;
While (MyIndex < 256) Do
begin
If LeadImage1.HistogramTable[MyIndex] > 0 Then
begin
Brightest := MyIndex;
If (Darkest = -1) Then Darkest := MyIndex;
end;
MyIndex := MyIndex + 1;
end;

LeadImage1.RemapTableSize := 256;
{Remap the intensities to use the full range}
MyIndex := Darkest;
CurrentRange := Brightest - Darkest;
If CurrentRange > 0 Then
begin
While (MyIndex <= Brightest) do
begin
Offset := MyIndex - Darkest;
LeadImage1.RemapTable[MyIndex] := round((255 * Offset) / CurrentRange);
MyIndex := MyIndex + 1;
end;
LeadImage1.RemapIntensity(CHANNEL_MASTER);
end;

{Merge the color planes and free them from memory}
LeadImage1.ColorPlanes[3] := LeadImage1.Bitmap; {Update the K plane}
LeadImage1.ColorMerge(COLORSEP_CMYK);
LeadImage1.ColorPlanes[0] := 0;
LeadImage1.ColorPlanes[1] := 0;
LeadImage1.ColorPlanes[2] := 0;
LeadImage1.ColorPlanes[3] := 0;

{Set the image display size to match the LEAD control}
LeadImage1.SetDstRect(0, 0, LeadImage1.Width, LeadImage1.Height);
LeadImage1.SetDstClipRect(0, 0, LeadImage1.Width, LeadImage1.Height);
LeadImage1.ForceRepaint;
Screen.Cursor := crDefault;

end;


GetHistogramGray example for Delphi

{This example gets a histogram for a 12-bit or 16-bit grayscale image and then
displays the number of occurrences of the brightest and darkest intensities}

var
nRet: Integer;
begin
ShowMessage ( 'Table size before call to GetHistogramGray: ' + IntToStr(LEADImage1.HistogramGrayTableSize)) ;
nRet:= LEADImage1.GetHistogramGray ( ) ;
if ( nRet = SUCCESS ) then
begin
LEADImage1.GetMinMaxVal ( ) ;
ShowMessage ('Highest Intensity: ' + IntToStr(LEADImage1.MaxVal) + ' Count: ' + IntToStr(LEADImage1.HistogramGrayTable[LEADImage1.MaxVal])
+ Chr(13) + 'Lowest Intensity: ' + IntToStr(LEADImage1.MinVal) + ' Count: ' + IntToStr(LEADImage1.HistogramGrayTable[LEADImage1.MinVal]));
end;
ShowMessage ( 'Table size of current histogram: ' + IntToStr(LEADImage1.HistogramGrayTableSize));
end;


GetLinearVOILUT Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
Width: L_DOUBLE;
Center: L_DOUBLE;
nRet: L_INT;
begin
{ check the linearity of the LUT and computes its window width and center
by using GetLinearVOILUT method. }

LEADImage1.Load('e:\image1.cmp', 0, 1, 1 );
nRet:= LEADImage1.GetLinearVOILUT(Center, Width, 0);
if(nRet = SUCCESS) then
ShowMessage( 'Window Center = ' + FloatToStr(Center) + Chr(13)+ 'Window Width' + FloatToStr(Width));end;


GetMarkers example for Delphi

procedure TForm1.GetMarkersClick(Sender: TObject);
var
i: Integer;
begin
LEADImage1.Load ( 'e:\image1.jpg', 0, 0, 1 );
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
LEADImage1.SetMarkers ( LEADMarker1, 0 );
LEADImage1.Save ( 'c:\image2.jpg', FILE_EXIF_JPEG, 24, 2, 0 );
LEADMarker2.GetMarkers ( 0 );
for i:= 0 to LEADMarker2.Count - 1 do
begin
LEADMarker2.GetMarker ( i );
ShowMessage ( 'Marker Type= ' + IntToStr(LEADMarker2.MarkerType) + Chr(13) +
'Marker Element Count= ' + IntToStr(LEADMarker2.ElementCount) );
end;
end;


GetMemoryThresholds example for Delphi

{ This example doubles the maximum size for a conventional bitmap }
procedure TForm1.Button1Click(Sender: TObject);
var
nMaxConvSize: L_INT;
begin
{ Get only the max conventional size value }
LEADImage1.GetMemoryThresholds( Nil, @nMaxConvSize, Nil, Nil, Nil );

{ Double the max conventional size value }
LEADImage1.SetMemoryThresholds(0, nMaxConvSize * 2, 0, 0, 0, MEM_MAXCONVSIZE );
end;


GetMinMaxBits example for Delphi

The following example retrieves the values for MinBit and MaxBit using GetMinMaxBits and writes the results.

Lead1.GrayScale(12); {Grayscale image to 12-bit}
Lead1.GetMinMaxBits();
Edit1.Text := IntToStr(Lead1.MinBit);
Edit2.Text := IntToStr(Lead1.MaxBit);


GetMinMaxVal example for Delphi

The following example retrieves the values for MinVal and MaxVal using GetMinMaxVal and writes the results.

{Grayscale image to 12-bit}
Lead1.GrayScale(12);
{must call GetMinMaxVal first}
Lead1.GetMinMaxVal();
Edit1.Text := IntToStr(Lead1.MinVal);
Edit2.Text := IntToStr(Lead1.MaxVal);


GetObjectInfo Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
uX: L_UINT;
uY: L_UINT;
uRound: L_UINT;
nAngle: L_INT;
nRet: L_INT;
begin

{ Load a bitmap at its own bits per pixel }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );

{Get the objects center of mass and it's roundness.}
nRet:= LEADImage1.GetObjectInfo( FALSE, uX, uY, nAngle, uRound);

if (nRet = SUCCESS) then
begin
ShowMessage ( 'object''s center mass is at = (' + IntToStr(Trunc(uX/100)) + ' , ' + IntToStr(Trunc(uY/100)) + ')');
end;
end;


GetPixelData example for Delphi

{ This example uses GetPixelData and PutPixelData to swap the R and G values for a particular pixel.
This example will work only with 24, 32, 48 and 64-bit bitmaps}

Procedure TForm1.SwapRGBtoBGR( nRow: Integer; nCol: Integer);
var

uVal: Cardinal;
aPixel: Array [0..3] of L_UCHAR; // make it large enough for both bitmap types
bPixel: Array [0..3] of L_UINT16; // make it large enough for both bitmap types
pPixel: Pointer;
begin

if((LEADImage1.BitmapBits = 24) Or
(LEADImage1.BitmapBits = 32)) then
begin
pPixel:= @aPixel;
LEADImage1.GetPixelData(pPixel, nRow, nCol, 4);
// swap the R and B values
uVal:= aPixel[0]; aPixel[0] := aPixel[2]; aPixel[2] := uVal;
// put back the transformed pixel
LEADImage1.PutPixelData(pPixel, nRow, nCol, sizeof(aPixel));
end
else
if((LEADImage1.BitmapBits = 48) Or
(LEADImage1.BitmapBits = 64)) then
begin
pPixel:= @bPixel;
LEADImage1.GetPixelData(pPixel, nRow, nCol, 4);
// swap the R and B values
uVal:= aPixel[0]; aPixel[0]:= aPixel[2]; aPixel[2]:= uVal;
// put back the transformed pixel
LEADImage1.PutPixelData(pPixel, nRow, nCol, sizeof(aPixel));
end;
end;

{ This example uses GetPixelData and PutPixelData to swap the R and G values for a particular pixel.
This example will work only with 24, 32, 48 and 64-bit bitmaps}

Procedure TForm1.SwapRGBtoBGR( nRow: Integer; nCol: Integer);
var

uVal: Cardinal;
aPixel: Array [0..3] of L_UCHAR; // make it large enough for both bitmap types
bPixel: Array [0..3] of L_UINT16; // make it large enough for both bitmap types
pPixel: Pointer;
begin

if((LEADImage1.BitmapBits = 24) Or
(LEADImage1.BitmapBits = 32)) then
begin
pPixel:= @aPixel;
LEADImage1.GetPixelData(pPixel, nRow, nCol, 4);
// swap the R and B values
uVal:= aPixel[0]; aPixel[0] := aPixel[2]; aPixel[2] := uVal;
// put back the transformed pixel
LEADImage1.PutPixelData(pPixel, nRow, nCol, sizeof(aPixel));
end
else
if((LEADImage1.BitmapBits = 48) Or
(LEADImage1.BitmapBits = 64)) then
begin
pPixel:= @bPixel;
LEADImage1.GetPixelData(pPixel, nRow, nCol, 4);
// swap the R and B values
uVal:= aPixel[0]; aPixel[0]:= aPixel[2]; aPixel[2]:= uVal;
// put back the transformed pixel
LEADImage1.PutPixelData(pPixel, nRow, nCol, sizeof(aPixel));
end;
end;


GetRgnBounds example for Delphi

Procedure TForm1.Test();
Var
RgnRect : TRect;
Begin
if Lead1.HasRgn then
Begin
Lead1.GetRgnBounds(RgnRect);
Edit1.Text := Format('Region Bounds : (Top, Left), (Buttom, Right): ( %d %d ),
(%d,%d)', [RgnRect.Top,RgnRect.left, RgnRect.Bottom, RgnRect.Right]);
end
end;


GetRgnHandle example for Delphi

The following code creates a region, saves its handle and adds the saved region beside the current region.

procedure TForm1.Button1Click(Sender: TObject);
var
{Declare local variables. }
OffsetX, OffsetY: Integer;
SavedRegion: THandle;

begin
{Initialize the variables that we will manipulate to simulate mouse coordinates. }
OffsetX := Lead1.BitmapWidth div 8;
OffsetY := Lead1.BitmapHeight div 6;

{Create an elliptical region. }
Lead1.SetRgnEllipse(OffsetX, OffsetY, OffsetX, OffsetY, L_RGN_SET);

{Save a copy of the region. }
SavedRegion := Lead1.GetRgnHandle;

{Offset original Region}
Lead1.OffsetRgn(OffsetX div 2, OffsetY div 2);

{Add the saved region to the bitmap, offsetting it so that we can see it. }
Lead1.SetRgnHandle(SavedRegion, OffsetX, OffsetY, L_RGN_OR);

{Delete the saved region. }
Lead1.DeleteRgnHandle(SavedRegion);

{Fill the bitmap region with blue. }
Lead1.Fill(RGB(0, 0, 255));

{Free the bitmap region. }
Lead1.FreeRgn;

{Repaint the image so that we can see how the image was updated. }
Lead1.ForceRepaint;

end;


GetRgnPerimeterLength Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: L_INT;
uPerimeter: L_UINT;
begin
{ Load a bitmap at its own bits per pixel }
//LEADImage1.Load ('image3.cmp', 0, 1, 1 );
LEADImage1.SetRgnEllipse( Trunc(LEADImage1.BitmapHeight /3), Trunc(LEADImage1.BitmapWidth /3), Trunc(LEADImage1.BitmapWidth), Trunc(LEADImage1.BitmapHeight), L_RGN_SET);

nRet:= LEADImage1.GetRgnPerimeterLength(uPerimeter);
if(nRet = SUCCESS)then
begin
ShowMessage('Length of the perimeter' + IntToStr(uPerimeter));
end;
end;


GetStatisticsInfo Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
uStdDev: L_UINT;
uMean: L_UINT;
uMedian: L_UINT;
uMax: L_UINT;
uMin: L_UINT;
uPixelCnt: L_UINT;
uTotalPixelCnt: L_UINT;
uPercent: L_UINT;
nRet: L_INT;
begin
{ Load a bitmap at 24 bits per pixel }
LEADImage1.Load ('e:\image1.cmp', 0, 1, 1 );

{ Get statistical image information }
nRet:= LEADImage1.GetStatisticsInfo ( CHANNEL_MASTER, 0, 255, uStdDev, uMean, uMedian, uMax, uMin, uPixelCnt, uTotalPixelCnt, uPercent );
if (nRet = SUCCESS) then
begin
ShowMessage ( 'Standard deviation value = ' + IntToStr(uStdDev) + Chr(13) + 'Mean value = ' + IntToStr(uMean)+ Chr(13) + 'Median value = ' + IntToStr(uMedian)+ Chr(13) + 'Maximum value = ' + IntToStr(uMax)+ Chr(13) + 'Minimum value = ' + IntToStr(uMin)+ Chr(13) + 'Pixel number value = ' + IntToStr(uPixelCnt)+ Chr(13) + 'Whole image Pixel number value = ' + IntToStr(uTotalPixelCnt) + Chr(13) + 'Percent value = ' + IntToStr(uPercent) + Chr(13) );
end;
end;


GetTransformationParameters Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nAngle: L_INT;
uXTranslation: L_INT;
uYTranslation: L_INT;
uXScale: L_UINT;
uYScale: L_UINT;
aSearchMarks: Array[0..2] of REGMARKS;
aMarkPoints: Array[0..2] of TPoint;
aMarkCMPoints: Array[0..2] of TPoint;
aRefPoints: Array[0..2] of TPoint;
CenterPt: TPoint;
begin
{ This example loads a bitmap, and computes the translation parameters.
The example makes the assumption that you have saved the position of the
registration marks of the reference bitmap in a file. It also assumes you have
a method which loads these positions, namely, ?oadRefParameters·
You should modify this example and replace LoadRefParameters with your
own method before testing this example.}

// Load a bitmap at its own bits per pixel
LEADImage1.Load('e:\\image1.cmp', 0, 1, 1 );

// bend the image around it is center
CenterPt.x:= Trunc(LEADImage1.BitmapWidth/2);
CenterPt.y:= Trunc(LEADImage1.BitmapHeight/2);

{ Get aRefPoints from pre-calculated saved values. You have to implement LoadRefParameters }
//LoadRefParameters(aRefPoints);

aSearchMarks[0].uType:= RGS_T;
aSearchMarks[0].uMinScale:= 90;
aSearchMarks[0].uMaxScale:= 110;
aSearchMarks[0].uWidth:= 31;
aSearchMarks[0].uHeight:= 29;
SetRect(aSearchMarks[0].rcRect, 200, 150, 100, 100);
aSearchMarks[0].uSearchMarkCount:= 1;
aSearchMarks[0].pMarkDetectedPoints:= @aMarkPoints[0];

aSearchMarks[1].uType:= RGS_T;
aSearchMarks[1].uMinScale:= 90;
aSearchMarks[1].uMaxScale:= 110;
aSearchMarks[1].uWidth:= 31;
aSearchMarks[1].uHeight:= 29;
SetRect(aSearchMarks[0].rcRect, 200, 150, 100, 100);
aSearchMarks[1].uSearchMarkCount:= 1;
aSearchMarks[1].pMarkDetectedPoints:= @aMarkPoints[1];

aSearchMarks[2].uType:= RGS_T;
aSearchMarks[2].uMinScale:= 90;
aSearchMarks[2].uMaxScale:= 110;
aSearchMarks[2].uWidth:= 31;
aSearchMarks[2].uHeight:= 29;
SetRect(aSearchMarks[0].rcRect, 300,300,100,100);
aSearchMarks[2].uSearchMarkCount:= 1;
aSearchMarks[2].pMarkDetectedPoints:= @aMarkPoints[2];

LEADImage1.Load('e:\\image2.cmp', 0, 1, 1 );

LEADImage1.SearchRegMarks( @aSearchMarks[0], 3 );

LEADImage1.GetMarksCenterMass( @aMarkPoints[0], @aMarkCMPoints, 3 );

LEADImage1.GetTransformationParameters( @aRefPoints[0], @aMarkCMPoints[0], uXTranslation, uYTranslation, nAngle, uXScale, uYScale );
end;


GetUserLookupTable example for Delphi

var
PointCount: Integer;
begin
LEADImage1.UserLUTCurveSize := 3;
LEADImage1.UserLUTCurveX[0] := 0;
LEADImage1.UserLUTCurveY[0] := 0;
LEADImage1.UserLUTCurveX[1] := 128;
LEADImage1.UserLUTCurveY[1] := 150;
LEADImage1.UserLUTCurveX[2] := 255;
LEADImage1.UserLUTCurveY[2] := 255;
LEADImage1.GetUserLookupTable (@PointCount);
LEADImage1.RemapIntensity (CHANNEL_MASTER);
ShowMessage (IntToStr(PointCount) + ' Points were modified');
end;


GlassEffect Example for Delphi

procedure TForm1.GlassEffectClick(Sender: TObject);
begin
LEADImage1.GlassEffect( 20,10, GLASS_WFRQ Or GLASS_HPER );
end;


GlowFilter Example for Delphi

procedure TForm1.GlowFilterClick(Sender: TObject);
begin
LEADImage1.GlowFilter( 5, 3, 0 );
end;


Grayscale example for Delphi

This example converts the bitmap to 12-bit grayscale.

Lead1.Grayscale (12); {Grayscale image to 12-bit}


GrayScaleExt example for Delphi

GrayScaleExt Delphi Example

{This example assumes there is a bitmap loaded}
var
RedFact, GreenFact, BlueFact: Integer;
begin
RedFact := 300;
GreenFact := 590;
BlueFact := 110;
LEADImage1.GrayScaleExt (RedFact, GreenFact, BlueFact);
end;


GrayScaleToDuotone Example for Delphi

procedure TForm1.GrayScaleToDuotone1Click(Sender: TObject);
begin
{ Change the bitmap to grayscale bitmap }
LEADImage1.GrayScale( 8 );
{ Apply duotone conversion }
LEADImage1.GrayScaleToDuotone( Nil, RGB(255, 0, 0), DT_REPLACE );
end;


GrayScaleToMultitone Example for Delphi

procedure TForm1.GrayScaleToMultitone1Click(Sender: TObject);
var
crColors: Array [ 0..1 ] of COLORREF;{ New Color }
begin
{ Change the bitmap to grayscale bitmap}
LEADImage1.GrayScale( 8 );

{ The new colors }
crColors[0]:= RGB ( 255, 255, 0 );
crColors[1]:= RGB ( 255, 0, 0 );

{ Apply Multitone conversion }
LEADImage1.GrayScaleToMultitone( DT_DUOTONE, @crColors, DT_LINEAR, Nil, DT_REPLACE );
end;


h_Wnd example for Delphi

h_Wnd (AnnToolbar) example for Delphi

// This Example is also for Tool Property.
procedure TMainFrm.LEADAnnCtrl1AnnToolDestroy ;
var
iTool:Integer;
begin
ShowMessage ( 'Toolbar has been destroyed!' ) ;
if (LEADAnn1.AnnToolbar.h_Wnd = 0) then
LEADAnn1.AnnToolbar.CreateTB ( 0, 0, 0 );
iTool:= LEADAnn1.AnnToolbar.Tool;

end;


Halftone example for Delphi

//This example halftones the bitmap with a horizontal pattern and repaints the image.
LEADImage1.Halftone ( HT_PRINT, 0, 0, 0 );
LEADImage1.ForceRepaint ( );


HasMagGlass example for Delphi

if (LEADImage1.HasMagGlass) Then
begin
Caption:= 'Stop';
//Stop the MagGlass
LEADImage1.StopMagGlass ( ) ;
end
else
Caption:= 'Error';


HasRgn example for Delphi

If Lead1.HasRgn then
Edit1.Text := 'Bitmap Has Region';


hDocCleanRgn example for Delphi

procedure TForm1.Button4Click(Sender: TObject);
var
nRet :Integer;
begin

{HolePunch Remove}
{This example updates a windows region with all removed hole punches}
{For the example, a windows region is updated and then converted to a LEAD region}
{but in practice it would easier and faster to just update a LEAD region}
{The HOLEPUNCH_USE_DPI flag instructs the API to determine the size of the hole punches}
{based on the image DPI}
{The image is modified}
{The HolePunch Event is used to display information about each hole punch removed}

nRet := LEADImage1.HolePunchRemove (HOLEPUNCH_SINGLE_REGION Or HOLEPUNCH_USE_DPI Or HOLEPUNCH_USE_COUNT Or HOLEPUNCH_USE_LOCATION,
2, 4, 0, 0, 0, 0, HOLEPUNCH_LEFT);

if (nRet = SUCCESS) then
begin
LEADImage1.FreeRgn;
LEADImage1.SetRgnHandle (LEADImage1.hDocCleanRgn, 0, 0, L_RGN_SET);
LEADImage1.hDocCleanRgn := 0 ;{no longer need rgn}
LEADImage1.RgnFrameType := ftAnimated;
end;
end;

procedure TForm1.LEADImage1HolePunchRemove (Sender: TObject; hHoleRgn: L_HRGN;
nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth,
nBoundingRectHeight, iHoleIndex, iHoleTotalCount, iWhiteCount,
iBlackCount: Integer);

var
sOutput : String;
szTemp : array[0..255] of Char;
begin
sOutput := Format ('HolePunch at %d,%d,%d,%d HoleIndex= %d TotalCount= %d WhiteCount= %d BlackCount= %d',
[nBoundingRectLeft,
nBoundingRectTop,
nBoundingRectWidth,
nBoundingRectHeight,
iHoleIndex,
iHoleTotalCount,
iWhiteCount,
iBlackCount]);
OutputDebugString(StrPCopy(szTemp,sOutput));
end;


HistoContrast example for Delphi

This example applies a histogram contrast to the bitmap and repaints the image.

Lead1.HistoContrast(300);
Lead1.ForceRepaint;


HistoEqualize example for Delphi

This example equalizes the bitmap's histogram and repaints the image.

Lead1.HistoEqualize;
Lead1.ForceRepaint;


HistogramTableSize example for Delphi

if ((LEADImage1.BitmapBits = 64) Or
(LEADImage1.BitmapBits = 48)) Then

LEADImage1.HistogramTableSize:= 65536
else
LEADImage1.HistogramTableSize:= 256;


HitTest (ImageList Control) example for Delphi

{ Handle MouseDown and MouseUp events as follows}
procedure TForm1.LEADImgList1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
nItem : LongInt;
begin

nItem := LEADImgList1.HitTest(x, y);

If (nItem >= 0) Then

begin
LEADImgList1.SelectionColor := clRed;
LEADImgList1.Item[nItem].Selected := True;
end ;
end ;

procedure TForm1.LEADImgList1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
nItem : LongInt;
begin
nItem := LEADImgList1.HitTest(x, y);

If (nItem >= 0) Then
begin
LEADImgList1.SelectionColor := clBlue;
LEADImgList1.Item[nItem].Selected := True ;
end;
end;


HolesRemovalRgn Example for Delphi

Function TForm1.DoHolesRemovalRgn ( hRegn: L_HRGN; nOffsetX: L_INT; nOffsetY: L_INT ): L_INT;
begin
{put the predefined region}
LEADImage1.SetRgnHandle( hRegn, nOffsetX, nOffsetY, L_RGN_SET );

{Remove holes}
Result:= LEADImage1.HolesRemovalRgn( );
end;


HScrollInfo example for Delphi

var
msg: string;
begin
if (LEADImage1.HScrollInfo.Visible) then
begin
LEADImage1. HScrollInfo.Page := Trunc (LEADImage1.HScrollInfo.Max / 10 ) ;
LEADImage1.HScrollInfo.Line := 10;
end;
if (LEADImage1.VScrollInfo.Visible) then
begin
LEADImage1.VScrollInfo.Page := Trunc ( LEADImage1.VScrollInfo.Max / 10 ) ;
LEADImage1.VScrollInfo.Line := 10;
end;
msg:= 'HScrollMin: ' + IntToStr (LEADImage1.HScrollInfo.Min) + Chr(13);
msg:= msg + 'HScrollMax: ' + IntToStr(LEADImage1.HScrollInfo.Max) + Chr(13);
msg:= msg + 'VScrollMin: ' + IntToStr(LEADImage1.VScrollInfo.Min) + Chr(13);
msg:= msg + 'VScrollMax: ' + IntToStr(LEADImage1.VScrollInfo.Max) + Chr(13);
msg:= msg + '-------------'+ Chr(13);
msg:= msg + 'HScrollPage: ' + IntToStr(LEADImage1.HScrollInfo.Page)+ Chr(13);
msg:= msg + 'HScrollLine: ' + IntToStr(LEADImage1.HScrollInfo.Line)+ Chr(13);
msg:= msg + 'VScrollPage: ' + IntToStr(LEADImage1.VScrollInfo.Page)+ Chr(13);
msg:= msg + 'VScrollLine: ' + IntToStr(LEADImage1.VScrollInfo.Line)+ Chr(13);
msg:= msg + '-------------'+ Chr(13);
msg:= msg + 'HScrollPos: ' + IntToStr(LEADImage1.HScrollInfo.Pos) + Chr(13);
msg:= msg + 'VScrollPos: ' + IntToStr(LEADImage1.VScrollInfo.Pos) + Chr(13);
msg:= msg + '-------------'+ Chr(13);
msg:= msg + 'HScrollWidth: ' + IntToStr(LEADImage1.HScrollInfo.Width)+ Chr(13);
msg:= msg + 'VScrollWidth: ' + IntToStr(LEADImage1.VScrollInfo.Width)+ Chr(13);

ShowMessage ( msg ) ;

end;


HScrollStep example for Delphi

Lead1.HScrollStep := 2;


HSV_HfromRGB example for Delphi

{Takes an RGB, displays the RGB components, and displays the HSV components}
Procedure TForm1.RGBtoHSV(cr : TColorRef) ;
var
red: Integer;
green: Integer;
blue: Integer;
h: Integer;
s: Integer;
v: Integer;

begin
red:= GetRValue (cr);
green:= GetGValue (cr);
blue:= GetBValue(cr);

h:= LEADImage1.HSV_HfromRGB(cr);
s:= LEADImage1.HSV_SfromRGB(cr);
v:= LEADImage1.HSV_VfromRGB(cr);

ShowMessage ( 'RGB (' + IntToStr(red) + ',' + IntToStr(green) + ',' + IntToStr(blue) + ') is HSV(' + IntToStr(h) + ',' + IntToStr(s) + ',' + IntToStr(v) + ')');
end;


Hue example for Delphi

This example rotates the hue 180 degrees and repaints the image.

Lead1.Hue(180);
Lead1.ForceRepaint;


IgnoreFilters Example for Delphi

This example shows how to ignore filters so that certain files are not loaded.

{First, make sure PreLoaded Filters does not}
{contain CMP, and that 0 filters can be cached}
Lead1.PreLoadFilters(3, 0, 'BMP,FAX,TIF');

{now, ignore cmp filter (never load cmp files)}
Lead1.IgnoreFilters('CMP');


ImportBitmapList example for Delphi

procedure TForm1.btnImportBitmapListClick(Sender: TObject);
begin
if(LEADImage1.BitmapListCount >
 0)then// There are some bitmaps
begin
LEADImgList1.ImportBitmapList(LEADImage1.BitmapList,
 0, LEADImage1.BitmapListCount, 'Imported Bitmap-Text', 'Imported Bitmap-TextExt');
// Redraw the control
LEADImgList1.Refresh();
end;
end;


Impressionist Example for Delphi

procedure TForm1.ImpressionistClick(Sender: TObject);
begin
LEADImage1.Impressionist( 10, 10 );
end;


InfoColorSpace Example for Delphi

procedure TForm1.btnInfoColorSpaceClick(Sender: TObject);
begin
if(LEADImage1.GetFileInfo('image1.cmp', 0) = SUCCESS)then
begin
ShowMessage('Info Color Space = ' + IntToStr(LEADImage1.InfoColorSpace));
end;
end;


InfoHasAlpha example for Delphi

LEAD1.Load ('c:\temp\1.jpg', 24, 1, 1);// load a 24-bit image
LEAD2.Bitmap := LEAD1.Bitmap;
LEAD2.ColorRes(8, 0, 0, 0);// just make it 8-bit
//now set an alpha channel
LEAD1.BitmapAlpha := LEAD2.Bitmap;

//save and free
LEAD1.Save ('c:\temp\32.png', FILE_PNG, 32, 0, 0);
LEAD1.Bitmap := 0;
LEAD2.Bitmap := 0;

Application.MessageBox ('Pause','Pause',0);

//re-load
LEAD1.GetFileInfo ('c:\temp\32.png', 0);
If (LEAD1.InfoHasAlpha <> False) Then
LEAD1.Load ('c:\temp\32.png', 0, 1, 1);
LEAD2.Bitmap := LEAD1.BitmapAlpha;


InfoLayers example for Delphi

var
i: Integer;
begin
// This example all the layers in a file to a bitmap list
LEADImage1.GetFileInfo ( 'c:\temp\layers.psd', 0);

if LEADImage1.InfoLayers = 0 then
ShowMessage ( 'This file has no layers!' )
else
begin
// load the first layer directly
LEADImage1.LoadLayer ('c:\temp\layers.psd', 0, 0);

// steal the bitmaps from the other control
LEADImage1.RefBitmap:= True;

for i:= 1 to LEADImage1.InfoLayers - 1 do
begin
// use a second control to load the other layers
// using LEADImage1 to load the other layers would invalidate the bitmap list
LEADImage2.LoadLayer ('c:\temp\layers.psd', 0, i );
// append the layer to the bitmap list
LEADImage1.InsertBitmapListItem (LST_APPEND, LEADImage2.Bitmap);
end;
end;
end;


InfoViewPerspective example for Delphi

LEADImage1.GetFileInfo ( 'v:\images\image1.cmp', 1 ) ;
ShowMessage (IntToStr(LEADImage1.InfoViewPerspective));


Insert (ImageList Control) example for Delphi

{load an image}
LEADImage1.Load('v:\images\eagle.cmp', 0, 0, 1);
{insert it into the ImageList control}
LEADImgList1.Insert (LEADImage1.Bitmap, 'testing', 1);
LEADImgList1.EnsureVisible (LEADImgList1.Count - 1);


InsertAt (ImageList Control) example for Delphi

{load an image}
LEADImage1.Load ('v:\images\eagle.cmp', 0, 0, 1);
{insert it into the ImageList control at the first item}
LEADImgList1.InsertAt(LEADImage1.Bitmap, 'test2', 1, 0);


InsertBitmapListItem Example for Delphi

This example loads an ordinary file and uses it to create and play an animation. It assumes that the LEAD control has already been sized to the aspect ratio of the image.

procedure TForm1.Button1Click(Sender: TObject);
var
nMax: integer; { Maximum width or height for bitmaps in the list}
BitmapWidth: integer; { Width of the bitmap }
BitmapHeight: integer; { Height of the bitmap }
i: Integer; { Loop Counter }
begin
nMax := 160;
Lead2.Load('d:\ltwin11\images\image1.cmp', 0, 0, 1);
BitmapWidth := Lead2.BitmapWidth;
BitmapHeight := Lead2.BitmapHeight;
{ Reduce memory requirements, if necessary. Only small bitmaps play smoothly. }
if (BitmapWidth > nMax) then
Lead2.Size(nMax, Round((BitmapHeight * nMax) / BitmapWidth), SIZE_RESAMPLE)
else
if (BitmapHeight > nMax) then
Lead2.Size(Round((BitmapWidth * nMax) / BitmapHeight), nMax, SIZE_RESAMPLE);

{ Dither to an optimized palette, leaving the last color blank to use }
{ for transparency. }
Lead2.ColorRes(8, CRF_IDENTITYPALETTE, CRF_FLOYDSTEINDITHERING, 255);
{ Set an arbitrary transparent color in the last position of the bitmap palette. }
Lead2.BitmapPalette[255] := RGB(212, 222, 202);
{ Set the playback values that will apply to all bitmaps in the list. }
Lead2.BitmapDelay := 10;
Lead2.BitmapTop := 0;
Lead2.BitmapLeft := 0;
Lead2.BitmapEnableTransparency := True;
Lead2.BitmapTransparentColor := 16777216 + 255; { Specified by palette index}
Lead2.BitmapDisposalMethod := 2; //PLAYDISPOSE_RESTOREBACKGROUND;
{ Free the LEAD1 control's current bitmap list. }
Lead1.BitmapList := 0;
{ Populate the bitmap list in the LEAD1 control. }
for i:= 0 To 36 do
begin
Lead1.InsertBitmapListItem(i, Lead2.Bitmap);
{ Rotate, using the transparent color as the fill color. }
Lead1.BitmapListIndex := i;
Lead1.Rotate(1000 * i, False, 16777216 + 255);
end;
{ Set the animation playback properties }
Lead1.AnimationBackColor := RGB(0, 0, 255);
Lead1.AnimationBitsPerPixel := 8;
Lead1.AnimationHeight := Lead1.Height;
Lead1.AnimationWidth := Lead1.Width;
Lead1.AnimationLoop := False;
for i := 0 to 255 do
Lead1.AnimationPalette[i] := Lead1.BitmapPalette[i];
{ Set properties for a scaled animation. }
Lead1.AutoRepaint := True;
Lead1.AutoSetRects := False;
{ Set the image display size to match the LEAD control. }
Lead1.SetDstRect(0, 0, Lead1.Width, Lead1.Height);
Lead1.SetDstClipRect(0, 0, Lead1.Width, Lead1.Height);
{ Start the animation. }
Lead1.AnimationEnable := True;
{ Free the LEAD2 control's bitmap. }
Lead2.BitmapList := 0;
end;


InsertFromBitmapList (ImageList Control) example for Delphi

{load an image}
LEADImage1.Load ('v:\images\eagle.cmp', 0, 0, 1);
{make a bitmap list}
LEADImage2.InsertBitmapListItem (0, LEADImage1.Bitmap);
LEADImage1.Rotate (2500, 0, 0);
LEADImage2.InsertBitmapListItem (0, LEADImage1.Bitmap);
LEADImage1.Rotate (2500, 0, 0);
LEADImage2.InsertBitmapListItem (0, LEADImage1.Bitmap);
LEADImage1.Rotate (2500, 0, 0);

{now, insert the items from the bitmap list into the ImageList Control}
LEADImgList1.InsertFromBitmapList (LEADImage2.BitmapList, 'test_list');


InsertMarker example for Delphi

procedure TForm1.InsertMarkerClick(Sender: TObject);
var
i: Integer;
begin
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
LEADMarker2.LoadMarkers ( 'e:\image2.tif', 0 );
LEADMarker1.GetMarker ( 0 );
LEADMarker2.MarkerType:= LEADMarker1.MarkerType;
LEADMarker2.ElementCount:= LEADMarker1.ElementCount;
for i:= 0 to LEADMarker1.Count - 1 do
begin
LEADMarker2.Element[i]:= LEADMarker1.Element[i];
end;
LEADMarker2.InsertMarker ( 0 );
end;


Intensity example for Delphi

This example lightens the bitmap and repaints the image.

Lead1.Intensity(150);
Lead1.ForceRepaint;


IntensityDetect example for Delphi

LEADImage1.IntensityDetect ( 128, 255, RGB(0, 0, 0), RGB(255, 255, 255), IDB_CHANNEL_MASTER );
LEADImage1.ForceRepaint ( );


Invert example for Delphi

This example inverts the bitmap's colors and repaints the image.

Lead1.Invert;
Lead1.ForceRepaint;


InvertedText example for Delphi

procedure TForm1.Button5Click(Sender: TObject);
var
nRet : Integer;
begin

{InvertedText }
{This example finds all inverted text regions greater than 5 inches in width and 1/2 inch in height}
{and inverts the text so that it appears normal}
{The InvertedText Event is used to display additional information about the inverted text regions}
{A LEAD region is updated to show all of the changes}
LEADImage1.DocCleanSuccess := SUCCESS_REMOVE;
nRet := LEADImage1.InvertedText(INVERTEDTEXT_SINGLE_REGION Or INVERTEDTEXT_LEAD_REGION Or INVERTEDTEXT_USE_DPI, 5000, 500, 70, 95);
If (nRet = SUCCESS) Then
begin
LEADImage1.FreeRgn;
LEADImage2.Bitmap := LEADImage1.DocCleanBitmap; {copy the result so we can get the rgn handle}
LEADImage1.SetRgnHandle (LEADImage2.GetRgnHandle, 0, 0, L_RGN_SET);
LEADImage2.Bitmap := 0; {no longer need copy}
LEADImage1.DocCleanBitmap := 0; {no longer need rgn either}
LEADImage1.RgnFrameType := ftAnimated;
End;
end;

procedure TForm1.LEADImage1InvertedText (Sender: TObject; hTextRgn: L_HRGN;
nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth,
nBoundingRectHeight, nWhiteCount, nBlackCount: Integer);
begin
OutputDebugString(pChar('Inverted at ' + IntToStr(nBoundingRectLeft) +','+
IntToStr(nBoundingRectTop) + ',' + IntToStr(nBoundingRectWidth) +','+
IntToStr(nBoundingRectHeight) +' WhiteCount=' +
IntToStr(nWhiteCount) + ' BlackCount= ' +
IntToStr(nBlackCount)));

end;


ISISAcquire example for Delphi

{The following example acquires a single image using ISISAcquire.}
var
bLoaded : Boolean;
Begin
bLoaded := False;
LeadIsis1.EnableMethodErrors := True;
try
LeadIsis1.ISISLoadDriver();
bLoaded := True;
LeadIsis1.ISISAcquire(ISIS_SHOWUI);
except
If LeadIsis1.Error <> ERROR_ISIS_CANCEL Then
ShowMessage('Error ' + IntToStr(LeadIsis1.Error) +
' during ISIS Scan!' + #10 + LeadIsis1.ErrorMsg);
if bLoaded Then
LeadIsis1.ISISUnloadDriver;
Exit;
end;
LeadIsis1.ISISUnloadDriver;
Lead1.Bitmap := LeadIsis1.Bitmap
end;


ISISAcquireMulti example for Delphi

{ The following example prepares for scanning multiple images by setting tags }
{ and enabling the OnISISPage event and then scans multiple images using }
{ ISISAcquireMulti method. }

var
nMaxPages : Integer;
nRet : Integer;
ErrorDesc : String;
begin
nMaxPages := 10;
LeadIsis1.EnableMethodErrors := False;
LeadIsis1.EnableISISEvent := True;
nRet := LeadIsis1.ISISLoadDriver();
If nRet = SUCCESS Then
begin
LeadIsis1.ISISSetTag(TAG_SCANAHEAD, TAG_SCANAHEAD_YES);
LeadIsis1.ISISGetTag(TAG_MAXPAGES, nMaxPages);
LeadIsis1.ISISSetTag(TAG_SCANAHEAD_MAXPAGES, nMaxPages div 2);
LeadIsis1.ISISSetTag(TAG_COMPRESSION, TAG_COMPRESSION_G4);
nRet := LeadIsis1.ISISAcquireMulti('c:\temp\dTest.tif', ISIS_SHOWUI, FILE_CCITT_GROUP4, True);
ErrorDesc := LeadIsis1.ErrorMsg;
LeadIsis1.ISISUnloadDriver();
If nRet <> SUCCESS Then
If nRet = ERROR_USER_ABORT Then
ShowMessage('Acquire canceled, ' + IntToStr(LeadIsis1.PagesDiscarded) + ' pages were aborted!')
Else
begin
If nRet <> ERROR_ISIS_CANCEL Then
ShowMessage('Error ' + IntToStr(nRet) + ' during ISIS Scan!' + #10 + ErrorDesc);
End
Else
ShowMessage('Image(s) acquired to file(s) c:\temp\dTest.tif');
end;
end;

procedure TForm1.LeadIsis1ISISPage(Sender: TObject; nPage: Integer; FileName: String);
begin
Label1.Caption := IntToStr(nPage);
Label1.Refresh;
Label2.Caption := FileName;
Label2.Refresh;
end;


ISISGetASCIITag example for Delphi

var
szVal: PChar;
begin
szVal:= Nil;
LeadIsis1.ISISLoadDriver ( ) ;
//get the default value
LEADISIS1.ISISGetASCIITag ( TAG_PAGESIZE, @szVal, True ) ;
ShowMessage ( 'Default: ' + szVal ) ;
if (szVal<> Nil ) then
begin
GlobalFree ( Cardinal(szVal) ) ;
szVal:= Nil;
end;

//get the current value
LEADISIS1.ISISGetASCIITag ( TAG_PAGESIZE, @szVal, False ) ;
ShowMessage ( 'Current: ' + szVal ) ;
if (szVal<> Nil ) then
begin
GlobalFree ( Cardinal(szVal) ) ;
szVal:= Nil;
end;
//set a new value
//NOTE, this would have to be a valid choice for the scanner
LEADISIS1.ISISSetASCIITag ( TAG_PAGESIZE, PChar('Scanner Maximum') );
//get the default value
LEADISIS1.ISISGetASCIITag ( TAG_PAGESIZE, @szVal, False ) ;
ShowMessage ( 'Current: ' + szVal ) ;
if (szVal<> Nil ) then
begin
GlobalFree (Cardinal(szVal) ) ;
szVal:= Nil;
end;

LEADISIS1.ISISUnloadDriver ( ) ;

end;


ISISGetASCIITagChoiceCount example for Delphi

var
n: Longint;
x: Longint;
szChoice: PChar;

begin
LEADISIS1.ISISLoadDriver( ) ;
LEADISIS1.ISISGetASCIITagChoiceCount ( TAG_PAGESIZE, @n );
ShowMessage ( 'Scanner has ' + IntToStr(n) + ' choices' ) ;
for x:= 0 To n - 1 do
begin
LEADISIS1.ISISGetASCIITagChoice ( TAG_PAGESIZE, x, @szChoice ) ;
ShowMessage ('Choice: ' + IntToStr(x) + ' Value: ' + szChoice ) ;
if (szChoice<> Nil ) then
begin
GlobalFree (Cardinal (szChoice));
szChoice:= Nil;
end;
end;
LEADISIS1.ISISUnloadDriver ();
end;


ISISGetTagChoiceCount example for Delphi

var
lCount: Longint;
lVal: Longint;
x: Longint;
begin

LEADISIS1.ISISLoadDriver ( ) ;

//try a long tag
LEADISIS1.ISISGetTagChoiceCount ( TAG_IMAGEWIDTH, @lCount ) ;
ShowMessage ( 'Scanner has ' + IntToStr(lCount) + ' choices' ) ;
for x:= 0 To lCount - 1 do
begin
LEADISIS1.ISISGetTagChoice (TAG_IMAGEWIDTH, x, @lVal);
ListBox1.Items.Add ('Choice: ' + IntToStr (x) + ' Value: ' + IntToStr (lVal)) ;
end;

//try a short tag
LEADISIS1.ISISGetTagChoiceCount (TAG_BRIGHTNESS, @lCount);
ShowMessage ('Scanner has ' + IntToStr (lCount) + ' choices');
for x:= 0 To lCount - 1 do
begin
LEADISIS1.ISISGetTagChoice (TAG_BRIGHTNESS, x, @lVal);
ListBox2.Items.Add ('Choice: ' + IntToStr (x) + ' Value: ' + IntToStr (lVal)) ;
end;
LEADISIS1.ISISUnloadDriver ();
end;


IsISISAvailable example for Delphi

{ The following example tests to see if ISIS is available and shows an appropriate message}

If LeadIsis1.IsISISAvailable Then
ShowMessage('ISIS Support installed!')
else
ShowMessage('ISIS Support not present');


ISISSelect example for Delphi

{ The following example displays the ISISSelect DialogBox and writes }
{ a message indicating which ISIS Scanner Driver was selected. }
LeadIsis1.ISISSelect();
ShowMessage(LeadIsis1.DriverName + ' was selected! ');


ISISSetScanOptions example for Delphi

LeadIsis1.ISISLoadDriver();
LeadIsis1.ISISSetScanOptions();
LeadIsis1.ISISUnloadDriver();


IsPtInRgn (Main Control) example for Delphi

Code the LEAD Control MouseDown event as follows:

procedure TForm1.Lead1MouseDown (Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
ZoomFactorX: Single; {Used for translating positioning information}
ZoomFactorY: Single; {Used for translating positioning information}
tX,tY :integer; {For translated Mouse coordinates }
begin
ZoomFactorX := Lead1.DstWidth / Lead1.SrcWidth;
ZoomFactorY := Lead1.DstHeight / Lead1.SrcHeight;

{Translate the client coordinates to bitmap coordinates. }
tX := Round((X / ZoomFactorX) - (Lead1.DstLeft / ZoomFactorX) + Lead1.SrcLeft);
tY := Round((Y / ZoomFactorY) - (Lead1.DstTop / ZoomFactorY) + Lead1.SrcTop);

if Lead1.HasRgn and Lead1.IsPtInRgn( tY , tX ) then
Edit1.Text := 'Inside the Region'
else
Edit1.Text := 'Outside the Region';
end;


IsRegMark Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: integer;
begin
// Load a bitmap at its own bits per pixel
LEADImage1.Load('e:\\image1.cmp', 0, 1, 1 );

nRet:= LEADImage1.IsRegMark (RGS_T, 90, 110, 31, 29);
if (nRet = SUCCESS) then
begin
//it is a registration mark
end;
end;


IsSigned example for Delphi

{Load the bitmap data as signed so we can use a different conversion}
LEADImage1.LoadSigned := True;
LEADImage1.Load ('c:\temp\signed.tif', 0, 0, 1);
{ use the non-default conversion "zero to center"}
LEADImage1.ConvertSignedToUnsigned (SHIFT_ZERO_TO_CENTER);


IsSupportLocked (ISIS Control) example for Delphi

If LeadIsis1.IsSupportLocked(L_SUPPORT_OCR) Then
ShowMessage('OCR Support Locked')
else
ShowMessage(OCR Support is available');


Item (ImageList Control) example for Delphi

var

nCount : LongInt;

index: integer;
begin
LEADImgList1.SelectAll(False);
{flip the 3rd item's bitmap}
LEADImage1.Bitmap := LEADImgList1.Item[2].Bitmap;
LEADImage1.Flip;
LEADImgList1.Item[2].Bitmap := LEADImage1.Bitmap;
{set the 4th and 6th items as selected}
LEADImgList1.Item[3].Selected := True;
LEADImgList1.Item[5].Selected := True;

{now, count the selected items}
nCount := 0;

for index := 0 to LEADImgList1.Count – 1 do
if LEADImgList1.Item [index].Selected = True then Inc(nCount);

ShowMessage(IntToStr(nCount) +' Items were selected!');

end;


ItemBackgroundColor (ImageList Control) example for Delphi

LEADImgList1.ItemBackgroundColor := clRed;{set to RED}


ItemWidth (ImageList Control) example for Delphi

{set item display options}
LEADImgList1.ItemWidth := 150;
LEADImgList1.ItemHeight := 150;
LEADImgList1.ItemVerticalSpacing := 20;
LEADImgList1.ItemHorizontalSpacing := 20;
LEADImgList1.DisplayItemText := False;


J2KCompressionControl example for Delphi

// shows saving J2K lossless
// compress a lossless file
LEADImage1.J2KCompressionControl := J2K_COMPRESSION_LOSSLESS;
LEADImage1.Save ('c:\temp\lossless.j2k', FILE_J2K, 0, 0, SAVE_OVERWRITE);


J2KCompressionRatio example for Delphi

//shows saving J2K using CompressionRatio
// compress a JPEG2000 file using 100:1 comp ratio
LEADImage1.J2KCompressionControl:= J2K_COMPRESSION_RATIO;
LEADImage1.J2KCompressionRatio:= 100;
LEADImage1.Save ('c:\temp\100_to_1.j2k', FILE_J2K, 0, 0, SAVE_OVERWRITE);


J2KSetDefaults example for Delphi

var
Msg: String;
begin
LEADImage1.UnlockSupport (L_SUPPORT_J2K, L_KEY_J2K);

//Display all the default JPEG2000 advanced options
LEADImage1.J2KSetDefaults();

if (LEADImage1.J2KUseColorTransform) then
msg := msg + 'J2KUseColorTransform = True' + Chr(13)
else
msg := msg + 'J2KUseColorTransform = False' + Chr(13);

if ( LEADImage1.J2KDerivedQuantization ) then
msg := msg + 'J2KDerivedQuantization = True' + Chr(13)
else
msg := msg + 'J2KDerivedQuantization = False' + Chr(13);

msg := msg + 'J2KXOsiz := ' + IntToStr(LEADImage1.J2KXOsiz) + Chr(13);
msg := msg + 'J2KYOsiz := ' + IntToStr(LEADImage1.J2KYOsiz) + Chr(13);
msg := msg + 'J2KXTsiz := ' + IntToStr(LEADImage1.J2KXTsiz) + Chr(13);
msg := msg + 'J2KYTsiz := ' + IntToStr(LEADImage1.J2KYTsiz) + Chr(13);
msg := msg + 'J2KXTOsiz := ' + IntToStr(LEADImage1.J2KXTOsiz) + Chr(13);
msg := msg + 'J2KYTOsiz := ' + IntToStr(LEADImage1.J2KYTOsiz) + Chr(13);

msg := msg + 'J2KDecompLevel := ' + IntToStr(LEADImage1.J2KDecompLevel) + Chr(13);
msg := msg + 'J2KProgressOrder := ' + IntToStr(LEADImage1.J2KProgressOrder) + Chr(13);
msg := msg + 'J2KCodBlockWidth := ' + IntToStr(LEADImage1.J2KCodBlockWidth) + Chr(13);
msg := msg + 'J2KCodBlockHeight := ' + IntToStr(LEADImage1.J2KCodBlockHeight) + Chr(13);

if ( LEADImage1.J2KCBS_SelectiveACBypass ) then

msg := msg + 'J2KCBS_SelectiveACBypass = True' + Chr(13)
else
msg := msg + 'J2KCBS_SelectiveACBypass = False' + Chr(13);

if ( LEADImage1.J2KCBS_ResetContextOnBoundaries ) then
msg := msg + 'J2KCBS_ResetContextOnBoundaries = True' + Chr(13)
else
msg := msg + 'J2KCBS_ResetContextOnBoundaries = False' + Chr(13);

if ( LEADImage1.J2KCBS_TerminationOnEachPass ) then
msg := msg + 'J2KCBS_TerminationOnEachPass = True' + Chr(13)
else
msg := msg + 'J2KCBS_TerminationOnEachPass = False' + Chr(13);

if ( LEADImage1.J2KCBS_VerticallyCausalContext ) then
msg := msg + 'J2KCBS_VerticallyCausalContext = True' + Chr(13)
else
msg := msg + 'J2KCBS_VerticallyCausalContext = False' + Chr(13);

if ( LEADImage1.J2KCBS_PredictableTermination ) then
msg := msg + 'J2KCBS_PredictableTermination = True' + Chr(13)
else
msg := msg + 'J2KCBS_PredictableTermination = False' + Chr(13);

if ( LEADImage1.J2KCBS_ErrorResilienceSymbol ) then
msg := msg + 'J2KCBS_ErrorResilienceSymbol = True' + Chr(13)
else
msg := msg + 'J2KCBS_ErrorResilienceSymbol = False' + Chr(13);

msg := msg + 'J2KGuardBits = ' + IntToStr(LEADImage1.J2KGuardBits) + Chr(13);
msg := msg + 'J2KDerivedBaseMantissa = ' + IntToStr(LEADImage1.J2KDerivedBaseMantissa) + Chr(13);
msg := msg + 'J2KDerivedBaseExponent = ' + IntToStr(LEADImage1.J2KDerivedBaseExponent) + Chr(13);

if ( LEADImage1.J2KUseSOPMarker ) then
msg := msg + 'J2KUseSOPMarker = True' + Chr(13)
else
msg := msg + 'J2KUseSOPMarker = False' + Chr(13);

if ( LEADImage1.J2KUseEPHMarker ) then
msg := msg + 'J2KUseEPHMarker = True' + Chr(13)
else
msg := msg + 'J2KUseEPHMarker = False'+ Chr(13);

ShowMessage (msg);


J2KTargetFileSize example for Delphi

//shows saving J2K using TargetFilesize
// compress a 30K JPEG2000 file
LEADImage1.J2KCompressionControl:= J2K_COMPRESSION_TARGETSIZE;
LEADImage1.J2KTargetFileSize:= 30 * 1024;
LEADImage1.Save ('c:\temp\30k.j2k', FILE_J2K, 0, 0, SAVE_OVERWRITE);


J2KUseROI example for Delphi

procedure TForm1.btnSaveUsingROIClick(Sender: TObject);
begin
// Set the default settings for the J2K
LEADImage1.J2KSetDefaults ( ) ;
// Set our options
LEADImage1.J2KCompressionRatio := 1000;
LEADImage1.J2KCompressionControl := J2K_COMPRESSION_RATIO;
LEADImage1.J2KUseROI := True;
LEADImage1.J2KROIControl:= J2K_USE_OPTION_RECT;
LEADImage1.J2KROIRect := Rect( 200, 200, 400, 400 );
LEADImage1.J2KXTsiz := 100;
LEADImage1.J2KYTsiz := 100;
// Save the bitmap to disk
LEADImage1.Save ( 'c:\image1.j2k', FILE_J2K, 24, 2, SAVE_OVERWRITE ) ;
end;


JBIG2SaveFlags Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: Integer;
begin
LEADImage1.JBIG2SaveFlags:= FLAG_JBIG2_TPON;
LEADImage1.JBIG2TemplateType:= 2;
LEADImage1.JBIG2GBATX1:= 3;
LEADImage1.JBIG2GBATY1:= -1;
LEADImage1.JBIG2GBATX2:= -3;
LEADImage1.JBIG2GBATY2:= -1;
LEADImage1.JBIG2GBATX3:= 2;
LEADImage1.JBIG2GBATY3:= -2;
LEADImage1.JBIG2GBATX4:= -2;
LEADImage1.JBIG2GBATY4:= -2;

nRet:= LEADImage1.Save('c:\Output.jb2', FILE_JBIG2, 24, 2, SAVE_OVERWRITE);
if(nRet = SUCCESS)then
ShowMessage('Saved Successfully')
else
ShowMessage('Error Saving: ' + IntToStr(nRet));
end;


LensFlare Example for Delphi

procedure TForm1.LensFlareClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /4);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /4);
LEADImage1.LensFlare( ptCenter, 100, LNS_TYPE_1, RGB(100, 150, 10));
end;


LevelLowBit example for Delphi

This is also the example for LevelHighBit.

This example sets LevelLowBit and LevelHighBit to display the image using only the eight least significant bits.

{Grayscale image to 12-bit}
Lead1.GrayScale(12);
Lead1.AutoRepaint := False;
{use least significant 8 bits}
Lead1.LevelLowBit := 0;
Lead1.LevelHighBit := 7;

Lead1.AutoRepaint := True;


LevelLUT example for Delphi

This is also the example for MinVal property and MaxVal property.

The following example sets LevelLowBit and LevelHighBit to use all bits, gets the minimum and maximum bits and intensity values for the image, and then sets the LUT so that pixels with values in the minimum range are mapped to the color RED, while pixels with values in the maximum range are mapped to BLUE.

var
min : longint;
max : longint;
i : longint;
begin
Lead1.AutoRepaint := False;
{use all bits}
Lead1.LevelLowBit := 0;
Lead1.LevelHighBit := Lead1.BitmapBits - 1;

Lead1.GetMinMaxBits();
Lead1.GetMinMaxVal();
max := Lead1.MaxVal;
min := Lead1.MinVal;

{set LUT so that min range maps to RED and max range maps to BLUE}
For i := min To min + 100 do
Lead1.LevelLUT[i] := RGB(255, 0, 0);
For i := max - 100 To max do
Lead1.LevelLUT[i] := RGB(0, 0, 255);

Lead1.AutoRepaint := True;
end;


LevelLUTLength example for Delphi

This example writes out the number of entries in the LUT.

Edit1.Text := IntToStr(Lead1.LevelLUTLength);


Light Example for Delphi

procedure TForm1.LightClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.Light( ptCenter, Trunc(max(LEADImage1.BitmapHeight, LEADImage1.BitmapWidth)/2), Trunc(min(LEADImage1.BitmapHeight, LEADImage1.BitmapWidth)/2), 0, 50, 0, RGB(255, 255, 255), 100, LGT_SPOTLIGHT, 1, 100, 100, RGB(255,255,255) );
end;


LightControl Example for Delphi

procedure TForm1.LightControlClick(Sender: TObject);
var
LowerAvr: Array [ 0..2 ] of L_UINT;
Average: Array [ 0..2 ] of L_UINT;
UpperAvr: Array [ 0..2 ] of L_UINT;
begin
LowerAvr[0]:= 100;{for blue, gray or yuv}
LowerAvr[1]:= 120;{for green}
LowerAvr[2]:= 80; {for red}

Average [0]:= 150;{for blue, gray or yuy}
Average [1]:= 140;{for green}
Average [2]:= 128;{for red}

UpperAvr[0]:= 190;{for blue, gray or yuv}
UpperAvr[1]:= 200;{for green}
UpperAvr[2]:= 220;{for red}

LEADImage1.LightControl( @LowerAvr, @Average, @UpperAvr, RGB_SPACE );
end;


LineProfile example for Delphi

LineProfile Delphi Example

{This example assumes there is a bitmap loaded}
var
pRed: L_PINT;
pGreen: L_PINT;
pBlue: L_PINT;
FirstPoint, SecondPoint: TPoint;

begin
pRed:= Nil;
pGreen:= Nil;
pBlue:= Nil;

LEADImage1.LineProfile(FirstPoint, SecondPoint, pRed, pGreen, pBlue);

{use the colors in the arrays here}

// free the three buffers
GlobalFreePtr ( pRed );
GlobalFreePtr ( pGreen );
GlobalFreePtr ( pBlue );
end;


LineRemove example for Delphi

procedure TForm1.Button6Click(Sender: TObject);
var
nRet : Integer;
begin
{Line Remove}
{This examples removes vertical lines that are at least 200 pixels in length}
{and no more than 5 pixels in width}
{The lines can have gaps up to two pixels in length}
{The LineRemove Event is used to display information about each line removed}
LEADImage1.DocCleanSuccess := SUCCESS_REMOVE;
nRet := LEADImage1.LineRemove(LINE_USE_GAP, 200, 5, 7, 1, 2, 0, LINEREMOVE_HORIZONTAL);
end;

procedure TForm1.LEADImage1LineRemove (Sender: TObject; nStartRow,
nStartCol, nLength: Integer; hRgnLine: L_HRGN);
begin
OutputDebugString(pChar('Line at ' + IntToStr(nStartRow) + ',' + IntToStr(nStartCol) + ' Length=' + IntToStr(nLength)));
end;


LoadDatabase example for Delphi

LEADImgList1.LoadDatabase ('c:\temp\image1.tif');


LoadewPerspective example for Delphi

LoadUseViewPerspective example for Delphi

Note:

This topic is for Document/Medical editions only.

This example times the loading of a bitmap with and without changing the internal view perspective.

procedure TForm1.TestBtnClick(Sender: TObject);

var

{ Declare local variables }
StartTime, DeltaTime: TDateTime;
Hour, Min, Sec, MSec: Word;

begin

{ Do not include paints when measuring time. }
Lead1.AutoRepaint := False;

{ Time the load using the bitmap's view perspective. }
Lead1.LoadUseViewPerspective := True;
StartTime := Now;
Lead1.Load ('d:\lead\images\rotated.tif', 0, 0, 1);
DeltaTime := Now - StartTime;
DecodeTime(DeltaTime, Hour, Min, Sec, MSec);
ShowMessage('As is, rotated: ' + IntToStr(Sec) + ' seconds + ' +IntToStr(MSec) + ' milliseconds');

{ Time the load that converts the bitmap's view perspective. }
Lead1.LoadUseViewPerspective := False;
StartTime := Now;
Lead1.Load ('d:\lead\images\rotated.tif', 0, 0, 1);
DeltaTime := Now - StartTime;
DecodeTime(DeltaTime, Hour, Min, Sec, MSec);
ShowMessage('Converted to top left: ' + IntToStr(Sec) + ' seconds + ' +IntToStr(MSec) + ' milliseconds');

end;


LoadFast example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
LEADImage1.LoadFast:= True;
LEADImage1.Load('c:\image1.abc', 0, 0, -1);
end;


LoadFileTile example for Delphi

LEADImage1.GetFileInfo('Test.fpx', 1);
LEADImage1.LoadFileTile('Test.fpx', 0, 1, 1, Trunc(LEADImage1.InfoWidth / 4), Trunc(LEADImage1.InfoHeight/ 4), Trunc (LEADImage1.InfoWidth/ 2), Trunc(LEADImage1.InfoHeight / 2));


LoadFromFile (ImageList Control) example for Delphi

{Insert all pages from a multipage file}
LEADImgList1.LoadFromFile ('d:\temp\img\test1.tif', 0, 0, -1);
ShowMessage('Inserted ' + IntToStr(LEADImgList1.Count) + ' Items!');


LoadIFD example for Delphi

{ All examples will assume that "test.tif" has over 1002 images}
{ This example will load pages 1000 and 1001 after getting the information for page 1000:}

LEADImage1.GetFileInfo ('test.tif', 1000);
{ Setting LoadIFD to InfoIFD indicates that 1000 is treated as page 1}

LEADImage1.LoadIFD := LEADImage1.InfoIFD;
LEADImage1.Load ('test.tif', 0, 1, 2);
{ Reset LoadIFD to 0 so other TIF files will be handled properly}
LEADImage1.LoadIFD := 0


LoadMarkers example for Delphi

procedure TForm1.LoadMarkerClick(Sender: TObject);
begin
LEADImage1.Load ( 'e:\image1.jpg', 0, 0, 1 );

LEADMarker1.MethodErrorsEnabled:= True;
try
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
except
ShowMessage('File load failed'#10'Error No ' + IntToStr(LEADMarker1.Error) );
Exit;
end;

LEADImage1.SetMarkers ( LEADMarker1, 0 );
LEADImage1.Save ( 'e:\image2.jpg', FILE_EXIF_JPEG, 24, 2, 0 );
end;


LoadMemory example for Delphi

This example uses Windows API calls to load a file into memory, then uses the LoadMemory method to load the memory-resident file into a bitmap.

procedure TForm1.Button1Click(Sender: TObject);
var
hf: HFILE;
hMem: integer;
lpMem: pointer;
iSize: Longint;
label quit_loadmemory;

begin
{ Load the file into memory.}
hf := FileOpen('c:\lead\images\image1.cmp', fmOpenRead);

If hf = HFILE_ERROR Then
begin
MessageDlg ('Error opening file!', mtError, [mbOK], 0);
goto quit_loadmemory;
End;

iSize := FileSeek(hf,0,2);
FileSeek(hf, 0, 0);
hMem := GlobalAlloc(GMEM_MOVEABLE,iSize);
if hMem = 0 then
begin
FileClose (hf);
MessageDlg ('Not enough memory to hold the file in memory!', mtError, [mbOK], 0);
goto quit_loadmemory
end;

lpMem := GlobalLock(hMem);
If lpMem = nil Then
begin
FileClose (hf);
GlobalFree(hMem);
MessageDlg ('Not enough memory to hold the file in memory!', mtError, [mbOK], 0);
goto quit_loadmemory
end;

if FileRead(hf, lpMem^, iSize) < iSize Then
begin
FileClose (hf);
GlobalUnlock(hMem);
GlobalFree(hMem);
MessageDlg ('Error reading file!', mtError, [mbOK], 0);
goto quit_loadmemory
end;

GlobalUnlock(hMem);
FileClose (hf);
{Load the bitmap from the memory-resident file.}
if Lead1.LoadMemory(hMem, 0, 0, iSize) <> SUCCESS Then
MessageDlg ('Error calling LoadMemory', mtError, [mbOK], 0)
else
MessageDlg ('LoadMemory succeeded', mtInformation, [mbOK], 0);
GlobalFree (hMem);
quit_loadmemory:
end;


LoadMemoryTile example for Delphi

Function TForm1.LoadMemoryTile(sFilename: String; nLeft: Integer; nTop: Integer; nWidth: Integer; nHeight: Integer): Integer;
var
nRet: Integer;
iSize: Integer;
hFileInMemory: L_HANDLE;
begin
// Check the passed parameter
if (sFilename = '') Then
begin
Result:= ERROR_INV_PARAMETER;
Exit;
end;
hFileInMemory := 0;
// Load a bitmap at its own bits per pixel
LEADImage1.Load(sFilename, 0, 1, 1);
// Save the image as a CMP file in memory
LEADImage1.SaveMemory(hFileInMemory, FILE_CMP, 24, 2, iSize);
// Free the temporary bitmap
LEADImage1.Bitmap:= 0;
// Get the pointer to the memory-resident file
GlobalLock(hFileInMemory);
// Load the required bitmap tile
nRet:= LEADImage1.LoadMemoryTile(hFileInMemory, 0, 1, -1, iSize, nLeft, nTop, nWidth, nHeight);
// Clean up
GlobalUnlock (hFileInMemory);
GlobalFree (hFileInMemory);
Result:= nRet;
end;


LoadResize example for Delphi

LEADImage1.LoadResize ('v:\images\image1.cmp', 80, 80, SIZE_RESAMPLE, 0);


LocalHistoEqualize Example for Delphi

procedure TForm1.LocalHistoEqualizeClick(Sender: TObject);
begin
LEADImage1.LocalHistoEqualize( 15, 15, 100, 100, YUV_SPACE, 2 );
end;


MagGlassPaintContrast Example for Delphi

procedure TForm1.btnStartMagnifyingGlassClick(Sender: TObject);
var
nStatus: L_INT;
begin
// Setting the Magnifying Glass Paint contrast, gamma and intensity
LEADImage1.MagGlassPaintContrast:= LEADImage1.MagGlassPaintContrast + 100;
LEADImage1.MagGlassPaintGamma:= LEADImage1.MagGlassPaintGamma + 100;
LEADImage1.MagGlassPaintIntensity:= LEADImage1.MagGlassPaintIntensity + 100;

// Starting the Magnifying Glass
nStatus:= LEADImage1.StartMagGlass(100, 100, 400, RGB(255, 0, 0), RGB(128, 128, 128), False, 1, False, CROSSHAIR_FINE, True, True);

if (nStatus <> SUCCESS) then
ShowMessage ( 'Error Starting the Magnifying Glass, Error: ' + IntToStr(nStatus) );
end;


MagGlassPointer example for Delphi

This example shows how to add custom cursors to an application. It assumes that a custom cursor with the name NewCursor has been added to the resources (.RC file) of the application.

const
crNewCursor = 10;
procedure TForm1.FormCreate(Sender: TObject);
begin
Screen.Cursors[crNewCursor] := LoadCursor(HInstance, 'NewCursor');
LeadImage1.MagGlassPointer := crNewCursor;
end;


MathFunction Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ This example loads a bitmap and applies a Log method over the loaded image. }

{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{ Apply Log method to this bitmap }
LEADImage1.MathFunction(MF_SIN, 100);
end;


MaxFilter example for Delphi

Note:

This topic is for Document/Medical editions only.

This example erodes dark objects and repaints the image.

Lead1.MaxFilter(3);
Lead1.ForceRepaint;


Median example for Delphi

This example applies a median filter with a 3x3 neighborhood and redisplays the bitmap.

Lead1.Median(3);
Lead1.ForceRepaint;


MinFilter example for Delphi

Note:

This topic is for Document/Medical editions only.

This example dilates dark objects and repaints the image.

Lead1.MinFilter(3);
Lead1.ForceRepaint;


Mosaic example for Delphi

This example applies a mosaic effect with 8x8 tiles and redisplays the bitmap.

Lead1.Mosaic(8);
Lead1.ForceRepaint;


MotionBlur example for Delphi

LEADImage1.MotionBlur (12, 4500, False);


Multiply Example for Delphi

procedure TForm1.MultiplyClick(Sender: TObject);
begin
LEADImage1.Multiply( 151 );
end;


MultiScaleEnhancement Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('e:\\image1.cmp', 0, 1, 1 );

// Apply multiscale enhancement
LEADImage1.MultiScaleEnhancement( 2000, 4, MSE_DEFAULT , 0, 0, MSE_GAUSSIAN + MSE_EDGEENH);
end;


Ocean Example for Delphi

procedure TForm1.OceanClick(Sender: TObject);
begin
LEADImage1.Ocean( 20, 6, False );
end;


OCXBitmap example for Delphi

This sample describes how to assign the Leadimage OCXBitmap property to the LEADOCR ActiveX control.

procedure TForm1.OCRClick(Sender: TObject);
Var
lRet : longint;
begin
{assign the bitmap for OCR}
LEADOCR1.Bitmap := LeadImage1.OCXBitmap ;
Screen.Cursor := crHourglass;
lRet := LEADOCR1.RecognizeOCR(OCRFLAG_CALLBACK_AUTO);
Screen.Cursor := crDefault;
If (lRet <> 0) Then
begin
MessageDlg('Error: ' + IntToStr(lRet) + ' during recognition!', mtError, [mbOk], 0);
LEADOCR1.ClearDoc(); {clear the document}
end;
end;


Oilify example for Delphi

This example applies an oil-painting effect and repaints the image.

Screen.Cursor := crHourGlass;
Lead1.Oilify(10);
Lead1.ForceRepaint();
Screen.Cursor := crDefault;


OnAnimate Event Example for Delphi

This example shows how the OnAnimate event can be used to toggle the use of a button to start and stop the animation.

procedure TForm1.Lead1Animate(Sender: TObject; bEnable: Wordbool);
begin
if bEnable = True then
Button1.Caption := 'Stop Animation'
else
Button1.Caption := 'Start Animation'
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
if Lead1.AnimationEnable = True Then
Lead1.AnimationEnable := False
else
Lead1.AnimationEnable := True ;
end;


OnAnnChange example for Delphi

OnAnnChange Event Example for Delphi

//This example tests the OnAnnChange event.
procedure TForm1.LEADAnn1AnnChange(hObject: L_HANDLE);
var
Msg: String;
begin
Msg:= ' This is a change for the button tagged ' + IntToStr(LEADAnn1.AnnGetTag(hObject));
ShowMessage ( Msg ) ;
end;


OnAnnEnumerate example for Delphi

//This example is also for:
//AnnEnumerate method
//This event is fired for each annotation
//Displays the handle for each annotation
procedure TForm1.LEADAnn1AnnEnumerate (hObject: L_HANDLE);
var
Msg: String;
begin
Msg:= 'hObject: ' + IntToStr (LEADAnn1.AnnGetTag(hObject));
ShowMessage (Msg);
end;

//Load image and annotation file and then enumerate all the annotations
procedure TForm1.Button1Click(Sender: TObject);
begin
LEADAnn1.Load ('D:\pictures\Test.cmp', 0, 0, 1);
LEADAnn1.AnnLoad ('D:\pictures\Test.ann', 0);
LEADAnn1.AnnUserMode:= ANNUSERMODE_RUN ;
LEADAnn1.AnnEnumerate (LEADAnn1.AnnContainer,
ANNFLAG_RECURSE + ANNFLAG_NOTTHIS, Nil);
end;


OnAnnLocked example for Delphi

//The following is an example of an OnAnnLocked event.

procedure TForm1.LEADAnn1AnnLocked(hObject: L_HANDLE);

var
Msg: String;
begin
Msg:= 'AnnObject: ' + IntToStr(hObject) + ' was locked!';
ShowMessage ( Msg );
end;


OnAnnMenu example for Delphi

// This Example is for also for:
// Count Property, ItemString Property, ItemID Property, ItemType Property,
// ItemChecked Property, ItemEnabled Property, DeleteItem method,
// AddItem method, GetSubMenu method, OnAnnUserMenu event.

Procedure TForm1.LEADAnn1AnnMenu (AnnMenu: TAnnMenu);
var
nID: Integer;
x: Integer;
PopupMenuItem: TAnnMenu;
Msg: String;

begin
Msg:= 'There are ' + IntToStr(AnnMenu.count) + ' Items';
ShowMessage (Msg);

Msg:= 'Original Text for item#2: ' + AnnMenu.ItemString [1];
ShowMessage (Msg);
//set new string

AnnMenu.ItemString [1]:= 'TestText';
Msg:= 'Custom Text for item#2: ' + AnnMenu.ItemString[1];
ShowMessage (Msg);

//make 3rd and 4th menu items have the same command id
nID:= AnnMenu.ItemID [3];
AnnMenu.ItemID [2]:= nID;

//check all unchecked menu items that are not popup submenus
//disable all enabled menu items that are not popup submenus
for x:= 0 to AnnMenu.count - 1 do
begin
if ( AnnMenu.ItemType [x] = ANNMENUITEMTYPE_NORMAL ) then
begin
if (AnnMenu.ItemChecked [x] = false) then
AnnMenu.ItemChecked[x]:= True;
if (AnnMenu.ItemEnabled [x]= True) then
AnnMenu.ItemEnabled[x]:= False
end;
end;

//insert 2 user-defined menu items
AnnMenu.AddItem ( '&Flip', ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST, AnnMenu.count );
AnnMenu.AddItem ( 'Test&2', ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST + 1, AnnMenu.count );

//delete the last menu item
AnnMenu.DeleteItem ( AnnMenu.count - 1 );
//delete the first menu item
AnnMenu.DeleteItem (0);

//insert a popup menu
AnnMenu.AddItem ( '&Popup1', ANNMENUITEMTYPE_SUBMENU, 0, AnnMenu.count );
//get the new item, and add some items to it
PopupMenuItem:= AnnMenu.GetSubMenu (AnnMenu.count - 1);
PopupMenuItem.AddItem ( 'Test&1', ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST + 2, PopupMenuItem.count );
PopupMenuItem.AddItem ( 'Test&2', ANNMENUITEMTYPE_NORMAL, LTANNEVENT_MENUFIRST + 3, PopupMenuItem.count );
end;

procedure TForm1.LEADAnn1AnnUserMenu (nID: Integer);
var

Msg: String;
begin
if (nID = LTANNEVENT_MENUFIRST) then
LEADAnn1.AnnFlip ( False, 0, True )
else
begin
Msg:= 'nID = LTANNEVENT_MENUFIRST + ' + IntToStr (nID - LTANNEVENT_MENUFIRST);
ShowMessage ( Msg ) ;
end;
end;


OnAnnMouseDown example for Delphi

// This example is also for:
// AnnAddUndoNode method, AnnCreate method, AnnDefine method,
// AnnSetAutoDefaults method
// AnnSetSelected method
// SetMousePos method
// OnAnnMouseMove event
// OnAnnMouseUp event
var
x0, y0 : integer;
hRectObject, hEllipseObject : L_HANDLE;
.
.
.
procedure TForm1.LEADAnn1AnnMouseDown (Button, Shift, x, y: Integer);
begin
x0 := x;
y0:= y;
Case LEADAnn1.AnnTool of
ANNTOOL_USER_FIRST:
begin
//create the objects
LEADAnn1.AnnSetSelected (LEADAnn1.AnnContainer, False, True);
LEADAnn1.AnnAddUndoNode ();
hRectObject:= LEADAnn1.AnnCreate (ANNOBJECT_RECT, True, True);
hEllipseObject:= LEADAnn1.AnnCreate (ANNOBJECT_ELLIPSE, True, True);
// set the automation defaults to the objects newly created
LEADAnn1.AnnSetAutoDefaults (hRectObject, 0);
LEADAnn1.AnnSetAutoDefaults (hEllipseObject, 0);
//start defining them from the x, y coordinate
LEADAnn1.AnnDefine (hRectObject, x, y, ANNDEFINE_BEGINSET);
LEADAnn1.AnnDefine (hEllipseObject, x, y, ANNDEFINE_BEGINSET);
end;
end;
end;

procedure TForm1.LEADAnn1AnnMouseMove (Button, Shift, x, y: Integer);
begin
if ( Button = 1 ) then
begin
Case LEADAnn1.AnnTool of
ANNTOOL_USER_FIRST:
begin
//update the objects from the x, y coordinate
LEADAnn1.AnnDefine (hRectObject, x, y, ANNDEFINE_UPDATE);
LEADAnn1.AnnDefine (hEllipseObject, x, y, ANNDEFINE_UPDATE);
end;

ANNTOOL_RECT:
begin
AdjustMousePos (Shift, x, y);
end;

ANNTOOL_ELLIPSE:
begin
AdjustMousePos (Shift, x, y);
end;
end;
end;
end;

procedure TForm1.LEADAnn1AnnMouseUp (Button, Shift, x, y: Integer);
begin
case (LEADAnn1.AnnTool)of ANNTOOL_USER_FIRST:
begin
LEADAnn1.AnnDefine (hRectObject, x, y, ANNDEFINE_END); LEADAnn1.AnnDefine (hEllipseObject, x, y, ANNDEFINE_END);
LEADAnn1.AnnSetSelected (hRectObject, True, False);
LEADAnn1.AnnSetSelected (hEllipseObject, True, False);
LEADAnn1.AnnGroup (LEADAnn1.AnnContainer, ANNFLAG_RECURSE + ANNFLAG_SELECTED, Nil);
hEllipseObject:= 0;
hRectObject:= 0;
end;

ANNTOOL_RECT:
begin
AdjustMousePos (Shift, x, y);
end;

ANNTOOL_ELLIPSE:
begin
AdjustMousePos (Shift, x, y);
end;
end;
end;

procedure TForm1.AdjustMousePos(Shift: Integer; x: Longint; y: longint);
var
dx, dy: longint;
begin
//if shift key is down, draw rectangles or circles
if ( Shift = 1 ) then
begin
//if shift key is down, force the creation of squares
dx:= Abs(x - x0);
dy:= Abs(y - y0);
if (dx > dy) then
begin
// Adjust y to be as far from y0 as x is from x0
if ( y > y0) then
y := y0 + dx
else
y := y0 – dx
end
else
begin
//adjust x to be as far from x0 as y is from y0
if ( x > x0 ) then
x := x0 + dy
else x := x0 - dy;
end;
// set the mouse cursor and update its position
LEADAnn1.SetMousePos ( x, y, False );
end;
end;


OnAnnSelect example for Delphi

//This example for the OnAnnSelect event displays a message box showing the number of
//selected annotation objects. It then goes through the array of selected objects
//to see if any of them are polygons.
procedure TForm1.LEADAnn1AnnSelect(phObjects: L_PHANDLE; iCount: Integer);
var
nType: integer;
x: integer;
bSelected: Boolean;

begin
bSelected:= False;
ShowMessage ( IntToStr(iCount) + ' objects were selected' ) ;
for x:= 1 to iCount do
begin
nType:= LEADAnn1.AnnGetType (LEADAnn1.AnnGetItemHandle (phObjects, x - 1));
if ( nType = ANNOBJECT_POLYGON ) then
bSelected:= True;
end;
if ( bSelected <> True ) then
ShowMessage ( 'No Polygon Objects were selected' ) ;
end;


OnAnnToolChecked Example for Delphi

procedure TForm1.LEADAnn1AnnToolChecked(iTool: Integer);
var
TestString: String;
begin
case iTool of
ANNTOOL_SELECT:
begin
TestString:= 'Selection pointer tool';
end;

ANNTOOL_LINE:
begin
TestString:= 'Line tool';
end;

ANNTOOL_RECT:
begin
TestString:= 'Rectangle tool';
end;

ANNTOOL_ELLIPSE:
begin
TestString:= 'Ellipse tool';
end;

//.
//.
//.
else
TestString:= 'User defined tool';
end;
ShowMessage ( TestString );
end;


OnAnnToolDestroy Example for Delphi

procedure TForm1.LEADAnn1AnnToolDestroy;
begin
ShowMessage ('You have closed the toolbar.');
end;


OnAnnUnlocked Example for Delphi

The following is an example of an OnAnnUnlocked event.

procedure TForm1.LEADAnn1AnnUnlocked (hObject: L_HANDLE);
begin
ShowMessage ('AnnObject: ' + IntToStr (hObject) + ' was unlocked!');
end;


OnBitmapDataPathClosed Example for Delphi

var
gBtmpClosed: Boolean; // Global Variable

procedure TForm1.LEADImage1BitmapDataPathClosed;
begin
gBtmpClosed:= False;
ShowMessage ( 'Closed' ) ;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
gBtmpClosed:= True;
LEADImage1.BitmapDataPath:= 'http://www.leadtools.com/Home2/vertmkts/images/v13web.jpg';
while ( gBtmpClosed ) do
Application.ProcessMessages ( ) ;

LEADImage1.BitmapDataPath:= 'http://www.leadtools.com/images/end-user.jpg';
end;


OnChange example for Delphi

Typically, you would use this event to flag changed image data and prompt the user to save the changes before closing a window or exiting an application. That use of the event cannot be tested properly without writing a complete application; so this example just shows you a simple test of the event.

procedure TForm1.Lead1Change(Sender: TObject);
begin
ShowMessage('Image data has changed');
end;


OnEnumerateMarkers example for Delphi

procedure TForm1.EnumMarkersClick(Sender: TObject);
begin
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
LEADMarker1.EnumMarkers ( );
end;

procedure TForm1.LEADMarker1EnumerateMarkers(uType,
uElementCount: Cardinal);
var
i: Integer;
begin
ShowMessage ( 'Marker Type= ' + IntToStr(uType) + Chr(13) +
'Marker Element Count= ' + IntToStr(uElementCount) );
for i:= 0 to uElementCount - 1 do
begin
LEADMarker1.Element[i];
end;
end;


OnFilePage Event Example for Delphi

This example shows how the OnFilePage event can be used to size and position a lead control when an image is loaded.

procedure TForm1.Lead1FilePage(Sender: TObject);
var
HeightFactor,WidthFactor : Integer; {Factors for aspect ratio }
HeightAllowed,WidthAllowed: Integer; {Maximum width and height }
nWidth,nHeight,nLeft,nTop : Integer; {Variables for control dimensions }
rcWindow : TRect;
begin
{ Set the variables used for preserving the aspect ratio. }
{ Allow for a border of 1/8 of the form size. }
HeightFactor := Lead1.InfoHeight;
WidthFactor := Lead1.InfoWidth;
HeightAllowed := Round(ClientHeight * 3.0 / 4);
WidthAllowed := Round(ClientWidth * 3.0 / 4);

{ Center the LEAD control on the form, preserving the aspect ratio. }
{ Check to see if using the maximum width will make the image too tall. }
{ Set the dimensions based on the result. }
if(((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed) then
begin
nLeft := Round(ClientWidth / 8.0);
nWidth := WidthAllowed;
nHeight := Round((nWidth * HeightFactor) / WidthFactor);
nTop := Round((ClientHeight - nHeight) / 2);
end
else
begin
nTop := Round(ClientHeight / 8.0);
nHeight := HeightAllowed;
nWidth := Round((nHeight * WidthFactor) / HeightFactor);
nLeft := Round((ClientWidth - nWidth) / 2);
end;

rcWindow:=Rect(0, 0, nWidth, nHeight);
OffsetRect(rcWindow, nLeft, nTop);
Lead1.Left:=rcWindow.Left;
Lead1.Top:=rcWindow.Top;
Lead1.Height:=rcWindow.Bottom - rcWindow.Top;
Lead1.Width:=rcWindow.Right - rcWindow.Left;

{ Turn off scroll bars to make sure we use the full client area. }
Lead1.AutoScroll:=False;

{ Set the image display size to match the LEAD control }
Lead1.SetDstRect(0, 0,Lead1.Width, Lead1.Height);
Lead1.SetDstClipRect(0, 0, Lead1.Width, Lead1.Height);
Lead1.ForceRepaint;
end;


OnItemSelected (ImageList Control) example for Delphi

OnItemSelected (ImageList Control) example for Delphi 4

procedure TForm1.LEADImgList1ItemSelected (Sender: TObject;
nIndex: Integer);
begin
ShowMessage(LEADImgList1.Item[nIndex].Text + ' was selected!');
end;


OnLoadInfo example for Delphi

Take the following steps to exercise the OnLoadInfo event and LoadInfo... properties. The example creates a raw FAX file, then loads the file it just created. (Getting format information from an unfamiliar file is beyond the scope of this example.)

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declarations to the private section of the Unit1 file. In online help, you can copy the block of code and paste it into your application.

{Declare variables for demonstrating raw FAX.}
MyInfoBits: Integer;
MyInfoFlags: Integer;
MyInfoFormat: Integer;
MyInfoHeight: Integer;
MyInfoOffset: Longint;
MyInfoWidth: Integer;
MyInfoXRes: Integer;
MyInfoYRes: Integer;

3.

Add a CommandButton control and code its click procedure as follows:

procedure TForm1.Button1Click(Sender: TObject);
begin
{Make the image look OK as a 1-bit image.}
Lead1.Size(Lead1.Width, Lead1.Height, SIZE_RESAMPLE);
Lead1.Halftone(HT_VIEW, 45);

{Set the form-level variables to the values we will use when loading.}
MyInfoBits := 1;
MyInfoFlags := LOADINFO_TOPLEFT;
MyInfoFormat := FILE_FAX_G3_2D;
MyInfoHeight := Lead1.BitmapHeight;
MyInfoOffset := 0;
MyInfoWidth := Lead1.BitmapWidth;
MyInfoXRes := Lead1.BitmapXRes;
MyInfoYRes := Lead1.BitmapYRes;

{Save the image as raw FAX; then load the saved file.}
{Format information will be supplied in the OnLoadInfo event.}
Lead1.Save('C:\lead\IMAGES\TMP.TIF', FILE_FAX_G3_2D, 1, 1, SAVE_OVERWRITE);
Lead1.Load('C:\lead\IMAGES\TMP.TIF', 0, 0, 1);

{Repaint the newly loaded image.}
Lead1.ForceRepaint;

End;

4.

Code the Lead1 control's OnLoadInfo event as follows:

procedure TForm1.Lead1LoadInfo(Sender: TObject);
begin
{Use the form-level variables to supply format information.}
Lead1.LoadInfoBits := MyInfoBits;
Lead1.LoadInfoFlags := MyInfoFlags;
Lead1.LoadInfoFormat := MyInfoFormat;
Lead1.LoadInfoHeight := MyInfoHeight;
Lead1.LoadInfoOffset := MyInfoOffset;
Lead1.LoadInfoWidth := MyInfoWidth;
Lead1.LoadInfoXRes := MyInfoXRes;
Lead1.LoadInfoYRes := MyInfoYRes;
End;

5.

Run your program to test it.


OnOLECompleteDrag (ImageList Control) example for Delphi

procedure TForm1.LEADImgList2OLECompleteDrag(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
str: String;
begin
str:= 'LEADImgList2: OLE Complete Drag at pos X = ' + IntToStr(X) + ' and pos Y = ' + IntToStr(Y);

ShowMessage(str);
end;

procedure TForm1.LEADImgList1OLEDragOver(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
str: String;
begin
str := 'LEADImgList1: OLE Drag Over at pos X = ' + IntToStr(X) + ' and pos Y = ' + IntToStr(Y);
ShowMessage(str);
end;

procedure TForm1.LEADImgList1OLEStartDrag(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
str: String;
begin
str := 'LEADImgList1: OLE Start Drag at pos X = ' + IntToStr(X) + ' and pos Y = ' + IntToStr(Y);
ShowMessage(str);

end;


OnOLECompleteDrag (Main Control) example for Delphi

procedure TForm1.LEADImage2OLECompleteDrag(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
str: String;
begin
str:= ' LEADImage2: OLE Complete Drag at pos X = ' + IntToStr(X) + ' and pos Y = ' + IntToStr(Y);
ShowMessage(str);
end;

procedure TForm1.LEADImage1OLEDragOver(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
str: String;
begin
str := 'LEADImage1: OLE Drag Over at pos X = ' + IntToStr(X) + ' and pos Y = ' + IntToStr(Y);

ShowMessage(str);
end;

procedure TForm1.LEADImage1OLEStartDrag(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var
str: String;
begin
str := ' LEADImage1: OLE Start Drag at pos X = ' + IntToStr(X) + ' and pos Y = ' + IntToStr(Y);

ShowMessage(str);
end;


OnPaint event example for Delphi

1. | Start with the project that you created in Loading and Displaying an Image.
2. | Add the following declarations to the private section of the Unit1 file:

MyRect: TRect; {Used with the OnPaint event example}
MyPoint: TPoint; {Used with the OnPaint event example}

3. | Add a button to the top of your main form, and in the Object Inspector box, change both its name and caption to Toggle.
4. | Add an edit box to the top of your form, and in the Object Inspector box, change its name to Directions, and change its Text property to the following:

Use the Toggle button to turn on or turn off Click-Splat

5.

Code the Toggle button's Click procedure as follows. This code uses the Enabled property to toggle the LEAD control's ability to respond to click events.

procedure TForm1.ToggleClick(Sender: TObject);

begin
Lead1.AutoRepaint := False;
If (Lead1.Enabled = False) Then
begin
Lead1.Enabled := True;
Directions.Text := 'Click on the image for a splat';
Toggle.Caption := 'Disable';
end
Else
begin
Lead1.Enabled := False;
Directions.Text := 'Click does nothing';
Toggle.Caption := 'Enable';
end;

end;

6.

Code the LEAD control's Click procedure as follows. When the Enabled property is true, this code uses a Windows API call to generate a paint event.

procedure TForm1.Lead1Click (Sender: TObject);
var
hCtl: THandle;
begin
{Do not use this event until the user enables it.}
If Toggle.Caption <> 'Disable' Then Exit;

{ Use InvalidateRect to generate a paint message}
MyRect.left := 0;
MyRect.top := 0;
MyRect.bottom := round(Lead1.Height);
MyRect.right := round(Lead1.Width);
hCtl :=.Lead1.handle;
InvalidateRect( hCtl, @MyRect, True);

end;

7.

Code the LEAD control's Paint procedure as follows. The procedure uses Windows GDI functions to draw random lines on the control whenever there is an OnPaint event.

procedure TForm1.Lead1Paint(Sender: TObject);
var
i, xStart, yStart, xDelta, yDelta, xEnd, yEnd: Integer;
LeadClientDC: HDC;

begin
{Do not use this event until the user enables it.}
If Toggle.Caption <> 'Disable' Then Exit;

MyPoint.x := 0;
MyPoint.y := 0;

{ Create a device context for the control that the GDI functions can access}
LeadClientDC := Lead1.GetClientDC;

{ Draw random lines on the control. This is an overlay that does not affect the bitmap.}
xStart := Random(round(Lead1.Width) + 1);
yStart := Random(round(Lead1.Height) + 1);
MoveToEx(LeadClientDC, xStart, yStart, @MyPoint);
For i := 1 To 50 do
Begin
xDelta := Random(81) - 40;
yDelta := Random(81) - 40;
xEnd := xStart + xDelta;
yEnd := yStart + yDelta;
LineTo(LeadClientDC, xEnd, yEnd);
MoveToEx(LeadClientDC, xStart, yStart, @MyPoint);
end;

{ Remove the lock from the device control}
Lead1.ReleaseClientDC;

end;

8.

Run your program to test it.


OnRgnChange example for Delphi

procedure TForm1.Lead1RgnChange(Sender: TObject);
var
{Declare a local variable. }
MyText: String;

begin
MyText := 'Number of pixels in region: ';
MyText := MyText + IntToStr(Lead1.GetRgnArea);
Edit1.Text := MyText;
end;


OnScroll event example for Delphi

Before using this example you must add an Edit control to your form. Then, you can exercise this example by coding a command button that loads an image with the AutoScroll property set to True.

procedure TForm1.Lead1Scroll(Sender: TObject);

begin
Edit1.Text := 'Image origin: ' +
IntToStr(round(Lead1.DstLeft)) + ', ' +
IntToStr(round(Lead1.DstTop));
end;


OnZoomInDone example for Delphi

This example triggers the OnZoomInDone event and displays a message that the ZoomIn image has been captured.

procedure TForm1.LeadCtrl1ZoomInDone (Sender: TObject; x, y: Integer);
var
msg : string;
begin
msg := 'ZoomIn Captured: ' + IntToStr(x) + ',' + IntToStr(y);
ShowMessage(msg);
end;


OwnerDrawItem event example for Delphi

procedure TForm1.LEADImgList1OwnerDrawItemEvent(nIndex: Integer; h_DC: HDC;
ItemLeft, ItemTop, ItemRight, ItemBottom, ItemBackLeft, ItemBackTop,
ItemBackRight, ItemBackBottom: Integer);
var
szText: String;
begin
//use Windows GDI to custom paints the items

szText:= LEADImgList1.Item[nIndex].Text;
Ellipse ( h_DC, ItemLeft, ItemTop, ItemRight, ItemBottom ) ;
TextOut ( h_DC, ItemLeft, ItemTop, PChar(szText), strlen(PChar(szText)) ) ;
end;


OwnerDrawItems example for Delphi

//toggle OwnerDraw
LEADImgList1.OwnerDrawItems := not LEADImgList1.OwnerDrawItems;


PageCount (ImageList Control) example for Delphi

PageCount (ImageList Control) example for Delphi 4

Write OnScroll event handler as follows:

procedure TForm1.LEADImgList1Scroll(Sender: TObject);
begin
ShowMessage('Page: ' + IntToStr(LEADImgList1.CurrentPage) + ' of ' +
IntToStr(LEADImgList1.PageCount));
end;


PaintContrast example for Delphi

This example increases the contrast for painting images.

Lead1.PaintContrast := Lead1.PaintContrast + 100;
Lead1.ForceRepaint();


PaintDither (ImageList Control) example for Delphi

PaintDither (ImageList Control) example for Delphi 4

{set the control to use error diffusion}
LEADImgList1.PaintDither := pdDiffusion;


PaintDither example for Delphi

This example turns on error diffusion and redisplays the bitmap.

Lead1.PaintDither := pdDiffusion;
Lead1.ForceRepaint;


PaintEffect example for Delphi

The following modules use the KeyDown and KeyUp events to repaint the image with effects:

procedure TForm1.Lead1KeyDown (Sender: TObject; var Key: Word; Shift: TShiftState);
begin

If Key = 116 Then {Code for F5}
begin
Lead1.AutoRepaint := False;
Lead1.BackErase := True;
Lead1.EffectGrain := 20;
Lead1.EffectDelay := 50;
Lead1.WandSize := 5;
Lead1.WandColor := RGB(255,255,0); {Yellow Wand}
Lead1.PaintEffect := EFX_EFFECT_WIPE_L_TO_R;
Lead1.ForceRepaint();
end;
end;

procedure TForm1.Lead1KeyUp (Sender: TObject; var Key: Word; Shift: TShiftState);
begin

If Key = 116 Then {Code for F5}
begin
Lead1.PaintEffect := EFX_EFFECT_WIPE_R_TO_L;
Lead1.ForceRepaint();
Lead1.PaintEffect := EFX_EFFECT_NONE;
end;
end;


PaintGamma example for Delphi

This example increases the gamma correction for painting images.

Lead1.PaintGamma := Lead1.PaintGamma + 100;
Lead1.ForceRepaint();


PaintIntensity example for Delphi

This example increases the intensity for painting images.

Lead1.PaintIntensity := Lead1.PaintIntensity + 100;
Lead1.ForceRepaint();


PaintMaxPasses example for Delphi

This example includes two procedures. First, a button click starts a multi-pass paint effect; then LEAD's OnPaintNotify event changes the direction of the effect on each pass.

procedure TForm1.PaintPassesClick(Sender: TObject);
begin
Lead1.AutoRepaint := False;
{Set the effect}
Lead1.PaintEffect := EFX_EFFECT_WIPE_L_TO_R;
Lead1.PaintMaxPasses := 5; {5 total passes}
Lead1.PaintPass := 1; {Start with pass number 1}
Lead1.PaintNotificationDelay := 200; {Delay 200 milliseconds between passes}
Lead1.EffectDelay := 10;
Lead1.Load ('c:\lead\images\image1.cmp', 0, 0, 1); {load the image}
Lead1.AutoRepaint := True;
end;

procedure TForm1.Lead1PaintNotify(Sender: TObject; uPass,
uType: Cardinal);
begin
{If the first pass is complete, toggle the effect from left_to_right to right_to_left }
If ((uType = EFX_NOTIFY_IMAGE) And (uPass > 0)) Then
If (Lead1.PaintEffect = EFX_EFFECT_WIPE_L_TO_R) Then
Lead1.PaintEffect := EFX_EFFECT_WIPE_R_TO_L
Else
Lead1.PaintEffect := EFX_EFFECT_WIPE_L_TO_R;
end;


PaintPalette example for Delphi

This example sets the paint palette to the palette of each Lead control. It then loads two images and dithers them to 8 bits per pixel with optimized palettes, and displays them side by side. In 8-bit display mode, you can see the palette problems that result when you do not use a fixed palette.

procedure TForm1.Button3Click(Sender: TObject);

var
HeightFactor1, WidthFactor1, HeightFactor2, WidthFactor2, HeightAllowed, WidthAllowed: Integer;

begin
{
{Let the controls use the bitmaps' own palettes.}
Lead1.PaintPalette := ppAuto;
Lead2.PaintPalette := ppAuto;

{Disable automatic repainting of the image.}
Lead1.AutoRepaint := False;
Lead2.AutoRepaint := False;

{Turn off scroll bars to make sure we use the full client area.}
Lead1.AutoScroll := False;
Lead2.AutoScroll := False;

{Clear the bitmaps from memory}
Lead1.Bitmap := 0;
Lead2.Bitmap := 0;
Screen.Cursor := crHourglass; {Hourglass}

{Load the bitmaps. These hard-coded path names may be different on your system.}
Lead1.Load('C:\lead\IMAGES\IMAGE1.CMP', 0, 0, 1);
Lead2.Load('C:\lead\IMAGES\IMAGE2.CMP', 0, 0, 1);

{Change the bitmaps to 8 BPS with optimized palettes}
Lead1.ColorRes(8, CRF_OPTIMIZEDPALETTE, CRF_FLOYDSTEINDITHERING, 0);
Lead2.ColorRes(8, CRF_OPTIMIZEDPALETTE, CRF_FLOYDSTEINDITHERING, 0);

{Make the controls visible so that we can size and position them.}
{They will not really appear until we load an image and paint it.}
Lead1.Visible := True;
Lead2.Visible := True;

{Set the variables used for preserving the aspect ratio.}
HeightFactor1 := Lead1.BitmapHeight;
WidthFactor1 := Lead1.BitmapWidth;
HeightFactor2 := Lead2.BitmapHeight;
WidthFactor2 := Lead2.BitmapWidth;
HeightAllowed := (ClientHeight * 8) div 10;
WidthAllowed := (ClientWidth * 45) div 100;

{Center each LEAD control on half of the form, preserving the aspect ratio.}
{Check to see if using the maximum width will make the image too tall.}
{Set the dimensions based on the result.}
If (WidthAllowed * HeightFactor1) div WidthFactor1 < HeightAllowed Then
begin
Lead1.Left := round((ClientWidth / 4) - (WidthAllowed / 2));
Lead1.Width := round(WidthAllowed);
Lead1.Height := round((Lead1.Width * HeightFactor1) / WidthFactor1);
Lead1.Top := round((ClientHeight - Lead1.Height) / 2);
end
Else
begin
Lead1.Top := round((ClientHeight - HeightAllowed) / 2);
Lead1.Height := HeightAllowed;
Lead1.Width := round((Lead1.Height * WidthFactor1) / HeightFactor1);
Lead1.Left := round((ClientWidth / 4) - (Lead1.Width / 2));
End;

If (WidthAllowed * HeightFactor2) div WidthFactor2 < HeightAllowed Then
begin
Lead2.Left := round((ClientWidth * 3/4) - (WidthAllowed / 2));
Lead2.Width := WidthAllowed;
Lead2.Height := round((Lead2.Width * HeightFactor2) / WidthFactor2);
Lead2.Top := round((ClientHeight - Lead2.Height) / 2);
end
Else
begin
Lead2.Top := round((ClientHeight - HeightAllowed) / 2);
Lead2.Height := HeightAllowed;
Lead2.Width := round((Lead2.Height * WidthFactor2) / HeightFactor2);
Lead2.Left := round((ClientWidth * 3 / 4) - (Lead2.Width / 2));
End;

{Set the image display sizes to match the LEAD controls}
Lead1.SetDstRect(0, 0, Lead1.BitmapWidth, Lead1.BitmapHeight);
Lead1.SetDstClipRect(0, 0, Lead1.BitmapWidth, Lead1.BitmapHeight);
Lead2.SetDstRect(0, 0, Lead2.BitmapWidth, Lead2.BitmapHeight);
Lead2.SetDstClipRect(0, 0, Lead2.BitmapWidth, Lead2.BitmapHeight);

{Display the images}
Lead1.ForceRepaint;
Lead2.ForceRepaint;
Screen.Cursor := crDefault;

end;


PaintRgnOnly example for Delphi

Procedure TForm1.Test() ;
Begin
Lead1.SetRgnEllipse(0, 0, 200, 200, L_RGN_SET);
Lead1.PaintRgnOnly := true;
End;


PaintROP3 example for Delphi

This example demonstrates the PaintROP3 property.

{ Paint an inverted image.}
Lead1.PaintROP3 := SRCINVERT;


PaintScaling example for Delphi (ImageList Control)

procedure TForm1.Button1Click(Sender: TObject);
begin
{toggle through the paint scale modes}
Case LEADImgList1.PaintScaling of
psNormal:
begin
LEADImgList1.PaintScaling := psResample;
Edit1.Text := 'Resample';
end;
psResample:
begin
LEADImgList1.PaintScaling := psBicubic;
Edit1.Text := 'Bicubic' ;
end;
psBicubic:
begin
LEADImgList1.PaintScaling := psNormal;
Edit1.Text := 'Normal';
end;
end;
end;


PaintScaling example for Delphi (Main Control)

PaintScaling eample for Delphi (Main Control)

{This example sets the display to use bilinear interpolation}
LeadImage1.PaintScaling := psResample;


PaintSizeMode Example for Delphi

This example shows how to set the PaintSizeMode property so that the control uses only a vertical scroll bar.

Lead1.AutoScroll:=True;
Lead1.AutoSetRects:=True;
Lead1.PaintSizeMode:= smFitSides;
Lead1.ForceRepaint;


PaintSizeUseDPI example for Delphi

This example toggles the PaintSizeUseDPI property.

If (Lead1.PaintSizeUseDPI = False) Then
Lead1.PaintSizeUseDPI := True
Else
Lead1.PaintSizeUseDPI := False;


PaintWhileLoad example for Delphi

This example causes the LEAD control to paint the image as it loads.

procedure TForm1.Button3Click(Sender: TObject);

var
HeightFactor, WidthFactor, HeightAllowed, WidthAllowed: Single;
ImageHeight, ImageWidth, BitmapHeight, BitmapWidth: integer;

begin
Lead1.PaintWhileLoad := True;

{Get information about the image so that we can size the control.}
Lead1.GetFileInfo('c:\lead\images\image2.cmp', 0);

{Set the variables used for preserving the aspect ratio.}
{Allow for a border of 1/8 of the form size.}
HeightFactor := Lead1.InfoHeight;
WidthFactor := Lead1.InfoWidth;
HeightAllowed := ClientHeight * 3/4;
WidthAllowed := ClientWidth * 3/4;

{Center the LEAD control on the form, preserving the aspect ratio.}
{Check to see if using the maximum width will make the image too tall.}
{Set the dimensions based on the result.}
If ((WidthAllowed * HeightFactor) / WidthFactor) < HeightAllowed Then
begin
Lead1.Left := round(ClientWidth / 8);
Lead1.Width := round(WidthAllowed);
Lead1.Height := round((Lead1.Width * HeightFactor) / WidthFactor);
Lead1.Top := round((ClientHeight - Lead1.Height) / 2);
end
Else
begin
Lead1.Top := round(ClientHeight / 8);
Lead1.Height := round(HeightAllowed);
Lead1.Width := round((Lead1.Height * WidthFactor) / HeightFactor);
Lead1.Left := round((ClientWidth - Lead1.Width) / 2);
End;

{Set the image display sizes}
ImageHeight := Lead1.Height;
ImageWidth := Lead1.Width;
BitmapHeight := Lead1.InfoHeight;
BitmapWidth := Lead1.InfoWidth;
Lead1.SetSrcRect(0, 0, BitmapWidth, BitmapHeight);
Lead1.SetSrcClipRect(0, 0, BitmapWidth, BitmapHeight);
Lead1.SetDstRect(0, 0, ImageWidth, ImageHeight);
Lead1.SetDstClipRect(0, 0, ImageWidth, ImageHeight);

{Turn off the automatic adjustment of display rectangles}
Lead1.AutoSetRects := False;

{Load the file}
Lead1.Load('c:\lead\images\image2.cmp', 0, 0, 1);

{Turn on the automatic adjustment of display rectangles for future use}
Lead1.AutoSetRects := True;

end;


PaintZoomFactor Example for Delphi

This example shows how to set the PaintZoomFactor property so that image is scaled 200 percent for display.

Lead1.AutoScroll:=False;
Lead1.AutoSetRects:=True;
Lead1.PaintSizeMode:=smZoom;
Lead1.PaintZoomFactor:=200;
Lead1.ForceRepaint;


PatternStyle example for Delphi

This example paints a transition with a diagonal cross pattern.

Lead1.AutoRepaint := False;
Lead1.EffectDelay := 50;
Lead1.Load ('c:\lead\images\image1.cmp', 0, 0, 1);
Lead1.TransitionEffect := EFX_EFFECT_WIPE_RECTANGLE_OUT;
Lead1.TransitionStyle := etsPattern;
Lead1.PatternStyle := epsDiagCross;
Lead1.PatternBackColor := RGB(255, 0, 0);
Lead1.PatternForeColor := RGB(0, 0, 255);
Lead1.AutoRepaint := True;


PCDRes example for Delphi

This example checks for a high resolution image and loads it if possible.

procedure TForm1.Button3Click(Sender: TObject);

var
myfile, msg: String;

begin
myfile := 'v:\images\img0024.pcd'; {No PCD sample image is included with LEADTOOLS}
Lead1.GetFileInfo(myfile, 0);

If Lead1.InfoPCDRes[L_PCD_4BASE] = True Then
begin
Lead1.PCDRes := L_PCD_4BASE;
msg := 'Loading 1024 x 1536 resolution';
end
Else
begin
Lead1.PCDRes := L_PCD_BASE;
msg := 'Loading 512 x 768 resolution';
End;

ShowMessage(msg);
Screen.Cursor := crHourglass;

{Turn on the automatic display rectangles and the scroll bars.}
Lead1.AutoSetRects := True;
Lead1.AutoScroll := True;

{Load the file.}
Lead1.Load(myfile, 0, 0, 1);
Lead1.ForceRepaint;
Screen.Cursor := crDefault;

end;


PDFEncryptFlags example for Delphi

LEADImage1.PDFUserPassword:= 'UserPassword';
LEADImage1.PDFOwnerPassword:= 'OwnerPassword';
LEADImage1.PDFEnable128bit:= True;
LEADImage1.PDFEncryptFlags:= PDF_SECURITYFLAGS_REV2_PRINTDOCUMENT;
LEADImage1.Save ( 'c:\test.PDF', FILE_RAS_PDF, 0, 0, SAVE_OVERWRITE );


PDFInitDir example for Delphi

procedure TForm1.GetPDFInitDirClick(Sender: TObject);
begin
ShowMessage(LEADImage1.PDFInitDir);
end;

procedure TForm1.SetPDFInitDirClick(Sender: TObject);
begin
LEADImage1.PDFInitDir:= 'c:\Runtime PDF\PDF';
end;


PDFSaveUseDPI example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
//Use image DPI when saving as PDF .
LEADImage1.PDFSaveUseDPI:= True;
//Save image as Raster PDF with CCITT G4 compression
LEADImage1.Save ('c:\temp\test.pdf', FILE_RAS_PDF_G4, 1, 1, SAVE_OVERWRITE);
end;


PDFXResolution example for Delphi

//This example does the following:
// 1- Changes the horizontal and vertical PDF resolutions to 150 dpi.
// 2- Sets the pixel depth to 8.
// 3- Disables both font and graphics anti-aliasing.
// 4- Forces the PDF module to use it's own installed fonts.
// 5- Loads a PDF file using the new settings.

//Set horizontal resolution
LEAD1.PDFXResolution := 150;
//Set vertical resolution
LEAD1.PDFYResolution := 150;
//Set Display depth
LEAD1.PDFDisplayDepth := 8;
// No font anti-aliasing
LEAD1.PDFTextAlpha := 1;
// No graphics anti-aliasing
LEAD1.PDFGraphicsAlpha := 1;
// Use fonts installed by the PDF module
LEAD1.PDFUseLibFonts := True;
//Load the PDF file
LEAD1.Load( 'C:\test.pdf', 0, 0, 1 );


Picturize example for Delphi

{ replace the current image in the main control with an image created
from all the images present in c:\images. Resize all images present in that directory
to 24x24 pixels and load them all in memory before proceeding }

Screen.Cursor:= crHourGlass;
LEADImage1->Picturize('c:\images', PICTURIZE_LOADALL+PICTURIZE_RESIZE, 24, 24);
Screen.Cursor:= crDefault;


PicturizeBitmapList example for Delphi

LEADImage1.PicturizeBitmapList (20, 15, 200, LEADImage3.BitmapList);


PicturizeSingle example for Delphi

LEADImage2.Load ('v:\images\image1.cmp', 0, 1, 1 );
LEADImage1.PicturizeSingle (LEADImage2.Bitmap, 20, 15, 200);


Pixel example for Delphi

procedure TForm1.Lead1MouseDown (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
xycolor : Longint;
xfraction, yfraction : Single;
xPixel, yPixel, xWidth : Integer;

begin
Lead1.AutoRepaint := False;

{Translate mouse coordinates to fractions of the destination width and height }
xfraction := (x - Lead1.DstLeft) / Lead1.DstWidth;
yfraction := (y - Lead1.DstTop) / Lead1.DstHeight;

{Convert fractions to bitmap pixel coordinates}
xPixel := Round((Lead1.SrcWidth * xfraction) + Lead1.SrcLeft);
yPixel := Round((Lead1.SrcHeight * yfraction) + Lead1.SrcTop);

{Make the whole line the same color as the pixel}
xycolor := Lead1.Pixel[xPixel, yPixel];

xWidth := Lead1.BitmapWidth;

Y := yPixel;

for X := 0 to xWidth-1 do
Lead1.Pixel[X, Y] := xycolor;
Lead1.ForceRepaint();
end;


Pixelate Example for Delphi

procedure TForm1.PixelateClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x := Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y := Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.Pixelate( 5, 10, 100, ptCenter, PIX_AVR Or PIX_RAD Or PIX_WPER Or PIX_HPER );
end;


Plane Example for Delphi

procedure TForm1.PlaneClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc( LEADImage1.BitmapWidth /2 );
ptCenter.y:= Trunc( LEADImage1.BitmapHeight /2 );

LEADImage1.Plane( ptCenter, 0, Trunc(LEADImage1.BitmapHeight), Trunc(LEADImage1.BitmapWidth/2), -1, 0, 25, 0, 0, 50, RGB(255,0,255), RGB(0,0,0), PLANE_RIGHT Or PLANE_LEFT Or PLANE_FILL_CLR );
end;


PlaneBend Example for Delphi

procedure TForm1.PlaneBendClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc( LEADImage1.BitmapWidth );
ptCenter.y:= Trunc( LEADImage1.BitmapHeight /2 );

LEADImage1.PlaneBend( ptCenter, 0, Trunc(LEADImage1.BitmapHeight), Trunc(LEADImage1.BitmapWidth/2), -1, 0, 25, 100, 0, 0, 50, RGB(255,0,0), RGB(0,0,0), PLANE_DOWN Or PLANE_UP Or PLANE_FILL_CLR );
end;


PLTPenColor example for Delphi

procedure TForm1.Button2Click(Sender: TObject);
var
uPen: L_UINT;
uWidth: L_UINT;
crColor: COLORREF;
begin
for uPen:= 0 to 7 do
begin
uWidth:= Round(uPen/2) + 1;
Case ( uWidth ) of
1:
begin
crColor:= RGB ( 255, 0, 0 );
end;
2:
begin
crColor:= RGB ( 0, 255, 0 );
end;
3:
begin
crColor:= RGB ( 0, 0, 255 );
end;
4:
begin
crColor:= RGB ( 255, 255, 0 );
end;
else
begin
crColor:= RGB ( 255, 0, 255 );
end;
end;
{ Change Pen width }
LEADImage1.PLTPenWidth[uPen]:= uWidth;

{ Change Pen color }
LEADImage1.PLTPenColor[uPen]:= crColor ;
end;

{ Now load the PLT file }
LEADImage1.Load( 'c:\image1.plt', 0, 0, 1 );
end;


Polar Example for Delphi

procedure TForm1.PolarClick(Sender: TObject);
begin
LEADImage1.Polar( 0, FILL_RPT Or CART_TO_POL );
end;


Posterize example for Delphi

This example applies a six-color poster effect and redisplays the image.

Lead1.Posterize(6);
Lead1.ForceRepaint;


PreferredLoadFormat example for Delphi

LEADImage1.PreferredLoadFormat := FILE_CMP;


PreLoadFilters Example for Delphi

This example shows how to preload filters.

{preload the BMP, PCX, FAX, and TIFF filters,}
{and allow 1 filter to be cached, while always}
{keeping 3 loaded.}
Lead1.PreLoadFilters(3, 1, 'BMP,PCX,FAX,TIF');


ProgressivePasses Example for Delphi

This example shows how to save and load a progressive file.

procedure TForm1.Button10Click(Sender: TObject);
begin
{ Save the current image as a progressive CMP file. }
Lead1.ProgressivePasses := 8;
Lead1.Save('c:\lead\images\TMP.cmp', FILE_CMP, 24, PQ2, SAVE_OVERWRITE);

{ Set properties to show progressive paints when we load. }
Lead1.PaintWhileLoad := True;
Lead1.AutoSetRects := False;

{ Load the file we just saved. }
Lead1.ProgressivePasses := PROGRESSIVEPASSES_WHEN_MEANINGFUL;
Lead1.Load('c:\lead\images\TMP.cmp', 0, 0, 1);

{ Restore the default behavior. }
Lead1.ProgressivePasses := 0;
end;


PTKResolution example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Set new PTK option }
LEAdImage1.PTKResolution:= 120;

{ Now load the PTK file }
LEADImage1.Load( 'c:\Image1.ptk', 0, 1, 1 );
end;


Punch Example for Delphi

procedure TForm1.PunchClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.Punch( 100, 100, ptCenter, 0, FILL_RPT Or FILL_WOUTROT );
end;


PuzzleEffect Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('e:\\image1.cmp', 0, 1, 1 );

{ Apply Puzzle Effect to this bitmap }
LEADImage1.PuzzleEffect(10, 10, 0, RGB(100,0,0), PUZZLE_BORDER + PUZZLE_SHUFFLE + PUZZLE_COUNT + BITMAP_RESIZE);
end;


RadialBlur Example for Delphi

procedure TForm1.RadialBlurClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.RadialBlur( 50, 10, ptCenter );
end;


RadWave Example for Delphi

procedure TForm1.RadWaveClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.RadWave( 5, 25, 0, ptCenter, 0, FILL_RPT Or DIS_FRQ );
end;


RasterizeViewportWidth example for Delphi

Add to the use section the file LEADDef.
// This example will set current viewport mode to //L2D_USE_WIDTH_AND_HEIGHT,
// sets the current viewport size to 400*400 pixels and then loads a DXF file

// Set viewport mode to L2D_USE_WIDTH_HEIGHT
LEAD1.RasterizeViewMode:= L2D_USE_WIDTH_HEIGHT ;
// Set viewport size to 400*400 pixels
LEAD1.RasterizeViewportWidth := 400 ;
LEAD1.RasterizeViewportHeight := 400 ;
// Load a DXF file
LEAD1.Load ( 'c:\Test.dxf', 0, 0, 1 ) ;


RawLoad Example for Delphi

//This example loads RAW data into a LEAD control.
//Raw data parameters are set in the LoadInfo event, which gets called
//when the file format is FILE_RAW, or any unrecognized file format.
//The LoadInfo event obtains information through private variables.
Add these variables and procedure declarations to the private section of the Form1.
//variables used in the LoadInfo event
nWidth: Integer; //width of image
nHeight: Integer; //height of image
nBitsPerPixel: Integer; // bits per pixel of image--if palettized, a gray palette is generated
nViewPerspective: Integer; //view perspective of raw data (TOP_LEFT, BOTTOM_LEFT, etc)
bOrderBGR: Boolean; //TRUE if order BGR, FALSE if order RGB
nOffset: Integer; //offset into file where raw data begins
bPadding: Boolean; //TRUE if each line of data is padded to four bytes
bReverseBits: Boolean; //TRUE if the bits of each byte are reversed
procedure LoadRawData(strFileName: String);

procedure TForm1.LoadRawData(strFileName: String);
var
nRet: Integer;
//Fill in the values of the private variables
//The priavte variables will get access in the LoadInfo event
begin
nWidth:= 294;
nHeight:= 415;
nBitsPerPixel:= 24;
nViewPerspective:= BOTTOM_LEFT;
bOrderBGR:= True;
nOffset:= 100;
bPadding:= True;
bReverseBits:= True;

nRet:= LEADImage1.Load(strFileName, nBitsPerPixel, 0, 1);
if(nRet = SUCCESS)then
ShowMessage('SUCCESS file load: ' + strFileName)
else
ShowMessage('FAILED--file load: ' + strFileName);
end;

procedure TForm1.LEADImage1LoadInfo(Sender: TObject);
var
i: Integer;
nGray: Byte;
nColors: Integer;
begin
LEADImage1.LoadInfoFormat:= FILE_RAW;
LEADImage1.LoadInfoWidth:= nWidth;
LEADImage1.LoadInfoHeight:= nHeight;
LEADImage1.LoadInfoBits:= nBitsPerPixel;
LEADImage1.LoadInfoXRes:= 150;
LEADImage1.LoadInfoYRes:= 150;
LEADImage1.LoadInfoOffset:= nOffset;
LEADImage1.LoadInfoFlags:= 0;

if(bPadding)then
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_PAD4;

if(bOrderBGR = False)then
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_ORDERRGB;

if(bReverseBits)then
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_LSB;

case (nViewPerspective) of
TOP_LEFT:
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_TOPLEFT;

BOTTOM_LEFT:
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_REVERSE;

TOP_RIGHT: //BOTTOM_LEFT180
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_BOTTOMLEFT180;

BOTTOM_RIGHT: //TOP_LEFT180
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_TOPLEFT180;

RIGHT_TOP: //TOP_LEFT90
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_TOPLEFT90;

LEFT_BOTTOM: //TOP_LEFT270
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_TOPLEFT270;

LEFT_TOP: //BOTTOM_LEFT90
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_BOTTOMLEFT90;

RIGHT_BOTTOM: //BOTTOM_LEFT270
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_BOTTOMLEFT270;
end;

//if image is palettized create a grayscale palette
if(nBitsPerPixel <= 8)then
begin
nColors:= Trunc(Power(2, nBitsPerPixel));
LEADImage1.LoadInfoFlags:= LEADImage1.LoadInfoFlags Or LOADINFO_PALETTE;

for i:= 0 to nColors - 1 do
begin
nGray:= Trunc((i * 256) / nColors);
LEADImage1.UserPalette[i]:= RGB(nGray, nGray, nGray);
end;
end;
end;


RawSave Example for Delphi

//This example saves a LEAD TBitmapHandle as RAW data starting at offset uOffset.
//The data is padded so that each line of bytes is evenly divided by 4.
//The bits in each byte are reversed before saving.
//The bits per pixel of the raw data is the same as the bits per pixel of Bitmap property.
//If LEADImage1.Bitmap is a palettized image, the palette is not saved--only the raw data.
procedure TForm1.SaveRawData(strFileName: String; uOffset: Cardinal);
var
nRet: Integer;
begin
LEADImage1.SaveLSB:= True;
LEADImage1.SavePad4:= True;
nRet:= LEADImage1.SaveOffset(strFileName, uOffset, FILE_RAW, 0, 0, 0);
if(nRet = SUCCESS)then
ShowMessage('SUCCESS file save: ' + strFileName + ' Size Written: ' + IntToStr(LEADImage1.FileSizeWritten))
else
ShowMessage('FAILED--file save: ' + strFileName);
end;


ReadLoadResolutions Example for Delphi

This example shows how to use the methods and properties for FlashPix files.

var

InfoStr: String; { For composing message strings }
i: Integer; { Loop counter }

begin

{ Initialize the display }
Lead1.AutoScroll := False;
Lead1.AutoSetRects := True;
Lead1.PaintSizeMode := smFit;
Lead1.GetFileInfo('v:\images\image5.fpx', 0);

{ Update information about the available resolutions. }
Lead1.ReadLoadResolutions('v:\images\image5.fpx');

{ Display a message box that shows the available sizes. }
InfoStr := 'Available dimensions:' + CHR(13);

for i := 0 to Lead1.LoadResolutionCount - 1 do
begin
InfoStr := InfoStr + IntToStr(Lead1.LoadResolutionWidth[i]) + ' x ' + IntToStr(Lead1.LoadResolutionHeight[i]) + CHR(13);
end;

Application.MessageBox(PChar(InfoStr), 'File Information', mb_OK);

{ Set the size to load, the smallest size in this case. }
Lead1.SetLoadResolution(Lead1.InfoFormat, Lead1.LoadResolutionWidth[Lead1.LoadResolutionCount - 1], Lead1.LoadResolutionHeight[Lead1.LoadResolutionCount - 1]);

{ Get the dimensions that we just set and display them. }
Lead1.GetLoadResolution(Lead1.InfoFormat);

InfoStr := 'Size that will be loaded:' + CHR(13) + CHR(13) + IntToStr(Lead1.LoadResolutionWidth[0]) + ' x ' + IntToStr(Lead1.LoadResolutionHeight[0]) + CHR(13);

Application.MessageBox(PChar(InfoStr), 'File Information', mb_OK);

{ Load the bitmap, keeping the bits per pixel of the file. }
Lead1.Load('v:\images\image5.fpx', 0, 0, 1);

end;


ReadTagMemory example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
const
DATACOUNT= 4;

var
nRet: L_INT;
LogoPosition: L_UINT16; { my private tag }
vTagData: Variant;
vSavedData: Variant;
hFileInMemory: L_HANDLE; { memory handle for the file }
nMemSize: L_INT32; { size of the file in memory }

begin
LogoPosition:= $8001;
vTagData:= VarArrayCreate ([0,DATACOUNT-1], varWord);

vTagData[0]:= 5;
vTagData[1]:= 5;
vTagData[2]:= 24;
vTagData[3]:= 37;

{ Set the tag data to be saved }
LEADImage1.SetTag(LogoPosition, TAG_SSHORT, DATACOUNT, vTagData );
{ Save the image as a TIFF file in memory }
LEADImage1.SaveMemory( hFileInMemory, FILE_TIF, LEADImage1.BitmapBits, 0, nMemSize );

{ Get the tagged data }
nRet:= LEADImage1.ReadTagMemory( hFileInMemory, nMemSize, 1, LogoPosition );
if ( nRet = SUCCESS ) then
begin
{ Display a message showing the data }
if ( (LEADImage1.GetTagType(LogoPosition) = TAG_SSHORT) And (LEADImage1.GetTagCount(LogoPosition) = DATACOUNT) ) then
begin
vSavedData:= LEADImage1.GetTagData(0);
ShowMessage ( 'X = ' + IntToStr(vSavedData[0]) + Chr(13) +
'Y = ' + IntToStr(vSavedData[1]) + Chr(13) +
'nWidth = ' + IntToStr(vSavedData[2]) + Chr(13) +
'nHeight = ' + IntToStr(vSavedData[3]) );
end;
end;

{ Free memory that we no longer need }
if ( hFileInMemory <> 0 ) then
GlobalFree ( hFileInMemory );
end;


ReadyState Example for Delphi

This example shows how to use the ReadyState property to test whether an asynchronous load is in progress.

if Lead1.ReadyState = rsLoading then
ShowMessage('Still loading the image');


RemapHue example for Delphi

{
This example considers that the image you are working with is 24 bpp.
This example changes all green hues(and hues near green) to the hue of crNewColor
}
Function Increment(x: L_UINT): L_UINT;
begin
Result:= (x + 1) Mod 256;
End;

Function Decrement(x: L_UINT): L_UINT;
begin
Result:= (x + 255) Mod 256;
End;

Function Add(x: L_UINT; y: L_UINT): L_UINT;
begin
Result:= (x + y) Mod 256;
End;

procedure TForm1.Button1Click(Sender: TObject);
var
i: L_INT;
nHueGreen: L_INT;
nHueNewColor: L_INT;
nHueChange: L_INT;
crNewColor: COLORREF;
uCount: L_UINT;

begin
LEADImage1.RemapHueTablesSize:= 256;

for i:= 0 To 255 do
begin
LEADImage1.MaskTable[i]:= 0;
LEADImage1.HTable[i]:= i;
end;

//Get the hue for green
nHueGreen:= LEADImage1.HSV_HfromRGB(RGB(0, 255, 0));

//Obtain new hue (crNewColor can be any color)
crNewColor:= RGB(255, 255, 0);
nHueNewColor:= LEADImage1.HSV_HfromRGB(crNewColor);
nHueChange:= nHueNewColor - nHueGreen;

if (nHueChange < 0) then
nHueChange:= nHueChange + 256;

//Set values in HTable, MaskTable
LEADImage1.HTable[nHueGreen]:= LEADImage1.HTable[nHueGreen] + L_UINT(nHueChange);
LEADImage1.MaskTable[nHueGreen]:= 1;

//set the hues near green (+/- 5)
uCount:= 0;
i:= Increment(nHueGreen);
while uCount < 5 do
begin
LEADImage1.HTable[i]:= Add(LEADImage1.HTable[i], nHueChange);
LEADImage1.MaskTable[i]:= 1;
i:= Increment(i);
uCount:= uCount + 1;
end;

uCount:= 0;
i:= Decrement(nHueGreen);
while uCount < 5 do
begin
LEADImage1.HTable[i]:= Add(Integer(LEADImage1.HTable[i]), nHueChange);
LEADImage1.MaskTable[i]:= 1;
i:= Decrement(i);
uCount:= uCount + 1;
end;

LEADImage1.RemapHue( True, True, False, False ) ;
end;


RemapTableSize example for Delphi

if (((LEADImage1.BitmapBits = 16) And
(LEADImage1.IsGrayscale <>GRAY_NO)) Or
(LEADImage1.BitmapBits = 64) Or
(LEADImage1.BitmapBits = 48)) Then
LEADImage1.RemapTableSize := 65536
else
begin
if (LEADImage1.BitmapBits = 12) Then
LEADImage1.RemapTableSize:= 4096
else
LEADImage1.RemapTableSize:= 256;
end;


Remove (ImageList Control) example for Delphi

{remove the last item from the ImageList Control}
LEADImgList1.Remove (LEADImgList1.Count – 1);


RemoveRedeye example for Delphi

LEADImage1.SetRgnEllipse (80, 55, 35, 30, L_RGN_SET);
LEADImage1.RemoveRedeye (RGB(5, 20, 10), 125, 100 );


RenderCenter Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
{Declare the variables for print-area measurements.}
SkipSpace: Integer;
UsableWidth, UsableHeight, MaxImageHeight: Single;
{Declare the variables for sizing and positioning the image.}
PrintHeight, PrintWidth: Integer;
{Declare variables used for preserving aspect ratios.}
WidthFactor, HeightFactor: Single;

begin
{Set the variables used for preserving the aspect ratio}
HeightFactor := LEADImage1.BitmapHeight;
WidthFactor := LEADImage1.BitmapWidth;

{Set the pointer to an hourglass}
Screen.Cursor := crHourglass;
{Establish some print-area dimensions. These are arbitrary values.}
SkipSpace := round(Printer.PageHeight / 30);
UsableWidth := round(Printer.PageWidth) - (SkipSpace * 4);
UsableHeight := round(Printer.PageHeight) - (SkipSpace * 4);
{Get the maximum height of one image,}
{assuming two equal-size images and space between them.}
MaxImageHeight := round( (UsableHeight - (2 * SkipSpace)) / 2);
{Size and position the first image, preserving the aspect ratio.}
{Check to see if using the maximum width will make the image too tall.}
{Set the dimensions based on the result.}
If ((UsableWidth * HeightFactor) / WidthFactor) < MaxImageHeight Then
begin
PrintWidth := Round(UsableWidth);
PrintHeight := Round((PrintWidth * HeightFactor) / WidthFactor);
end
Else
begin
PrintHeight := Round(MaxImageHeight);
PrintWidth := Round((PrintHeight * WidthFactor) / HeightFactor);
End;

{Start Printing}
Printer.BeginDoc;
{ Set the RenderCenter property to False, so we can print the image starting from the point (0, 0)}
LEADImage1.RenderCenter := False;
{Print the Image}
LEADImage1.Render( Printer.Canvas.HANDLE, 0, 0, PrintWidth, PrintHeight );
{End Printing}
Printer.EndDoc;
{Set the mouse pointer back to the default}
Screen.Cursor := crDefault;
end;


RepaintRect Example for Delphi

Lead1.AutoRepaint:=False;
Lead1.Flip();
Lead1.RepaintRect(0, 0, Lead1.BitmapWidth, Lead1.BitmapHeight div 2, false);
ShowMessage('Click OK for full repainting');
Lead1.ForceRepaint;


ResizeRgn example for Delphi

LEADImage1.RgnFrameType := ftAnimated;
LEADImage1.SetRgnRect (40, 60, 280, 200, L_RGN_SET);
ShowMessage ('About to resize') ;
LEADImage1.ResizeRgn (20, RGN_CONTRACT, False);


RevEffect Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load a bitmap at its own bits per pixel }
LEADImage1.Load ('image3.cmp', 0, 1, 1 );

{ Apply Rev effect on the image }
LEADImage1.RevEffect(3, 37);
end;


Reverse example for Delphi

This example reverses the image, producing a mirror image, and displays it.

Lead1.Reverse();
Lead1.ForceRepaint;


RGBfromHSV example for Delphi

//Takes an HSV, displays the HSV components, and displays the RGB components
Procedure TForm1.HSVtoRGB( nH: Integer; nS: Integer; nV: Integer);
var
cr: TColorRef ;
nRed, nGreen, nBlue: Integer;
begin

cr:= LEADImage1.RGBfromHSV(nH, nS, nV);
nRed:= GetRValue(cr);
nGreen:= GetGValue(cr);
nBlue:= GetBValue(cr);
ShowMessage ( 'HSV('+IntToStr(nH)+ ', '+
IntToStr(nS)+ ', '+
IntToStr (nV) + ' )' +
' is RGB(' + IntToStr (nRed) + ', '+
IntToStr (nGreen) + ', '+
IntToStr (nBlue) + ')');
end;


RgnFrameColor example for Delphi

LEADImage1.RgnFrameColor := clBlue ;
LEADImage1.RgnFrameType := ftColor;
LEADImage1.SetRgnRect (10, 10, 200, 200, L_RGN_SET);


RgnFrameType example for Delphi

Procedure TForm1.Test() ;
Begin
Lead1.SetRgnEllipse(0,0,200,200,L_RGN_SET);
Lead1.RgnFrameType:= ftStatic;
End;


RgnHeight example for Delphi

Procedure TForm1.Test();
Begin
if Lead1.HasRgn then
Begin
Edit1.Text:= Format('Region Bounds : (Top, Left), (Width, Height) : ( %d %d ), (%d,%d)', [Lead1.RgnTop, Lead1.Rgnleft, Lead1.RgnWidth, Lead1.RgnHeight]);
end
end;


RgnMarkingMode example for Delphi

Procedure TForm1.Test();
Begin
Lead1.RgnMarkingMode := mmRectangle;
Lead1.RgnFrameType:= ftStatic;
End;


RingEffect Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
uXorg: L_UINT;
uYorg: L_UINT;
uRadius: L_UINT;
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load('e:\\image1.cmp', 0, 1, 1 );

uXorg:= Trunc(LEADImage1.BitmapWidth/2);
uYorg:= Trunc(LEADImage1.BitmapHeight/2);
uRadius:= uXorg;

{ Apply a ring effect to this bitmap with origin (uXorg, uYorg).
The maximum ring radius is equal to half of the bitmap? width. Draw 10 rings,
fill the undefined areas with the Black color and the shift angle is equal
to 1 degrees. Note that you will have undefined areas only if the bitmap width
is greater than the bitmap height. }
LEADImage1.RingEffect( uXorg, uYorg, uRadius, 10, 0, RGB(0,0,0), 100, RING_COLOR + RING_FIXEDANGLE + RING_MAXRADIUS );
end;


Ripple Example for Delphi

procedure TForm1.RippleClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.Ripple( 20, 10, 0, 0, ptCenter, 0, FILL_RPT );
end;


Rotate example for Delphi

This example rotates the bitmap 45 degrees and redisplays the image. It resizes the bitmap to accommodate the rotation and uses blue as the fill color.

LeadImage1.Rotate(4500, ROTATE_RESIZE, RGB(0,0,255));
LeadImage1.AutoSetRects := True; {Make sure the display rectangles are adjusted}
LeadImage1.ForceRepaint;


RowCount (ImageList Control) example for Delphi

RowCount (ImageList Control) example for Delphi 4

var
LinesPerPage : LongInt;

begin

if (LEADImgList1.ScrollStyle = SCROLLSTYLE_VERTICAL) then
LinesPerPage := LEADImgList1.RowCount div LEADImgList1.PageCount
else
LinesPerPage := LEADImgList1.ColumnCount div LEADImgList1.PageCount;

end;


RTFPaperHeight example for Delphi

{ This example loads a RTF file, with a custom top margin, bottom margin, left margin, right margin, paper width, and paper height }

procedure TForm1.Button3Click(Sender: TObject);
begin
{ Change margin values }
LEADImage1.RTFTopMarg:= 0.9;
LEADImage1.RTFBottomMarg:= 0.9;
LEADImage1.RTFLeftMarg:= 1.3;
LEADImage1.RTFRightMarg:= 1.3;

LEADImage1.RTFPaperWidth:= 8.25;
LEADImage1.RTFPaperHeight:= 11.5;

{ Now load the RTF file }
LEADImage1.Load( 'c:\image1.rtf', 0, 1, 1 );
end;


SampleTarget Example for Delphi

procedure TForm1.SampleTargetClick(Sender: TObject);
begin
LEADImage1.SampleTarget( RGB(50, 100, 150), RGB(60, 90 , 150), SAMP_RED Or SAMP_MID );
end;


Saturation example for Delphi

This example increases the saturation of colors in the bitmap and redisplays the image.

Lead1.Saturation(100);
Lead1.ForceRepaint;


Save example for Delphi

This example determines whether a bitmap is grayscale, saves it appropriately, loads the new file, and redisplays the bitmap.

Screen.Cursor := crHourglass; {Hourglass}

If Lead1.IsGrayscale = GRAY_NO Then
Lead1.Save('C:\lead\IMAGES\TMP.CMP', FILE_CMP, 24, PQ2, SAVE_OVERWRITE)
Else
Lead1.Save('C:\lead\IMAGES\TMP.CMP', FILE_CMP,8, PQ2, SAVE_OVERWRITE);

Lead1.Load('C:\lead\IMAGES\TMP.CMP', 0, 0, 1);
Lead1.ForceRepaint;
Screen.Cursor := crDefault;


SaveBuffer example for Delphi

var
pBuffer: Pointer;
uImageSize: Cardinal;
uFinalBufSize: Cardinal;
nRet: Integer;
hf: integer;
begin
// Loading an image
LEADImage1.Load ('v:\images\image1.cmp', 0, 1, 1);
// Calculate the Image Size so we can allocate enough Buffer to hold it.
uImageSize:= Round((LEADImage1.BitmapWidth *LEADImage1.BitmapHeight * 24)/8);
// Allocate a buffer to hold the Bitmap
pBuffer:= AllocMem (uImageSize) ;
if ( pBuffer = Nil ) then
begin
ShowMessage ('Not enough Memory');
Exit;
end;
// Saving the Bitmap in Memory
nRet := LEADImage1.SaveBuffer (pBuffer, uImageSize, FILE_CMP, 24, 2, @uFinalBufSize );
if ( nRet = SUCCESS ) then
begin
// Create a file on Disk
hf := FileCreate('c:\temp\SaveBuf.cmp');
if (hf = -1) Then
begin
FreeMem (pBuffer);
MessageDlg ('Can not create file', mtError, [mbOK], 0);
Exit;
end;
// Writing the File in Memory to Disk
if (FileWrite(hf, pBuffer^, uFinalBufSize) <> Integer(uFinalBufSize) ) then
MessageDlg ('Error calling FileWrite', mtError, [mbOK], 0)
else
begin
MessageDlg ('The file was saved successfully on disk.', mtInformation, [mbOK], 0);
nRet:= SUCCESS;
end;
FileClose (hf);
if ( pBuffer <> Nil ) then
FreeMem (pBuffer);
// Loading the Saved Bitmap from Disk
if ( nRet = SUCCESS ) then
LEADImage2.Load ('c:\temp\SaveBuf.cmp', 0, 1, 1 ) ;
Exit;
end;
// Free the Buffer
if ( pBuffer <> Nil ) then
FreeMem (pBuffer);
end;


SaveDatabase example for Delphi

LEADImgList1.SaveDatabase ('c:\temp\testdb7.tif', False);


SaveIFD example for Delphi

var
Page : integer;
nRet : Integer;
begin
{ This example will add 100 pages to a file faster by continuously using the IFD of the last page}

{ Save page 1, to make sure the file exists}

nRet := LEADImage1.Save ('test.tif', FILE_TIF, 0, 0, SAVE_APPEND);

for Page := 2 To 100 do
begin
{ get the IFD of the last page}
nRet := LEADImage1.GetFileInfo('test.tif', 0);
LEADImage1.SaveIFD := LEADImage1.InfoIFD;
nRet := LEADImage1.Save ('test.tif', FILE_TIF, 0, 0, SAVE_APPEND);
end;
{ reset the SaveIFD property so the other Save calls will work properly}
LEADImage1.SaveIFD := 0
end;


SaveInterlaced example for Delphi

This example saves the current image as an interlaced GIF file, then loads the saved image with a paint-while-load effect that shows the interlaced behavior.

{Save the current image as an interlaced GIF file.}
Lead1.SaveInterlaced := True;
Lead1.Save ('d:\temp\tmp.gif', FILE_GIF, 8, 1, SAVE_OVERWRITE);

{Clear the bitmap so that we can see the paint-while-load effect.}
Lead1.Bitmap := 0;

{Paint the image while loading, showing that it is interlaced.}
Lead1.PaintWhileLoad := True;
Lead1.Load ('d:\temp\tmp.gif', 0, 0, 1);


SaveLayers example for Delphi

Var
i: Integer;
begin
// Save all the extra bitmaps in the bitmap list as layers
LEADImage1.SaveLayers:= True;
For i:= 1 to LEADImage1.BitmapListCount - 1 do
begin
// reset the layer info so all the layers are saved from 0,0 offset
LEADImage1.LayerLeft[i]:= 0;
LEADImage1.LayerTop[i] := 0;
LEADImage1.LayerBlendModeKey[i]:= 'dark';
LEADImage1.LayerClipping[i]:= 0;
LEADImage1.LayerOpacity[i] := 40;
LEADImage1.LayerMaskBitmap[i]:= 0;
end;
// set the active bitmap to be the first in the list
LEADImage1.Save ('c:\temp\layers.psd', FILE_PSD, 0, 0, SAVE_OVERWRITE);
end;


SaveLSB example for Delphi

{ This example saves a bitmap compatible with the requirements
of the TIFF Class F format make sure we are using pixels}

LEAD1.SaveLSB := true;
LEAD1.SavePageNumberTag := true;
LEAD1.BitmapXRes := 204;
LEAD1.BitmapYRes := 196;

{ scale the bitmap (preserving the aspect ratio) to have a width of 1728 pixels}

LEAD1.Size (1728, LEAD1.BitmapHeight * 1728 div LEAD1.BitmapWidth , 0);
LEAD1.Save ('c:\i\lsb.tif', FILE_CCITT_GROUP3_1DIM, 1, 0, SAVE_OVERWRITE);


SaveMemory example for Delphi

// You have to add LEADTyp, and LEADDef to the uses section of your project.

procedure TForm1.SaveMemory1Click(Sender: TObject);
var
hMem : L_HANDLE;
hf, iSize : integer;
lpMem : pointer;
cMsg, cTemp : string;

begin
hMem := 0;
If (Lead1.SaveMemory (hMem, FILE_CMP, 24, 2, iSize) <> SUCCESS) Then
begin
MessageDlg ('Error calling SaveMemory', mtError, [mbOK], 0);
Exit
end;
If Lead1.GetMemoryInfo (hMem, 0, iSize) <> SUCCESS Then
begin
GlobalFree (hMem);
Exit
end;
{ Ask for a confirmation to save this file}
cMsg := 'Write this file on disk ?' + Chr(13) + Chr(13) + 'File info:' + Chr(13);
Str(Lead1.InfoWidth:1, cTemp);
cMsg := cMsg + cTemp + ' x ';
Str(Lead1.InfoHeight:1, cTemp);
cMsg := cMsg + cTemp + ' x ';
Str(Lead1.InfoBits, cTemp);
cMsg := cMsg + cTemp + ' BPP' + Chr(13) + 'Size in memory: ';
Str(Lead1.InfoSizeMem, cTemp);
cMsg := cMsg + cTemp + Chr(13) + 'Size on disk : ';
Str(Lead1.InfoSizeDisk, cTemp);
cMsg := cMsg + cTemp + Chr(13);
If MessageDlg (cMsg, mtConfirmation, [mbYes, mbNo], 0) <> mrYes Then
begin
GlobalFree (hMem);
Exit
end;
lpMem := GlobalLock(hMem);

If lpMem = nil Then
begin
GlobalFree (hMem);
MessageDlg ('Error calling GlobalLock', mtError, [mbOK], 0);
Exit
end;
hf := FileCreate('c:\savemem.cmp');
If hf = -1 Then
begin
GlobalUnlock (hMem);
GlobalFree (hMem);
MessageDlg ('Error calling GlobalLock', mtError, [mbOK], 0);
Exit
end;
If FileWrite(hf, lpMem^, iSize) <> iSize Then
MessageDlg ('Error calling FileWrite', mtError, [mbOK], 0)
Else
MessageDlg ('The file was saved successfully on disk.', mtInformation, [mbOK], 0);

FileClose (hf);
GlobalUnlock (hMem);
GlobalFree (hMem);
end;


SaveOffset Example for Delphi

{This example saves a TBitmapHandle as RAW data starting at offset nOffset.

The data is padded so that each line of bytes is evenly divided by 4.

The bits in each byte are reversed before saving. The bits per pixel of the raw data is the same as the BitmapBits Property. If the Bitmap is a palletized image, the palette is not saved--only the raw data.}

Procedure TForm1.SaveRawData ( szFileName: String; nOffset: Integer );
var
nRet: Integer;
begin
LEADImage1.SaveLSB:= True;
LEADImage1.SavePad4:= True;
nRet:= LEADImage1.SaveOffset(szFileName, nOffset, FILE_RAW, 0, 0, 0);
if (nRet = SUCCESS) Then
ShowMessage ( 'SUCCESS file save: ' + szFileName + ' Size Written: ' + IntToStr(LEADImage1.FileSizeWritten) )
else
ShowMessage ( 'FAILED--file save: ' + szFileName )

end;


SavePage example for Delphi

{ replace page 1 from TEST.TIF }
LEAD1.SavePage := 1;
LEAD1.Save(‘TEST.TIF’, FILE_TIF, 8, 0, SAVE_REPLACE);


SaveResolutionCount example for Delphi

Var
iCounter : Integer;
Begin
{ assume that our bitmap is 800 x 600 }
{ save 3 resolutions}
Lead1.SaveResolutionCount := 3;
Lead1.SaveResolutionWidth[0] := 800;
Lead1.SaveResolutionHeight[0] := 600;
Lead1.SaveResolutionWidth[1] := 400;
Lead1.SaveResolutionHeight[1] := 300;
Lead1.SaveResolutionWidth[2] := 200;
Lead1.SaveResolutionHeight[2] := 150;
{ get the SaveResolution info}
ShowMessage('SaveResolutionCount = ' + IntToStr( Lead1.SaveResolutionCount));
For iCounter := 0 To Lead1.SaveResolutionCount – 1 do
ShowMessage('SaveResolution[' + IntToStr(iCounter) + '] = ' +
IntToStr(Lead1.SaveResolutionWidth[iCounter]) + ' x ' +
IntToStr(Lead1.SaveResolutionHeight[iCounter]));
End;


SaveTileWidth example for Delphi

{save TIF files with a tile size of 512x512}
LEADImage1.SaveTileWidth := 512;
LEADImage1.SaveTileHeight := 512;
LEADImage1.Save ('c:\temp\tiled.tif', FILE_CCITT_GROUP4, 0, 0, SAVE_OVERWRITE);


SaveToFile (ImageList Control) example for Delphi

SaveToFile (ImageList Control) example for Delphi 4

{save all selected items to a multipage file}
LEADImgList1.SaveToFile ('d:\temp\testing.tif', FILE_TIF, 0, 0, True);

{clear list}
LEADImgList1.Clear;

{'reload file}
LEADImgList1.LoadFromFile ('d:\temp\testing.tif', 0, 1, -1);


SaveWithStamp example for Delphi

This example saves the image in a JPEG file that includes a thumbnail (stamp) image. It then loads the thumbnail from the new file.

Lead1.SaveWithStamp('C:\lead\IMAGES\STAMP.JPG', FILE_JFIF, 24, 30, 150, 100, 24);
Lead1.LoadStamp('C:\lead\IMAGES\STAMP.JPG');
Lead1.ForceRepaint;


ScrollItems (ImageList Control) example for Delphi

{scroll items down 2 lines}
LEADImgList1.ScrollItems (2);


ScrollStyle (ImageList Control) example for Delphi

{Set scroll style to horizontal}
LEADImgList1.ScrollStyle := SCROLLSTYLE_HORIZONTAL;


Segment Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{ segment the bitmap }
LEADImage1.Segment(20, SGM_RGB);
end;


SelectAll (ImageList Control) example for Delphi

{select all items}
LEADImgList1.SelectAll (True);

ShowMessage('wait');

{deselect allitems}
LEADImgList1.SelectAll (False);


SelectData Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmaps }
LEADImage1.Load('e:\\image1.cmp', 0, 1, 1 );
LEADImage2.Load ('e:\\image2.cmp', 0, 1, 1 );
LEADImage2.GrayScale(16);

// Call the method
LEADImage1.SelectData(LEADImage2.Bitmap, RGB(233, 10, 77), 2 { uSrcLowBit }, 6 { uSrcHighBit }, 25 { uThreshold }, TRUE);
// Now we have the resulted image in DstBitmap
end;


SelectedItems example for Delphi

var
x: integer;
begin
x:= LEADImgList1.SelectedCount;
while (x > 0) do
begin
LEADImgList1.SelectedItems[0].Selected:= False;
x:= LEADImgList1.SelectedCount;
end;
end;


SelectionColor (ImageList Control) example for Delphi

LEADImgList1.SelectionColor := clRed;{set to RED}


SelectionStyle (ImageList Control) example for Delphi

{show selected items as pressed buttons}
LEADImgList1.SelectionStyle := SELECTIONSTYLE_PRESSEDBUTTON;


SelectiveColor Example for Delphi

procedure TForm1.SelectiveColor1Click(Sender: TObject);
var
selColors: TLEADSelClrInfoArr;
begin
// Initialize selClr to zeros.
FillMemory ( @selColors, sizeof(SELECTIVECOLORINFO)*9, 0 );

{ Manipulate values }
selColors[SELCLR_RED].cCyan:= -100; // Change the "Red selected color"
selColors[SELCLR_YELLOW].cCyan:= 34; // Change the "Yellow selected color"
selColors[SELCLR_YELLOW].cMagenta:= 100;
selColors[SELCLR_YELLOW].cYellow:= 40;
selColors[SELCLR_GREEN].cBlack:= 100; // Change the "Green selected color"
selColors[SELCLR_NEUTRAL].cCyan:= -65; // Change the "neutral selected color"
selColors[SELCLR_NEUTRAL].cMagenta:= -39;
selColors[SELCLR_NEUTRAL].cYellow:= 63;
// Call the function
LEADImage1.SelectiveColor( selColors );
end;


SetMemoryThresholds example for Delphi

{ Allocate tiled bitmaps when more than 75% of the computer memory is used, or for bitmaps larger than 100MB. }

LEADImage1.SetMemoryThresholds(-25, 100 *1024 * 1024, 0, 0, 0, MEM_TILEDTHRESHOLD + MEM_MAXCONVSIZE );


SetRgn... example for Delphi

This example demonstrates the SetRgnEllipse, SetRgnRect, SetRgnRoundRect, and SetRgnPolygon methods by simulating client area coordinates. Normally, you would get the coordinates interactively from mouse events and would use Windows GDI functions to outline the shape of each region before it is created.

To create the polygonal region, this example uses the PolygonSize and PolygonPoint properties.

Also, to demonstrate the SetRgnColor method, it uses the Fill method to fill the region with a solid color, then uses the fill color to create a new region.

procedure TForm1.Button1Click(Sender: TObject);
const
{Set up arrays to use as client area grid values for drawing a polygon.}
xPoint : array[0..7] of integer = (0, -1, 2, 1, 1, 2, -1, -2);
yPoint : array[0..7] of integer = (0, -1, -1, 1, -1, 1, 1, 1);

var
{Declare local variables. }
ZoomFactorX: Single; {Used for translating positioning information }
ZoomFactorY: Single; {Used for translating positioning information }
OffsetX, OffsetY, CurrentX, CurrentY: Integer; {To simulate mouse coordinates }
SimLeft, SimTop, SimWidth, SimHeight: Integer; {To simulate mouse coordinates }
LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, eW, eH: integer; {For bitmap coordinates }
i: Integer; {Loop counter }
polyPoint : TPoint;

begin
{Initialize the variables that we will manipulate to simulate mouse coordinates. }
OffsetX := Round(Lead1.Width div 15);
OffsetY := Round(Lead1.Height div 15);
CurrentX := OffsetX;
CurrentY := OffsetY;

{Set the zoom factors. }
ZoomFactorX := Lead1.DstWidth / Lead1.SrcWidth;
ZoomFactorY := Lead1.DstHeight / Lead1.SrcHeight;

{Start by simulating the drawing of a rectangle. }
SimLeft := CurrentX;
SimTop := CurrentY;
SimWidth := OffsetX * 2;
SimHeight := OffsetY * 2;

{Translate the simulated client coordinates to bitmap coordinates. }
LBRgnLeft := Round((SimLeft / ZoomFactorX) - (Lead1.DstLeft / ZoomFactorX) + Lead1.SrcLeft);
LBRgnTop := Round((SimTop / ZoomFactorY) - (Lead1.DstTop / ZoomFactorY) + Lead1.SrcTop);
LBRgnWidth := Round(SimWidth / ZoomFactorX);
LBRgnHeight := Round(SimHeight / ZoomFactorY);

{Create the rectangular region, outline it, and display a message so that we can see what happened. }
Lead1.SetRgnRect(LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, L_RGN_SET);
Lead1.RgnFrameType := ftStatic;
ShowMessage('Here is the rectangular region');

{Move the current mouse position so that we overlap the existing region. }
CurrentX := CurrentX + OffsetX;
CurrentY := CurrentY + OffsetY;

{Next, simulate the drawing of an ellipse. }
SimLeft := CurrentX;
SimTop := CurrentY;
SimWidth := OffsetX * 3;
SimHeight := OffsetY * 2;

{Translate the simulated client coordinates to bitmap coordinates. }
LBRgnLeft := Round((SimLeft / ZoomFactorX) - (Lead1.DstLeft / ZoomFactorX) + Lead1.SrcLeft);
LBRgnTop := Round((SimTop / ZoomFactorY) - (Lead1.DstTop / ZoomFactorY) + Lead1.SrcTop);
LBRgnWidth := Round(SimWidth / ZoomFactorX);
LBRgnHeight := Round(SimHeight / ZoomFactorY);

{Add the elliptical region, using a Boolean OR, }
{and display a message so that we can see what happened. }
Lead1.SetRgnEllipse(LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, L_RGN_OR);
Lead1.RgnFrameType := ftStatic;
ShowMessage('Here is the added ellipse, with a Boolean OR');

{Move the current mouse position so that we overlap the existing region. }
CurrentX := CurrentX + OffsetX;
CurrentY := CurrentY + OffsetY;

{Next, simulate the drawing of a rounded rectangle. }
SimLeft := CurrentX;
SimTop := CurrentY;
SimWidth := OffsetX * 3;
SimHeight := OffsetY * 2;

{Translate the simulated client coordinates to bitmap coordinates. }
LBRgnLeft := Round((SimLeft / ZoomFactorX) - (Lead1.DstLeft / ZoomFactorX) + Lead1.SrcLeft);
LBRgnTop := Round((SimTop / ZoomFactorY) - (Lead1.DstTop / ZoomFactorY) + Lead1.SrcTop);
LBRgnWidth := Round(SimWidth / ZoomFactorX);
LBRgnHeight := Round(SimHeight / ZoomFactorY);

{Define an ellipse to use for the corners. }
eW := LBRgnWidth div 4;
eH := LBRgnHeight div 4;

{Add the rounded rectangular region, using a Boolean exclusive OR, }
{and display a message so that we can see what happened. }
Lead1.SetRgnRoundRect(LBRgnLeft, LBRgnTop, LBRgnWidth, LBRgnHeight, eW, eH,
L_RGN_XOR);
ShowMessage('Here is the rounded rectangle, with a Boolean XOR');

{Move the current mouse position so that we overlap the existing region. }
CurrentX := CurrentX + (2 * OffsetX);
CurrentY := CurrentY + (2 * OffsetY);

{Initialize the polygon size using an arbitrary number. }
{This number will be increased dynamically. }
Lead1.PolygonSize := 5;

{Fill in the array for the polygon. This simulates a user's mouse clicks. }
for i := 0 to 7 do
begin
CurrentX := CurrentX + (xPoint[i] * OffsetX);
CurrentY := CurrentY + (yPoint[i] * OffsetY);
polyPoint.x := Round((CurrentX / ZoomFactorX) - (Lead1.DstLeft / ZoomFactorX) + Lead1.SrcLeft);
polyPoint.y := Round((CurrentY / ZoomFactorY) - (Lead1.DstTop / ZoomFactorY) + Lead1.SrcTop);
Lead1.PolygonPoint[i] := polyPoint;
if i + 1 = Lead1.PolygonSize Then Lead1.PolygonSize := Lead1.PolygonSize + 5;
end;

{Adjust the polygon size to the actual number of points. }
Lead1.PolygonSize := i;

{Add the polygonal region, using a Boolean OR, }
{and display a message so that we can see what happened. }
Lead1.SetRgnPolygon(L_POLY_WINDING, L_RGN_OR);
ShowMessage('Here is the added polygon, with a Boolean OR');

{Fill the resulting polygon with red, and display a message. }
Lead1.Fill(RGB(255, 0, 0));
Lead1.RgnFrameType := ftNone;
Lead1.ForceRepaint;
ShowMessage('Using SetRgnColor and L_RGN_SETNOT, all else will become blue.');

{Clean up memory }
Lead1.FreeRgn;

{Do the final region. }
Lead1.SetRgnColor(RGB(255, 0, 0), L_RGN_SETNOT);
Lead1.Fill(RGB(0, 0, 255));
Lead1.ForceRepaint;

{Clean up memory }
Lead1.FreeRgn;
Lead1.PolygonSize := 0;

end;


SetRgnBorder example for Delphi

procedure TForm1.SetRgn ( x: L_INT; y: L_INT; crBorder: COLORREF );
begin
LEADImage1.SetRgnBorder( x, y, crBorder, RGB(20,30,15), RGB(15,30,10), L_RGN_SET );
LEADImage1.RgnFrameType:= ftAnimated;
end;


SetRgnColorHSVRange example for Delphi

var
H0: Integer;
S0: Integer;
V0: Integer;
H1: Integer;
S1: Integer;
V1: Integer;

begin
{This example sets a region corresponding to all pure green (Hue = 85)
and colors near green (+/- 10)
where Saturation is at least 40 and Value is at least 40}

H0:= 75;
S0:= 40;
V0:= 40;

H1:= 95;
S1:= 255;
V1:= 255;

LEADImage1.SetRgnColorHSVRange ( H0, S0, V0, H1, S1, V1, L_RGN_SET ) ;
LEADImage1.RgnFrameType:= ftAnimated;
end;


SetRgnColorRGBRange example for Delphi

{This example sets a region corresponding to all colors that
have an rgb that includes red but no green and no blue}
var
rgbLo: TColorRef;
rgbHi: TColorRef;

begin
rgbLo:= RGB(1, 0, 0);
rgbHi:= RGB(255, 0, 0);
LEADImage1.SetRgnColorRGBRange (rgbLo, rgbHi, L_RGN_SET);
LEADImage1.RgnFrameType:= ftAnimated;
end;


SetRgnFromMask Example for Delphi

{This example sets and colored a region into LEADImage1 using a 1-bit black-and-white mask image.}
procedure TForm1.Button3Click(Sender: TObject);
var
nRet: Integer;
begin
nRet:= LEADImage1.Load ('IMAGE1.CMP', 0, 1, 1);
if(nRet = SUCCESS)then
begin
nRet:= LEADMask.Load ('MASK.TIF', 0, 1, 1);
if(nRet = SUCCESS)then
begin
LEADImage1.MaskBitmap:= LEADMask.Bitmap;
LEADImage1.SetRgnFromMask (L_RGN_SET);
LEADImage1.Fill (RGB(0, 255, 0));
end;
end;
end;


SetRgnMagicWand example for Delphi

// handle OnMouseUp event.
procedure TForm1.LEADImage1MouseUp(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
begin
LEADImage1.SetRgnMagicWand( x, y, RGB(20,30,15), RGB(15,30,10), L_RGN_SET );
LEADImage1.RgnFrameType:= ftAnimated;
end;


SetRgnRect example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
{Declare local variables.}
OffsetX, OffsetY: integer;
SavedRegion: HRGN;
begin
{Initialize the variables that we will manipulate to simulate mouse coordinates.}
OffsetX := Lead1.BitmapWidth div 8;
OffsetY := Lead1.BitmapHeight div 6;
{Create a region.}
Lead1.SetRgnRect(OffsetX, OffsetY, OffsetX, OffsetY, L_RGN_SET);
{Save a copy of the region.}
SavedRegion := Lead1.GetRgnHandle;
{Add the saved region to the bitmap, offsetting it so that we can see it.}
Lead1.SetRgnHandle(SavedRegion, OffsetX, OffsetY, L_RGN_OR);
{Delete the saved region.}
Lead1.DeleteRgnHandle(SavedRegion);
{Fill the bitmap region with blue.}
Lead1.Fill(RGB(0, 0, 255));
{Free the bitmap region.}
Lead1.FreeRgn;
{Repaint the image so that we can see how the image was updated. }
Lead1.ForceRepaint;
end;


SetRgnRoundRect example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
{Declare local variables.}
OffsetX, OffsetY: integer;
begin
{Initialize the variables that we will manipulate to simulate mouse coordinates.}
OffsetX := Lead1.BitmapWidth div 8;
OffsetY := Lead1.BitmapHeight div 6;
{Create an elliptical region.}
Lead1.SetRgnRoundRect(OffsetX, OffsetY, OffsetX, OffsetY, OffsetX div 4 , OffsetY div 4 , L_RGN_SET);
Lead1.RgnFrameType:= ftStatic;
{Apply Emboss effect on the bitmap region }
Lead1.Emboss(EMBOSS_E,600);
{Repaint the image so that we can see how the image was updated.}
Lead1.ForceRepaint;
end;


SetSelectionBitmap example for Delphi

LEADImage1.Load('d:\temp\flagsel.bmp', 0, 0, 1);
LEADImgList1.SetSelectionBitmap(RGB(0, 255, 0), LEADImage1.Bitmap);
LEADImgList1.SelectionStyle := SELECTIONSTYLE_USERBITMAP;


SetSrcClipRect example for Delphi

procedure TForm1.SetSrcClipRect1Click(Sender: TObject);

var
NewLeft, NewTop, NewWidth, NewHeight: integer;
begin
NewLeft := LEADImage1.SrcClipLeft+ Round(LEADImage1.SrcClipWidth * 0.1);
NewTop := LEADImage1.SrcClipTop + Round(LEADImage1.SrcClipHeight * 0.1);
NewWidth := Round(LEADImage1.SrcClipWidth * 0.8);
NewHeight := Round(LEADImage1.SrcClipHeight * 0.8);
If ((NewWidth > 1) And (NewHeight >1)) then
LEADImage1.SetSrcClipRect(NewLeft, NewTop, NewWidth, NewHeight);
LEADImage1.BackErase :=True;
LEADImage1.ForceRepaint();
end;


SetSrcRect example for Delphi

This example zooms in on the image by reducing the source rectangle and repaints the image.

procedure TForm1.Button3Click(Sender: TObject);

var
NewLeft, NewTop, NewWidth, NewHeight: Integer;

begin

NewLeft := Lead1.SrcLeft+ Round(Lead1.SrcWidth * 0.1);
NewTop := Lead1.SrcTop + Round(Lead1.SrcHeight * 0.1);
NewWidth := Round(Lead1.SrcWidth * 0.8);
NewHeight := Round(Lead1.SrcHeight * 0.8);
If (NewWidth > 1) AND (NewHeight >1) Then
Lead1.SetSrcRect(NewLeft, NewTop, NewWidth, NewHeight);
Lead1.ForceRepaint;

end;


SetTag example for Delphi

procedure TForm1.SetAndReadClick(Sender: TObject);
var
myArray : Variant;
begin
// initialize the array
myArray := VarArrayCreate([0,3],varByte);
myArray[0] := 1;
myArray[1] := 2;
myArray[2] := 3;
myArray[3] := 127;

// set a tag using one of the following:
LEADImage1.SetTag (32768, TAG_BYTE, 4, myArray);
// Write the tag
LEADImage1.WriteTag(PCHAR(Edit1.Text) , 1);
ReadTagClick(self);

LEADImage1.SetTag(32768, TAG_ASCII, 0, 'My text string');
LEADImage1.WriteTag(PCHAR(Edit1.Text) , 1);
ReadTagClick(self);

end;

procedure TForm1.ReadTagClick(Sender: TObject);
begin
// read the tag back
LEADImage1.ReadTag(PCHAR(Edit1.Text), 1, 32768);
GetAndDisplayTag(0);
end;

procedure TForm1.GetAndDisplayTag(lTag: Integer);
var
myVar : Variant;
Msg : string;
i : LongInt;
count : LongInt;
begin
// This sub will get a certain tag and display it according to the tag type.

myVar := LEADImage1.GetTagData (lTag);
count := LEADImage1.GetTagCount (lTag);

Msg := 'Type = ' + IntToStr((LEADImage1.GetTagType (lTag)));
Msg := Msg + #10 + #13 + 'count = ' + IntToStr(count);

if (LEADImage1.GetTagType(lTag) = TAG_ASCII) then
Msg := Msg + #10 + #13 + 'Data = ' + myVar
else if (LEADImage1.GetTagType(lTag) = TAG_RATIONAL) or (LEADImage1.GetTagType(lTag) = TAG_SRATIONAL) then
for i := 0 to count - 1 do
Msg := Msg + #10 + #13 + 'Data(' + IntToStr(i) + ') = ' + IntTostr(myVar[i * 2]) + '/' + IntToStr(myVar[i * 2 + 1])
Else
for i := 0 to count - 1 do
Msg := Msg + #10 + #13 + 'Data(' + IntToStr(i) + ') = ' + VarToStr(myVar[i]);

MessageBox(Handle,pChar(Msg),'test',0);

end;


Sharpen example for Delphi

This example increases the sharpness of the bitmap and redisplays the image.

Lead1.Sharpen(100);
Lead1.ForceRepaint;


Shear example for Delphi

This example shears the bitmap 5 degrees horizontally and redisplays the image. It uses blue as the fill color.

Lead1.Shear(500, True, RGB(0,0,255));
Lead1.ForceRepaint;


ShiftData Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmaps }
LEADImage1.Load('e:\\image1.cmp', 0, 1, 1 );
LEADImage2.Load ('e:\\image2.cmp', 0, 1, 1 );
LEADImage2.GrayScale(16);

{ Move 5 bits starting from bit 2 into the high bits of the destination bitmap }
LEADImage1.ShiftData( LEADImage2.Bitmap, 2 { uSrcLowBit }, 6 { uSrcHighBit}, 3 { uDstLowBit }, 8 { uDstBitsPerPixel } );
end;


ShowMagGlass Example for Delphi

Const
crNewCursor= 10;
// Global variables
var
gbLeftButton: Boolean;

procedure TForm1.FormCreate(Sender: TObject);
begin
LEADImage1.EnableMethodErrors:= False;
// Load 'Image1.cmp' file
LEADImage1.Load ( 'e:\image1.cmp', 0, 1, 1 );
// Load the Same Image in LEADImage2
LEADImage2.Load ( 'e:\image1.cmp', 0, 1, 1 );
// Invert the Bitmap
LEADImage2.Invert ( );
// Set the MagGlassFlags
LEADImage1.MagGlassFlags:= MAGGLASS_MANUAL_UPDATE;
// Load our cursor to be the MagGlass Curosr
Screen.Cursors[crNewCursor]:= LoadCursorFromFile ( 'e:\cursor1.cur' );
LEADImage1.MagGlassPointer:= crNewCursor;

// Starting the Magnifying Glass
LEADImage1.StartMagGlass ( 100,
100,
400,
RGB(255, 0, 0),
RGB(128, 128, 128),
False,
1,
False,
CROSSHAIR_FINE,
True,
True );

// Updating the Magnifying Glass bitmap of 1st control with bitmap of the
// 2nd control that has the same width and height.
LEADImage1.UpdateMagGlassFromHandle( LEADImage2.Bitmap, True );
end;

procedure TForm1.LEADImage1MagGlassCursor(Sender: TObject);
begin
// Check if the left button is not down and the Magnifying Glass is started
if ((Not gbLeftButton) And (LEADImage1.HasMagGlass)) Then
begin
Cursor:= LEADImage1.MagGlassPointer;
end;
end;

procedure TForm1.LEADImage1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
nStatus: L_INT;
begin
// Check if this is a left button and the Magnifying Glass is started
if ((Button <> mbLeft) Or (Not LEADImage1.HasMagGlass) ) then
Exit;

// Move the Magnifying Glass to the hit position
nStatus:= LEADImage1.SetMagGlassPos (x, y);
if ( nStatus <> SUCCESS ) then
begin
ShowMessage ( 'Error while displaying Magnifying Glass, Error: ' + IntToStr(nStatus) );
Exit;
end;

// Show the Magnifying Glass
nStatus:= LEADImage1.ShowMagGlass (True);
if ( nStatus <> SUCCESS ) then
begin
ShowMessage ( 'Error while displaying Magnifying Glass, Error: ' + IntToStr(nStatus) );
Exit;
end;

// Left button is currently pressed
gbLeftButton:= True;

// Call this Windows API function to hide the cursor
ShowCursor ( False );
end;

procedure TForm1.LEADImage1MouseMove(Sender: TObject; Shift: TShiftState;
X, Y: Integer);
var
nStatus: L_INT;
begin
// Check if the left button is down and the Magnifying Glass is started
if ( Not LEADImage1.HasMagGlass ) then
Exit;

// Move the Magnifying Glass to the mouse position
nStatus:= LEADImage1.SetMagGlassPos(x, y);
if ( nStatus <> SUCCESS ) Then
ShowMessage ( 'Error while moving Magnifying Glass. Error: ' + IntToStr(nStatus) );
end;

procedure TForm1.LEADImage1MouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var
nStatus: L_INT;
begin
// Check if the left button is down and the Magnifying Glass is started
if ((Button <> mbLeft) Or (Not LEADImage1.HasMagGlass) ) then
Exit;

// Show the Magnifying Glass
nStatus:= LEADImage1.ShowMagGlass ( False );
if ( nStatus <> SUCCESS ) then
ShowMessage ( 'Error while hiding Magnifying Glass. Error: ' + IntToStr(nStatus) );

// Left button is released
gbLeftButton:= True;

// Call this Windows API function to show the cursor
ShowCursor ( True );
end;


Skeleton Example for Delphi

procedure TForm1.SkeletonBitmap1Click(Sender: TObject);
begin
LEADImage1.EdgeDetector( 60, EDG_SOBEL_ALL );
LEADImage1.Skeleton( 128 );
end;


SkipFile example for Delphi

procedure TForm1.LEADThumb1ThumbnailEvent(Sender: TObject;
Bitmap: TBitmapHandle; FileName: String; nStatusCode, nPercent: Integer);
var
msg: String;
p: PChar;
StrTmp : String ;
begin
if (nStatusCode = SUCCESS) Then //successful thumbnail generation
begin
//save thumbnails in a multipage TIFF file
LEADImage1.Bitmap:= Bitmap;
LEADImage1.Save ('c:\temp\thumbs.tif', FILE_TIF, 24, 0, SAVE_APPEND ) ;
Msg:= Filename + Chr(13);
Msg:= Msg + 'Format: ' + IntToStr(LEADThumb1.InfoFormat) + Chr(13);
Msg:= Msg + 'Compression: ' + LEADThumb1.InfoCompression + Chr(13);
Msg:= Msg + 'Bits: ' + IntToStr(LEADThumb1.InfoBits) + Chr(13);
Msg:= Msg + 'Width: ' + IntToStr(LEADThumb1.InfoWidth) + Chr(13);
Msg:= Msg + 'Height: ' + IntToStr(LEADThumb1.InfoHeight) + Chr(13);
Msg:= Msg + 'Page: ' + IntToStr(LEADThumb1.InfoPage) + Chr(13);
Msg:= Msg + 'TotalPages: ' + IntToStr(LEADThumb1.InfoTotalPages) + Chr(13);
Msg:= Msg + 'SizeDisk: ' + IntToStr(LEADThumb1.InfoSizeDisk) + Chr(13);
Msg:= Msg + 'SizeMem: ' + IntToStr(LEADThumb1.InfoSizeMem) + Chr(13);
Msg:= Msg + '"XRes: ' + IntToStr(LEADThumb1.InfoXRes) + Chr(13);
Msg:= Msg + 'YRes: ' + IntToStr(LEADThumb1.InfoYRes) + Chr(13);
ShowMessage ( Msg ) ;
end
else
begin
If (nStatusCode = BROWSE_PRELOAD) Then
begin
//check the extension, if it is '.DOC', then skip
StrTmp:=UpperCase(Filename);
p := StrrScan( PChar ( StrTmp ), '.');
If (p = '.DOC') Then
begin
LEADThumb1.SkipFile:= True;
ShowMessage ( 'skipping - ' + Filename ) ;
end;
end;
end;
LEADThumb1.ContinueBrowse:= True ;//continue the browse operation
end;


SmoothEdges Example for Delphi

procedure TForm1.SmoothEdgesClick(Sender: TObject);
begin
LEADImage1.SmoothEdges( 75, 0 );
end;


Solarize example for Delphi

This example applies a solarize effect and repaints the image.

Lead1.Solarize(100);
Lead1.ForceRepaint();


Sort (ImageList Control) example for Delphi

{Sort the items in ascending order}
LEADImgList1.Sort (True);


SortExt example for Delphi

procedure TForm1.btnSortExtClick(Sender: TObject);
begin
LEADImgList1.SortExt(True, True, False, 0);
end;


SpatialFilter example for Delphi

This example applies Laplacian line detection and redisplays the image.

Lead1.SpatialFilter(FLT_LAPLACE_1);
Lead1.ForceRepaint;


Spherize Example for Delphi

procedure TForm1.SpherizeClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.Spherize( 100, ptCenter, 0, FILL_RPT Or FILL_WOUTROT );
end;


Src... example for Delphi

This example uses the source rectangle properties to zoom in on the image.

{Calculate the values to zoom in by 10 percent and center the image.}
If (Lead1.SrcWidth > 1) And (Lead1.SrcHeight > 1) Then
begin
Lead1.SrcWidth := Round(Lead1.SrcWidth * 0.9);
Lead1.SrcHeight := Round(Lead1.SrcHeight * 0.9);
Lead1.SrcTop := Round((Lead1.BitmapHeight-Lead1.SrcHeight) / 2);
Lead1.SrcLeft := Round((Lead1.BitmapWidth-Lead1.SrcWidth) / 2);
end;

{Set the clipping area to the same as the destination rectangle}
Lead1.SrcClipWidth := Lead1.SrcWidth;
Lead1.SrcClipHeight := Lead1.SrcHeight;
Lead1.SrcClipTop := Lead1.SrcTop;
Lead1.SrcClipLeft := Lead1.SrcLeft;

{Redisplay the image}
Lead1.ForceRepaint;


STable example for Delphi

{This example considers that the image you are working with is 24 bpp.}
var
i: L_UINT;
uVal: L_UINT;
Msg: String;
begin
{This example remaps the saturation of each color to one half its original}

LEADImage1.RemapHueTablesSize:= 256;
for i:= 0 to 255 do
begin
LEADImage1.STable[i]:= Trunc(i/2);
uVal:= LEADImage1.STable[i];
Msg:= Msg + IntToStr(uVal)+ ' ';
end;
ShowMessage ( Msg ) ;
LEADImage1.RemapHue( False, False, True, False ) ;
end;


StartMagGlass example for Delphi

{ Add LEADDef to the uses section}
var
hRoundRectRgn : HRGN;
begin
{ set the color mask to mask out a few shades of black }
LeadImage1.MagGlassMaskCount := 3;
LeadImage1.MagGlassMask[0] := RGB(0, 0, 0);
LeadImage1.MagGlassMask[1] := RGB(1, 1, 1);
LeadImage1.MagGlassMask[2] := RGB(2, 2, 2);
LeadImage1.RgnFrameType := ftNone;
LeadImage1.MagGlassPaintPalette:= LeadImage1.PaintPalette;
LeadImage1.MagGlassBitonalScaling:= LeadImage1.BitonalScaling;
LeadImage1.MagGlassPaintDither:= LeadImage1.PaintDither;
LeadImage1.MagGlassPaintScaling := LeadImage1.PaintScaling;
LeadImage1.MagGlassFlags := MAGGLASS_MASK_NORMAL;

LeadImage1.StartMagGlass (100, 100, 400, RGB(255, 0, 0), RGB(128, 128, 128), True, 1, False, CROSSHAIR_FINE, True, True);

hRoundRectRgn := CreateRoundRectRgn(0, 0, 100, 100, 25, 25);
LeadImage1.UpdateMagGlassShape(MAGGLASS_SHAPE_HRGN, hRoundRectRgn);
DeleteObject(hRoundRectRgn);

{.......some other work..............}
{.......some other work..............}
{ Stop the MagGlass }
LeadImage1.StopMagGlass();

end;


StretchIntensity example for Delphi

This example stretches the intensity and redisplays the image.

Lead1.StretchIntensity;
Lead1.ForceRepaint;


SubtractBackground Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('mage3.cmp', 0, 1, 1 );
{ Apply Subtract Background effect on the image }
LEADImage1.SubtractBackground( 50, SBK_DEPEND, 50, SBK_BG_DARK + SBK_RES_SHOW );
end;


SwapColors example for Delphi

SwapColors Delphi Example

{This example assumes there is a bitmap loaded}
LEADImage1.SwapColors (SWAP_RG);


Swirl Example for Delphi

procedure TForm1.SwirlClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.Swirl( 180, ptCenter );
end;


TextFont example for Delphi

This example, in a MouseUp event, determines the size of a rectangle for a string in the specified font. It then draws the rectangle and draws the text on top of the rectangle.

procedure TForm1.Lead1MouseUp (Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
const
OutputString = 'This is my text.';
var
TextWidth, TextHeight : Integer;
begin

{Specify the font, and styles}
Lead1.TextFont.Name := 'Times New Roman';
Lead1.TextFont.Size := 16;
Lead1.TextFont.Color := RGB(0, 0, 255); {Blue}
Lead1.TextStyle := etsNormal;
Lead1.TextAlign := etaHcenterVcenter;

{Get the width and height of the text to be drawn.}
TextWidth := Lead1.DrawTextWidth(OutputString);
TextHeight := Lead1.DrawTextHeight (OutputString);

{set the location for the text}
Lead1.TextTop := y;
Lead1.TextLeft := x;
Lead1.TextWidth := TextWidth;
Lead1.TextHeight := TextHeight;

{Set the properties for drawing a rectangle behind the text.}
Lead1.DrawPenStyle := psSolid;
Lead1.DrawMode := pmCopy;
Lead1.DrawFillColor := RGB(0, 255, 0); {Green}

{Draw on the screen, not on the bitmap.}
Lead1.DrawPersistence := False;

{Draw the rectangle, then draw the text.}
Lead1.DrawRectangle(x, y, TextWidth, TextHeight);
Lead1.DrawTextStr(OutputString, 0);
end;


TextPointerFixed example for Delphi

Procedure TForm1.ExampleTextPointerFixed ( hObject: HANNOBJECT );
var
nObjectType: L_INT;
bTextPointerFixed: Boolean;
begin
nObjectType:= LEADAnn1.AnnGetType(hObject);

if (nObjectType <> ANNOBJECT_TEXT) Then
begin
ShowMessage( 'This object is not a Text Object');
end;

bTextPointerFixed:= LEADAnn1.AnnTextPointerFixed[hObject];
if (bTextPointerFixed = true) Then
begin
bTextPointerFixed:= false;
end
else
begin
bTextPointerFixed:= true;
end;

LEADAnn1.AnnTextPointerFixed[hObject]:= bTextPointerFixed;
end;


TextureAlphaBlend Example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load both bitmaps, at 24 bits per pixel }
LEADImage1.Load('E:\\IMAGE1.CMP', 24, ORDER_BGR, 1);
LEADImage2.Load('E:\\IMAGE2.cmp', 24, ORDER_BGR, 1);

{ Load the fade mask bitmaps }
LEADImage3.Load('E:\\IMAGE1.CMP', 24, ORDER_BGR, 1);
LEADImage3.Invert( );
{ Combine BitmapSrc with BitmapDst, with fade mask bitmap and a 100 opacity}
LEADImage1.TextureAlphaBlend( 0, 0, LEADImage1.BitmapWidth, LEADImage1.BitmapHeight, LEADImage2.Bitmap, 0, 0, LEADImage3.Bitmap, 100, 0, Nil );
end;


TextWordWrap example for Delphi

This example wraps text inside the rectangle that is specified for the text object.

{Text location}
Lead1.TextTop := 10;
Lead1.TextLeft := 10;
Lead1.TextWidth := 150;
Lead1.TextHeight := 150;

{Text alignment and angle}
Lead1.TextAlign := etaLeftVcenter;
Lead1.TextAngle := 0;

{Enable word wrap}
Lead1.TextWordWrap := True;

Lead1.DrawTextStr ('LEADTOOLS 11 Supports WordWrap when drawing text.', 0);


TransitionEffect example for Delphi

Lead1.AutoRepaint := False;
Lead1.EffectDelay := 50;
Lead1.Load ('c:\lead\images\image1.cmp', 0, 0, 1);
Lead1.TransitionEffect := EFX_EFFECT_WIPE_RECTANGLE_OUT;
Lead1.TransitionStyle := etsGradient;
Lead1.GradientStyle := EFX_GRADIENT_ANGLE_TO_LT;
Lead1.GradientEndColor := RGB(0, 0, 0);
Lead1.GradientStartColor := RGB(255, 255, 255);
Lead1.GradientSteps := 255;
Lead1.AutoRepaint := True;


TransparentColor example for Delphi

This example sets white as a transparent color; then loads a test image and paints it.

Lead1.AutoRepaint := False;

{Enable transparency}
Lead1.UseTransparentColor := True;

{Make white the transparent color}
Lead1.TransparentColor := RGB(255, 255, 255);
Lead1.Load ('d:\ ltwin11\images\image1.cmp', 0, 0, 1);
Lead1.ForceRepaint();


Trim example for Delphi

This example trims one-tenth from the bitmap and repaints the image.

var
NewLeft, NewTop, NewWidth, NewHeight: Integer;

begin
NewLeft := Lead1.BitmapWidth div 10;
NewTop := Lead1.BitmapHeight div 10;
NewWidth := (Lead1.BitmapWidth * 8) div 10;
NewHeight := (Lead1.BitmapHeight * 8) div 10;
Lead1.Trim(NewLeft, NewTop, NewWidth, NewHeight);

{ Set the image display size to match the LEAD control}
Lead1.SetDstRect(0, 0, Lead1.BitmapWidth, Lead1.BitmapHeight);
Lead1.SetDstClipRect(0, 0, Lead1.BitmapWidth, Lead1.BitmapHeight);
Lead1.ForceRepaint;

end;


Tunnel Example for Delphi

procedure TForm1.TunnelClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc( LEADImage1.BitmapWidth /2 );
ptCenter.y:= Trunc( LEADImage1.BitmapHeight /2 );
LEADImage1.Tunnel( ptCenter, 0, Trunc(LEADImage1.BitmapHeight/2), Trunc(LEADImage1.BitmapWidth/2), 1, 0, 25, 100, 0, 2000, RGB(255,0,0), RGB(0,0,0), TUN_AXIS_WIDTH Or PLANE_FILL_CLR );
end;


Underlay example for Delphi

This example loads a bitmap into Lead2 and uses it as a tiled underlay for Lead1.

Lead2.Visible := False;
Lead2.Load('c:\lead\images\ulay1.bmp', 0, 0, 1);
Lead1.Underlay(Lead2.Bitmap, UB_TILE);
Lead1.ForceRepaint;


UnlockSupport (ImageList Control) example for Delphi

UnlockSupport (ImageList Control) example for Delphi 4

var
bRet : Boolean;
begin

bRet := LEADImgList1.IsSupportLocked(L_SUPPORT_OCR);
If (bRet) Then
LEADImgList1.UnlockSupport (L_SUPPORT_OCR, 'yourstringhere');
end;


UnlockSupport (ISIS Control) example for Delphi

{ Unlock OCR support. }
{ Note that this is a sample key, which will not work in your toolkit. }
LeadIsis1.UnlockSupport(L_SUPPORT_OCR, 'TestKeyXYZ');


UnlockSupport (Thumbnail Browser Control) example for Delphi

var
bRet : Boolean;
begin
bRet := LEADThumb1.IsSupportLocked(L_SUPPORT_OCR);
If bRet = true Then
LEADThumb1.UnlockSupport (L_SUPPORT_OCR, 'yourstinghere');
end;


UnSharpMask example for Delphi

UnsharpMask Delphi Example

LEADImage1.UnsharpMask (200, 15, 50, RGB_SPACE);


UseLUT example for Delphi

procedure TForm1.Button1Click(Sender: TObject);
var
nRet: Integer;
nLow: Integer;
nHigh: Integer;
begin
LEADImage1.UnlockSupport(L_SUPPORT_MEDICAL, 'TestKey');
nRet:= LEADImage1.Load('c:\16.jpg', 16, 0, 1);
if(nRet = SUCCESS)then
begin
LEADImage1.GetMinMaxBits();
LEADImage1.GetMinMaxVal();

LEADImage1.LevelLowBit:= 0;
LEADImage1.LevelHighBit:= LEADImage1.BitmapBits - 1;

nLow:= LEADImage1.MinBit;
nHigh:= 1 Shl (LEADImage1.MaxBit - LEADImage1.MinBit + 1);
//allocate the LUT
LEADImage1.LevelLUT[nHigh - 1]:= 0;

//fill the entire LUT with gradient from RED to BLUE
LEADImage1.WindowLevelFillLUT(clRed,
clBlue,
nLow,
nHigh,
LEADImage1.MinBit,
LEADImage1.MaxBit,
LEADImage1.MinVal,
LEADImage1.MaxVal,
0,
FILLLUT_INSIDE Or FILLLUT_LINEAR);
end
else
ShowMessage('Unable to load file');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
LEADImage1.UseLUT:= False;
LEADImage1.ColorRes(24, CRF_BYTEORDERBGR, CRF_NODITHERING, 0);
end;


UserFilter Example for Delphi

{In this example the high pass filter will be applied using user defined matrix}
procedure TForm1.Button1Click(Sender: TObject);
var
{ Allocate the user filter matrix. We need a (3x3) matrix with 9 elements. }
ufltMatrix: Array [0..8] of L_INT;
i: L_INT;
j: L_INT;
pt: TPoint;
begin
{ Load a bitmap at its own bits per pixel }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );

{ Initialize the array with factor used to apply the high pass filter }
for i:=0 to 2 do
begin
for j:= 0 to 2 do
begin
if ( (j = 1) Or (i = 1) ) Then
begin
if( (j = 1) And (i = 1) ) then
begin
ufltMatrix[i * 3 + j]:= 5;
end
else
begin
ufltMatrix[i * 3 + j]:= -1;
end;
end
else
begin
ufltMatrix[i * 3 + j]:= 0;
end;
end;
end;

pt.x:= 1;
pt.y:= 1;
{ Apply the high pass custom filter }
LEADImage1.UserFilter(3, 3, pt, 1, 0, @ufltMatrix, UD_SUM);
end;


UserPalette and BitmapPalette example for Delphi

This example demonstrates the UserPalette and BitmapPalette properties.

{Specify a blue and white user palette}
Lead1.UserPalette[0] := RGB(0, 0, 255);
Lead1.UserPalette[1] := RGB(255, 255, 255);

{Implement the user palette}
Lead1.ColorRes(1, CRF_USERPALETTE, CRF_ORDEREDDITHERING, 2);

{Display the blue and white image}
Lead1.ForceRepaint;

ShowMessage('This is the user palette. Click OK to change the bitmap palette.');

{Change the bitmap palette to red and white}
Lead1.BitmapPalette[0] := RGB(255, 0, 0);
Lead1.BitmapPalette[1] := RGB(255, 255, 255);

{Display the red and white image}
Lead1.ForceRepaint;


Version... example for Delphi

This example puts the version information into a string and displays the string in a message box.

procedure TForm1.Button3Click(Sender: TObject);

var
LevelStr, cMsg: String;

begin
If Lead1.VersionLevel = TOOLKIT_LEVEL_EXP Then
LevelStr := 'Document/Medical editions '
Else LevelStr := 'Professional Edition';
cMsg := Lead1.VersionProduct + Chr(13) + LevelStr + Chr(13);
cMsg := cMsg + 'Version: ' + IntToStr(Lead1.VersionMajor) + '.';
cMsg := cMsg + IntToStr(Lead1.VersionMinor) + Chr(13);
cMsg := cMsg + 'Date produced: ' + Lead1.VersionDate + Chr(13);
cMsg := cMsg + 'Time produced: ' + Lead1.VersionTime + Chr(13);

{ Display the message box}
Application.MessageBox(PChar(cMsg), 'Version Info', mb_OK);

end;


ViewSize example for Delphi

var
nSize: Integer;
nFirst: Integer;
nLast: Integer;
nCols: Integer;
nCount: Integer;
begin

//NOTE: assume scroll style = SCROLLSTYLE_VERTICAL
//get the view size
nSize:= LEADImgList1.ViewSize;
//get the first visible item
nFirst:= LEADImgList1.FirstVisibleItem;
//get the column count
nCols:= LEADImgList1.ColumnCount;
//calculate the index of last visible item
nLast:= nFirst + (nSize * nCols) - 1; //0 based index
nCount:= LEADImgList1.Count;
if (nLast > nCount - 1) Then
nLast:= nCount - 1;
end;


VScrollStep example for Delphi

Lead1.VScrollStep := 2;


VTable example for Delphi

{This example considers that the image you are working with is 24 bpp.}
var
i: L_INT;
uVal: L_UINT;
Msg: String;
begin
LEADImage1.RemapHueTablesSize:= 256;
{This example remaps the "value" of each color to one half its original}
for i:= 0 To 255 do
begin
LEADImage1.VTable[i]:= Trunc(i/2);
uVal:= LEADImage1.VTable[i];
Msg:= Msg + IntToStr (uVal)+ ' ';
end;
ShowMessage ( Msg );
LEADImage1.RemapHue( False, False, False, True );
end;


Wave Example for Delphi

procedure TForm1.WaveClick(Sender: TObject);
begin
LEADImage1.Wave( 20, 25, 0, 100 , 100, 0, FILL_RPT Or DIS_PER Or WV_SIN );
end;


Wind Example for Delphi

procedure TForm1.WindClick(Sender: TObject);
begin
LEADImage1.Wind( 40, 4500, 0 );
end;


WindowLevel example for Delphi

This example converts a bitmap to 12-bit grayscale and then performs window leveling on the eight least significant bits of the image.

Lead1.Grayscale (12); {Grayscale image to 12-bit}

{use least significant 8 bits}

Lead1.LevelLowBit := 0;

Lead1.LevelHighBit := 7;

Lead1.WindowLevel;


WindowLevelBitmap example for Delphi

//This example loads a 16-bit grayscale, fills the window level lookup table,
//and window levels the bitmap for display only
procedure TForm1.WndLvlBmpClick(Sender: TObject);
var
min: integer;
max: integer;
i : integer;
begin
// Load a 16-bit grayscale image
Lead1.Load('test.tif', 0, 0, 1);
Lead1.AutoRepaint := False;
// Use all bits
Lead1.LevelLowBit := 0;
Lead1.LevelHighBit := Lead1.BitmapBits - 1;
Lead1.GetMinMaxBits;
Lead1.GetMinMaxVal;
max := Lead1.MaxVal;
min := Lead1.MinVal;
// Set LUT so it ranges from pure blue to pure red
for i:=min to max-1 do
Lead1.LevelLUT[i] := RGB(i mod 256, 0, 256 - i mod 256);
//Window level for display only -- leave the bitmap data unchanged
Lead1.WindowLevelBitmap := True;
Lead1.WindowLevel();
Lead1.ForceRepaint;
end;


WindowLevelFillLUT example for Delphi

var
nHigh: Integer;
nLow: Integer;
begin

LEADImage1.GetMinMaxBits;
LEADImage1.GetMinMaxVal;

LEADImage1.LevelLowBit := 0;
LEADImage1.LevelHighBit := LEADImage1.BitmapBits - 1;

nLow := LEADImage1.MinBit;
nHigh := Trunc ( Power(2, LEADImage1.MaxBit - LEADImage1.MinBit + 1) ) ;

//allocate the LUT
LEADImage1.LevelLUT[nHigh - 1] := 0;

//fill the entire LUT with gradient from RED to BLUE
LEADImage1.WindowLevelFillLUT ( RGB(255, 0, 0), RGB(0, 0, 255),
nLow, nHigh, LEADImage1.MinBit, LEADImage1.MaxBit,
LEADImage1.MinVal, LEADImage1.MaxVal, True);

//now use it
LEADImage1.WindowLevelBitmap := True;
LEADImage1.WindowLevel( ) ;
end;


WMFResolution example for Delphi

//This example displays the default resolution stored in a WMF,
//changes the resolution to 150 dpi, and then loads the image

procedure TForm1.LoadWMFClick(Sender: TObject);
var
fileName: String;
begin
fileName := 'test.wmf';
//Display resolution stored in WMF
Lead1.GetFileInfo(fileName, 0);
ShowMessage('InfoXRes: ' + IntToStr(Lead1.InfoXRes) + #13 + 'InfoYRes: ' + IntToStr(Lead1.InfoYRes));
// Set resolution so WMF is loaded at 150 dpi
Lead1.WMFResolutionX := 150;
Lead1.WMFResolutionY := 150;
Lead1.Load(fileName, 0, 0, 1);
end;


WMFResolutionX Example for Delphi

//This example displays the default resolution stored in a WMF,
//changes the resolution to 150 dpi, and then loads the image
procedure TForm1.LoadWMFClick(Sender: TObject);
var
fileName: String;
begin
fileName:= 'test.wmf';
//Display resolution stored in WMF
LEADImage1.GetFileInfo(fileName, 0);
ShowMessage('InfoXRes: ' + IntToStr(LEADImage1.InfoXRes) + #13 + 'InfoYRes: ' + IntToStr(LEADImage1.InfoYRes));
// Set resolution so WMF is loaded at 150 dpi
LEADImage1.WMFResolutionX:= 150;
LEADImage1.WMFResolutionY:= 150;
LEADImage1.Load(fileName, 0, 0, 1);
end;


WriteComment example for Delphi

{ set the comment}
LEADImage1.Comment[CMNT_SZARTIST] := 'Me';

{ write the comment into page 1 of TEST.TIF}
LEADImage1.WriteComment(pChar('Test.Tif'), 1);

{ read the comment and display it}
MessageBox(Handle,
pChar(VarToStr(LEADImage1.ReadComment('TEST.TIF', 1, CMNT_SZARTIST))),
'test',0);


WriteMarkerAction example for Delphi

procedure TForm1.LEADImage1TransformMarker (iMarker, lSize: Integer;
pData: Pointer; iTransform: Integer);
begin
// I will replace the comment present in the file with my own comment
if (iMarker = $FE) Then
begin
LEADImage1.WriteMarkerAction:= WRITEMARKER_IGNORE;
LEADImage1.WriteMarker (iMarker, 10, PChar('My comment'));
end;
end;
//Rotate the file 90 degrees
LEADImage1.TransformFile ('c:\temp\1.jpg', 'c:\temp\2.jpg', FILE_TRANSFORM_ROTATE90, 1);


WriteMetaData example for Delphi

procedure TForm1.WriteMetaDataClick(Sender: TObject);
begin
LEADMarker1.LoadMarkers ( 'e:\image1.jpg', 0 );
LEADImage1.SetMarkers ( LEADMarker1, 0 );
LEADImage1.WriteMetaData ( 'e:\image2.tif', METADATA_ALL );
end;


ZoomBlur Example for Delphi

procedure TForm1.ZoomBlurClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.ZoomBlur( 50, 5, ptCenter );
end;


ZoomIn example for Delphi

This example calls ZoomIn() method to zoom in on a captured image.

Lead1.ZoomIn();


ZoomWave Example for Delphi

procedure TForm1.ZoomWaveClick(Sender: TObject);
var
ptCenter: TPoint;
begin
ptCenter.x:= Trunc(LEADImage1.BitmapWidth /2);
ptCenter.y:= Trunc(LEADImage1.BitmapHeight /2);

LEADImage1.ZoomWave( 20 , 10 , 0 , 0, ptCenter, 0, FILL_RPT );
end;


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
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.


Properties, Methods, and Events

Working with the Control

General Behavior

Client Area Usage

Raster Images

Input and Output

Creation, Deletion, and Copying

Palettes

Displaying and Printing

Image Processing

Region Processing

Analysis

Annotations (Document/Medical only)

Input and Output

Automation

Annotation Events

Annotation Security

Annotation Hyperlinks

Using the Clipboard

Using the Mouse

Object Manipulation

Object Bitmap

Databases

Data Binding

Support

Version and License Information


Working with the Control: Client Area Usage

Working with the Control:
Client Area Usage

Mouse events:

The following are all Borland events. For information concerning these events, consult your Borland documentation.

OnClick event

OnDblClick event

OnMouseDown event

OnMouseMove event

OnMouseUp event

Display events:

OnPaint event

OnRubberBand event

OnScroll event

Selecting a rectangular area:

AutoRubberBand property

RubberBandHeight property

RubberBandLeft property

RubberBandTop property

RubberBandVisible property

RubberBandWidth property

SetRubberBandRect method

Getting the device context:

GetClientDC method

ReleaseClientDC method

Converting between client and bitmap coordinates:

BitmapToClient method

ClientToBitmap method

ConvertX property

ConvertY property

Specifying the client area as the drawing surface:

DrawPersistence property

Drawing simple objects:

DrawLine method

DrawEllipse method

DrawRectangle method

DrawFillColor property

DrawFillStyle property

DrawMode property

DrawPenColor property

DrawPenStyle property

DrawPenWidth property

Drawing three-dimensional shapes:

DrawShape method

ShapeLeft property

ShapeTop property

ShapeWidth property

ShapeHeight property

ShapeBackgroundStyle property

BackgroundImageHeight property

BackgroundImageLeft property

BackgroundImageTop property

BackgroundImageWidth property

ShapeBorderColor property

ShapeBorderStyle property

ShapeBorderThickness property

ShapeInnerBandHiliteColor property

ShapeInnerBandShadowColor property

ShapeInnerBandStyle property

ShapeInnerBandThickness property

ShapeOuterBandHiliteColor property

ShapeOuterBandShadowColor property

ShapeOuterBandStyle property

ShapeOuterBandThickness property

ShadowColor property

ShadowXDepth property

ShadowYDepth property

Drawing three-dimensional text objects:

DrawTextStr method

TextLeft property

TextTop property

TextWidth property

TextHeight property

TextAlign property

TextFont property

TextStyle property

TextWordWrap property

TextAngle property

TextHiliteColor property

ShadowColor property

ShadowXDepth property

ShadowYDepth property

DrawTextHeight method

DrawTextWidth method

Specifying gradient colors or patterns:

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

PatternStyle property

PatternBackColor property

PatternForeColor property


Working with the Control: General Behavior

Working with the Control:
General Behavior

Control usage:

EnableMethodErrors property

EnableProgressEvent property

DropFilesAllowed property

DropAutoLoad property

OnDropFile event

OnStatus event

Appearance:

BackColor property

Transparent property

FrameThickness property

FrameColor property

FrameInnerStyle property

FrameInnerThickness property

FrameInnerHiliteColor property

FrameInnerShadowColor property

FrameOuterStyle property

FrameOuterThickness property

FrameOuterHiliteColor property

FrameOuterShadowColor property

Keyboard events:

These are Borland events. For more information, refer to your Borland documentation.

OnKeyDown event

OnKeyUp event

OnKeyPress event

Mouse events:

These are Borland events. For more information, refer to your Borland documentation.

OnClick event

OnDblClick event

OnMouseDown event

OnMouseMove event

OnMouseUp event

Input/Output File Format Filters:

PDFInitDir property

PreLoadFilters method

IgnoreFilters method


Raster Images: Analysis

Raster Images:
Analysis

Image Analysis

Object or Region Analysis


Raster Images: Image Analysis

Raster Images:
Region Processing
Image Analysis

GetStatisticsInfo method


Raster Images: Object or Region Analysis

Raster Images:
Region Processing
Object or Region Analysis

GetFeretsDiameter method

GetObjectInfo method

GetRgnContourPoints method

GetRgnPerimeterLength method


Raster Images: Capturing a Screen Image

Raster Images:
Input and Output
Capturing a Screen Image

Capture method

EnableZoomInRect property

OnZoomInDone event

ZoomIn method


Raster Images: Exchanging Images with Other Objects

Raster Images:
Input and Output
Exchanging Images with Other Objects

DIB:

GetDIB method

SetDIB method

DDB:

GetDDB method

SetDDB method

Windows Clipboard:

Copy method

Paste method


Raster Images: Getting and Setting File Information

Raster Images:
Input and Output
Getting and Setting File Information

Getting information:

ExtractMessage method

GetFileInfo method

GetMemoryInfo method

GetTagCount method

GetTagData method

GetTagType method

InfoBits property

InfoColorSpace property

InfoCompress property

InfoFormat property

InfoHasAlpha property

InfoHeight property

InfoLayers property

InfoPage property

InfoPCDRes property

InfoSizeDisk property

InfoSizeMem property

InfoTotalPages property

InfoViewPerspective property

InfoWidth property

InfoXRes property

InfoYRes property

IsSigned property

LoadResolutionCount property

LoadResolutionHeight property

LoadResolutionWidth property

ReadComment method

ReadLoadResolutions method

EnumTags method

ReadTag method

ReadTagMemory method

SetTag method

WriteComment method

WriteTag method

OnEnumTags event

Setting information:

AddMessage method

AnimationBackColor property

AnimationBitsPerPixel property

AnimationHeight property

AnimationPalette property

AnimationWidth property

Comment property

ProgressivePasses property

SavePage property

SaveResolutionCount property

SaveResolutionHeight property

SaveResolutionWidth property


Raster Images: Getting / Setting Rows from Bitmaps

Raster Images:
Image Processing
Getting / Setting Rows from Bitmaps

GetBitmapRow method

GetBitmapRowCol method

PutBitmapRow method

PutBitmapRowCol method

BitmapOrder property

BitmapBytesPerLine property


Raster Images: Input and Output

Raster Images:
Input and Output

 Loading Files

Saving Files

Getting and Setting File Information

Loading and Saving Stamp Images

Loading and Saving Large TIFF Files

Scanning Images using ISIS

Capturing a Screen Image

Exchanging Images with Other Objects

Using the Thumbnail Browser

Maintaining File Comments

Maintaining TIFF Tags


Raster Images: Loading and Saving Stamp Images

Raster Images:
Input and Output
Loading and Saving Stamp Images

LoadStamp method

SaveWithStamp method


Raster Images: Loading and Saving TIFF Files

Raster Images:
Input and Output
Loading and Saving Large TIFF Files

InfoIFD property

LoadIFD property

SaveIFD property


Raster Images: Loading Files

Raster Images:
Input and Output
Loading Files

Getting information before loading:

GetFileInfo method

GetMemoryInfo method

InfoBits property

InfoColorSpace property

InfoCompress property

InfoFormat property

InfoHasAlpha property

InfoHeight property

InfoLayers property

InfoPage property

InfoPCDRes property

InfoSizeDisk property

InfoSizeMem property

InfoViewPerspective property

InfoXRes property

InfoYRes property

InfoWidth property

ReadLoadResolutions method

LoadResolutionCount property

LoadResolutionHeight property

LoadResolutionWidth property

Optional settings before loading:

AutoCADFilesColorScheme property

DVJResolution property

GetLoadResolution method

LoadInfoBits property

LoadInfoFlags property

LoadInfoFormat property

LoadInfoHeight property

LoadInfoOffset property

LoadInfoWidth property

LoadInfoXRes property

LoadInfoYRes property

LoadSigned property

LoadUseViewPerspective property

OnLoadInfo event

PaintWhileLoad property

ProgressivePasses property

PCDRes property

PDFDisplayDepth property

PDFGraphicsAlpha property

PDFTextAlpha property

PDFUseLibFonts property

PDFXResolution property

PDFYResolution property

PLTPenColor property

PLTPenWidth property

PTKResolution property

RasterizeViewMode property

RasterizeViewportHeight property

RasterizeViewportWidth property

RTFTopMarg property

RTFBottomMarg property

RTFRightMarg property

RTFLeftMarg property

RTFPaperWidth property

RTFPaperHeight property

SetLoadResolution method

WMFResolutionX property

WMFResolutionY property

LoadFast property

Alternatives to load from a file on a disk:

Load method

LoadLayer method

LoadResize method

LoadStamp method

DropFilesAllowed property

DropAutoLoad property

OnDropFile event

Loading from a file in memory:

LoadFileTile method (Main Control)

LoadMemoryTile method (Main Control)

LoadMemory method

Where you supply the image data to load:

FeedLoad method

StartFeedLoad method

StopFeedLoad method

WMFResolutionX property

WMFResolutionY property

Events during a load:

OnFilePage event

OnChange event

OnBitmapDataPathClosed event


Raster Images: Markers

Raster Images:
Input and Output
Markers

CopyMarkers method

Count property

CreateMarkers method

DeleteMarker method

DeleteMarkerAt method

Element property

ElementCount property

EnumMarkers method

GetMarker method

GetMarkers method

InsertMarker method

LoadMarkers method

MarkerType property

OnEnumerateMarkers event

SetMarkers method

WriteMetaData method


Raster Images: Saving Files

Raster Images:
Input and Output
Saving Files

Optional settings before saving:

AnimationBackColor property

AnimationBitsPerPixel property

AnimationHeight property

AnimationPalette property

AnimationWidth property

Comment property

FileSizeWritten property

LayerLeft property

LayerTop property

PDFSaveUseDPI property

ProgressivePasses property

SaveInterlaced property

SaveLayers property

SaveOffset method

SavePad4 property

SavePage property

SaveResolutionCount property

SaveResolutionHeight property

SaveResolutionWidth property

Alternatives to save a file on disk:

Save method

SaveOffset method

SaveWithStamp method

Saving a file in memory:

SaveBuffer method

SaveMemory method

Optional settings for saving PDF files:

PDFEnable128bit property

PDFEncryptFlags property

PDFOwnerPassword property

PDFSaveUseDPI property

PDFUserPassword property

Optional settings for saving JPEG 2000 files:

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedQuantization property

J2KGuardBits property

J2KProgressOrder property

J2KROIControl property

J2KROIRect property

J2KSetDefaults method

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseROI property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property

Optional settings for saving TIF files

SaveTileHeight property

SaveTileWidth property

Optional settings for saving JBIG2 files:

JBIG2SaveFlags property

JBIG2TemplateType property

JBIG2GBATX1 property

JBIG2GBATY1 property

JBIG2GBATX2 property

JBIG2GBATY2 property

JBIG2GBATX3 property

JBIG2GBATY3 property

JBIG2GBATX4 property

JBIG2GBATY4 property


Raster Images: Scanning Images using ISIS

Raster Images:
Input and Output
Scanning Images using ISIS

Before scanning:

DriverName property

EnableISISEvent property

EnableMethodErrors property

ISISGetASCIITag method

ISISGetASCIITagChoice method

ISISGetASCIITagChoiceCount method

ISISGetTag method

ISISGetTagChoice method

ISISGetTagChoiceCount method

IsISISAvailable property

ISISLoadDriver method

ISISSelect method

ISISSetASCIITag method

ISISSetScanOptions method

ISISSetTag method

Scanning:

Bitmap property

ISISAcquire method

ISISAcquireMulti method

OnISISPage event

After Scanning:

Bitmap property

ISISUnloadDriver method

Error property

ErrorMsg property

PagesDiscarded property


Raster Images: Using the Thumbnail Browser

Raster Images:
Input and Output
Using the Thumbnail Browser

BrowseDir method

ContinueBrowse property

DitherFlags property

EnableMethodErrors property

ExpandMultipage property

Filter property

ForceSize property

IncludeSubDirectories property

InfoBits property

InfoCompression property

InfoFormat property

InfoHeight property

InfoPage property

InfoSizeDisk property

InfoSizeMem property

InfoTotalPages property

InfoWidth property

InfoXRes property

InfoYRes property

IsSupportLocked method

LoadStamp property

MaintainAspect property

MaxSizeDisk property

MaxSizeMem property

PaletteFlags property

Resample property

StopOnError property

ThumbnailBackgroundColor property

ThumbnailBitsPerPixel property

ThumbnailEvent event

ThumbnailHeight property

ThumbnailWidth property

UnlockSupport method


Raster Images: Copying Images

Raster Images:
Creation, Deletion, and Copying
Copying Images

Copying whole bitmaps:

Bitmap property

BitmapList property

OCXBitmap property

Copying part of one bitmap to another bitmap:

Combine method

CombineWarp method

CombineExt method

Creating and using a floater automatically(Document/Medical only):

AutoFloater property

EnableFloater property

Creating and using a floater manually:

Floater property

FloaterVisible property

IsPtInFloater method

SetFloaterDstRect method

SetFloaterDstClipRect method

FloaterDstHeight property

FloaterDstLeft property

FloaterDstTop property

FloaterDstWidth property

FloaterDstClipHeight property

FloaterDstClipLeft property

FloaterDstClipTop property

FloaterDstClipWidth property

FloaterHeight property

FloaterWidth property


Raster Images: Creating and Deleting Images

Raster Images:
Creation, Deletion, and Copying
Creating and Deleting Images

Creating an image:

CreateBitmap method

Fill method

GetBitmapDC method

GetMemoryThresholds method

ReleaseBitmapDC method

SetMemoryThresholds method

Deleting images:

Bitmap property

DeleteBitmapListItems method

DeletePage method


Raster Images: Creating and Maintaining Lists of Images

Raster Images:
Creation, Deletion, and Copying
Creating and Maintaining Lists of Images

Creating, saving, and deleting lists:

Load method

Save method

SaveOffset method

BitmapList property

Maintaining list items:

InsertBitmapListItem method

DeleteBitmapListItems method

Accessing bitmaps in a list:

BitmapListIndex property

BitmapListCount property

Bitmap property


Raster Images: Creation, Deletion, and Copying

Raster Images:
Creation, Deletion, and Copying

Creating and Deleting Images

Creating and Maintaining Lists of Images

Using the Clipboard

Copying Images


Raster Images: Using the Clipboard

Raster Images:
Creation, Deletion, and Copying
Using the Clipboard

Copy method

Paste method


Raster Images: Palettes

Raster Images:
Palettes

Manipulating palettes:

BitmapPalette property

GetBitmapPalette method

UseLUT property

UserPalette property

Implementing palettes:

ColorRes method

ColorResList method

PaintPalette property

Implementing window leveling:

Note: This topic is for Medical only.

LEADTOOLS provides window leveling properties, methods and events for working with 12 and 16-bit grayscale images. The properties, methods and events allow you to specify which bits should be used for display, remap intensity levels to user defined palette colors, and change the bitmap to match the displayed image.

WindowLevel method

WindowLevelBitmap property

GetMinMaxBits method

GetMinMaxVal method

LevelLowBit property

LevelHighBit property

LevelLUT property

LevelLUTLength property

MaxBit property

MaxVal property

MinBit property

MinVal property


Raster Images: Cleaning - up 1-Bit Images

Raster Images:
Displaying and Printing
Cleaning - up 1-Bit Images (Document/Medical only)

BorderRemove method

DocCleanBitmap property

DocCleanSuccess property

DotRemove method

hDocCleanRgn property

HolePunchRemove method

InvertedText method

LineRemove method

OnBorderRemove event

OnDotRemove event

OnHolePunchRemove event

OnInvertedText event

OnLineRemove event

OnSmooth event

Smooth method


Raster Images: Displaying and Printing

Raster Images:
Displaying and Printing

Displaying Images

Implementing Special Effects

Playing Animated Images

Printing Images

Cleaning - up 1-Bit Images


Raster Images: Displaying Images

Raster Images:
Displaying and Printing
Displaying Images

Setting the control's appearance:

BackColor property

FrameThickness property

FrameColor property

FrameInnerStyle property

FrameInnerThickness property

FrameInnerHiliteColor property

FrameInnerShadowColor property

FrameOuterStyle property

FrameOuterThickness property

FrameOuterHiliteColor property

FrameOuterShadowColor property

Automated display options:

AutoRepaint property

AutoScroll property

AutoSetRects property

AutoSize property

CenterImage property

EnableKeyboard property

EnableScroll property

HasMagGlass property

PaintSizeMode property

PaintSizeUseDPI property

PaintZoomFactor property

ZoomToRect method

Painting options:

PaintRgnOnly property

BackErase property

BitonalScaling property (Document/Medical only)

PaintDither property

PaintEffect property

PaintPalette property

PaintROP3 property

PaintGamma property

PaintIntensity property

PaintContrast property

Forced painting:

ForceRepaint method

RepaintRect method

Converting between client and bitmap coordinates:

BitmapToClient method

ClientToBitmap method

ConvertX property

ConvertY property

Setting source and destination rectangles:

SetDstClipRect method

SetDstRect method

SetSrcClipRect method

SetSrcRect method

Source and destination rectangle properties:

SrcHeight property

SrcLeft property

SrcTop property

SrcWidth property

SrcClipHeight property

SrcClipLeft property

SrcClipTop property

SrcClipWidth property

DstHeight property

DstLeft property

DstTop property

DstWidth property

DstClipHeight property

DstClipLeft property

DstClipTop property

DstClipWidth property

Scrolling an image

AutoScroll property

HScrollInfo property

OnScroll event

VScrollInfo property

Using a PanWindow:

OnPanWin event

PanWinBitonalScaling property

PanWinHeight property

PanWinIcon property

PanWinPaintDither property

PanWinPaintPalette property

PanWinPaintScaling property

PanWinPointer property

PanWinRectColor property

PanWinSysMenu property

PanWinTitle property

PanWinWidth property

PanWinPointer property

ShowPanWin method

Using the ImageList Control

AllowSelection property (ImageList Control)

BackColor property (ImageList Control)

BitonalScaling property (ImageList Control)

BorderColor property (ImageList Control)

Clear method (ImageList Control)

ColumnCount property (ImageList Control)

Count property (ImageList Control)

CurrentPage property (ImageList Control)

DisplayItemText property (ImageList Control)

EnableKeyboard property (ImageList Control)

EnableMethodErrors property (ImageList Control)

EnsureVisible method (ImageList Control)

ExportBitmapList method (ImageList Control)

FirstVisibleItem property(ImageList Control)

Font property (ImageList Control)

ForeColor property (ImageList Control)

HitTest method (ImageList Control)

ImportBitmapList method (ImageList Control)

Insert method (ImageList Control)

InsertAt method (ImageList Control)

InsertFromBitmapList method (ImageList Control)

IsSupportLocked method (ImageList Control)

Item property (ImageList Control)

ItemBackgroundColor property (ImageList Control)

ItemHeight property (ImageList Control)

ItemHorizontalSpacing property (ImageList Control)

ItemVerticalSpacing property (ImageList Control)

ItemWidth property (ImageList Control)

LoadDatabase method (ImageList Control)

LoadFromFile method (ImageList Control)

OnItemSelected event (ImageList Control)

OwnerDrawItem event (ImageList Control)

OwnerDrawItems property (ImageList Control)

PageCount property (ImageList Control)

PaintDither property (ImageList Control)

PaintScaling property (ImageList Control)

Remove method (ImageList Control)

RowCount property (ImageList Control)

SaveDatabase method (ImageList Control)

SaveToFile method (ImageList Control)

Scroll event (ImageList Control)

ScrollItems method (ImageList Control)

ScrollStyle property (ImageList Control)

SelectAll method (ImageList Control)

SelectedCount property (ImageList Control)

SelectedItems property (ImageList Control)

SelectionColor property (ImageList Control)

SelectionStyle property (ImageList Control)

SetSelectionBitmap method (ImageList Control)

Sort method (ImageList Control)

SortExt method (ImageList Control)

UnlockSupport method (ImageList Control)

ViewSize property (ImageList Control)

Magnifying Glass

MagGlassBitonalScaling property (Main Control)

MagGlassFlags property (Main Control)

MagGlassMask property (Main Control)

MagGlassMaskCount property (Main Control)

MagGlassPaintContrast property (Main Control)

MagGlassPaintContrast property (Main Control)

MagGlassPaintDither property (Main Control)

MagGlassPaintGamma property (Main Control)

MagGlassPaintGamma property (Main Control)

MagGlassPaintIntensity property (Main Control)

MagGlassPaintIntensity property (Main Control)

MagGlassPaintPalette property (Main Control)

MagGlassPaintScaling property (Main Control)

MagGlassPointer property (Main Control)

OnMagGlassCursor event (Main Control)

OnMagGlassCursor event

SetMagGlassPos method (Main Control)

SetMagGlassPos method (Main Control)

ShowMagGlass method (Main Control)

ShowMagGlass method (Main Control)

StartMagGlass method (Main Control)

StopMagGlass method (Main Control)

UpdateMagGlassFromHandle method (Main Control)

UpdateMagGlassFromHandle method (Main Control)

UpdateMagGlassShape method (Main Control)

Drag-and-Drop

EnableOLEDragMethod property (ImageList Control)

EnableOLEDragMethod property (Main Control)

OLEDragCursor property (ImageList Control)

OLEDragCursor property (Main Control)

OnOLECompleteDrag event (ImageList Control)

OnOLECompleteDrag event (Main Control)

OnOLEDragOver event (ImageList Control)

OnOLEDragOver event (Main Control)

OnOLEGiveFeedback event (ImageList Control)

OnOLEGiveFeedback event (Main Control)

OnOLEStartDrag event (ImageList Control)

OnOLEStartDrag event (Main Control)


Raster Images: Implementing Special Effects

Raster Images:
Displaying and Printing
Implementing Special Effects

Specifying effects and transitions:

PaintEffect property

TransitionStyle property

TransitionEffect property

Controlling speed and granularity:

EffectDelay property

EffectGrain property

Controlling multiple passes:

PaintMaxPasses property

PaintPass property

PaintNotificationDelay property

OnPaintNotify event

Using a transparent color:

TransparentColor property

Transparent property

UseTransparentColor property

Using a wand:

WandColor property

WandSize property

Specifying transition colors or patterns:

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

PatternStyle property

PatternBackColor property

PatternForeColor property


Raster Images: Playing Animated Images

Raster Images:
Displaying and Printing
Playing Animated Images

Starting and stopping a playback:

AutoAnimate property

AutoAnimationLoop property

AnimationLoop property

AnimationEnable property

OnAnimate event

Information in an animated file:

GetFileInfo method

InfoAnimation property

InfoAnimationHeight property

InfoAnimationWidth property

Bitmap behavior during playback:

BitmapDelay property

BitmapDisposalMethod property

BitmapEnableTransparency property

BitmapTransparentColor property

Bitmap positioning during playback:

BitmapLeft property

BitmapTop property

Playback target properties:

AnimationBackColor property

AnimationBitsPerPixel property

AnimationPalette property

AnimationWidth property

AnimationHeight property


Raster Images: Printing Images

Raster Images:
Displaying and Printing
Printing Images

Render method

RenderCenter property


Raster Images: Combining Images

Raster Images:
Image Processing
Combining Images

AddWeightedBitmaps method

AlphaBlend method

BumpMap method

Combine method

CombineExt method

CombineWarp method

CreateFadedMask method

FeatherAlphaBlend method

Multiply method

Picturize method

PicturizeBitmapList method

PicturizeSingle method

TextureAlphaBlend method

Underlay method


Raster Images: Doing Color Expansion or Reduction

Raster Images:
Image Processing
Doing Color Expansion or Reduction

Automated color reduction:

PaintDither property

General color expansion or reduction:

BalanceColors method

ColorRes method

ColorResList method

ConvertSignedToUnsigned method

ConvertUnsignedToSigned method

Support for dithering to a custom palette:

UserPalette property

Specialized color expansion or reduction:

AutoBinary method

ChannelMix method

ColorizeGray method

ConvertToColoredGray method

Desaturate method

DynamicBinary method

Grayscale method

GrayScaleExt method

GrayScaleToDuotone method

GrayScaleToMultitone method

Halftone method

IsGrayscale property

SampleTarget method

Segment method

SelectData method

ShiftData method


Raster Images: Doing Color Space Conversions

Raster Images:
Image Processing
Doing Color Space Conversions

ColorMerge method

ColorPlanes property

ColorSeparate method

ColorThreshold method

HSV_HfromRGB method

HSV_SfromRGB method

HSV_VfromRGB method

RGBfromHSV method


Raster Images: Doing Geometric Transformations

Raster Images:
Image Processing
Doing Geometric Transformations

Resizing a bitmap:

Size method

Other transformations:

AutoTrim method

Bending method

Cylindrical method

Deskew method ( Document/Medical only)

FastRotate method ( Document/Medical only)

Flip method

FreeHandShear method

FreeHandWave method

FreePlaneBend method

FreeRadBend method

Impressionist method

Plane method

PlaneBend method

Polar method

Punch method

RadialBlur method

RadWave method

Reverse method

Ripple method

Rotate method

Shear method

Spherize method

Swirl method

Trim method

Tunnel method

Wave method

Wind method

ZoomBlur method

ZoomWave method


Raster Images: Drawing on a Bitmap

Raster Images:
Image Processing
Drawing on a Bitmap

Using Windows GDI functions:

GetBitmapDC method

ReleaseBitmapDC method

Specifying the bitmap as the drawing surface:

DrawPersistence property

Drawing simple objects:

DrawLine method

DrawEllipse method

DrawRectangle method

DrawFillColor property

DrawFillStyle property

DrawMode property

DrawPenColor property

DrawPenStyle property

DrawPenWidth property

Drawing three-dimensional shapes:

DrawShape method

ShapeLeft property

ShapeTop property

ShapeWidth property

ShapeHeight property

ShapeBackgroundStyle property

BackgroundImageHeight property

BackgroundImageLeft property

BackgroundImageTop property

BackgroundImageWidth property

ShapeBorderColor property

ShapeBorderStyle property

ShapeBorderThickness property

ShapeInnerBandHiliteColor property

ShapeInnerBandShadowColor property

ShapeInnerBandStyle property

ShapeInnerBandThickness property

ShapeOuterBandHiliteColor property

ShapeOuterBandShadowColor property

ShapeOuterBandStyle property

ShapeOuterBandThickness property

ShadowColor property

ShadowXDepth property

ShadowYDepth property

Drawing three-dimensional text objects:

DrawTextStr method

TextLeft property

TextTop property

TextWidth property

TextHeight property

TextAlign property

TextFont property

TextStyle property

TextWordWrap property

TextAngle property

TextHiliteColor property

ShadowColor property

ShadowXDepth property

ShadowYDepth property

DrawTextHeight method

DrawTextWidth method

Specifying gradient colors or patterns:

GradientStyle property

GradientStartColor property

GradientEndColor property

GradientSteps property

PatternStyle property

PatternBackColor property

PatternForeColor property


Raster Images: Artistic Effects

Raster Images:
Image Processing
Artistic Effects

AddShadow method

Aging method

Bending method

BumpMap method

Cubism method

Cylindrical method

DiceEffect method

DrawStar method

Dry method

FreeHandShear method

FreeHandWave method

FunctionalLight method

GlassEffect method

Impressionist method

LensFlare method

Light method

Ocean method

Pixelate method

Plane method

PlaneBend method

Polar method

Punch method

PuzzleEffect method

RadialBlur method

RadWave method

RevEffect method

RingEffect method

Ripple method

Segment method

Spherize method

Swirl method

Tunnel method

Wave method

Wind method

ZoomBlur method

ZoomWave method


Raster Images: Comparing Images

Raster Images:
Image Processing
Comparing Images

Correlation method


Raster Images: Fourier Transform Functions

Raster Images:
Image Processing
Fourier Transform Functions

DiscreteFourierTransformation method

DisplayFourierTransformation method

FastFourierTransformation method

FreeFourierTransformationData method

FrequencyFilterMask method

InitFourierTransformationData method


Raster Images: Document Imaging

Raster Images:
Image Processing
Document Imaging

Registration Marks

ApplyTransformationParameters method

GetMarksCenterMass method

GetTransformationParameters method

IsRegMark method

SearchRegMarks method


Raster Images: Filtering Images

Raster Images:
Image Processing
Filtering Images

General Filters

SpatialFilter method

BinaryFilter method ( Document/Medical only)

Specialized Filters

AddNoise method

AddShadow method

AntiAlias method

AutoBinary method

Average method

Despeckle method

DirectionEdgeStatistical method

DynamicBinary method

EdgeDetectEffect method

EdgeDetector method

EdgeDetectStatistical method

Emboss method

GaussianFilter method

IntensityDetect method

MaxFilter method ( Document/Medical only)

Median method

MinFilter method ( Document/Medical only)

Mosaic method

MotionBlur method

Oilify method

Posterize method

Sharpen method

Skeleton method

SmoothEdges method

Solarize method

UnsharpMask method

UserFilter method


Raster Images: Getting Current Information

Raster Images:
Image Processing
Getting Current Information

BitmapBits property

BitmapHeight property

BitmapSize property

BitmapWidth property

BitmapXRes property

BitmapYRes property

ColorCount property

GetStatisticsInfo method

GetPixelData method

LineProfile method

Pixel property

PutPixelData method


Raster Images: Image Processing

Raster Images:
Image Processing

Getting Current Information

Doing Color Space Conversions

Doing Color Expansion or Reduction

Doing Geometric Transformations

Modifying Individual Pixels

Modifying Intensity Values

Filtering Images

Using Histograms

Using the Alpha Channel

Combining Images

Drawing on a Bitmap

Artistic Effects

Comparing Images

Fourier Transform Functions

Document Imaging


Raster Images: Modifying Individual Pixels

Raster Images:
Image Processing
Modifying Individual Pixels

Pixel property

RemoveRedeye method


Raster Images: Modifying Intensity Values

Raster Images:
Image Processing
Modifying Intensity Values

Overall brightness and contrast:

AdaptiveContrast method

AddWeightedBitmaps method

AutoColorLevel method

ColorLevel method

Contrast method

GammaCorrect method

HistoContrast method

HistoEqualize method

Intensity method

Light method

LightControl method

LocalHistoEqualize method

Multiply method

StretchIntensity method

SubtractBackground method

Color changes:

AddBitmaps method

Aging method

ApplyLinearModalityLUT method

ApplyLinearVOILUT method

ApplyMathLogic method

ApplyModalityLUT method

ApplyVOILUT method

ChangeHueSatInt method

ChannelMix method

ColorizeGray method

ColorMerge method

ColorReplace method

ColorSeparate method

ColorThreshold method

ContrastBrightIntensity method

CountLUTColors method

Desaturate method

DigitalSubtract method

FunctionalLight method

GetLinearVOILUT method

Hue method

Invert method

MathFunction method

MultiScaleEnhancement method

RemapHue method

RemoveRedeye method

SampleTarget method

Saturation method

Segment method

SelectData method

SelectiveColor method

ShiftData method

SwapColors method

Filtering intensity values:

DynamicBinary method

GaussianFilter method

IntensityDetect method

Segment method

UserFilter method

Low-level manipulation:

Deinterlace method

HTable property

MaskTable property

RemapHue method

RemapHueTablesSize property

RemapIntensity method

RemapTable property

STable property

VTable property


Raster Images: Using Histograms

Raster Images:
Image Processing
Using Histograms

HistoContrast method

HistoEqualize method

GetHistogram method

GetHistogramGray method

HistogramGrayTable property

HistogramGrayTableSize property

HistogramTable property


Raster Images: Using the Alpha Channel

Raster Images:
Image Processing
Using the Alpha Channel

Getting and setting alpha channel data:

BitmapAlpha property

Using the alpha channel for transparency:

SetRgnColor method

GetRgnHandle method

SetRgnHandle method

PaintRgnOnly property


Raster Images: Creating and Using a Region

Raster Images:
Region Processing
Creating and Using a Region

Automatic creation of a region:

OnRgnChange event

RgnMarkingMode property

RgnFrameColor property

RgnFrameType property

Automatic Creation of a floater:

AutoFloater property

EnableFloater property

CancelFloater method

Low-level methods for creating and manipulating a floater:

Floater property

FloaterVisible property

IsPtInFloater method

SetFloaterDstRect method

SetFloaterDstClipRect method

FloaterDstHeight property

FloaterDstLeft property

FloaterDstTop property

FloaterDstWidth property

FloaterDstClipHeight property

FloaterDstClipLeft property

FloaterDstClipTop property

FloaterDstClipWidth property

FloaterHeight property

FloaterWidth property

Storing, retrieving, and deleting regions:

GetRgnHandle method

DeleteRgnHandle method

FreeRgn method

ResizeRgn method

SetRgnHandle method

SetRgnMagicWand method

Getting region information:

GetBitmapClipSegments method

GetFeretsDiameter method

GetRgnArea method

GetRgnContourPoints method

GetRgnPerimeterLength method

HasRgn property

IsPtInRgn method

RgnHeight property

RgnLeft property

RgnTop property

RgnWidth property

Low-level methods for creating regions:

BezierSize property

BezierX property

BezierY property

CurveClose property

CurveSize property

CurveTension property

CurveToBezier method

CurveType property

CurveX property

CurveY property

SetRgnBorder method

SetRgnCurve method

SetRgnEllipse method

SetRgnRect method

SetRgnRoundRect method

SetRgnColor method

PolygonSize property

PolygonPoint property

SetRgnPolygon method

For working with the current region:

HolesRemovalRgn method

OffsetRgn method

PaintRgnOnly property

RepaintRect method

SetRgnColorHSVRange method

SetRgnColorRGBRange method


Raster Images: Methods That Transform the Region and the Bitmap

Raster Images:
Region Processing
Methods That Transform the Region and the Bitmap

These methods affect the bitmap as a whole, even if a region is defined. However, if an automatic-mode floater is present, they act on the floater alone.

Flip method

Reverse method

Rotate method

Shear method

Size method

Trim method


Raster Images: Region Processing

Raster Images:
Region Processing

Creating and Using a Region

Where the Region Preempts the Bitmap

Methods That Transform the Region and the Bitmap


Raster Images: Where the Region Preempts the Bitmap

Raster Images:
Region Processing
Where the Region Preempts the Bitmap

AddNoise method

AutoBinary method

AutoColorLevel method

Average method

Bending method

BinaryFilter method

ChannelMix method

ColorizeGray method

ColorLevel method

Combine method

CombineExt method

CombineWarp method

Contrast method

ContrastBrightIntensity method

Cylindrical method

Despeckle method

DiceEffect method

DrawStar method

Dry method

Emboss method

Fill method

FreeHandWave method

FreePlaneBend method

FreeRadBend method

GammaCorrect method

GetHistogram method

GetHistogramGray method

GlassEffect method

HistoContrast method

HistoEqualize method

HolesRemovalRgn method

Hue method

Intensity method

IntensityDetect method

Invert method

Light method

Median method

Mosaic method

MultiScaleEnhancement method

Ocean method

Pixelate method

Plane method

PlaneBend method

Polar method

Posterize method

Punch method

PuzzleEffect method

RadialBlur method

RadWave method

RemapIntensity method

RingEffect method

Ripple method

Saturation method

SelectData method

SelectiveColor method

Sharpen method

ShiftData method

Skeleton method

SpatialFilter method

Spherize method

StretchIntensity method

Swirl method

Wave method

ZoomBlur method

ZoomWave


Annotations (Document/Medical): Annotation Events

Annotations (Document/Medical only):
Annotation Events

OnAnnChange event

OnAnnClicked event

OnAnnCreate event

OnAnnDestroy event

OnAnnDrawn event

OnAnnEnumerate event

OnAnnHyperlink event

OnAnnHyperlinkMenu event

OnAnnLocked event

OnAnnMouseDown event

OnAnnMouseMove event

OnAnnMouseUp event

OnAnnSelect event

OnAnnToolChecked event

OnAnnToolDestroy event

OnAnnUnlocked event

OnAnnUserMenu event


Annotations (Document/Medical only): Annotations Hyperlinks

Annotations (Document/Medical only): Annotation Hyperlinks

AnnGetHyperlinkParam method

AnnGetHyperlinkString method

AnnGetHyperlinkType method

AnnSetHyperlinkMsg method

AnnSetHyperlinkString method


Annotations (Document/Medical): Annotation Security

Annotations (Document/Medical only):
Annotation Security

AnnGetLocked method

AnnLock method

AnnSetUser method

AnnShowLockedIcon property

AnnUnlock method

OnAnnLocked event

OnAnnUnlocked event


Annotations (Document/Medical only): Global Properties

AnnGetWnd method

AnnSetWnd method

AnnUserMode property


Annotations (Document/Medical only): Grouping and Ungrouping Objects

AnnGetGrouping method

AnnGroup method

AnnSetGrouping method

AnnUngroup method


Annotations (Document/Medical only): Object Bitmap

Annotations (Document/Medical only):
Object Bitmap

AnnSetBitmap method

AnnGetBitmap method

AnnSetSecondaryBitmap method

AnnGetSecondaryBitmap method

AnnPredefinedBitmap property

AnnGetSecondaryMetafile method

AnnSetPredefinedMetafile method

AnnGetPredefinedMetafile method


Annotations (Document/Medical only): Object Information

AnnEnumerate method

AnnGetArea method

AnnContainer property

AnnContainerPointX property

AnnContainerPointY property

AnnGetItemHandle method

AnnGetObjectFromTag method

AnnGetTag method

AnnGetType method

AnnHitTestExt method


Annotations (Document/Medical): Object Manipulation

Annotations (Document/Medical only):
Object Manipulation

Transforming annotations:

AnnAutoResize property

AnnAutoRotate property

AnnFlip method

AnnMove method

AnnRectHeight property

AnnRectLeft property

AnnRectTop property

AnnRectWidth property

AnnReverse method

AnnRotate method

Identifying annotations:

AnnGetObjectFromTag method

AnnGetTag method

AnnSetTag method

Enumerating annotations

AnnEnumerate method

OnAnnEnumerate event

Realizing annotations to a bitmap:

AnnRealize method

AnnUnrealize method

Creating an object

AnnCreate method

AnnCreateItem method

AnnDefine method

AnnSetTag method

Object characteristics

AnnAutoCursor property

AnnAutoHilightPen property

AnnGetVisible method

AnnInsert method

AnnSetAutoDefaults method

AnnSetSelected method

AnnSetVisible method

AnnGetAngle method

AnnGetAutoBackColor method

AnnGetBitmap method

AnnGetContainer method

AnnGetMetafile method

AnnGetNodes method

AnnGetPredefinedMetafile method

AnnGetProtractorOptions method

AnnGetROP2 method

AnnGetSecondaryBitmap method

AnnGetSelected method

AnnGetSelectRect method

AnnGetShowFlags method

AnnGetTopContainer method

AnnGetTransparent method

AnnGetTransparentColor method

AnnSelectPoint method

AnnSelectRect method

AnnSetAutoBackColor method

AnnSetBitmap method

AnnSetMetafile method

AnnSetNodes method

AnnSetPredefinedMetafile method

AnnSetProtractorOptions method

AnnSetROP2 method

AnnSetSecondaryBitmap method

AnnSetShowFlags method

AnnSetTransparent method

AnnSetTransparentColor method

AnnCut method

AnnRemove method

Grouping and ungrouping objects

AnnGetGrouping method

AnnGroup method

AnnSetGrouping method

AnnUngroup method

Destroying an object

AnnDestroy method

Moving the name of an annotation

AnnGetNameOffsetX method

AnnGetNameOffsetY method

AnnGetNameRestrict method

AnnNameBoundingRectHeight property

AnnNameBoundingRectLeft property

AnnNameBoundingRectTop property

AnnNameBoundingRectWidth property

AnnNameRectHeight property

AnnNameRectLeft property

AnnNameRectTop property

AnnNameRectWidth property

AnnSetNameOffsetX method

AnnSetNameOffsetY method

AnnSetNameRestrict method

Getting and Setting the Name Property

AnnGetNameOptions method

AnnSetNameOptions method


Annotations (Document/Medical only): Realizing to a Bitmap

AnnRealize method

AnnUnrealize method


Annotations (Document/Medical): Using the Mouse

Annotations (Document/Medical only):
Using the Mouse

AnnAutoDrawEnable property

OnAnnMouseDown event

OnAnnMouseMove event

OnAnnMouseUp event

SetMousePos method


Annotations (Document/Medical only): Automation

Implementing Automation

Working with the Toolbar

Creating Custom Annotations


Annotations (Document/Medical only): Implementing Automation

Creating the automation object:

AnnCreate method

AnnCreateItem method

Setting initial automation properties:

AnnAutoCursor property

AnnAutoDialogFontSize property

AnnAutoDrawEnable property

AnnAutoHilightPen property

AnnAutomation property

AnnAutoResize property

AnnAutoRotate property

AnnGetAutoBackColor method

AnnGetAutoMenuItemEnable method

AnnGetAutoText method

AnnGetBitmapDpiX method

AnnGetBitmapDpiY method

AnnSetAutoBackColor method

AnnSetAutoDefaults method

AnnSetAutoMenuItemEnable method

AnnSetAutoText method

AnnSetBitmapDpiX method

AnnSetBitmapDpiY method

AnnOptions property

Undoing automation operations

AnnAddUndoNode method

AnnUndo method

AnnUndoEnable property

Modifying automated text strings:

AnnGetAutoText method

AnnSetAutoText method

Modifying the menu

AddItem method

AnnAutoMenuEnable property

AnnGetAutoMenuItemEnable method

AnnSetAutoMenuItemEnable method

Controlling automation:

AnnAutoCursor property

AnnAutoHilightPen property


Annotations (Document/Medical only): Working with the Toolbar

Annotations (Document/Medical only):
Automation
Working with the Toolbar

AnnTool property

AnnToolbar property

ButtonBitmapDown property

ButtonBitmapUp property

ButtonColumns property

ButtonCount property

ButtonMenuText property

ButtonMenuTextID property

ButtonMenuTool property

ButtonRows property

ButtonTool property

ButtonToolCount property

ButtonToolTipText property

ButtonToolTipTextID property

ButtonVisible property

OnAnnToolChecked event

OnAnnToolDestroy event


Annotations (Document/Medical only): Creating Custom Annotations

AnnAddUserHandle method

AnnAdjustPoint method

AnnChangeUserHandle method

AnnConvert method

AnnCreate method

AnnCreateItem method

AnnDefine method

AnnDefine2 method

AnnDeleteUserHandle method

AnnEnumerateHandles method

AnnOptions property

AnnGetUserHandle method

AnnGetUserHandles method

AnnHitTestExt method

AnnRestrictCursor method


Annotations (Document/Medical only): Creation, Deletion, and Copying

Copying Annotations

Creating and Deleting Annotations

Using the Clipboard


Annotations (Document/Medical only): Creating and Deleting Annotations

High-level creation:

AnnDefine method

AnnDefine2 method

Creation, and insertion:

AnnCreate method

AnnCreateItem method

AnnInsert method

AnnPaste method

AnnPasteReady property

Cut:

AnnCut method

Deletion:

AnnDestroy method

Removal:

AnnRemove method

Custom:

AnnAddUserHandle method

AnnAdjustPoint method

AnnChangeUserHandle method

AnnConvert method

AnnDefine2 method

AnnDeleteUserHandle method

AnnEnumerateHandles method

AnnGetContainer method

AnnGetTopContainer method

AnnGetUserHandle method

AnnGetUserHandles method

AnnHitTestExt method

AnnRestrictCursor method


Annotations (Document/Medical only): Copying Annotations

Annotations (Document/Medical only):
Creation, Deletion, and Copying
Copying Annotations

AnnCopy method


Annotations (Document/Medical only): Using the Clipboard

AnnCopy method

AnnCut method

AnnPaste method

AnnPasteReady property


Annotations (Document/Medical only): Input and Output

Getting Annotation File Information

Loading Annotation Files

Saving Annotation Files


Annotations (Document/Medical only): Getting Annotation File Information

Annotations (Document/Medical only):
Input and Output
Getting Annotation File Information

AnnFileInfo method

AnnFileInfoMemory method


Annotations (Document/Medical only): Loading Annotation Files

Annotations (Document/Medical only):
Input and Output
Loading Annotation Files

AnnLoad method

AnnLoadMemory method


Annotations (Document/Medical only): Saving Annotation Files

Annotations (Document/Medical only):
Input and Output
Saving Annotation Files

AnnSave method

AnnSaveMemory method

AnnSaveTag method


Annotations (Document/Medical only): Object Properties

Getting and Setting the Bitmap Property

Getting and Setting Color Properties

Getting and Setting Fill Properties

Getting and Setting Font Properties

Getting and Setting Line Properties

Getting and Setting Node Properties

Getting and Setting the ROP2 Properties

Getting and Setting Text Properties

Getting and Setting the Cross product Properties

Getting and Setting the Name Property

Getting and Setting the Protractor Properties

Getting and Setting the Push Pin Properties

Getting and Setting the Ruler Properties

Getting and Setting the Stamp Properties

Getting and Setting the Tag Property

Getting and Setting the Visible Property

Grouping and Ungrouping Objects


Annotations (Document/Medical only): Getting and Setting the Bitmap Property

AnnGetBitmap method

AnnGetSecondaryBitmap method

AnnPredefinedBitmap property

AnnSetBitmap method

AnnSetSecondaryBitmap method


Annotations (Document/Medical only): Getting and Setting Color Properties

AnnAutoHilightPen property

AnnGetAutoBackColor method

AnnGetBackColor method

AnnGetForeColor method

AnnSetAutoBackColor method

AnnSetBackColor method

AnnSetForeColor method

AnnOptions property


Annotations (Document/Medical only): Getting and Setting Fill Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting Fill Properties

AnnGetFillMode method

AnnGetFillPattern method

AnnGetPolyFillMode method

AnnSetFillMode method

AnnSetFillPattern method

AnnSetPolyFillMode method


Annotations (Document/Medical only): Getting and Setting Font Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting Font Properties

AnnGetFontBold method

AnnGetFontItalic method

AnnGetFontName method

AnnGetFontSize method

AnnGetFontStrikeThrough method

AnnGetFontUnderline method

AnnSetFontBold method

AnnSetFontItalic method

AnnSetFontName method

AnnSetFontSize method

AnnSetFontStrikeThrough method

AnnSetFontUnderline method


Annotations (Document/Medical only): Getting and Setting the Name Property

Annotations (Document/Medical only):
Object Properties
Getting and Setting the Name Property

AnnGetNameOptions method

AnnGetNameRestrict method

AnnSetNameOptions method

AnnSetNameRestrict method


Annotations (Document/Medical only): Getting and Setting the ROP2 Properties

AnnSetROP2 method

AnnGetROP2 method


Annotations (Document/Medical only): Getting and Setting the Tag Property

Annotations (Document/Medical only):
Object Properties
Getting and Setting the Tag Property

AnnGetTag method

AnnSetTag method


Annotations (Document/Medical only): Getting and Setting the Visible Property

Annotations (Document/Medical only):
Object Properties
Getting and Setting the Visible Property

AnnGetVisible method

AnnSetVisible method


Annotations (Document/Medical only): Getting and Setting the Cross product Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting the Cross product Properties

AnnFixed property

AnnGetBackColor method

AnnGetFillMode method

AnnGetFontBold method

AnnGetFontItalic method

AnnGetFontName method

AnnGetFontSize method

AnnGetFontStrikeThrough method

AnnGetFontUnderline method

AnnGetForeColor method

AnnGetLineStyle method

AnnGetLineWidth method

AnnGetNameOptions method

AnnGetTag method

AnnGetVisible method

AnnGetWnd method

AnnSetBackColor method

AnnSetFillMode method

AnnSetFontBold method

AnnSetFontItalic method

AnnSetFontName method

AnnSetFontSize method

AnnSetFontStrikeThrough method

AnnSetFontUnderline method

AnnSetForeColor method

AnnSetLineStyle method

AnnSetLineWidth method

AnnSetNameOptions method

AnnSetSelected method

AnnSetTag method

AnnSetVisible method

AnnSetWnd method

AnnUserMode property


Annotations (Document/Medical only): Getting and Setting Line Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting Line Properties

AnnGetLineStyle method

AnnGetLineWidth method

AnnSetLineStyle method

AnnSetLineWidth method


Annotations (Document/Medical only): Getting and Setting Node Properties

AnnGetNodes method

AnnSetNodes method


Annotations (Document/Medical only): Getting and Setting the Protractor Properties

AnnFixed property

AnnGetAngle method

AnnGetAutoBackColor method

AnnGetBackColor method

AnnGetFillMode method

AnnGetFontBold method

AnnGetFontItalic method

AnnGetFontName method

AnnGetFontSize method

AnnGetFontStrikeThrough method

AnnGetFontUnderline method

AnnGetForeColor method

AnnGetLineStyle method

AnnGetLineWidth method

AnnGetNameOptions method

AnnGetProtractorOptions method

AnnGetROP2 method

AnnGetSelected method

AnnGetShowFlags method

AnnGetTag method

AnnGetVisible method

AnnGetWnd method

AnnSetAutoBackColor method

AnnSetBackColor method

AnnSetFillMode method

AnnSetFontBold method

AnnSetFontItalic method

AnnSetFontName method

AnnSetFontSize method

AnnSetFontStrikeThrough method

AnnSetFontUnderline method

AnnSetForeColor method

AnnSetLineStyle method

AnnSetLineWidth method

AnnSetNameOptions method

AnnSetProtractorOptions method

AnnSetROP2 method

AnnSetSelected method

AnnSetShowFlags method

AnnSetTag method

AnnSetVisible method

AnnSetWnd method

AnnUserMode property


Annotations (Document/Medical only): Getting and Setting the Push Pin Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting the Push Pin Properties

AnnFixed property

AnnGetBackColor method

AnnGetFillMode method

AnnGetFillPattern method

AnnGetFontBold method

AnnGetFontItalic method

AnnGetFontName method

AnnGetFontSize method

AnnGetFontStrikeThrough method

AnnGetFontUnderline method

AnnGetForeColor method

AnnGetNameOptions method

AnnGetTag method

AnnGetText method

AnnGetVisible method

AnnGetWnd method

AnnSetBackColor method

AnnSetFillMode method

AnnSetFillPattern method

AnnSetFontBold method

AnnSetFontItalic method

AnnSetFontName method

AnnSetFontSize method

AnnSetFontStrikeThrough method

AnnSetFontUnderline method

AnnSetForeColor method

AnnSetNameOptions method

AnnSetSelected method

AnnSetTag method

AnnSetText method

AnnSetVisible method

AnnSetWnd method

AnnUserMode property


Annotations (Document/Medical only): Getting and Setting the Ruler Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting the Ruler Properties

AnnGetBitmapDpiX method

AnnGetBitmapDpiY method

AnnGetDistance method

AnnGetGaugeLength method

AnnGetNameOptions method

AnnGetUnit method

AnnSetBitmapDpiX method

AnnSetBitmapDpiY method

AnnSetGaugeLength method

AnnSetNameOptions method

AnnSetUnit method


Annotations (Document/Medical only): Getting and Setting the Stamp Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting the Stamp Properties

AnnFixed property

AnnGetBackColor method

AnnGetFillMode method

AnnGetFillPattern method

AnnGetFontBold method

AnnGetFontItalic method

AnnGetFontName method

AnnGetFontSize method

AnnGetFontStrikeThrough method

AnnGetFontUnderline method

AnnGetForeColor method

AnnGetLineStyle method

AnnGetLineWidth method

AnnGetNameOptions method

AnnGetTag method

AnnGetText method

AnnGetVisible method

AnnGetWnd method

AnnSetBackColor method

AnnSetFillMode method

AnnSetFillPattern method

AnnSetFontBold method

AnnSetFontItalic method

AnnSetFontName method

AnnSetFontSize method

AnnSetFontStrikeThrough method

AnnSetFontUnderline method

AnnSetForeColor method

AnnSetLineStyle method

AnnSetLineWidth method

AnnSetNameOptions method

AnnSetSelected method

AnnSetTag method

AnnSetText method

AnnSetVisible method

AnnSetWnd method

AnnTextExpandTokens property

AnnUserMode property


Annotations (Document/Medical only): Getting and Setting Text Properties

Annotations (Document/Medical only):
Object Properties
Getting and Setting Text Properties

For text in objects:

AnnGetText method

AnnSetText method

For automated menu text:

AnnGetAutoText method

AnnSetAutoText method


Annotations (Document/Medical only): Size, Position, and Shape

Doing Geometric Transformations

Getting and Setting Geometric Properties

Using Window Coordinates to Define an Object

Using Window Coordinates to Select Objects


Annotations (Document/Medical only): Doing Geometric Transformations

Annotations (Document/Medical only):
Size, Position, and Shape
Doing Geometric Transformations

AnnDefine method

AnnBringToFront method

AnnFlip method

AnnMove method

AnnReverse method

AnnRotate method

AnnSendToBack method


Annotations (Document/Medical only): Getting and Setting Geometric Properties

Annotations (Document/Medical only):
Size, Position, and Shape
Getting and Setting Geometric Properties

Setting up coordinate translations:

AnnGetOffsetX method

AnnGetOffsetY method

AnnGetScalarX method

AnnGetScalarY method

AnnSetOffsetX method

AnnSetOffsetY method

AnnSetScalarX method

AnnSetScalarY method

Defining the position and shape of an object:

AnnGetPointCount method

AnnGetPointX method

AnnGetPointY method

AnnRectHeight property

AnnRectLeft property

AnnRectTop property

AnnRectWidth property

AnnSetPoints method

Getting the window coordinates of an object:

AnnBoundingRectHeight property

AnnBoundingRectLeft property

AnnBoundingRectTop property

AnnBoundingRectWidth property


Annotations (Document/Medical only): Using Window Coordinates to Define an Object

Annotations (Document/Medical only):
Size, Position, and Shape
Using Window Coordinates to Define an Object

AnnDefine method


Annotations (Document/Medical only): Using Window Coordinates to Select Objects

Selecting objects:

AnnGetSelectCount method

AnnGetSelectList method

AnnSetSelected method

Identifying an object at a particular point:

AnnHitTestExt method

AnnSendToBack method

Selecting all objects in a rectangle:

AnnGetSelectCount

AnnSelectRect

Selecting an object at a particular point:

AnnSelectPoint

Getting the bounding rectangle of selected objects:

AnnGetSelectRect


Databases: Data Binding

Databases:
Data Binding

Accessing data:

DataSource property

DataField property

Specifying how images are loaded:

DataLoadBits property

Specifying how images are saved:

DataSaveBits property

DataSaveFormat property

DataSaveQuality property

Detecting changes:

DataChanged property


Support: Version and License Information

Support:
Version and License Information

UnlockSupport method

IsSupportLocked method

AboutBox method

VersionDate property

VersionLevel property

VersionMajor property

VersionMinor property

VersionProduct property

VersionTime property


Data Types

Basic Data Types and Keywords

LEADTOOLS Basic Data Types

Annotation Data Type

ANNPOINT

Image Processing Data Type

COLORBALANCING

LEVELCOLORINFO

SELECTIVECOLORINFO


LEADTOOLS Basic Data Types

LEADTOOLS has defined the following basic data types for portability:

Data Type | Definition and Usage
L_HANDLE | Defined as (type integer), used as LEAD Handle.
L_CHAR | Defined as char, used as a signed 8-bit integer.
L_UCHAR | Defined as Byte, used as an unsigned 8-bit integer.
L_INT16 | Defined as SmallInt, used as a signed 16-bit integer.
L_UINT16 | Defined as Word, used as an unsigned 16-bit integer.
L_INT32 | Defined as Longint, used as a signed 32-bit integer.
L_UINT32 | Defined as LongWord, used as an unsigned 32-bit integer.
L_INT | Defined as integer, used as a signed integer, 16-bits or larger.
L_UINT | Defined as Cardinal, used as an unsigned integer, 16-bits or larger.
L_BOOL | Defined as L_UINT, used as a Boolean value.
L_BITFIELD | Defined as L_UINT, used as a bit field.
L_FLOAT | Defined as Single, used as a floating-point number (4 bytes).
L_DOUBLE | Defined as double used as a double precision floating point number.
L_RGBQUAD | Defined as RGBQUAD structure.
L_PVOID | Defined as pointer.
L_PHANDLE | Defined as pointer to L_HANDLE.
L_PCHAR | Defined as pointer to L_CHAR.
L_PUCHAR | Defined as pointer to L_UCHAR.
L_PINT16 | Defined as pointer to L_INT16.
L_PUINT16 | Defined as pointer to L_UINT16.
L_PINT32 | Defined as pointer to L_INT32.
L_PUINT32 | Defined as pointer to L_UINT32.
L_PINT | Defined as pointer to L_INT.
L_PUINT | Defined as pointer to L_UINT.
L_PBOOL | Defined as pointer to L_BOOL.
L_PBITFIELD | Defined as pointer to L_BITFIELD.
L_PFLOAT | Defined as pointer to L_FLOAT.
L_PDOUBLE | Defined as pointer to L_DOUBLE.
L_PRGBQUAD | Defined as pointer to L_RGBQUAD.
L_PPCHAR | Defined as pointer to pChar.
L_PPINT | Defined as pointer to L_PINT.
L_PPUINT | Defined as pointer to L_PUINT.
TLEADSelClrInfoArr | Array [ 0..8 ] of SELECTIVECOLORINFO;


ADDMESGINFO

LPADDMESGINFO= ^ADDMESGINFO;
ADDMESGINFO= Packed Record
pStrMsg: PCHAR;
pPassword: PCHAR;
pFileName: PCHAR;
pDirectory: PCHAR;
ptStart: pPOINT;
end;

The ADDMESGINFO Record (structure) contains information about the message being added to or extracted from the bitmap and is used by the ExtractMessage and AddMessage methods.

Member | Description
pStrMsg | Pointer to text that will be added to or extracted from an image. When adding a message to a bitmap this pointer refers to the text message that will be added. If you want to add a file, set this pointer to Nil (NULL). When extracting a message from a bitmap there is no need to allocate this pointer, the extract method will allocate it if the embedded message is text, otherwise it remains Nil (NULL).
pPassword | Pointer to the password that will be used when adding the message to or extracting the message from the bitmap. To use the default password set this parameter to Nil (NULL). The default password is, "LEAD Technologies".
pFileName | Pointer to the name of the file that will be added to or extracted from an image. When adding a message to a bitmap this pointer refers to the name of the file that will be added, and the pStrMsg member must be set to Nil (NULL), otherwise this parameter has no effect. When extracting a message from a bitmap there is no need to allocate this pointer, the extract method will allocate it if the embedded message is a file otherwise it remains Nil (NULL).
pDirectory | Pointer to the full path name of the directory in which to save the extracted file. This parameter is used only by the ExtractMessage method. If the extracted message is a file this parameter is used to specify the path for saving the extracted file. To save the extracted file using the original path, set this parameter to Nil (NULL). If the extracted message is text this parameter has no effect.
pStart | Pointer to a TPoint Record (structure) that contains the point at which the message will be added to or extracted from the image. To use the default position set this parameter to Nil (NULL).


ANNPOINT record

pANNPOINT= ^ ANNPOINT;
ANNPOINT = Record;
x: L_DOUBLE;
y: L_DOUBLE;
end;

The ANNPOINT record defines coordinates of an annotation object relative to its container.

Member | Description
x | The x coordinate, expressed as a double-precision floating point value.
y | The x coordinate, expressed as a double-precision floating point value.

Comments

(Annotation Control only) The ANNPOINT structure is like a Windows POINT structure, except that it uses double-precision floating-point values.


COLORBALANCING

C++ Builder Syntax:

Typdef struct
{
L_DOUBLE toRed;
L_DOUBLE toGreen;
L_DOUBLE toBlue;
} COLORBALANCING

Delphi Syntax:

COLORBALANCING = Packed Record
toRed : L_DOUBLE;
toGreen: L_DOUBLE;
toBlue: L_DOUBLE;
end;

The COLORBALANCING Record (structure) provides color-balancing information to the BalanceColors method.

Member | Description
toRed | Value that represents the percentage of the red color value that should be distributed to the red component. Possible values are 0.0 to 1.0.
toGreen | Value that represents the percentage of the green color value that should be distributed to the green component. Possible values are 0.0 to 1.0.
toBlue | Value that represents the percentage of the blue color value that should be distributed to the blue component. Possible values are 0.0 to 1.0.

Comments

If a COLORBALANCING Record (structure) used to redistribute the red value of a pixel contains the following values:

toRed = 0.50toGreen = 0.50toBlue = 0.0

then 50% of the current red value of the pixel will be added to the new red value for the pixel and 50% of the current red value of the pixel will be added to the new green value for the pixel. For a more detailed description of how this works, refer to BalanceColors method.


COMPAREDATA

Delphi Syntax:

COMPAREDATA= Packed Record
nMinRange: L_INT;
nMaxRange: L_INT;
uFlags: L_UINT;
end;

C++ Builder Syntax:

struct COMPAREDATA
{
int nMinRange;
int nMaxRange;
unsigned uFlags;
};

The COMPAREDATA record (structure) contains the values to be used for thresholding and redistributing the bitmap's color component values for the ColorThreshold method.

Member | Description
nMinRange | Value that represents the minimum boundary used to threshold the specific color.
nMaxRange | Value that represents the maximum boundary used to threshold the specific color.
uFlags | Flag that indicates which pixels will be modified, how the threshold pixel is handled and how rejected pixels are handled. Possible values are:
 | The following flags indicate which pixels will be modified:
 | Value | Meaning
 | CLTH_TYP_BANDPASS | [$00000000] The values falling outside the range are modified.
 | CLTH_TYP_BANDREJECT | [$00000001] The values falling inside the range are modified.
 | The following are the flags that indicate how the threshold pixel is handled:
 | Value | Meaning
 | CLTH_MOD_CHANNEL | [$00000000] Each channel component is modified independently.
 | CLTH_MOD_ALL | [$00000010] The pixel is rejected if any component is rejected.
 | The following are the flags that indicate how the rejected values are handled:
 | Value | Meaning
 | CLTH_VALUE_MIN | [$00000000] The rejected values are set to 0.
 | CLTH_VALUE_MAX | [$00000100] The rejected values are set to the maximum value
 | CLTH_VALUE_CLAMP | [$00000200] The rejected component values less that nMin go to the minimum value in the used color space component and the rejected component values greater than nMax go to the maximum value in the used color space component. This works only with the CLTH_MOD_CHANNEL flag.


GRAYCOLOR

Delphi Syntax:

GRAYCOLOR= Packed Record
crColor: RGBQUAD;
uThreshold: L_UINT;
end;

C++ Builder Syntax:

struct GRAYCOLOR
{
RGBQUAD crColor;
L_UINT uThreshold;
};

The GRAYCOLOR record (structure) contains information about gray color intensities (uThreshold) and the associated colors (crColor) used in the ColorizeGray method.

Member | Description
crColor | The RGB color used for coloring the specified range of intensities set in uThreshold. crColor.rgbReserved is ignored.
uThreshold | The maximum value of the pixels, which will be colored with this color. The pixels with a value smaller than this will have the color crColor. If the GRAYCOLOR structure is the last in the pGrayColors array, then this value is ignored and the maximum possible value will be used instead.
 | The maximum value depends on the image bits per pixel. For 8, 12 and 16-bit images the maximum value is 255, 4095 and 65535 respectively. However if you enter a value higher than the maximum, the value will be clipped at the maximum value.


HUESATINTDATA

Delphi Syntax:

HUESATINTDATA= Packed Record
nHue: L_INT;
nSaturation: L_INT;
nIntensity: L_INT;
nOuterLow: L_INT;
nOuterHigh: L_INT;
nInnerLow: L_INT;
nInnerHigh: L_INT;
end;

C++ Builder Syntax:

struct HUESATINTDATA
{
int nHue;
int nSaturation;
int nIntensity;
int nOuterLow;
int nOuterHigh;
int nInnerLow;
int nInnerHigh;
};

The HUESATINTDATA record (structure) provides the color range information used in the ChangeHueSatInt method.

Member | Description
nHue | Angular amount to change the hue, in hundredths of a degree. Valid values range from -18000 through 18000. This value is divided internally by 100.
nSaturation | Percentage amount to change saturation, in tenths of a percent. Valid values range from -1000 through 1000. This value is divided internally by 10.
nIntensity | Percentage amount to change the intensity , in tenths of a percent. Valid values range from -1000 through 1000. This value is divided internally by 10.
nOuterLow | Specifies the start of the color range to be changed. Valid values range from -359 through 359.
nOuterHigh | Specifies the end of the color range to be changed. Valid values range is from -359 through 359.
nInnerLow | Specifies the start of the color range to be fully changed. The valid range is between the nOuterLow and nOuterHigh values.
nInnerHigh | Specifies the end of the color range to be fully changed. The valid range is between the nOuterLow and nOuterHigh values.

The hue values for the inner and outer ranges are expressed as degrees in the HSB color space. Values inside the inner range are changed fully and those within the outer range are changed partially.


LEVELCOLORINFO

Delphi Syntax:

LEVELCOLORINFO= Packed Record
uMinInput: L_UINT;
uMaxInput: L_UINT;
uMinOutput: L_UINT;
uMaxOutput: L_UINT;
uGamma: L_UINT;
end;

C++ Builder Syntax:

struct LEVELCOLORINFO
{
L_UINT uMinInput;
L_UINT uMaxInput;
L_UINT uMinOutput;
L_UINT uMaxOutput;
L_UINT uGamma;
};

The LEVELCOLORINFO record (structure) contains color-leveling information for a specific color channel. It is used mainly in the ColorLevel and AutoColorLevel methods.

Member | Description
uMinInput | Value that specifies the image’s shadows to be mapped. Valid values range from 0 to 255 for 8-bit, 0 to 4095 for 12-bit and 0 to 65535 for 16-bit images. Any value greater than or equal to this will be considered a shadow and will be remapped to the value in uMinOutput.
uMaxInput | Value that specifies the image’s highlights to be mapped. Valid values range from 0 to 255 for 8-bit, 0 to 4095 for 12-bit and 0 to 65535 for 16-bit images. Any value greater than or equal to this will be considered a highlight and will be remapped to the value in uMaxOutput.
uMinOutput | Value that specifies the value to which the shadows will be mapped. Valid values range from 0 to 255 for 8-bit, 0 to 4095 for 12-bit and 0 to 65535 for 16-bit images.
uMaxOutput | Value that specifies the value to which the highlights will be mapped. Valid values range from 0 to 255 for 8-bit, 0 to 4095 for 12-bit and 0 to 65535 for 16-bit images.
uGamma | Value that represents the gamma value. This value is used to modify the midtones of the image. The value in this member is a 100 times the actual value. Therefore, if uGamma = 167 then the actual gamma value is 1.67. Likewise, if you want to use a gamma of 1.75, set this member to 175. The default value is DEFAULT_GAMMA, which is 100 (actual gamma value of 1.00), which does not change the gamma value of the image.

Comments

The value of the uMaxInput member must be greater than the value of the uMinInputValue member by at least 2.

If uMinOutput > uMaxOutput then the image’s shadows and highlights will be inverted for the given channel.


REGMARKS

Delphi Syntax:

REGMARKS= Packed Record
uType: L_UINT;
uWidth: L_UINT;
uHeight: L_UINT;
uMinScale: L_UINT;
uMaxScale: L_UINT;
rcRect: TRECT;
uSearchMarkCount: L_UINT;
pMarkDetectedPoints: pPOINT;
uMarkDetectedCount: L_UINT;
end;

C++ Builder Syntax:

struct REGMARKS
{
L_UINT uType;
L_UINT uWidth;
L_UINT uHeight;
L_UINT uMinScale;
L_UINT uMaxScale;
TRect rcRect;
L_UINT uSearchMarkCount;
PPOINT pMarkDetectedPoints;
L_UINT uMarkDetectedCount;
};

The REGMARKS record (structure) provides registration marks search information to the SearchRegMarks method. The SearchRegMarks method also stores information in this record (structure) about the registration marks that it finds.

Member | Description
uType | Registration mark type. Possible values are:
 | Value | Meaning
 | RGS_T | [$0000] T-shape registration mark.
 | Currently, only one registration mark is defined (T-shape).
uWidth | Registration mark width, in pixels.
uHeight | Registration mark height, in pixels.
uMinScale | Minimum registration mark scale to be detected. This is a percentage. It must not exceed uMaxScale.
uMaxScale | Maximum registration mark scale to be detected. This is a percentage. It must not be lower than uMinScale.
rcRect | The area to be searched for registration marks (in pixels).
uSearchMarksCount | Number of registration marks expected inside the search area.
pMarkDetectedPoints | Pointer to an array to be filled with the location points of the detected registration marks. SearchRegMarks will fill the first uMarkDetectedCount elements in this array.
uMarkDetectedCount | Number of detected registration marks inside the search area. This variable will be updated by the SearchRegMarks method. This tells how many elements of the pMarkDetectedPoints array will be filled.


REPLACECOLOR

Delphi Syntax:

REPLACECOLOR= Packed Record
crColor: COLORREF;
uFuzziness: L_UINT;
end;

C++ Builder Syntax:

struct REPLACECOLOR
{
COLORREF crColor;
unsigned uFuzziness;
};

The REPLACECOLOR record (structure) contains information about the replacement color for the ColorReplace method.

Member | Description
crColor | The COLORREF value that specifies the replaced color. You can specify a COLORREF value, such as the return value of the Windows RGB macro.
uFuzziness | Value that indicates the acceptable variance of the color being replaced. This value indicates how close the pixel value must be to the value in crColor in order to be replaced. This must be a nonzero value.


SELECTIVECOLORINFO

Delphi Syntax:

SELECTIVECOLORINFO= Packed Record
cCyan: Shortint;
cMagenta: Shortint;
cYellow: Shortint;
cBlack: Shortint;
end;

C++ Builder Syntax:

struct SELECTIVECOLORINFO
{
Shortint cCyan;
Shortint cMagenta;
Shortint cYellow;
Shortint cBlack;
};

The SELECTIVECOLORINFO record (structure) contains the information needed for a single "Selected Color", which is used mainly in the SelectiveColor method.

Member | Description
cCyan | Value that specifies the percentage of cyan in a color. Valid values range from –100 to 100, which is interpreted as –100% to 100%.
cMagenta | Value that specifies the percentage of magenta in a color. Valid values range from –100 to 100, which is interpreted as –100% to 100%.
cYellow | Value that specifies the percentage of yellow in a color. Valid values range from –100 to 100, which is interpreted as –100% to 100%.
cBlack | Value that specifies the percentage of black in a color. Valid values range from –100 to 100, which is interpreted as –100% to 100%.


Return Codes

The following are the possible return values for LEADTOOLS functions. These are the values in the LEADDef file. The first table lists SUCCESS and FAILURE codes used by various LEADTOOLS functions and the second table lists ERROR codes used by various LEADTOOLS functions.

FAILURE | 0 | Function not successful.
SUCCESS | 1 | Function successful.
SUCCESS_ABORT | 2 | Function successful with an abort request.

Note:

All LEADTOOLS function errors will return a negative number.

Error | No. | Description
ERROR_NO_MEMORY | -1 | Not enough memory available.
ERROR_NO_BITMAP | -2 | Invalid bitmap handle.
ERROR_MEMORY_TOO_LOW | -3 | Not enough memory available.
ERROR_FILE_LSEEK | -4 | Error seeking to position.
ERROR_FILE_WRITE | -5 | Error writing file.
ERROR_FILE_GONE | -6 | File not present - abort.
ERROR_FILE_READ | -7 | Error reading file.
ERROR_INV_FILENAME | -8 | Invalid filename specified.
ERROR_FILE_FORMAT | -9 | Invalid file format.
ERROR_FILENOTFOUND | -10 | File not found.
ERROR_INV_RANGE | -11 | Invalid width/height.
ERROR_IMAGE_TYPE | -12 | Image format recognized, but sub-type not supported.
ERROR_INV_PARAMETER | -13 | Invalid parameter passed.
ERROR_FILE_OPEN | -14 | Not able to open file.
ERROR_UNKNOWN_COMP | -15 | Unknown compression format.
ERROR_FEATURE_NOT_SUPPORTED | -16 | Feature not supported.
ERROR_NOT_256_COLOR | -17 | VGA card only supports 256 colors (8 bit).
ERROR_PRINTER | -18 | Printer error.
ERROR_CRC_CHECK | -19 | Data CRC check error.
ERROR_QFACTOR | -21 | Invalid QFactor specified.
ERROR_TARGAINSTALL | -22 | TARGA not installed.
ERROR_OUTPUTTYPE | -23 | Invalid compression format.
ERROR_XORIGIN | -24 | X origin specified invalid.
ERROR_YORIGIN | -25 | Y origin specified invalid.
ERROR_VIDEOTYPE | -26 | Invalid video mode.
ERROR_BITPERPIXEL | -27 | Invalid bits/pixel.
ERROR_WINDOWSIZE | -28 | Invalid window size.
ERROR_NORMAL_ABORT | -29 | Escape key pressed - or user aborted operation.
ERROR_NOT_INITIALIZED | -30 | Internal error - call LEAD.
ERROR_CU_BUSY | -31 | Internal error - call LEAD.
ERROR_INVALID_TABLE_TYPE | -32 | Internal error - call LEAD.
ERROR_UNEQUAL_TABLES | -33 | Internal error - call LEAD.
ERROR_INVALID_BUFFER | -34 | Internal error - call LEAD.
ERROR_MISSING_TILE_DATA | -35 | Internal error - call LEAD.
ERROR_INVALID_QVALUE | -36 | Internal error - call LEAD.
ERROR_INVALIDDATA | -37 | Internal error - call LEAD.
ERROR_INVALID_COMPRESSED_TYPE | -38 | Internal error - call LEAD.
ERROR_INVALID_COMPONENT_NUM | -39 | Internal error - call LEAD.
ERROR_INVALID_PIXEL_TYPE | -40 | Internal error - call LEAD.
ERROR_INVALID_PIXEL_SAMPLING | -41 | Internal error - call LEAD.
ERROR_INVALID_SOURCE_FILE | -42 | Internal error - call LEAD.
ERROR_INVALID_TARGET_FILE | -43 | Internal error - call LEAD.
ERROR_INVALID_IMAGE_DIMS | -44 | Internal error - call LEAD.
ERROR_INVALID_TILE_DIMS | -45 | Internal error - call LEAD.
ERROR_INVALID_PIX_BUFF_DIMS | -46 | Internal error - call LEAD.
ERROR_SEGMENT_OVERFLOW | -47 | Internal error - call LEAD.
ERROR_INVALID_SUBSAMPLING | -48 | Internal error - call LEAD.
ERROR_INVALID_Q_VIS_TABLE | -49 | Internal error - call LEAD.
ERROR_INVALID_DC_CODE_TABLE | -50 | Internal error - call LEAD.
ERROR_INVALID_AC_CODE_TABLE | -51 | Internal error - call LEAD.
ERROR_INSUFFICIENT_DATA | -52 | Internal error - call LEAD.
ERROR_MISSING_FUNC_POINTER | -53 | Internal error - call LEAD.
ERROR_TOO_MANY_DC_CODE_TABLES | -54 | Internal error - call LEAD.
ERROR_TOO_MANY_AC_CODE_TABLES | -55 | Internal error - call LEAD.
ERROR_INVALID_SUBIMAGE | -56 | Internal error - call LEAD.
ERROR_INVALID_ABORTION | -57 | Internal error - call LEAD.
ERROR_CU_NO_SUPPORT | -58 | Internal error - call LEAD.
ERROR_CU_FAILURE | -59 | Internal error - call LEAD.
ERROR_BAD_POINTER | -60 | Internal error - call LEAD.
ERROR_HEADER_DATA_FAILUR | -61 | Internal error - call LEAD.
ERROR_COMPRESSED_DATA_FAILURE | -62 | Internal error - call LEAD.
ERROR_FIXEDPAL_DATA | -63 | Fixed palette data not found.
ERROR_LOADFONT_DATA | -64 | Fixed palette data not found.
ERROR_NO_STAMP | -65 | Stamp not found.
ERROR_G3CODE_INVALID | -70 | Invalid group 3 dat.
ERROR_G3CODE_EOF | -71 | Group3 code end of file.
ERROR_G3CODE_EOL | -72 | Group3 code end of code.
ERROR_PREMATURE_EOF | -73 | Premature EOF at scanline.
ERROR_PREMATURE_EOL | -74 | Premature end-of-line code.
ERROR_UNCOMP_EOF | -75 | Premature end-of-line code.
ERROR_ACT_INCOMP | -76 | Premature end-of-line code.
ERROR_BAD_DECODE_STATE | -77 | Premature end-of-line code.
ERROR_VERSION_NUMBER | -78 | Bad version number.
ERROR_TWAIN_NODSM | -79 | Source manager not found.
ERROR_TWAIN_BUMMER | -80 | Failure due to unknown causes.
ERROR_TWAIN_LOWMEMORY | -81 | Not enough memory to perform operation.
ERROR_TWAIN_NODS | -82 | No Data Source.
ERROR_TWAIN_MAXCONNECTIONS | -83 | DS is connected to max possible apps.
ERROR_TWAIN_OPERATIONERROR | -84 | DS or DSM reported error, app shouldn't (no need for your app to report the error).
ERROR_TWAIN_BADCAP | -85 | Unknown capability.
ERROR_TWAIN_BADPROTOCOL | -86 | Unrecognized MSG DG DAT combination.
ERROR_TWAIN_BADVALUE | -87 | Data parameter out of range.
ERROR_TWAIN_SEQERROR | -88 | DG DAT MSG out of expected sequence.
ERROR_TWAIN_BADDEST | -89 | Unknown destination App/Src in DSM_Entry.
ERROR_TWAIN_CANCEL | -90 | Operation was cancelled.
ERROR_PANWINDOW_NOT_CREATED | -91 | PanWindow creation failed.
ERROR_NOT_ENOUGH_IMAGES | -92 | Not enough images - more input images are required.
ERROR_TWAIN_CAPUNSUPPORTED | -93 | Twain capability unsupported.
ERROR_TWAIN_FILEXFER_UNSUPPORTED | -94 | Twain File Transfer unsupported.
ERROR_USER_ABORT | -100 | User has aborted operation
ERROR_FPX_INVALID_FORMAT_ERROR | -101 | Invalid FlashPix format
ERROR_FPX_FILE_WRITE_ERROR | -102 | Error writing file
ERROR_FPX_FILE_READ_ERROR | -103 | Error reading file
ERROR_FPX_FILE_NOT_FOUND | -104 | File not found
ERROR_FPX_COLOR_CONVERSION_ERROR | -105 | Color conversion error
ERROR_FPX_SEVER_INIT_ERROR | -106 | Server initialize error
ERROR_FPX_LOW_MEMORY_ERROR | -107 | Not enough memory available
ERROR_FPX_IMAGE_TOO_BIG_ERROR | -108 | Image too big
ERROR_FPX_INVALID_COMPRESSION_ERROR | -109 | Invalid compression
ERROR_FPX_INVALID_RESOLUTION | -110 | Invalid resolution
ERROR_FPX_INVALID_FPX_HANDLE | -111 | Invalid handle
ERROR_FPX_TOO_MANY_LINES | -112 | Too many lines
ERROR_FPX_BAD_COORDINATES | -113 | Invalid coordinates
ERROR_FPX_FILE_SYSTEM_FULL | -114 | File system full
ERROR_FPX_MISSING_TABLE | -115 | The table is missing
ERROR_FPX_RETURN_PARAMETER_TOO_LARGE | -116 | Parameter too large
ERROR_FPX_NOT_A_VIEW | -117 | Error view
ERROR_FPX_VIEW_IS_TRANFORMLESS | -118 | The view is tranformless
ERROR_FPX_ERROR | -119 | General error
ERROR_FPX_UNIMPLEMENTED_FUNCTION | -120 | Unimplemented function
ERROR_FPX_INVALID_IMAGE_DESC | -121 | Invalid image description
ERROR_FPX_INVALID_JPEG_TABLE | -122 | Invalid jpeg table
ERROR_FPX_ILLEGAL_JPEG_ID | -123 | Illegal jpeg identifier
ERROR_FPX_MEMORY_ALLOCATION_FAILED | -124 | Memory allocation failed
ERROR_FPX_NO_MEMORY_MANAGEMENT | -125 | No memory management
ERROR_FPX_OBJECT_CREATION_FAILED | -126 | Object creation failed
ERROR_FPX_EXTENSION_FAILED | -127 | Extension failed
ERROR_FPX_FREE_NULL_PTR | -128 | Free null pointer
ERROR_FPX_INVALID_TILE | -129 | Invalid tile
ERROR_FPX_FILE_IN_USE | -130 | File in use
ERROR_FPX_FILE_CREATE_ERROR | -131 | Error creating file
ERROR_FPX_FILE_NOT_OPEN_ERROR | -132 | File not open
ERROR_FPX_USER_ABORT | -133 | User abort
ERROR_FPX_OLE_FILE_ERROR | -134 | OLE file I/O error
ERROR_BAD_TAG | -140 | Bad TIFF tag
ERROR_INVALID_STAMP_SIZE | -141 | Stamp size is too big or invalid bits/pixel, etc
ERROR_BAD_STAMP | -142 | Stamp is present but data is corrupted
ERROR_DOCUMENT_NOT_ENABLED | -143 | Document capability is required to use this function
ERROR_IMAGE_EMPTY | -144 | Image is empty
ERROR_NO_CHANGE | -145 | The image hasn't changed
ERROR_LZW_LOCKED | -146 | The LZW capabilities are locked
ERROR_FPXEXTENSIONS_LOCKED | -147 | The FlashPix extension capabilities are locked
ERROR_ANN_LOCKED | -148 | One or more annotation objects are still locked
ERROR_EXCEPTION | -149 | An unspecified exception occurred - could be memory access violations
ERROR_DLG_FAILED | -150 | An error occurred during the creation of the common dialog.
ERROR_DLG_ALREADYINITIATED | -151 | The dialogs are already initialized.
ERROR_DLG_NOTINITIATED | -152 | The dialogs have not been initialized.
ERROR_DLG_COLORNOTINITIALIZED | -153 | The dialogs were not initialized with DLG_INIT_COLOR.
ERROR_DLG_COLORDLL_UNABLETOLOAD | -154 | The dialogs could not load the LTCLR dll.
ERROR_DLG_RESDLL_UNABLETOLOAD | -155 | The dialogs could not load the LTDLGRES dll.
ERROR_ISIS_NOCURSCANNER | -160 | ISIS No Scanner selected
ERROR_ISIS_SCANDRIVER_NOT_LOADED | -161 | ISIS Scanner driver failed to load
ERROR_ISIS_CANCEL | -162 | ISIS Operation canceled
ERROR_ISIS_BAD_TAG_OR_VALUE | -163 | ISIS Bad Tag or Bad Tag Value
ERROR_ISIS_NOT_READY | -164 | ISIS Scanner not ready
ERROR_ISIS_NO_PAGE | -165 | ISIS No page in the Scanner
ERROR_ISIS_JAM | -166 | ISIS Scanner Jam error
ERROR_ISIS_SCANNER_ERROR | -167 | ISIS Scanner driver error
ERROR_ISIS_BUSY | -168 | ISIS Scanner is busy
ERROR_ISIS_FILE_ERROR | -169 | ISIS File driver error
ERROR_ISIS_NETWORK_ERROR | -170 | ISIS Network error
ERROR_ISIS_NOT_INSTALLED | -171 | ISIS is not installed
ERROR_ISIS_NO_PIXDFLT | -172 | ISIS is not installed
ERROR_ISIS_PIXVERSION | -173 | ISIS version is incorrect
ERROR_ISIS_PERM_NOACCESS | -174 | ISIS No permission/access
ERROR_LTDIS_NOT_LOADED | -200 | LTDIS dll doesn't loaded.
ERROR_LTFIL_NOT_LOADED | -201 | LTFIL dll doesn't loaded.
ERROR_RECORDING | -250 | Wave device is currently recording
ERROR_COMPRESSOR | -251 | Invalid compressor
ERROR_SOUND_DEVICE | -252 | Problem with sound card
ERROR_DEVICE_INUSE | -253 | The sound card is currently in use
ERROR_INV_TRACKTYPE | -254 | Invalid track for operation
ERROR_NO_SOUNDCARD | -255 | No sound card is present
ERROR_NOT_RECORDING | -256 | Not currently recording
ERROR_INV_MODE | -257 | Invalid open mode for operation
ERROR_NO_VIDEO_MODULE | -258 | No video module present on machine
ERROR_QUEUE_FULL | -259 | The buffer queue is full
ERROR_CONFIGURE_RESTART | -260 | Configuration was successful, but you need to restart Windows
ERROR_INV_HANDLE | -261 | Invalid handle
ERROR_HOST_RESOLVE | -270 | Can't resolve hostname
ERROR_CANT_INITIALIZE | -271 | Can't initialize network
ERROR_NO_CONNECTION | -272 | No open network connections
ERROR_HOST_NOT_FOUND | -273 | Hostname not found
ERROR_NOT_SERVER | -274 | Computer is not a server
ERROR_NO_CONNECTIONS | -275 | No connection requests waiting
ERROR_CONNECT_REFUSED | -276 | Connection was refused
ERROR_IS_CONNECTED | -277 | Computer is already connected
ERROR_NET_UNREACH | -278 | Network is unreachable from host
ERROR_TIME_OUT | -279 | Connect attempt time out without connecting
ERROR_NET_DOWN | -280 | Network subsystem is down
ERROR_NO_BUFFERS | -281 | No buffer space is available, too many connections
ERROR_NO_FILE_DESCR | -282 | No more file handle available
ERROR_DATA_QUEUED | -283 | Data has been queued to send later
ERROR_UNKNOWN | -284 | Unknown network error has occurred
ERROR_CONNECT_RESET | -285 | Connection was reset - socket might be unusable
ERROR_TRANSFER_ABORTED | -286 | Transfer was aborted
ERROR_DSHOW_FAILURE | -287 | DirectShow isn't installed correctly
ERROR_REGISTRY_READ | -288 | Error reading from the registry
ERROR_WAVE_FORMAT | -289 | The wave format is not supported
ERROR_BUFFER_TOO_SMALL | -290 | The buffer size is too small
ERROR_WAVE_CONVERT | -291 | Error converting the wave format
ERROR_MULTIMEDIA_NOT_ENABLED | -292 | Video capability is required to use this function
ERROR_CAP_CONNECT | -293 | Error connecting to capture device
ERROR_CAP_DISCONNECT | -294 | Error disconnecting capture device
ERROR_DISK_ISFULL | -295 | Not enough disk space
ERROR_CAP_OVERLAY | -296 | Error setting capture overlay
ERROR_CAP_PREVIEW | -297 | Error setting capture preview
ERROR_CAP_COPY | -298 | Error copying to clipboard
ERROR_CAP_WINDOW | -299 | Error with capture window
ERROR_CAP_ISCAPTURING | -300 | Operation invalid during capture
ERROR_NO_STREAMS | -301 | No streams to play
ERROR_CREATE_STREAM | -302 | Error creating streams
ERROR_FRAME_DELETE | -303 | Error deleting frames
ERROR_DXF_FILTER_MISSING | -309 | The DXF filter is needed to use this function
ERROR_PAGE_NOT_FOUND | -310 | Page not found
ERROR_DELETE_LAST_PAGE | -311 | You cannot delete a page from a file containing only one page
ERROR_NO_HOTKEY | -312 | There is no hotkey
ERROR_CANNOT_CREATE_HOTKEY_WINDOW | -313 | Error creating the hotkey window
ERROR_MEDICAL_NOT_ENABLED | -314 | Medical Express capability is required to use this function
ERROR_JBIG_NOT_ENABLED | -315 | JBIG capability is required to use this function
ERROR_UNDO_STACK_EMPTY | -316 | Undo stack is empty - too many undos
ERROR_NO_TOOLBAR | -317 | ActiveX error - the toolbar window was not created
ERROR_MEDICAL_NET_NOT_ENABLED | -318 | Medical Network Express capability is required to use this function
ERROR_JBIG_FILTER_MISSING | -319 | The JBIG filter is needed to use this function
ERROR_CAPTURE_STILL_IN_PROCESS | -320 | Capture is still in progress
ERROR_INVALID_DELAY | -321 | Invalid delay specified
ERROR_INVALID_COUNT | -322 | Invalid capture count specified
ERROR_INVALID_INTERVAL | -323 | Invalid interval specified
ERROR_HOTKEY_CONFILCTS_WITH_CANCELKEY | -324 | Hotkey Conflicts With Cancelkey
ERROR_CAPTURE_INVALID_AREA_TYPE | -325 | Invalid Area Type specified
ERROR_CAPTURE_NO_OPTION_STRUCTURE | -326 | Invalid or missing options structure
ERROR_CAPTURE_INVALID_FILL_PATTERN | -327 | Invalid fill pattern
ERROR_CAPTURE_INVALID_LINE_STYLE | -328 | Invalid line style
ERROR_CAPTURE_INVALID_INFOWND_POS | -329 | Invalid info window position
ERROR_CAPTURE_INVALID_INFOWND_SIZE | -330 | Invalid info window size
ERROR_CAPTURE_ZERO_AREA_SIZE | -331 | Zero Area Size for capture
ERROR_CAPTURE_FILE_ACCESS_FAILED | -332 | The specified filename could not be read
ERROR_CAPTURE_INVALID_32BIT_EXE_OR_DLL | -333 | The specified filename is not a valid 32bit EXE/DLL
ERROR_CAPTURE_INVALID_RESOURCE_TYPE | -334 | The specified resource type is not supported
ERROR_CAPTURE_INVALID_RESOURCE_INDEX | -335 | The index resource is out of range
ERROR_CAPTURE_NO_ACTIVE_WINDOW | -336 | No active window for capture
ERROR_CAPTURE_CANNOT_CAPTURE_WINDOW | -337 | Could not capture the window
ERROR_CAPTURE_STRING_ID_NOT_DEFINED | -338 | String ID Not Defined
ERROR_CAPTURE_DELAY_LESS_THAN_ZERO | -339 | Delay value cannot be less than zero
ERROR_CAPTURE_NO_MENU | -340 | No menu to capture
ERROR_WMF_FILTER_MISSING | -349 | WMF filter is needed to use this function
ERROR_BROWSE_FAILED | -350 | Directory browsing failed
ERROR_NOTHING_TO_DO | -351 | There is nothing to do! - i.e. no files were found
ERROR_INTERNET_NOT_ENABLED | -352 | Internet capability is required to use this function
ERROR_LVKRN_MISSING | -353 | The LVKRN DLL is needed to use this function
ERROR_CMW_LOCKED | -354 | The CMW support is locked
ERROR_CMW_FILTER_MISSING | -355 | CMW filter is needed to use this function
ERROR_CMP_FILTER_MISSING | -356 | CMP filter is needed to use this function
ERROR_FAX_FILTER_MISSING | -357 | FAX filter is needed to use this function
ERROR_PDF_FILTER_MISSING | -358 | PDF filter is needed to use this function
ERROR_TIF_FILTER_MISSING | -359 | TIF filter is needed to use this function
ERROR_INV_HORZSIZE | -360 | The horizontal size is outside the specification
ERROR_INV_VERTSIZE | -361 | The vertical size is outside the specification
ERROR_ASPECTRATIO | -362 | Invalid pel aspect ratio
ERROR_BITRATE | -363 | Invalid bitrate
ERROR_VBV_BUFFER | -364 | VBV Buffer Size is isn't valid
ERROR_CHROMA_FORMAT | -365 | Invalid chroma format
ERROR_VIDEO_FORMAT | -366 | Invalid video format
ERROR_COLOR_PRIMARY | -367 | Invalid number of color primaries
ERROR_TRANSFER_CHAR | -368 | Invalid number of transfer characteristics
ERROR_MATRIX_COEFF | -369 | Invalid number of matrix coefficients
ERROR_DISPLAY_HORZSIZE | -370 | Invalid horizontal display size
ERROR_DISPLAY_VERTSIZE | -371 | Invalid vertical display size
ERROR_INTRA_DCPREC | -372 | Invalid Intra DC Precision
ERROR_FCODE | -373 | Invalid f code
ERROR_SRCH_WINDOW | -374 | Invalid motion data search window
ERROR_PROFILEID | -375 | Invalid profile id
ERROR_LEVELID | -376 | Invalid level id
ERROR_PROFILEID_NS | -377 | Encoder doesn't support scalable bitstreams
ERROR_INV_COMBINATION | -378 | Undefined Profile & Level id combination
ERROR_BPIC_NOTALLOWED | -379 | B Pictures not allowed
ERROR_RPTFIRST_MUSTBEZERO | -380 | Repeat first must be zero
ERROR_FRAME_RATE | -381 | Invalid frame rate
ERROR_VECTOR_NOT_ENABLED | -400 | Vector capability is required to use this function
ERROR_VECTOR_DXF_NOT_ENABLED | -401 | Vector DXF capability is required to use this function
ERROR_VECTOR_DWG_NOT_ENABLED | -402 | Vector DWG capability is required to use this function
ERROR_VECTOR_MISC_NOT_ENABLED | -403 | Vector Misc capability is required to use this function
ERROR_TAG_MISSING | -404 | Tag not found
ERROR_VECTOR_DWF_NOT_ENABLED | -405 | Vector DWF capability is required to use this function
ERROR_NO_UNDO_STACK | -406 | There is no undo stack
ERROR_UNDO_DISABLED | -407 | The undo is disabled
ERROR_PDF_NOT_ENABLED | -408 | PDF capability is required to use this function
ERROR_ENTENSIONS_MISSING | -409 | EXIF extensions are missing
ERROR_BARCODE_DIGIT_CHECK | -410 | Invalid error check digit
ERROR_BARCODE_INVALID_TYPE | -411 | Invalid bar code type
ERROR_BARCODE_TEXTOUT | -412 | Invalid bar code text out option
ERROR_BARCODE_WIDTH | -413 | Invalid bar code width
ERROR_BARCODE_HEIGHT | -414 | Invalid bar code height
ERROR_BARCODE_TOSMALL | -415 | Bar code string is too small
ERROR_BARCODE_STRING | -416 | Invalid bar code string for a specified bar code type
ERROR_BARCODE_NOTFOUND | -417 | No bar code recognition
ERROR_BARCODE_UNITS | -418 | Invalid bar code measurement unit
ERROR_BARCODE_MULTIPLEMAXCOUNT | -419 | Invalid multiple max count
ERROR_BARCODE_GROUP | -420 | Invalid bar code group
ERROR_BARCODE_NO_DATA | -421 | Invalid BARCODEDATA structure
ERROR_BARCODE_NOTFOUND_DUPLICATED | -422 | No duplicated bar code
ERROR_BARCODE_LAST_DUPLICATED | -423 | Reached the last duplicated bar code
ERROR_BARCODE_STRING_LENGTH | -424 | Invalid bar code data string length
ERROR_BARCODE_LOCATION | -425 | Invalid bar code area location
ERROR_BARCODE_1D_LOCK | -426 | Bar Code 1D is locked
ERROR_BARCODE_2D_READ_LOCKED | -427 | Bar Code Read 2D (CodeOne) is locked
ERROR_BARCODE_2D_WRITE_LOCKED | -428 | Bar Code Write 2D (CodeOne) is locked
ERROR_BARCODE_PDF_READ_LOCKED | -429 | Bar Code Read PDF is locked
ERROR_BARCODE_PDF_WRITE_LOCKED | -430 | Bar Code Write PDF is locked
ERROR_BARCODE_FOUNDCORRUPT | -431 | Barcode PDF417 symbol is found but cannot be read successfully
ERROR_BARCODE_DATAMATRIX_READ_LOCKED | -432 | Bar Code Read DataMatrix is locked.
ERROR_BARCODE_DATAMATRIX_WRITE_LOCKED | -433 | Bar Code Write DataMatrix is locked.
ERROR_BARCODE_QR_READ_LOCKED | -1380 | Bar Code Read QR is locked
ERROR_BARCODE_QR_WRITE_LOCKED | -1381 | Bar Code Write QR is locked
ERROR_NET_OUT_OF_HANDLES | -435 | No more handles could be generated at this time
ERROR_NET_TIMEOUT | -436 | The request has timed out
ERROR_NET_EXTENDED_ERROR | -437 | An extended error has occurred
ERROR_NET_INTERNAL_ERROR | -438 | An internal WinInet error
ERROR_NET_INVALID_URL | -439 | The URL is invalid
ERROR_NET_UNRECOGNIZED_SCHEME | -440 | The URL scheme could not be recognized or is not supported
ERROR_NET_NAME_NOT_RESOLVED | -441 | The server name could not be resolved
ERROR_NET_PROTOCOL_NOT_FOUND | -442 | The requested protocol could not be located
ERROR_NET_INVALID_OPTION | -443 | Invalid option specified
ERROR_NET_BAD_OPTION_LENGTH | -444 | The length of option is incorrect
ERROR_NET_OPTION_NOT_SETTABLE | -445 | The option can not be set
ERROR_NET_SHUTDOWN | -446 | The Win32 Internet function support is being shut down or unload
ERROR_NET_LOGIN_FAILURE | -449 | User could not connect to site
ERROR_NET_INVALID_OPERATION | -450 | The requested operation is invalid
ERROR_NET_OPERATION_CANCELLED | -451 | The operation was cancelled
ERROR_NET_INCORRECT_HANDLE_TYPE | -452 | The type of handle supplied is incorrect for the operation
ERROR_NET_INCORRECT_HANDLE_STATE | -453 | Handle is not in the correct state
ERROR_NET_NOT_PROXY_REQUEST | -454 | The request cannot be made via a proxy
ERROR_NET_REGISTRY_VALUE_NOT_FOUND | -455 | The registry value could not be found
ERROR_NET_BAD_REGISTRY_PARAMETER | -456 | Incorrect registry value
ERROR_NET_NO_DIRECT_ACCESS | -457 | Direct network access cannot be made at this time
ERROR_NET_NO_CONTEXT | -458 | An asynchronous request could not be made because a zero context value was supplied
ERROR_NET_NO_CALLBACK | -459 | A callback function has not been defined
ERROR_NET_REQUEST_PENDING | -460 | Operation could not be completed because one or more operations are pending
ERROR_NET_INCORRECT_FORMAT | -461 | The format of the request is invalid
ERROR_NET_ITEM_NOT_FOUND | -462 | The requested item could not be located
ERROR_NET_CANNOT_CONNECT | -463 | The attempt to connect to the server failed
ERROR_NET_CONNECTION_ABORTED | -464 | The connection with the server has been terminated
ERROR_NET_CONNECTION_RESET | -465 | The connection with the server has been reset
ERROR_NET_FORCE_RETRY | -466 | Calls for the Win32 Internet function to redo the request
ERROR_NET_INVALID_PROXY_REQUEST | -467 | The proxy request is invalid
ERROR_NET_HANDLE_EXISTS | -469 | The request failed because the handle already exits
ERROR_NET_SEC_CERT_DATE_INVALID | -470 | SSL certificate date that was received from the server is bad
ERROR_NET_SEC_CERT_CN_INVALID | -471 | SSL certificate common name is incorrect
ERROR_NET_HTTP_TO_HTTPS_ON_REDIR | -472 | Moving from a non-SSL to an SSL connection because of a redirect
ERROR_NET_HTTPS_TO_HTTP_ON_REDIR | -473 | Moving from an SSL to a no-SSL connection because of a redirect
ERROR_NET_MIXED_SECURITY | -474 | Indicates that the content is not entirely secure. Some of the content being viewed may have come from unsecured servers
ERROR_NET_CHG_POST_IS_NON_SECURE | -475 | Changing the post is not secure.
ERROR_NET_POST_IS_NON_SECURE | -476 | Current posts is not secure.
ERROR_NET_CLIENT_AUTH_CERT_NEEDED | -477 | Client need certificate authority.
ERROR_NET_INVALID_CA | -478 | Invalid certificate authority
ERROR_NET_CLIENT_AUTH_NOT_SETUP | -479 | Client authorization wasn't setup yet.
ERROR_NET_REDIRECT_SCHEME_CHANGE | -481 | Redirect scheme change.
ERROR_NET_HTTPS_HTTP_SUBMIT_REDIR | -484 | HTTP submitting redir.
ERROR_NET_INSERT_CDROM | -485 | Please insert CD Rom into the CD drive.
ERROR_NET_HTTP_HEADER_NOT_FOUND | -486 | The requested header could not be located
ERROR_NET_HTTP_DOWNLEVEL_SERVER | -487 | The server did not return any headers
ERROR_NET_HTTP_INVALID_SERVER_RESPONSE | -488 | The server response could not be parsed
ERROR_NET_HTTP_INVALID_HEADER | -489 | The supplied header is invalid
ERROR_NET_HTTP_INVALID_QUERY_REQUEST | -490 | The request made to HttpQueryInfo is invalid
ERROR_NET_HTTP_HEADER_ALREADY_EXISTS | -491 | The header could not be added because it already exists
ERROR_NET_HTTP_REDIRECT_FAILED | -492 | An HTTP redirection failed
ERROR_NET_HTTP_NOT_REDIRECTED | -493 | The HTTP redirection did not occur
ERROR_NET_HTTP_COOKIE_NEEDS_CONFIRMATION | -494 | Before a cookie is set there needs to be confirmation
ERROR_NET_HTTP_COOKIE_DECLINED | -495 | Trying to assign a cookie was declined
ERROR_NET_HTTP_REDIRECT_NEEDS_CONFIRMATION | -496 | The HTTP redirection needs to be confirmed
ERROR_NET_NO_OPEN_REQUEST | -497 | Operation cannot be completed because there are no open requests
ERROR_VECTOR_IS_LOCKED | -500 | Vector handle is locked
ERROR_VECTOR_IS_EMPTY | -501 | Vector is empty
ERROR_VECTOR_LAYER_NOT_FOUND | -502 | Layer is not found
ERROR_VECTOR_LAYER_IS_LOCKED | -503 | Layer is locked
ERROR_VECTOR_LAYER_ALREADY_EXISTS | -504 | Layer already exists
ERROR_VECTOR_OBJECT_NOT_FOUND | -505 | Object is not found
ERROR_VECTOR_INVALID_OBJECT_TYPE | -506 | Invalid object type
ERROR_VECTOR_PEN_NOT_FOUND | -507 | Pen is not found
ERROR_VECTOR_BRUSH_NOT_FOUND | -508 | Brush is not found
ERROR_VECTOR_FONT_NOT_FOUND | -509 | Font is not found
ERROR_VECTOR_BITMAP_NOT_FOUND | -510 | Bitmap is not found
ERROR_VECTOR_POINT_NOT_FOUND | -511 | Point is not found
ERROR_VECTOR_ENGINE_NOT_FOUND | -512 | Vector engine not found
ERROR_VECTOR_INVALID_ENGINE | -513 | Invalid vector engine
ERROR_VECTOR_CLIPBOARD | -514 | Clipboard error
ERROR_VECTOR_CLIPBOARD_IS_EMPTY | -515 | Clipboard is empty
ERROR_VECTOR_CANT_ADD_TEXT | -516 | Cannot add text
ERROR_VECTOR_CANT_READ_WMF | -517 | Cannot read WMF
ERROR_VECTOR_GROUP_NOT_FOUND | -518 | Group is not found
ERROR_VECTOR_GROUP_ALREADY_EXISTS | -519 | Group already exists
ERROR_JP2_FAILURE | -530 | Error in JP2 Box values
ERROR_JP2_SIGNATURE | -531 | The header does not match the JP2 signature - not a JP2 file
ERROR_JP2_UNSUPPORTED | -532 | JP2 file has a feature that is unsupported
ERROR_J2K_FAILURE | -533 | Invalid save options were specified to the encoder
ERROR_J2K_NO_SOC | -534 | File header does not contain SOC marker
ERROR_J2K_NO_SOT | -535 | File contains complete header but no compressed image data
ERROR_J2K_INFORMATION_SET | -536 | Invalid save options were specified or file includes invalid encoded values
ERROR_J2K_LOW_TARGET_SIZE | -537 | Compression ratio, target file size, or tile size was too small for encoder
ERROR_J2K_DECOMPOSITION_LEVEL | -538 | Specified Wavelet decomposition level was too high
ERROR_J2K_MARKER_VALUE | -539 | Decoder could not translate J2K marker - file is corrupt or invalid
ERROR_J2K_UNSUPPORTED | -540 | J2K file has image with more than 30 bits per component
ERROR_J2K_FILTER_MISSING | -541 | J2K filter is needed to use this function
ERROR_J2K_LOCKED | -542 | J2K support is locked
ERROR_TWAIN_NO_LIBRARY | -560 | TWAIN libraries not found.
ERROR_TWAIN_NOT_AVAILABLE | -560 | At least one of the TWAIN DLLs is missing
ERROR_TWAIN_INVALID_DLL | -561 | Invalid DLL.
ERROR_TWAIN_NOT_INITIALIZED | -562 | TWAIN source not initialized.
ERROR_TWAIN_CANCELED | -563 | Cancel operation done.
ERROR_TWAIN_CHECK_STATUS | -564 | An error in the status of the TWAIN source.
ERROR_TWAIN_END_OF_LIST | -565 | End of the enumeration list.
ERROR_TWAIN_CAP_NOT_SUPPORTED | -566 | Required capability not supported.
ERROR_TWAIN_SOURCE_NOT_OPEN | -567 | TWAIN source not being open.
ERROR_TWAIN_BAD_VALUE | -568 | Invalid capability value
ERROR_TWAIN_INVALID_STATE | -569 | TWAIN source state is not valid for the required operation.
ERROR_TWAIN_CAPS_NEG_NOT_ENDED | -570 | Capability negotiation ended before the current operation.
ERROR_TWAIN_OPEN_FILE | -571 | Can't open required file.
ERROR_TWAIN_INV_HANDLE | -572 | Invalid handle was passed.
ERROR_TWAIN_WRITE_TO_FILE | -573 | Error trying write to a file.
ERROR_TWAIN_INV_VERSION_NUM | -574 | Invalid version number.
ERROR_TWAIN_READ_FROM_FILE | -575 | Error reading from file.
ERROR_TWAIN_NOT_VALID_FILE | -576 | Invalid file
ERROR_TWAIN_INV_ACCESS_RIGHT | -577 | Invalid access right to file
ERROR_TWAIN_CUSTOMBASE | -578 | Custom return code base
ERROR_TWAIN_DENIED | -579 | Operation denied (device not ready)
ERROR_TWAIN_FILEEXISTS | -580 | Specified output file name already exists
ERROR_TWAIN_FILENOTFOUND | -581 | Input file name not found or output file name invalid
ERROR_TWAIN_NOTEMPTY | -582 | Directory is not empty & can not be deleted
ERROR_TWAIN_PAPERJAM | -583 | Transfer failed because of a feeder error
ERROR_TWAIN_PAPERDOUBLEFEED | -584 | Transfer failed because of a feeder error
ERROR_TWAIN_FILEWRITEERROR | -585 | Error writing to the specified file
ERROR_TWAIN_CHECKDEVICEONLINE | -586 | The device has been powered off
ERROR_TWAIN_STOP_SCAN | -587 | The feeder is stopped by the user.
ERROR_TWAIN_STOP_ENUMERATION | 2 | Function successful with an abort request.
ERROR_PAINT_INTERNAL | -600 | Internal error (Call LEAD)
ERROR_PAINT_INV_DATA | -601 | Internal error (Call LEAD)
ERROR_PAINT_NO_RESOURCES | -602 | Internal error (Call LEAD)
ERROR_PAINT_NOT_ENABLED | -603 | DigitalPaint capability is required to use this function
ERROR_CONTAINER_INV_HANDLE | -630 | Invalid container handle.
ERROR_CONTAINER_INV_OPERATION | -631 | Invalid container operation
ERROR_CONTAINER_NO_RESOURCES | -632 | No container resources
ERROR_TOOLBAR_NO_RESOURCES | -660 | No toolbar resources available
ERROR_TOOLBAR_INV_STATE | -661 | Invalid toolbar state
ERROR_TOOLBAR_INV_HANDLE | -662 | Invalid toolbar handle
ERROR_AUTOMATION_INV_HANDLE | -690 | Invalid automation handle
ERROR_AUTOMATION_INV_STATE | -691 | Invalid automation state
ERROR_INV_SEG_HANDLE | -700 | Invalid segmentation handle
ERROR_INV_SEG_DATA | -701 | Invalid segmentation data
ERROR_INV_LAYER_DATA | -702 | Invalid layer data
ERROR_MRC_NOT_ALLOCATED | -703 | Segmentation handle not initialized
ERROR_INV_MIN_SEGMENT | -704 | Invalid minimum segment width or height
ERROR_SEGMENTATION_FAILURE | -705 | Segmentation process Failure
ERROR_MRC_INV_PAGE | -706 | Invalid MRC file's page number
ERROR_PDF_FILE_ENCRYPTED | -721 | The PDF file is encrypted and the szPassword member of the FILEPDFOPTIONS is not set. (No password.)
ERROR_PDF_INVALID_PASSWORD | -722 | Invalid password specified
ERROR_PDF_FAX_NOT_ENABLED | -723 | LFFAX is required for this function
ERROR_PDF_JPEG_NOT_ENABLED | -724 | LFCMP is required for this function
ERROR_PDF_INV_DOC_STRUCTURING_COMMENTS | -725 | Invalid Document Structuring Comments (PS and EPS)
ERROR_PDF_FONTS_DIRECTORY_NOT_FOUND | -726 | Could not find the Fonts directory.
ERROR_PDF_CANNOT_EDIT_FILE | -727 | Cannot insert, delete, append or replace pages.
ERROR_PDF_BAD_CONTENT | -728 | File is corrupted.
ERROR_PDF_BAD_INITIALIZATION_FILES | -729 | The files required for initializing the PDF engine were not found, or they were found, but are not correct.
ERROR_ISAPI_CONFIG_NOT_FOUND | -740 | Configuration not found in the registry
ERROR_ISAPI_DSN_NOT_FOUND | -741 | DSN not found in ODBC
ERROR_ISAPI_SQL_EXEC | -742 | Table or fields not found in database
ERROR_ISAPI_RECORD_NOT_FOUND | -743 | Record not found in database
ERROR_ISAPI_DATABASE_SETTING | -744 | Error on database settings in the registry
ERROR_ISAPI_DATABASE_SAVE_BITMAP | -745 | Can't save bitmap in database
ERROR_ISAPI_DATABASE_RECORD_DUPLICATE | -746 | Record already exists in the database, duplicate in primary key
ERROR_ISAPI_SESSION_FULL | -747 | Can't add user to ISAPI session
ERROR_ISAPI_CACHE_SYSTEM_NOT_ENABLED | -748 | The caching system is not enabled in the Configuration Settings
ERROR_ISAPI_CACHE_MAX_SIZE | -749 | The maximum size of the cache limit.
ERROR_ISAPI_CACHE_SETTING | -750 | Error On Cache System Settings in Registry
ERROR_SVG_FILE_SIZE_READ | -770 | SVG - Invalid File Size Read
ERROR_SVG_ROOT_NOT_SVG | -771 | SVG - ROOT is Not SVG
ERROR_SVG_NOFOUND_ROOT_ELEMENT | -772 | SVG - Root Element Not Found
ERROR_SVG_INV_ELEMENT | -773 | SVG - Invalid Element
ERROR_SVG_DUPLICATED_ATTRIBUTE | -774 | SVG - Duplicated Attribute
ERROR_SVG_INV_ATTRIBUTE | -775 | SVG - Invalid Attribute
ERROR_SVG_INV_ATTRIBUTE_VALUE | -776 | SVG - Invalid Attribute Value
ERROR_SVG_BAD_CSS_PROPERTY | -777 | SVG - Bad CSS Property
ERROR_SVG_MISSING_REQUIRED_ATTRIBUTE | -778 | SVG - Missing Required Attribute
ERROR_SVG_DUPLICATED_ID | -779 | SVG - Duplicated ID
ERROR_SVG_INV_COORDINATES_NUMBER | -780 | SVG - Invalid Coordinates Number
ERROR_SVG_INV_STRING_COMMA | -781 | SVG - Invalid String Comma
ERROR_INVALID_FORMAT | -785 | Invalid format.
ERROR_UNSUPPORTED_METHOD | -786 | Unsupported method.
ERROR_OPENING_PROFILE | -787 | Opening profile.
ERROR_INVALID_COLOR_PROFILE | -788 | Invalid color profile.
ERROR_INVALID_STRUCT_SIZE | -789 | Invalid structure size.
ERROR_U_V_NOT_MULTIPLES | -791 | Vertical subsampling period of U must be must be multiple of vertical subsampling period of V, or vice versa. Also horizontal subsampling period of U must be multiple of horizontal subsampling period of V, or vice versa. Otherwise the error is triggered.
ERROR_NO_NONPLANAR_VERTICAL_SUBSAMPLING_SUPPORTED | -792 | Non-planar vertical sub-sampling is not supported.
ERROR_PLANAR_ALIGNMENT_NOT_SUPPORTED | -793 | Planar alignment is not supported.
ERROR_UNSUPPORTED_CONVERSION | -794 | Unsupported conversion.
ERROR_TRUNCATE_HEIGHT | -795 | Height was truncated.
ERROR_TRUNCATE_WIDTH | -796 | Width was truncated.
ERROR_TRUNCATE_WIDTH_AND_HEIGHT | -797 | Height and width were truncated.
ERROR_LAYER_MISSING | -800 | The PSD layer is missing.
ERROR_BAD_MARKER | -801 | Bad JPEG marker.
ERROR_AUDIO_MISSING | -802 | The audio data is not present.
ERROR_DICOM_NOT_ENABLED | -803 | DICOM support is required to use this function
ERROR_EXTGRAY_NOT_ENABLED | -804 | Extended grayscale support is required to use this function
ERROR_FILE_READONLY | -805 | File is read-only. Cannot open file with write access
ERROR_BAD_RESYNC_MARKER | -806 | Bad JPEG Resync marker
ERROR_LTCLR_MISSING | -807 | LTCLR DLL is missing
ERROR_MARKER_SIZE_TOO_BIG | -808 | The size of the JPEG marker cannot exceed 64K
ERROR_MARKER_MISSING | -809 | The required JPEG marker is missing
ERROR_EXTENSIONS_MISSING | -810 | This file does not contain Exif extensions
ERROR_MARKER_INDEX | -811 | The marker index is invalid (too big)
ERROR_NO_PROFILE | -812 | The ICC profile was not found
ERROR_DECODING_PROFILE | -813 | An error has occured while decoding the profile
ERROR_NULL_PTR | -814 | A NULL pointer was passed
ERROR_NO_OVERLAY | -815 | The overlay does not exist
ERROR_OVERLAY_INDEX | -816 | Something is wrong with the overlay index
ERROR_CORRUPT_PROFILE | -817 | The ICC profile was invalid
ERROR_LTSGM_MISSING | -818 | LTSGM DLL is missing
ERROR_DCR_FILTER_MISSING | -819 | LFDCR filter is needed to use this function
ERROR_KDC_FILTER_MISSING | -820 | LFKDC filter is needed to use this function
ERROR_DCS_FILTER_MISSING | -821 | LFDCS filter is needed to use this function
ERROR_LMC_FILTER_MISSING | -822 | LFLMC filter is needed to use this function
ERROR_ABC_FILTER_MISSING | -823 | LFABC (ABIC) filter is needed to use this function
ERROR_JB2_FILTER_MISSING | -824 | LFJB2 (JBIG2) filter is needed to use this function
ERROR_LTCLR_DLL_NOTLOADED | -900 | The LTCLR DLL is not loaded
ERROR_LTDLGRES_DLL_NOTLOADED | -901 | The LDLGRES DLL is not loaded
ERROR_LTDLG_COLOR_NOTINITIALIZE | -902 | You must initialize LTDLG using L_DlgInit
ERROR_IMAGE_SIZE | -910 | Image size not sufficient
ERROR_NO_MESSAGE | -911 | There is no message
ERROR_INV_PASSWORD | -912 | Invalid password
ERROR_TIFF_COMMAND_NOT_ALLOWED | -913 | The specified TIFF command is not allowed
ERROR_BAD_TIFF_TAG_VALUE | -914 | Bad TIFF Tag value
ERROR_NOT_MULTIPAGE_TIFF_FILE | -915 | Not Multi-Page TIFF file
ERROR_DELETE_TIFF_FILE_NOT_ALLOWED | -916 | Not allowed to delete the TIFF file
ERROR_COMPACT_ABORTED | -917 | The compact function was finished without copying all the pages.
ERROR_INV_COLORSPACE | -918 | Invalid color-space
ERROR_LTPRO_NOT_ENABLED | -930 | LEADTOOLS Pro Features are not enabled
ERROR_EPRINT_LOCKED | -1000 | ePrint is locked, Please execute a License Agreement
ERROR_OPT_ABORT | -1100 | Abort the optimization operation
ERROR_OPT_SKIPIMAGE | -1101 | Skip optimizing current image
ERROR_OPT_INVALID_INPUT_PATH | -1102 | Invalid input path
ERROR_OPT_INVALID_OUTPUT_PATH | -1103 | Invalid output path
ERROR_OPT_CANNOT_CREATE_OUTPUTPATH | -1104 | Cannot Create Output Directory
ERROR_ICC_UNKNOWN_TAG | -1150 | Unknown ICC profile Tag
ERROR_ICC_UNKNOWN_TYPE | -1151 | Unknown ICC profile Type
ERROR_ICC_UNKNOWN_TAG_AND_TYPE | -1152 | Unknown ICC profile Tag and Type
ERROR_INVALID_ICC_PROFILE | -1153 | Invalid ICC profile
ERROR_DOC_DLL_NOT_LOADED | -1200 | ScanSoft DLLs are not loaded
ERROR_DOC_INV_PAGE_INDEX | -1201 | Specified index is not corrected
ERROR_DOC_INV_FILLMETHOD | -1202 | Invalid fill method.
ERROR_DOC_INV_RECOG_MODULE | -1203 | Invalid recognition module
ERROR_DOC_INV_CHAR_FILTER | -1204 | Invalid character filter
ERROR_DOC_INV_ZONE_TYPE | -1205 | Invalid zone type
ERROR_DOC_INV_LANGID | -1206 | Invalid language Id
ERROR_DOC_INV_SPELL_LANGUAGE | -1207 | Invalid spell language
ERROR_DOC_INV_SECTION_ENUMERATION | -1208 | Invalid enumeration section
ERROR_DOC_INV_PAGE_COUNT | -1209 | Invalid page count
ERROR_DOC_ILLEGAL_CODE | -1210 | Illegal internal code as a parameter
ERROR_DOC_INV_PARAMETER | -1211 | Set parameter is not acceptable
ERROR_DOC_END_LIST_CODE_PAGES | -1212 | End of list of the available Code Pages
ERROR_DOC_LOAD_CODE_PAGE_FILE | -1213 | Error while loading the Code Page Definition file
ERROR_DOC_INV_BUFFER_SIZE | -1214 | The length of the exported code exceeds the buffer size
ERROR_DOC_INV_CHARACTER_CONVERSION | -1215 | Character conversion is not available for the given character
ERROR_DOC_INV_CHARACTER_LANGUAGE | -1216 | Conflict: The selected Code Page does not support some characters in the selected languages. There is no exact code in the Code Page for them
ERROR_DOC_INITIALIZE_CODE_PAGE | -1217 | Character Set and Code Pages module initialization error
ERROR_DOC_INITIALIZE_ENGINE | -1218 | OCR engine initialization error, or there is no appropriate license
ERROR_DOC_TERMINATE_ENGINE | -1219 | OCR engine termination error
ERROR_DOC_INITIALIZE_WARNING | -1220 | Module initialization warning
ERROR_DOC_PROCESS_USER_ABORT | -1221 | Application has aborted the current process
ERROR_DOC_FINISH_PROCESS | -1222 | Application has terminated the current recognition process without losing the recognized text
ERROR_DOC_MODULE_MISSING | -1223 | Module is not present
ERROR_DOC_MODULE_LOAD | -1224 | OS could not load a module
ERROR_DOC_MODULE_MISSING_ENTRY | -1225 | Missing entry in a module
ERROR_DOC_MODULE_INVALID | -1226 | Invalid module
ERROR_DOC_MODULE_INITIALIZE | -1227 | Module initialization error
ERROR_DOC_FEATURE_NOT_SUPPORTED | -1228 | The requested function is not available, or there is no appropriate license
ERROR_DOC_GENERAL | -1229 | General error in the engine
ERROR_DOC_GPF | -1230 | General Protection Fault in the engine
ERROR_DOC_NOT_SUPPORT_OS | -1231 | Not supported operational system
ERROR_DOC_INV_SETTING_FILE | -1232 | Syntax error in the specified engine Settings file
ERROR_DOC_INV_SETTING | -1233 | Invalid setting
ERROR_DOC_ENGINE_BUSY | -1234 | The engine is busy
ERROR_DOC_RECOGNITION_TIME_OUT | -1235 | Recognition process Time Out
ERROR_DOC_INV_IMAGE_MODULE_SETTING | -1236 | Internal error in image module
ERROR_DOC_NO_MEMORY | -1237 | Not enough memory during image processing
ERROR_DOC_INV_IMAGE_DIMENSIONS | -1238 | Invalid rectangle dimensions
ERROR_DOC_INV_IMAGE_RESOLUTION | -1239 | Non-supported resolution
ERROR_DOC_CANNOT_COMPRESS_IMAGE | -1240 | Cannot process compressed image
ERROR_DOC_BAD_BITMAP | -1241 | Invalid bitmap address
ERROR_DOC_NOT_SUPPORT_BPP | -1242 | Unsupported BitsPerPixel value
ERROR_DOC_INV_IMAGE_MODULE | -1243 | Internal error in image module
ERROR_DOC_INV_IMAGE_HANDLE | -1244 | Invalid image handle
ERROR_DOC_BUFFER_OVERFLOW | -1245 | Buffer overflow during processing the image
ERROR_DOC_ACCESS_DENIED | -1246 | Image operation denied
ERROR_DOC_NO_MORE_LINES | -1247 | No more lines in defined image area
ERROR_DOC_BAD_IMAGE_SIZE | -1248 | Non-supported image size
ERROR_DOC_BAD_ENGINE_MANAGER_MODULE | -1249 | Engine manager module error
ERROR_DOC_NO_RECOGNIZED_TEXT_AVAILABLE | -1250 | No recognized text available, either because the zone is empty or the required recognition module has not been initialized properly
ERROR_DOC_NO_SELECTED_RECOGNITION_MODULE | -1251 | There is no selected recognition module
ERROR_DOC_NO_ZONE | -1252 | There is no zone in the zone list
ERROR_DOC_INV_ZONE_INDEX | -1253 | Invalid zone index
ERROR_DOC_INV_ZONE_COORDINATES | -1254 | Invalid zone coordinates
ERROR_DOC_MOR_INITIALIZE_MODULE | -1255 | MOR recognition module initialization error
ERROR_DOC_MOR_BASE_FILE_NOT_FOUND | -1256 | MOR recognition module's knowledge base file not found
ERROR_DOC_MOR_BASE_FILE_CORRUPTED | -1257 | MOR recognition module's knowledge base file corrupted
ERROR_DOC_MOR_BASE_FILE_VERSION | -1258 | Incorrect knowledge base file version
ERROR_DOC_MOR_IMAGE_SIZE | -1259 | Size of image is too large
ERROR_DOC_MOR_FILE_CORRUPTED | -1260 | File is corrupted
ERROR_DOC_MOR_BAD_RECOG_MODULE | -1261 | Internal error in the MOR recognition module
ERROR_DOC_MOR_GPF_MODULE | -1262 | General Protection Fault in the MOR recognition module
ERROR_DOC_DOT_RECOGNITION | -1263 | Dot-matrix recognition error
ERROR_DOC_OMR_CHECKMARK_RECOGNITION | -1264 | Checkmark recognition error
ERROR_DOC_HNR_BASE_FILE__CORRUPTED | -1265 | HNR module's knowledge base file is corrupted
ERROR_DOC_HNR_PARAM_OUT_RANGE | -1266 | Parameter is out of valid range
ERROR_DOC_RER_MODULE | -1267 | Internal error in the RER module
ERROR_DOC_RER_BASE_FILE_NOT_FOUND | -1268 | RER module's knowledge base file not found
ERROR_DOC_RER_CHAR_SET_EMPTY | -1269 | Character Set is empty for the RER module
ERROR_DOC_RER_CHAR_SET_NOT_SUPPORTED | -1270 | The specified Character Set not fully supported by the RER recognition module
ERROR_DOC_RER_MODULE_NOT_FOUND | -1271 | RER specific file not found
ERROR_DOC_SPELL_NO_MEMORY | -1272 | Not enough memory for the SPL module
ERROR_DOC_SPELL_UNINITIALIZED | -1273 | Un-initialized spell object
ERROR_DOC_SPELL_FILE_OPEN | -1274 | Spell file open error
ERROR_DOC_SPELL_FILE_READ | -1275 | Spell file read error
ERROR_DOC_SPELL_USER_DICTIONARY_WRITE | -1276 | User dictionary write error
ERROR_DOC_SPELL_INV_FILE_FORMAT | -1277 | Invalid file format
ERROR_DOC_SPELL_INITIALIZE_MODULE | -1278 | Module initialization error
ERROR_DOC_SPELL_USER_DICTIONARY_CLOSE | -1279 | User dictionary close error
ERROR_DOC_SPELL_ILLEGAL_LANGUAGE_SETTING | -1280 | Illegal language setting
ERROR_DOC_SPELL_NO_MORE_ITEMS | -1281 | No more suggestions/items available
ERROR_DOC_SPELL_CHECK_ERROR | -1282 | Internal checking error
ERROR_DOC_SPELL_ITEM_ALREADY_EXIST | -1283 | Item already exists in the User dictionary
ERROR_DOC_SPELL_ITEM_NOT_EXIST | -1284 | Item doesn't exist in the User dictionary
ERROR_DOC_SPELL_ITEM_NOT_INSERTED | -1285 | Item wasn't inserted into the User dictionary
ERROR_DOC_SPELL_SECTION_NOT_EXIST | -1286 | Section does not exist in the User dictionary
ERROR_DOC_SPELL_BAD_SYNTEX | -1287 | Regular expression syntax error
ERROR_DOC_OUTPUT_NOT_INITIALIZED | -1288 | Output format conversion subsystem was not initialized
ERROR_DOC_OUTPUT_CONVERT_NOT_EXIST | -1289 | No more converters available
ERROR_DOC_OUTPUT_CONVERT_DLL_NOT_EXIST | -1290 | There is no converter DLL file
ERROR_DOC_OUTPUT_BAD_PARAMETER | -1291 | Wrong parameter or parameter not found
ERROR_DOC_OUTPUT_FILE_CORRUPTED | -1292 | TMP file is corrupted
ERROR_DOC_OUTPUT_FILE_NOT_FOUND | -1293 | TMP file not found
ERROR_DOC_OUTPUT_CREATE_FILE | -1294 | Cannot create TMP file
ERROR_DOC_OUTPUT_SEEK_FILE | -1295 | Cannot seek in TMP file
ERROR_DOC_OUTPUT_READ_FILE | -1296 | TMP file read error
ERROR_DOC_OUTPUT_WRITE_FILE | -1297 | TMP file write error
ERROR_DOC_OUTPUT_CLOSE_FILE | -1298 | Cannot close TMP file
ERROR_DOC_OUTPUT_LOAD_DLL | -1299 | Cannot load the DLL file
ERROR_DOC_OUTPUT_END_OF_FILE | -1300 | Internal error in ATMTXT module. (End-Of-File detected)
ERROR_DOC_OUTPUT_NO_MEMORY | -1301 | Not enough memory for ATMTXT/TMP module
ERROR_DOC_OUTPUT_IMAGE_NOT_AVAILABLE | -1302 | Image is not available for inserting into the output
ERROR_DOC_OUTPUT_NOT_REGISTER_INFO_ITEM | -1303 | Not enough memory to register an info item
ERROR_DOC_TXT_FILE_OPEN | -1304 | Output file open error
ERROR_DOC_TXT_FILE_READ | -1305 | Output file read error
ERROR_DOC_TXT_FILE_NOT_FOUND | -1306 | Output file not found
ERROR_DOC_TXT_FILE_WRITE | -1307 | Output file write error
ERROR_DOC_TXT_INV_COMMAND_SEQUENCE | -1308 | Invalid command sequence in the ICF file
ERROR_DOC_TXT_CREATE_FILE | -1309 | Cannot create the output file
ERROR_DOC_TXT_NO_MEMORY | -1310 | Not enough memory for ATMTXT/TXT module
ERROR_DOC_TXT_INV_DOCUMENT | -1311 | Invalid document type
ERROR_DOC_TXT_FILE_TOO_LARGE | -1312 | File too large
ERROR_DOC_TXT_WARNING_OUTPUT_FILE | -1313 | There was a WARNING during the output file conversion
ERROR_DOC_TXT_OPERATION_CANCELLED | -1314 | Operation cancelled.
ERROR_DOC_TXT_ILLEGAL_OPTION | -1315 | Illegal option specified
ERROR_DOC_TXT_ENCRYPTED_SOURCE | -1316 | Encrypted source
ERROR_DOC_TXT_SEEK_ERROR | -1317 | Output file seek error
ERROR_DOC_BRAILLE_BAD_INITIALIZATION | -1318 | Braille recognition module initialization error
ERROR_DOC_MATRIX_BAD_INITIALIZATION | -1319 | Matrix matching recognition module initialization error
ERROR_DOC_MTX_BAD_INITIALIZATION | -1320 | M/TEXT recognition module initialization error
ERROR_DOC_NON_IMPLEMENTED_FEATURE | -1321 | Non-implemented feature
ERROR_DOC_NOT_FOUND_ZONE | -1322 | couldn't find specific zone
ERROR_DOC_NO_SELECTED_ZONE | -1323 | No available selected zone
ERROR_DOC_EXPORT_PAGE | -1324 | can't export the specified page
ERROR_DOC_LOCK_PAGE | -1325 | can't lock the specified page
ERROR_DOC_ACTIVE_PAGE | -1326 | can't set the specified page to be activated.
ERROR_DOC_LOCKED | -1327 | The OCR document engine is locked
ERROR_DOC_OUTPUT_PDF_LOCKED | -1328 | Output PDF engine is locked.
ERROR_DOC_OMR_LOCKED | -1329 | OMR Options is locked
ERROR_DOC_ICR_LOCKED | -1330 | ICR Options is locked
ERROR_INV_VARIANT_TYPE | -1350 | Invalid Variant type
ERROR_INV_STRING | -1351 | Invalid string value
ERROR_INV_DISPATCH | -1352 | Invalid dispatch
ERROR_INV_FILTERNAME | -1353 | Invalid filter name
ERROR_SIGNED_DATA_NOT_SUPPORTED | -1360 | Signed image data not supported
ERROR_LMC_LOCKED | -1361 | LMC file format is locked
ERROR_JBIG2_LOCKED | -1362 | JBIG2 file format is locked


AnnAutoCursor property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | L_HCURSOR AnnAutoCursor[unsigned uIndex]
Delphi Syntax | AnnAutoCursor[uIndex: L_UINT]: L_HCURSOR
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets one of the cursors associated with automated annotations. Use the Error property to check for errors.

See Also

Elements: | AnnUserMode property, AnnAutoMenuEnable property, AnnAutoDrawEnable property, AnnSetForeColor method, AnnGetForeColor method, AnnSetBackColor method, AnnGetBackColor method, AnnCreate method, AnnDefine method, AnnDestroy method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method, AnnSetVisible method
Topics: | Annotations (Document/Medical only): Automation
 | Annotations (Document/Medical): Object Manipulation


AnnAutoDialogFontSize property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnAutoDialogFontSize
Delphi Syntax | AnnAutoDialogFontSize: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Contains the font size, in points, used to display the automation dialog boxes.

This property should be set when the font name is set. The font name can be set by calling AnnSetAutoText Method (ANNAUTOTEXT_DIALOG_FONT, "New font name").

This property may be used to convert the annotation automation dialogs to another language. For more information, refer to Converting Annotation Automation Dialogs to Other Languages.

See Also

Elements: | AnnSetAutoText method
Topics: | Annotations (Document/Medical only): Automation


AnnAutoDrawEnable property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnAutoDrawEnable
Delphi Syntax | AnnAutoDrawEnable:Boolean
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Enables or disables the default use of the left mouse button to draw an annotation object in design mode.

To implement the automated design mode for annotations, this property must be set to True, and the AnnUserMode property must be set to ANNUSERMODE_DESIGN.

Setting | Description
True | The left mouse button can be used to draw objects in design mode.
False | The automated functions of the left mouse button are disabled.

See Also

Elements | AnnAutoMenuEnable property, AnnUserMode property
Topics | Annotations (Document/Medical only): Automation
 | Displaying and Manipulating Annotation Objects


AnnAutoHilightPen property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnAutoHilightPen
Delphi Syntax | AnnAutoHilightPen: COLORREF
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets or sets the color of the pen that is used for highlighting.

Use this function to change the color of the pen that is used for highlighting and selecting. More specifically, this pen is used in the following situations:

In automated annotation design mode, after selecting ANY tool and clicking and dragging the mouse to draw an outline. The outline is displayed using the highlight pen.

In automated annotation design mode, after choosing the Select tool and clicking on an existing annotation object. When the mouse is down, the selected object is displayed using the highlight pen.

The highlighting is implemented by taking the "exclusive-or" (XOR) of the highlight pen color and the underlying image.

The default highlight pen has an RGB or TColor value of 0xFFFFFF (white). This color works well for most images. However, images that have many mid-range gray colors will not effectively show a highlight. To understand why this is so, consider an image that contains only the color gray 0x808080. The highlight color will be determined by

Highlight Color = (0xFFFFFF) XOR (0x808080)

= 0x7F7F7F

The highlight color (0x7F7F7F) (gray) and the underlying image color (0x808080) (gray) are almost the same color, and indistinguishable to the naked eye. In cases like this, the highlight will not be visible.

To avoid this, choose a different highlight pen color so that the XOR with the underlying color will give a result that is visibly different from the underlying color. A good choice is 0xC0C0C0 (silver). The XOR of 0xC0C0C0 (silver) with the (0x808080) (gray) is 0x404040 (another gray, but more visible).

To change the highlight color back to the default color after changing the highlight color, use the AnnAutoHilitePen property to change the color back to the TColor value of 0xFFFFFF.

Note that several of the automated mode annotation cursors are displayed using an XOR operation. These cursors will not be visible if an image has many mid-range values. To avoid this, define new cursors and use the AnnAutoCursor property.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements | AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method, AnnSetVisible method
Topics | Annotations (Document/Medical only): Automation
 | Annotations (Document/Medical): Object Manipulation


AnnAutomation property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::L_HANDLE AnnAutomation
Delphi Syntax | AnnAutomation: L_HANDLE
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Is the handle to the annotation automation object in the current window.

This object can be used with LEADTOOLS DLL functions to implement automation and to set default properties.

See Also

Elements: | AnnContainer property
Topics: | Annotations (Document/Medical only): Automation


AnnAutoMenuEnable property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnAutoMenuEnable
Delphi Syntax | AnnAutoMenuEnable: Boolean
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Enables or disables the pop-up menus that appear when you click the right mouse button on an annotation object.

Setting | Description
True | Enables the pop-up menus.
False | Disables the pop-up menus.

See Also

Elements: | AnnAutoDrawEnable property, AnnUserMode property
Topics: | Annotations (Document/Medical only): Automation


AnnAutoResize property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnAutoResize
Delphi Syntax | AnnAutoResize: Boolean
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only, persistent property, available at design time) Determines whether annotations are resized automatically when the bitmap is resized.

Setting | Description
True | Annotations are automatically resized any time the bitmap is resized.
False | Annotations keep their same size when the bitmap is resized.

The default is True.

See Also

Elements | AnnAutoRotate property, Size method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnAutoRotate property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnAutoRotate
Delphi Syntax | AnnAutoRotate: Boolean
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only, persistent property, available at design time) Determines whether annotations are rotated automatically when the bitmap is rotated.

Notes, hot spots, buttons, and audio clips cannot be rotated. These objects will move to new positions, but will retain their orientation.

Setting | Description
True | Annotations are automatically rotated any time the bitmap is rotated.
False | Annotations keep their same positions and orientation when the bitmap is rotated.

See Also

Elements | AnnRotate method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnBottomPreviousClip property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | Int AnnBottomPreviousClip
Delphi Syntax | AnnBottomPreviousClip: L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets the bottom boundary of the previous clip rectangle.

This property is updated by the AnnRestrictCursor method. Therefore, you must call the AnnRestrictCursor method before checking this property for the information.

See Also

Elements: | AnnRestrictCursor method, AnnTopPreviousClip property, AnnRightPreviousClip property, AnnLeftPreviousClip property
Topics: | Annotations: Object Manipulation


AnnBoundingRectHeight property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnBoundingRectHeight [L_HANDLE hObject]
Delphi Syntax | AnnBoundingRectHeight [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the height of the bounding rectangle of the specified annotation object. This is the rectangle in which the object is displayed. The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnRectHeight property, AnnRectLeft property, AnnBoundingRectLeft property, AnnRectTop property, AnnBoundingRectTop property, AnnRectWidth property, AnnBoundingRectWidth property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnBoundingRectLeft property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnBoundingRectLeft [L_HANDLE hObject]
Delphi Syntax | AnnBoundingRectLeft [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the left boundary of the bounding rectangle of the specified annotation object. This is the rectangle in which the object is displayed.

The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnRectHeight property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnBoundingRectTop property, AnnRectWidth property, AnnBoundingRectWidth property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnBoundingRectTop property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnBoundingRectTop [L_HANDLE hObject]
Delphi Syntax | AnnBoundingRectTop [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the top boundary of the bounding rectangle of the specified annotation object. This is the rectangle in which the object is displayed.

The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnRectHeight property, AnnBoundingRectHeight property, AnnRectLeft property, AnnBoundingRectLeft property, AnnRectTop property, AnnRectWidth property, AnnBoundingRectWidth property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnBoundingRectWidth property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnBoundingRectWidth [L_HANDLE hObject]
Delphi Syntax | AnnBoundingRectWidth [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the width of the bounding rectangle of the specified annotation object. This is the rectangle in which the object is displayed.

The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnRectHeight property, AnnBoundingRectHeight property, AnnRectLeft property, AnnBoundingRectLeft property, AnnRectTop property, AnnBoundingRectTop property, AnnRectWidth property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnContainer property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::L_HANDLE AnnContainer
Delphi Syntax | AnnContainer: L_HANDLE
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) The handle to the annotation container for objects in the current window.

This is the root container, which may be needed when using LEADTOOLS DLL functions for annotations.

The value of this property is 0 if the Annotation Control has no annotations. Therefore, it can be used to check for the existence of annotations.

See Also

Elements | AnnAutomation property
Topics | Annotations (Document/Medical only): Automation
 | Using Rulers in Annotation Objects
 | Displaying and Manipulating Annotation Objects


AnnContainerPointX property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | double AnnContainerPointX[unsigned uIndex]
Delphi Syntax | AnnContainerPointX [uIndex: L_UINT]: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets an array of X coordinates for one or more points to be converted. These values are in container coordinates. Container coordinates are typically the same dimensions as the underlying bitmap, and are independent of zooming and scrolling.

You specify the point index in uIndex in order to allocate adequate memory for the AnnContainerPointX property. For more information on the conversion process, refer to AnnConvert method.

See Also

Elements | AnnConvert method, ClientPointX property, ClientPointY property, AnnContainerPointY property, PointsCount property
Topics | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnContainerPointY property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | Double AnnContainerPointY[unsigned uIndex]
Delphi Syntax | AnnContainerPointY [uIndex: L_UINT]: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets an array of Y coordinates for one or more points to be converted. These values are in container coordinates. Container coordinates are typically the same dimensions as the underlying bitmap, and are independent of zooming and scrolling.

You specify the point index in uIndex in order to allocate adequate memory for the AnnContainerPointY property. For more information on the conversion process, refer to AnnConvert method.

See Also

Elements | AnnConvert method, ClientPointX property, ClientPointY property, AnnContainerPointX property, PointsCount property
Topics | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnDataPath property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | WideString AnnDataPath
Delphi Syntax | AnnDataPath: WideString
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only, persistent property, available at design time) Loads the specified annotation file asynchronously. The value can be a local pathname or an Internet URL.

See Also

Elements: | BitmapDataPath property
Topics: | Annotations (Document/Medical only): Input and Output


AnnDescription property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | AnsiString AnnDescription
Delphi Syntax | AnnDescription: String
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a character string that describes the token. This string appears on the text token table menu. For example, the string for token #0 in the default text token table is "Two Digit Month". The text token table menu is displayed by:

1. | Right-clicking on a Button, Note, PushPin, Rubber Stamp, Stamp, Text, or Text Pointer annotation object.
2. | Select Text option in menu that appears.
3. | Click the Insert Token button. A menu for the existing text token table appears, as shown in the following figure:
4. | Select the token to be inserted.

See Also

Elements: | OnAnnEnumerateTextTokenTable event, AnnToken property, AnnTokenString property, AnnTokenType property, AnnInsertTextTokenTable method, AnnDeleteTextTokenTable method, AnnClearTextTokenTable method, AnnEnableEnumerateTextTokenTableEvent property, AnnEnumerateTextToken method
Topics: | Annotations: Automation


AnnDistance property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | double AnnDistance[unsigned uIndex]
Delphi Syntax | AnnDistance [uIndex: L_UINT]: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets an array of values that represents the length of each ruler contained in the annotation object specified in the AnnGetDistance2 method.

To determine the unit of measure for each ruler, check the AnnRulerUnit property and the AnnSmartUnit property.

If the entry in AnnRulerUnit (i) is ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the actual unit of measure can be found in AnnSmartUnit(i). If AnnRulerUnit (i) is not ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then both AnnRulerUnit (i) and AnnSmartUnit (i) contain the unit of measure.

See Also

Elements: | AnnGetDistance2 method, AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnRulerUnit property, AnnSmartUnit property, AnnDistanceCount property
Topics: | Annotations: Object Manipulation


AnnDistanceCount property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnDistanceCount
Delphi Syntax | AnnDistanceCount: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the total number of rulers that make up the object. This property is updated by the AnnGetDistance2 method.

See Also

Elements: | AnnGetDistance2 method, AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnDistance property, AnnRulerUnit property, AnnSmartUnit property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects


AnnEnableAdjust property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnEnableAdjust
Delphi Syntax | AnnEnableAdjust: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that specifies whether the annotation will be automatically adjusted when changing the fixed states. Possible values are:

Setting | Description
TRUE | The annotation object is automatically adjusted when changing the fixed state.
FALSE | The annotation object is not automatically adjusted when changing the fixed state.

Setting AnnEnableAdjust to TRUE automatically adjusts the size and location of the object before fixing or un-fixing the annotation object. The result is the annotation object will not jump around as you change its fixed state.

If you set EnableAdjust to FALSE, the annotation object can move or resize if the annotation container has scalar values other than 1, or offset values other than 0.

See Also

Elements: | AnnFixed property
Topics: | Annotations: Object Manipulation


AnnEnableEnumerateHandlesEvent property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnEnableEnumerateHandlesEvent
Delphi Syntax | AnnEnableEnumerateHandlesEvent: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Enables or disables the generation of the OnAnnEnumerateHandles event. Possible values are:

Setting | Description
TRUE | Generate OnAnnEnumerateHandles events.
FALSE | Don't generate OnAnnEnumerateHandles events.

To discontinue generating OnAnnEnumerateHandles event, set the AnnEnableEnumerateHandlesEvent property to FALSE.

See Also

Elements: | AnnEnumerateHandles method
Topics: | Annotations: Object Manipulation


AnnEnableEnumerateTextTokenTableEvent property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnEnableEnumerateTextTokenTableEvent
Delphi Syntax | AnnEnableEnumerateTextTokenTableEvent: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Enables or disables the generation of the OnAnnEnumerateTextTokenTable Event. Possible values are:

Setting | Description
TRUE | Generate OnEnumerateTextTokenTable events.
FALSE | Don't generate OnEnumerateTextTokenTable events.

To discontinue generating EnumerateTextTokenTable event, set the AnnEnableEnumerateTextTokenTableEvent to FALSE.

See Also

Elements: | OnAnnEnumerateTextTokenTable event, AnnEnumerateTextToken method
Topics: | Annotations: Object Manipulation


AnnEncryptOptions property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnEncryptOptions* AnnEncryptOptions
Delphi Syntax | AnnEncryptOptions: TannEncryptOptions
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the annotation encryption options.

This property is updated with the annotation encryption options when the AnnGetEncryptOptions method is called. To set annotation encryption options set this property with the desired encryption options, and then call the AnnSetEncryptOptions method.

See Also

Elements: | AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnNameOptions), Flags property (TAnnNameOptions), Key property (TAnnNameOptions), NeverEncrypted property (TAnnNameOptions), SaveDecryptorKey property (TAnnNameOptions), SaveEncryptorKey property (TAnnNameOptions), ClearDecryptorKey property (TAnnNameOptions), ClearEncryptorKey property (TAnnNameOptions), EncryptBitmap property (TAnnNameOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


AnnFixed property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnFixed[HANNOBJECT hObject]
Delphi Syntax | AnnFixed [hObject: HANNOBJECT]: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the specified annotation object is fixed. Possible values are:

Value | Meaning
TRUE | The annotation object is fixed.
FALSE | The annotation object is not fixed.

The following annotations cannot be fixed:

ANNOBJECT_CONTAINER

ANNOBJECT_REDACT

ANNOBJECT_ENCRYPT

You must set the AnnFlags property before setting this property. Possible values for the Flags property, when used with this property, are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property, AnnEnableAdjust property
Topics: | Annotations: Object Manipulation


AnnFlags property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnFlags
Delphi Syntax | AnnFlags: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates which objects to process. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR (+). Possible values are:

Value | Meaning
0 | Process only the specified object.
ANNFLAG_SELECTED | [$0001] Process only objects that have the selected property set to TRUE. For setting the selected property, use the AnnSetSelected Method.
ANNFLAG_NOTCONTAINER | [$0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.
ANNFLAG_NOTTHIS | [$0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not.
ANNFLAG_RECURSE | [$0008] Process objects within a container, and within any subcontainers, down to any level.
ANNFLAG_NOINVALIDATE | [$0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages.
ANNFLAG_CHECKMENU | [$0020] Process objects only if ANNAUTOTEXT_MENU_XXX menu item has been selected.

See Also

Elements: | AnnTextExpandTokens property, AnnTicMarkLength property, AnnTextAlign property, AnnTextRotate property, AnnTextPointerFixed property, AnnSetNameOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnSetPointOptions method, AnnRestrictToContainer property, AnnFixed property, AnnIsFixedRect method, AnnPopFixedState method, AnnPushFixedState method, AnnRTFText property
Topics: | Annotations: Object Manipulation


AnnHandle property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnHandle* AnnHandle
Delphi Syntax | AnnHandle: TAnnHandle
Overview | Refer to Implementing Annotations.

Remarks

Access the user-defined annotation handle.

This property is updated with the user handle information when the AnnGetUserHandle method is called.

To add a new user handle to an annotation object, set this property with the desired handle information, and then call the AnnAddUserHandle method.

To change an existing user handle, call the AnnGetUserHandle method to get the current handle information. Set the desired values in this property and then call the AnnChangeUserHandle method.

A user handle can be deleted using the AnnDeleteUserHandle method.

See Also

Elements: | AnnGetUserHandle method, AnnAddUserHandle method, AnnChangeUserHandle method, AnnDeleteUserHandle method, ID property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property(TAnnHandleInfo), PenColor property(TAnnHandleInfo), FillColor property(TAnnHandleInfo), Shape property(TAnnHandleInfo), Cursor property(TAnnHandleInfo)
Topics: | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnHandleID property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnHandleID
Delphi Syntax | AnnHandleID: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a unique ID associated with the user handle. The ID can be set with the AnnAddUserHandle, AnnChangeUserHandle, and AnnEnumerateHandles methods.

See Also

Elements: | AnnHandleIndex property, AnnPositionResult property, AnnObjectHitHandle property, AnnHitTestExt method
Topics: | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnHandleIndex property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnHandleIndex
Delphi Syntax | AnnHandleIndex: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the index of a handle. This is the zero-based index. This property is valid only if the AnnPositionResult property is updated with either ANNHIT_HANDLE or ANNHIT_USER_HANDLE. The default handles and the user handles are maintained internally as separate arrays of handles. This means that there is both a default handle "0" and a user handle "0".

See Also

Elements: | AnnHandleID property, AnnPositionResult property, AnnObjectHitHandle property, AnnHitTestExt method
Topics: | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnHyperlinkMenuEnable property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnHyperlinkMenuEnable
Delphi Syntax | AnnHyperlinkMenuEnable: Boolean
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) (Persistent property, available at design time) Enables or disables a hyperlink menu item provided for automated annotations. If AnnHyperlinkMenuEnable is True, then the menu provided for automated annotations will contain an extra menu item when the right mouse button is clicked. If the user clicks on the extra menu item, the Control will send an OnAnnHyperlinkMenu event.

See Also

Elements: | OnAnnHyperlinkMenu event, OnAnnHyperlink event
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


AnnInfoFormat property (Main Control)

AnnInfoFormat property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnInfoFormat
Delphi Syntax | AnnInfoFormat: Integer
Overview | Refer to Annotation Files.

Remarks

(Read only) This property is updated with the annotation file type. Possible values are:

Value | Meaning
ANNFMT_NATIVE | LEAD text-based format for annotations.
ANNFMT_WMF | Windows WMF format.
ANNFMT_ENCODED | LEAD binary format. This file size is smaller and is upward compatible. It also provides better security.

Use the AnnFileInfo method, or the AnnFileInfoMemory method to update this property.

See Also

Elements: | AnnInfoVersion property, AnnInfoTotalPages property, AnnFileInfo method, AnnFileInfoMemory method, AnnLoadMemory method, AnnLoad method
Topics: | Annotations (Document/Medical only): Input and Output


AnnInfoTotalPages property (Main Control)

AnnInfoTotalPages property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnInfoTotalPages
Delphi Syntax | AnnInfoTotalPages: Integer
Overview | Refer to Annotation Files.

Remarks

(Read only) This property is updated with the total number of pages in the annotation file.

Use the AnnFileInfo method, or the AnnFileInfoMemory method to update this property.

See Also

Elements | InfoColorSpace property, AnnInfoVersion property, AnnInfoFormat property, AnnFileInfo method, AnnFileInfoMemory method, AnnLoadMemory method, AnnLoad method
Topics | Annotations (Document/Medical only): Input and Output


AnnInfoVersion property (Main Control)

AnnInfoVersion property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnInfoVersion
Delphi Syntax | AnnInfoVersion: Integer
Overview | Refer to Annotation Files.

Remarks

(Read only) This property is updated with the version of the annotation file. If ‘12’ is returned, this refers to version 12 or earlier (which could not be multi-page). There is support for multi-page annotation files beginning with version 13.

Use the AnnFileInfo method, or the AnnFileInfoMemory method to update this property.

See Also

Elements: | AnnInfoFormat property, AnnInfoTotalPages property, AnnFileInfo method, AnnFileInfoMemory method, AnnLoadMemory method, AnnLoad method
Topics: | Annotations (Document/Medical only): Input and Output


AnnLeftPreviousClip property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnLeftPreviousClip
Delphi Syntax | AnnLeftPreviousClip: L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the left boundary of the previous clip rectangle.

This property is updated by the AnnRestrictCursor method. Therefore, you must call the AnnRestrictCursor method before checking this property for the information.

See Also

Elements: | AnnRestrictCursor method, AnnTopPreviousClip property, AnnRightPreviousClip property, AnnBottomPreviousClip property
Topics: | Annotations: Object Manipulation


AnnNameBoundingRectHeight property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnNameBoundingRectHeight [L_HANDLE hObject]
Delphi Syntax | AnnNameBoundingRectHeight [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the width of the bounding rectangle of the name of the specified annotation object. This is the rectangle in which the object name is displayed.

The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnNameBoundingRectLeft property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnNameBoundingRectLeft [L_HANDLE hObject]
Delphi Syntax | AnnNameBoundingRectLeft [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the left boundary of the bounding rectangle of the name of the specified annotation object. This is the rectangle in which the object name is displayed.

The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnNameBoundingRectTop property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnNameBoundingRectTop [L_HANDLE hObject]
Delphi Syntax | AnnNameBoundingRectTop [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the top boundary of the bounding rectangle of the name of the specified annotation object. This is the rectangle in which the object name is displayed.

The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnNameBoundingRectWidth property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnNameBoundingRectWidth [L_HANDLE hObject]
Delphi Syntax | AnnNameBoundingRectWidth [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read only) (Document/Medical only) Gets the width of the bounding rectangle of the name of the specified annotation object. This is the rectangle in which the object name is displayed.

The bounding rectangle is different from the defining rectangle as follows:

The defining rectangle intersects the outermost points that define the object. If a line is more than one pixel wide, its defining points are in the middle of the line. Refer to the AnnRectXXX properties.

The bounding rectangle accounts for line width and is used as the rectangle to be invalidated when displaying an object. If the line width is an even number, the bounding rectangle is enlarged slightly to allow for variations in how the center of the line is defined on different systems.

Half the width of an object's outer line is outside its defining rectangle, as shown in the following diagram:

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnNameOptions property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnNameOptions* AnnNameOptions
Delphi Syntax | AnnNameOptions: TAnnNameOptions
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the annotation name options.

This property is updated with the annotation name options when the AnnGetNameOptions method is called. To set annotation name options set the TAnnNameOptions properties with the desired name options, and then call the AnnSetNameOptions method.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions)
Topics: | Annotations:Object Manipulation


AnnNameRectHeight property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnNameRectHeight [L_HANDLE hObject]
Delphi Syntax | AnnNameRectHeight [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) (Document/Medical only) Contains the height of the name of the specified annotation object.

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnNameRectLeft property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnNameRectLeft[L_HANDLE hObject]
Delphi Syntax | AnnNameRectLeft[hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) (Document/Medical only) Contains the left boundary of the name of the specified annotation object.

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnNameRectTop property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | Int AnnNameRectTop [L_HANDLE hObject]
Delphi Syntax | AnnNameRectTop [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) (Document/Medical only) Contains the top boundary of the name of the specified annotation object.

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnNameRectWidth property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | Int AnnNameRectWidth [L_HANDLE hObject]
Delphi Syntax | AnnNameRectWidth [hObject: L_HANDLE]: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) (Document/Medical only) Contains the width of the name of the specified annotation object.

See Also

Elements: | AnnNameBoundingRectLeft property, AnnNameBoundingRectTop property, AnnNameBoundingRectWidth property, AnnNameBoundingRectHeight property, AnnNameRectLeft property, AnnNameRectTop property, AnnNameRectWidth property, AnnNameRectHeight property, AnnBoundingRectLeft property, AnnBoundingRectTop property, AnnBoundingRectWidth property, AnnBoundingRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnRectHeight property
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnObjectHitHandle property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | HANNOBJECT AnnObjectHitHandle
Delphi Syntax | AnnObjectHitHandle: HANNOBJECT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets the handle to the annotation object that was found at the point specified for the AnnHitTestExt method.

See Also

Elements: | AnnHandleIndex property, AnnHandleID property, AnnPositionResult property, AnnHitTestExt method
Topics: | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnPasteReady property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnPasteReady
Delphi Syntax | AnnPasteReady: Boolean
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Indicates whether the Windows clipboard contains annotation data that can be pasted into the LEADAnn Control. Possible values are:

Value | Meaning
True | The clipboard contains annotations that can be pasted.
False | The clipboard does not contain annotations that can be pasted.

See Also

Elements | AnnCut method, AnnPaste method, AnnPasteReady property, AnnRemove method, AnnInsert method, AnnCopy method
Topics | Annotations (Document/Medical only): Using the Clipboard
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Using Rulers in Annotation Objects


AnnPointOptions property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnPointOptions* AnnPointOptions
Delphi Syntax | AnnPointOptions: TAnnPointOptions
Overview | Refer to Implementing Annotations.

Remarks

Gets or set the annotation point options.

This property is updated with the annotation point options when the AnnGetPointOptions method is called. To set annotation point options set this property with the desired point options and then call the AnnSetPointOptions method.

See Also

Elements: | AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TAnnPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


AnnPositionResult property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnPositionResult
Delphi Syntax | AnnPositionResult: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets a value that represents the position on the annotation object that was found at the point specified for the AnnHitTestExt method. Possible values are:

ANNHIT_NONE [0]

ANNHIT_BODY [1]

ANNHIT_HANDLE [2]

ANNHIT_NAME [3]

ANNHIT_USER_HANDLE [4]

If PositionResult is updated with ANNHIT_HANDLE or ANNHIT_USER_HANDLE the AnnHandleIndex property and the AnnHandleID property will be updated with extra information about the handle.

See Also

Elements | AnnHandleIndex property, AnnHandleID property, AnnObjectHitHandle property, AnnHitTestExt method
Topics | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnPredefinedBitmap property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TBitmapHandle AnnPredefinedBitmap[int nType]
Delphi Syntax | AnnPredefinedBitmap [nType: L_INT ]: TBitmapHandle
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a copy of the specified predefined bitmap, used for the annotation Point object (ANNOBJECT_POINT).

See Also

Topics: | Annotations: Object Manipulation
 | Using Annotation Object Bitmaps


AnnRectHeight property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | float AnnRectHeight[LEADTyp::L_HANDLE hObject]
Delphi Syntax | AnnRectHeight[hObject: L_HANDLE]: Single
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Contains the height of the specified annotation object. This value is in pixels.

This property lets you resize an annotation object.

Point objects cannot be resized.

Objects with a height of zero (horizontal lines or pointers, or freehand objects for which all points are on a horizontal line) cannot have their height changed.

See Also

Elements: | AnnRectLeft property. AnnRectTop property, AnnRectWidth property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnRectLeft property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | float AnnRectLeft[LEADTyp::L_HANDLE hObject]
Delphi Syntax | AnnRectLeft[hObject: L_HANDLE]: Single
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Contains the left boundary for the specified annotation object. This value is in pixels.

This property lets you reposition an annotation object.

See Also

Elements: | AnnRectHeight property. AnnRectTop property, AnnRectWidth property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnRectTop property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | float AnnRectTop[LEADTyp::L_HANDLE hObject]
Delphi Syntax | AnnRectTop[hObject: L_HANDLE]: Single
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Contains the top boundary for the specified annotation object. This value is in pixels.

This property lets you reposition an annotation object.

See Also

Elements: | AnnRectHeight property. AnnRectLeft property, AnnRectWidth property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnRectWidth property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | float AnnRectWidth[LEADTyp::L_HANDLE hObject]
Delphi Syntax | AnnRectWidth[hObject: L_HANDLE]: Single
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Contains the width of the specified annotation object. This value is in pixels.

This property lets you resize an annotation object.

Point objects cannot be resized.

Objects with a width of zero (vertical lines or pointers, or freehand objects for which all points are on a vertical line) cannot have their width changed.

See Also

Elements: | AnnRectHeight property. AnnRectLeft property, AnnRectTop property
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnRestrictToContainer property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnRestrictToContainer[HANNOBJECT hObject]
Delphi Syntax | AnnRestrictToContainer [hObject: HANNOBJECT ]: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the specified annotation object(s) is (are) restricted to the container. Possible values are:

Setting | Description
TRUE | Restrict the object to the container.
FALSE | Do not restrict the object to the container.

If an object is restricted to the container, then no part of that object can be moved outside of the container using automation.

You must set the AnnFlags property before setting this property. Possible values for the AnnFlags property, when used with this property, are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property, AnnHitTestExt method, AnnRotateAngle property
Topics: | Annotations: Object Manipulation


AnnRightPreviousClip property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnRightPreviousClip
Delphi Syntax | AnnRightPreviousClip: L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets the right boundary of the previous clip rectangle.

This property is updated by the AnnRestrictCursor method. Therefore, you must call the AnnRestrictCursor method before checking this property for the information.

See Also

Elements: | AnnRestrictCursor method, AnnLeftPreviousClip property, AnnTopPreviousClip property, AnnBottomPreviousClip property
Topics: | Annotations: Object Manipulation


AnnRotateAngle property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | double AnnRotateAngle[HANNOBJECT hObject]
Delphi Syntax | AnnRotateAngle [hObject: HANNOBJECT]: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the rotation angle for an annotation object.

The angle is in radians, and uses the following convention.

The possible range of rotate values is (-Pi) ... (Pi)

A rotation in the clockwise direction is considered a positive rotation.

A rotation in the counter-clockwise direction is considered a negative rotation.

For example, if a rectangle is rotated 90 degrees in the counter clockwise direction, this property will get (-PI/2) for the rotation angle. If a rectangle is rotated 90 degrees in the clockwise direction, this property will get PI/2 for the rotation angle. If a rectangle is rotated 270 degrees in the counter clockwise direction, this is equivalent to 90 degrees in the clockwise direction so the rotation value returned is PI/2.

This property is only valid for the following annotation object types:

ANNOBJECT_POINTER

ANNOBJECT_LINE

ANNOBJECT_RULER

ANNOBJECT_AUDIO

ANNOBJECT_BUTTON

ANNOBJECT_ELLIPSE

ANNOBJECT_HILITE

ANNOBJECT_HOTSPOT

ANNOBJECT_NOTE

ANNOBJECT_RECT

ANNOBJECT_REDACT

ANNOBJECT_STAMP

ANNOBJECT_TEXT

ANNOBJECT_VIDEO

ANNOBJECT_PUSHPIN

ANNOBJECT_ENCRYPT

See Also

Elements: | AnnHitTestExt method, AnnRestrictToContainer property
Topics: | Annotations: Object Manipulation


AnnRTFText property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | AnsiString AnnRTFText[HANNOBJECT hObject][unsigned uFormat]
Delphi Syntax | AnnRTFText [hObject: HANNOBJECT; uFormat: L_UINT]: String
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the text (unformatted text or rich text) of an ANNOBJECT_RTF or ANNOBJECT_AUTOMATION annotation object.

You must set the AnnFlags property before setting this property. Possible values for the AnnFlags Property, when used with this property, are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property, AnnGetText method, AnnSetText method, AnnGetAutoText method, AnnRTFTextLength property, AnnSetAutoText method
Topics: | Annotations: Object Manipulation


AnnRTFTextLength property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnRTFTextLength
Delphi Syntax | AnnRTFTextLength: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets the text length of an ANNOBJECT_RTF or ANNOBJECT_AUTOMATION annotation object.

See Also

Elements: | AnnRTFText property, AnnGetText method, AnnSetText method, AnnGetAutoText method, AnnSetAutoText method
Topics: | Annotations: Object Manipulation


AnnRulerUnit property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnRulerUnit[unsigned uIndex]
Delphi Syntax | AnnRulerUnit [uIndex: L_UINT]: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets an array of values that represents the unit of measure for each ruler length in the AnnDistance property. This property is updated by the AnnGetDistance2 method. Possible values are:

ANNUNIT_INCHES | 0
ANNUNIT_FEET | 1
ANNUNIT_YARDS | 2
ANNUNIT_MICROMETERS | 3
ANNUNIT_MILLIMETERS | 4
ANNUNIT_CENTIMETERS | 5
ANNUNIT_METERS | 6
ANNUNIT_TWIPS | 7
ANNUNIT_POINTS | 8
ANNUNIT_PIXELS | 9
ANNUNIT_SMART_METRIC | 10
ANNUNIT_SMART_ENGLISH | 11

If the entry in AnnRulerUnit (i) is ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the actual unit of measure for the ruler length in AnnDistance (i) can be found in AnnSmartUnit (i). If AnnRulerUnit (i) is not ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then both AnnRulerUnit (i) and AnnSmartUnit (i) contain the unit of measure.

See Also

Elements: | AnnGetDistance2 method, AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnDistance property, AnnSmartUnit property, AnnDistanceCount property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects


AnnShowLockedIcon property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnShowLockedIcon
Delphi Syntax | AnnShowLockedIcon: Boolean
Overview | Refer to Implementing Annotation Security.

Remarks

(Document/Medical only) (Persistent property, available at design time) Indicates how locked objects should be drawn. If this property is True, then all locked objects are drawn with a padlock icon on top. If this property is False, the locked objects are drawn the same way as the unlocked objects.

See Also

Elements: | AnnLock method, AnnUnlock method
Topics: | Annotations (Document/Medical only): Annotation Security


AnnSmartUnit property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnSmartUnit[unsigned uIndex]
Delphi Syntax | AnnSmartUnit [uIndex: L_UINT]: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets an array of values that represents the unit of measure for each ruler length in the AnnDistance property. This property is updated by the AnnGetDistance2 method. Possible values are:

ANNUNIT_INCHES | 0
ANNUNIT_FEET | 1
ANNUNIT_YARDS | 2
ANNUNIT_MICROMETERS | 3
ANNUNIT_MILLIMETERS | 4
ANNUNIT_CENTIMETERS | 5
ANNUNIT_METERS | 6
ANNUNIT_TWIPS | 7
ANNUNIT_POINTS | 8
ANNUNIT_PIXELS | 9

Please note that if AnnRulerUnit (i) is ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the actual unit of measure for the ruler length in AnnDistance (i) can be found in AnnSmartUnit (i). If AnnRulerUnit (i) is not ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then both AnnRulerUnit (i) and AnnSmartUnit (i) contain the unit of measure.

A "smart unit" is a unit that can be automatically promoted to the next higher unit.

For example, suppose you have a ruler that is 13 inches long. If the units of the ruler are ANNUNIT_INCHES, then the length is 13. However, if the units of the ruler are ANNUNIT_SMART_ENGLISH, then the length of the ruler is automatically promoted to feet. The length in this case would be 1.0833 feet.

See Also

Elements: | AnnGetDistance2 method, AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnDistance property, AnnRulerUnit property, AnnDistanceCount property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects


AnnTextAlign property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnTextAlign[HANNOBJECT hObject]
Delphi Syntax | AnnTextAlign[hObject: HANNOBJECT]: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the text alignment of the specified annotation. Possible values are:

Value | Meaning
TEXT_ALIGN_LEFT | [1] Align text to left.
TEXT_ALIGN_CENTER | [2] Center the text.
TEXT_ALIGN_RIGHT | [3] Align text to the right.

This property is valid only for the following annotation objects:

ANNOBJECT_AUTOMATION

ANNOBJECT_NOTE

ANNOBJECT_TEXT

ANNOBJECT_TEXTPOINTER

You must set the AnnFlags property before setting this property. Possible values for the Flags property for this property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property
Topics: | Annotations: Object Manipulation


AnnTextExpandTokens property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnTextExpandTokens[HANNOBJECT hObject]
Delphi Syntax | AnnTextExpandTokens[hObject: HANNOBJECT]: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the annotation object's text tokens will expand. Possible values are:

Setting | Description
TRUE | Text tokens will be expanded for this object.
FALSE | Text tokens will not be expanded for this object.

This property is valid only for the following annotation objects:

ANNOBJECT_AUTOMATION

ANNOBJECT_BUTTON

ANNOBJECT_NOTE

ANNOBJECT_PUSHPIN

ANNOBJECT_STAMP

ANNOBJECT_TEXT

ANNOBJECT_TEXTPOINTER

Getting or setting this property for an annotation object other than ones listed above will set an error in the VCL Error and Error properties.

If this property is TRUE, then all tokens will be expanded.

For example, if you have an ANNOBJECT_BUTTON object that will expand text tokens, and #D is defined to be the current day of the week (ANNTOKEN_DATE_DAY_OF_WEEK), then entering #D for the text of this button will cause it to display the current day of the week when in design or run mode.

You must set the AnnFlags property before setting this property. Possible values for the Flags property, when used with this property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property, AnnClearTextTokenTable method, AnnDeleteTextTokenTable method, AnnEnumerateTextToken method, AnnInsertTextTokenTable method
Topics: | Annotations: Object Manipulation


AnnTextPointerFixed property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnTextPointerFixed[HANNOBJECT hObject]
Delphi Syntax | AnnTextPointerFixed[hObject: HANNOBJECT]: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the pointer of an ANNOBJECT_TEXTPOINTER object is fixed. Possible values are:

Setting | Description
TRUE | The pointer of the ANNOBJECT_TEXTPOINTER object is fixed.
FALSE | The pointer of the ANNOBJECT_TEXTPOINTER moves with the object.

If this property is updated with TRUE, the text pointer of the object is fixed. When the text pointer is fixed, the location that the text pointer points to does not change when moving the object (either programatically or through automation).

If this property is updated with FALSE, the text pointer of the object is not fixed. This means that when the object is moved, the location the text pointer points to moves along with the object.

Getting or setting this property for an object other an ANNOBJECT_TEXTPOINTER object will result in an error.

You must set the AnnFlags property before setting this property. Possible values for Flags Property, when used with this property, are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property
Topics: | Annotations: Object Manipulation


AnnTextRotate property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnTextRotate[HANNOBJECT hObject]
Delphi Syntax | AnnTextRotate[hObject: HANNOBJECT]: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the text of an annotation object is rotated, and if so, then by how many degrees. Possible values are:

Value | Meaning
TEX_TROTATE_0 | [0] Do not rotate the text.
TEX_TROTATE_90 | [90] The text is rotated 90 degrees counter clockwise.
TEX_TROTATE_180 | [180] The text is rotated 180 degrees counter clockwise.
TEX_TROTATE_270 | [270] The text is rotated 270 degrees counter clockwise.

This property is valid only for the following annotation objects:

ANNOBJECT_AUTOMATION

ANNOBJECT_NOTE

ANNOBJECT_TEXTPOINTER

You must set the AnnFlags property before setting this property. Possible values for the Flags property when using this property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property
Topics: | Annotations: Object Manipulation


AnnTicMarkLength property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | double AnnTicMarkLength[HANNOBJECT hObject]
Delphi Syntax | AnnTicMarkLength [hObject: HANNOBJECT ]: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets and sets the length of the tic mark of the specified annotation object, if hObject specifies an ANNOBJECT_RULER or an ANNOBJECT_POLYRULER object. The tic marks are the perpendicular lines that measure the units.

The length of the tic mark is expressed in pixels, not in points. The length is for the whole line, not just from the intersection point with the ruler to the end point of the tic mark - it is from one end of the tic mark to the other end of the tic mark.

Note that a ruler can have tic marks of different lengths. For example, the ruler in the figure below has tic marks with several different lengths. In this case, this property is updated with the length of the longest tic mark.

You must set the AnnFlags property before setting this property. Possible values for the Flags property for this property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnToken property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | char AnnToken
Delphi Syntax | AnnToken: Char
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a character representing the token. This can be ANY ASCII character EXCEPT ‘#’, because the token ## is reserved to display the # character.

See Also

Elements: | AnnDescription property, AnnTokenString property, AnnTokenType property, AnnInsertTextTokenTable method, AnnDeleteTextTokenTable method, AnnClearTextTokenTable method, AnnEnableEnumerateTextTokenTableEvent property, AnnEnumerateTextToken method, OnAnnEnumerateTextTokenTable event
Topics: | Annotations: Automation


AnnTokenString property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | AnsiString AnnTokenString
Delphi Syntax | AnnTokenString: String
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a character string that contains any combination of existing token strings, or any new string.

This property is used only if the AnnTokenType property is ANNTOKEN_TEXT. If the AnnTokenType property is not ANNTOKEN_TEXT, then the AnnTokenString property is ignored.

See Also

Elements: | AnnEnableEnumerateTextTokenTableEvent property, AnnDescription property, AnnToken property, AnnTokenType property, AnnInsertTextTokenTable method, AnnDeleteTextTokenTable method, AnnClearTextTokenTable method, AnnEnumerateTextToken method, OnAnnEnumerateTextTokenTable event
Topics: | Annotations: Automation


AnnTokenType property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnTokenType
Delphi Syntax | AnnTokenType: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates the type of token. Must be one of the constants in the following table:

ANNTOKEN_NONE | [0] String not treated as a token
ANNTOKEN_SEPARATOR | [1] Add a separator to the automation token menu
ANNTOKEN_TEXT | [2] A text string
ANNTOKEN_DATE_YYYY | [3] Current four digit year
ANNTOKEN_DATE_YY | [4] Current two digit year
ANNTOKEN_DATE_MM | [5] Two digit representation of current month
ANNTOKEN_DATE_DD | [6] Two digit representation of current day
ANNTOKEN_DATE_MONTH_NAME | [7] Current month name (i.e. January)
ANNTOKEN_DATE_DAY_OF_WEEK | [8] Current day of week (i.e. Monday)
ANNTOKEN_TIME_HH_12 | [9] Current hour,using a 12 hour clock
ANNTOKEN_TIME_HH_24 | [10] Current hour, using a 24 hour clock
ANNTOKEN_TIME_MM | [11] Current minute (00-59)
ANNTOKEN_TIME_SS | [12] Current second (00-59)
ANNTOKEN_TIME_MILLISECONDS | [13] Current milliseconds (000-999)
ANNTOKEN_AM_PM | [14] Time of day indicator (AM or PM)

See Also

Elements: | AnnEnableEnumerateTextTokenTableEvent property, AnnDescription property, AnnToken property, AnnTokenString property, AnnInsertTextTokenTable method, AnnDeleteTextTokenTable method, AnnClearTextTokenTable method, AnnEnumerateTextToken method, OnAnnEnumerateTextTokenTable event
Topics: | Annotations: Automation


AnnTool property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnTool
Delphi Syntax | AnnTool: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) This is the currently selected annotation tool. For a list of available values, refer to Annotation Toolbar Buttons.

See Also

Elements: | AnnGetType method
Topics: | Annotations (Document/Medical only): Automation
 | New Annotation Features of Version 14.5


AnnToolbar property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnToolBar* AnnToolbar
Delphi Syntax | AnnToolbar: TAnnToolbar
Overview | Refer to Annotation Toolbar .

Remarks

(Document/Medical only) Gets the object that references the annotation toolbar.

The following properties and methods are associated with this property:

AutoSetTool property

ButtonBitmapDown property

ButtonBitmapUp property

ButtonCount property

ButtonColumns property

ButtonMenuTool property

ButtonMenuText property

ButtonMenuTextID property

ButtonRows property

ButtonTool property

ButtonToolCount property

ButtonToolTipText property

ButtonToolTipTextID property

ButtonVisible property

CreateTB method

h_Wnd property

Tool property

Visible property

See Also

Elements: | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics: | Annotations (Document/Medical only): Automation


AnnTopPreviousClip property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnTopPreviousClip
Delphi Syntax | AnnTopPreviousClip: L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets the top boundary of the previous clip rectangle.

This property is updated by the AnnRestrictCursor method. Therefore, you must call the AnnRestrictCursor method before checking this property for the information.

See Also

Elements: | AnnRestrictCursor method, AnnLeftPreviousClip property, AnnRightPreviousClip property, AnnBottomPreviousClip property
Topics: | Annotations: Object Manipulation


AnnTotalDistance property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | double AnnTotalDistance
Delphi Syntax | AnnTotalDistance: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Total length of the ruler(s).

To determine the unit of measure for the ruler, check the AnnTotalRulerUnit property and the AnnTotalSmartUnit property.

To get information on individual rulers in an annotation object, check the following properties:

AnnDistance property

AnnDistanceCount property

AnnRulerUnit property

AnnSmartUnit property

The AnnTotalDistance property and the properties listed above are updated by the AnnGetDistance2 method.

See Also

Elements: | AnnGetDistance2 method, AnnDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnRulerUnit property, AnnSmartUnit property, AnnDistanceCount property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects


AnnTotalRulerUnit property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnTotalRulerUnit
Delphi Syntax | AnnTotalRulerUnit: L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets a value that indicates the unit of measure for the total length of all rulers, found in the AnnTotalDistance property. This property is updated by the AnnGetDistance2 method. Possible values are:

ANNUNIT_INCHES | 0
ANNUNIT_FEET | 1
ANNUNIT_YARDS | 2
ANNUNIT_MICROMETERS | 3
ANNUNIT_MILLIMETERS | 4
ANNUNIT_CENTIMETERS | 5
ANNUNIT_METERS | 6
ANNUNIT_TWIPS | 7
ANNUNIT_POINTS | 8
ANNUNIT_PIXELS | 9
ANNUNIT_SMART_METRIC | 10
ANNUNIT_SMART_ENGLISH | 11

If the AnnTotalRulerUnit property is ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the actual unit of measure can be found in the AnnTotalSmartUnit property. If the AnnTotalRulerUnit property is not ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the AnnTotalRulerUnit property contains the unit of measure.

See Also

Elements: | AnnGetDistance2 method, AnnDistance property, AnnTotalDistance property, AnnTotalSmartUnit property, AnnRulerUnit property, AnnSmartUnit property, AnnDistanceCount property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects


AnnTotalSmartUnit property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | Int AnnTotalSmartUnit
Delphi Syntax | AnnTotalSmartUnit: L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets a value that indicates the unit of measure for the total length of all rulers, found in the AnnTotalDistance property. Possible values are:

ANNUNIT_INCHES | 0
ANNUNIT_FEET | 1
ANNUNIT_YARDS | 2
ANNUNIT_MICROMETERS | 3
ANNUNIT_MILLIMETERS | 4
ANNUNIT_CENTIMETERS | 5
ANNUNIT_METERS | 6
ANNUNIT_TWIPS | 7
ANNUNIT_POINTS | 8
ANNUNIT_PIXELS | 9

Please note that if the AnnTotalRulerUnit property is ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then the actual unit of measure can be found in the AnnTotalSmartUnit property. If the AnnTotalRulerUnit property is not ANNUNIT_SMART_METRIC or ANNUNIT_SMART_ENGLISH, then both the AnnTotalRulerUnit property and the AnnTotalSmartUnit property contain the unit of measure.

A "smart unit" is a unit that can be automatically promoted to the next higher unit.

For example, suppose you have a ruler that is 13 inches long. If the units of the ruler are ANNUNIT_INCHES, then the length is 13. However, if the units of the ruler are ANNUNIT_SMART_ENGLISH, then the length of the ruler is automatically promoted to feet. The length in this case would be 1.0833 feet.

See Also

Elements: | AnnGetDistance2 method, AnnDistance property, AnnTotalDistance property, AnnTotalRulerUnit property, AnnRulerUnit property, AnnSmartUnit property, AnnDistanceCount property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects


AnnType property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | int AnnType
Delphi Syntax | AnnType: L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets a value that represents the type of handle. Possible values are:

Value | Meaning
ANNHANDLETYPE_DEFAULT_HANDLE | A default annotation handle
ANNHANDLETYPE_USER_HANDLE | A user defined annotation handle

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo) , ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


AnnUndoDepth property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnUndoDepth
Delphi Syntax | AnnUndoDepth: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets or sets the undo level for the container object. It contains the length of the undo stack.

The undo level determines the number of automation operations that can be undone. The default value is 5.

This property should be set before calling the AnnAddUndoNode method.

See Also

Elements: | AnnUndoEnable property, AnnAddUndoNode method, AnnUndo method
Topics: | Annotations (Document/Medical only): Automation
 | Undoing Automation Operations


AnnUndoEnable property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnUndoEnable
Delphi Syntax | AnnUndoEnable: Boolean
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Enables or disables the undo mechanism for an automation object. Possible values are:

Value | Meaning
True | Enable the undo mechanism for the specified automation object.
False | Disable the undo mechanism for the specified automation object.

Please note that the undo stack is not changed. This is intended to temporarily disable the undo mechanism.

This property, along with the AnnAddUndoNode method can be used to combine multiple changes into a single undo call. For more information of this process, refer to the AnnAddUndoNode method.

See Also

Elements: | AnnUndoDepth property, AnnAddUndoNode method, AnnUndo method
Topics: | Annotations (Document/Medical only): Automation
 | Undoing Automation Operations


AnnUserHandle property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnHandle* AnnUserHandle[unsigned uIndex]
Delphi Syntax | AnnUserHandle [uIndex: L_UINT]: TAnnHandle
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets user – defined annotation handle properties for all user-defined handles associated with an annotation object.

The AnnGetUserHandles method updates the AnnUserHandle property with the annotation handle information for all handles associated with the specified annotation object. The AnnUserHandlesCount property is updated with the number of handles retrieved by the AnnGetUserHandles method.

See Also

Elements: | AnnGetUserHandles method, AnnUserHandlesCount property
Topics: | Annotations: Object Manipulation


AnnUserHandlesCount property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AnnUserHandlesCount
Delphi Syntax | AnnUserHandlesCount: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the total number of user - defined handles associated with an annotation object.

This property is updated when the AnnGetUserHandles method returns. Therefore, you must call the AnnGetUserHandles method before checking this property for the number of user – defined handles.

See Also

Elements: | AnnGetUserHandles method, AnnUserHandle property
Topics: | Annotations: Object Manipulation


AnnUserMode property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnUserMode
Delphi Syntax | AnnUserMode: Integer
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets or gets the current annotation mode.

The following are possible values:

Value | Meaning
ANNUSERMODE_DESIGN | The user can create annotations. In this mode, the toolbar is present, hot spots are visible, and popup menus can be activated with the right mouse button.
ANNUSERMODE_RUN | The user can view annotations and can activate hot spots, buttons, and audio clips. In this mode, hot spots are transparent.
ANNUSERMODE_NONE | Annotations are invisible.

See Also

Elements | AnnAutoMenuEnable property, AnnAutoDrawEnable property
Topics | Annotations (Document/Medical only): Automation
 | Displaying and Manipulating Annotation Objects


ClientPointX property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int ClientPointX[unsigned uIndex]
Delphi Syntax | ClientPointX [uIndex: L_UINT]: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets an array of X coordinates for one or more points to be converted. These values are in client coordinates. Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

You specify the point index in uIndex in order to allocate adequate memory for the ClientPointX and ClientPointY properties.

For more information on the conversion process, refer to the AnnConvert method.

See Also

Elements: | AnnConvert method, ClientPointY property, AnnContainerPointX property, AnnContainerPointY property, PointsCount property
Topics: | Annotations: Object Manipulation


ClientPointY property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | double ClientPointY [unsigned uIndex]
Delphi Syntax | ClientPointY [uIndex: L_UINT]: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets an array of Y coordinates for one or more points to be converted. These values are in client coordinates. Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

You specify the point index in uIndex in order to allocate adequate memory for the ClientPointY and ClientPointX properties. For more information on the conversion process, refer to AnnConvert method.

See Also

Elements: | AnnConvert method, ClientPointX property, AnnContainerPointX property, AnnContainerPointY property, PointsCount property
Topics: | Annotations: Object Manipulation


PointsCount property (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int PointsCount
Delphi Syntax | PointsCount: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that represents the minimum number of elements in the ClientPointX, ClientPointY, AnnContainerPointX and AnnContainerPointY arrays. That is, the number of elements in the ClientPointX, ClientPointY, AnnContainerPointX and AnnContainerPointY arrays must be AT LEAST equal to PointsCount.

See Also

Elements: | AnnConvert method, ClientPointX property, ClientPointY property, AnnContainerPointX property, AnnContainerPointY property
Topics: | Annotations: Object Manipulation


AnnAddUndoNode method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnAddUndoNode (void);
Delphi Syntax | Function AnnAddUndoNode: Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Manually adds a node to the undo stack.

The automation object automatically does this when changing, adding or deleting annotation objects. This method should be called before making changes programmatically to the annotation objects. Calling this method insures that the changes can be undone using the Undo menu item.

The number of operations that can be undone should be set in the AnnUndoDepth property before calling this method. If the AnnUndoDepth property is not set, a default of 5 is used.

This method adds an undo node to the automation object. When used with the AnnUndoEnable property, a lengthy operation, consisting of multiple steps, can be combined into one undo call to the AnnUndo method. To accomplish this, use the following steps:

1. | Set the number of operations that can be undone in the AnnUndoDepth property. (The default for this property is 5.)
2. | Call the AddUndoNode method to add an undo node to the container.
3. | Disable the undo feature by setting the AnnUndoEnable property to False.
4. | Perform the operations to be combined into one undo. For example:
5. | Re-enable the undo feature by setting the AnnUndoEnable property to True.

Now, all three operations can be undone with one call to the AnnUndo method instead of several calls to the AnnUndo method.

See Also

Elements: | AnnUndoEnable property, AnnUndoDepth property, AnnUndo method
Topics: |


AnnAddUserHandle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnAddUserHandle(HANNOBJECT hObject)
Delphi Syntax | AnnAddUserHandle (hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Adds a user-defined handle to an annotation object.

To add a new user handle to an annotation object, set the AnnHandle property with the desired handle information, and then call the AnnAddUserHandle method.

To change an existing user handle, call the AnnGetUserHandle method to get the current handle information. The AnnGetUserHandle method updates the AnnHandle property with the annotation handle information for the specified handle. Set the desired values in the AnnHandle property and then call the AnnChangeUserHandle method.

A user handle can be deleted using the AnnDeleteUserHandle method.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnChangeUserHandle method, AnnDeleteUserHandle method, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo), AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnAdjustPoint method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnAdjustPoint(double dAnchorX, double dAnchorY, double dMoveX, double dMoveY, double dAngle, int nType)
Delphi Syntax | AnnAdjustPoint (dAnchorX: L_DOUBLE; dAnchorY: L_DOUBLE; dMoveX: L_DOUBLE; dMoveY: L_DOUBLE; dAngle: L_DOUBLE; nType: L_INT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Modifies the point (dMoveX,d MoveY) based on the angle between line (dAnchor, dMove) and the horizontal.

This utility method is used when creating custom annotation objects. It can be used to calculate the horizontal, vertical, or 45 degree component of a rotated annotation object. It can also be used to easily restrict the mouse cursor on rotated annotation objects.

As an example, consider a rectangle that is rotated 35 degrees in the clockwise direction.

The user has clicked on the Anchor point, and moved the mouse to the Move point.

To find the horizontal component of the line that goes from (Anchor, Move), make the following call, and the (dMoveX, dMoveY) point is adjusted to contain only the horizontal component.

The adjusted (dMoveX, dMoveY) point can be seen in step 4.

Conceptually, the following occurs:

1. | Initial situation
2. | Points and rectangle are rotated 35 degrees counter clockwise
3. | Move point is adjusted to contain only the horizontal component
4. | Points and rectangle are rotated 35 degrees clockwise to the adjusted Move point.

See Also

Elements: | AnnHitTestExt method, AnnRotateAngle property, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnBringToFront method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnBringToFront (HANNOBJECT hObject);
Delphi Syntax | Function AnnBringToFront (hObject: HANNOBJECT ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Reorders the specified annotation object so that it is displayed on top of other objects in the same container.

This method moves the object to the end of the enumeration order for objects in the same container. When the container is displayed, this object is displayed last.

See Also

Elements | AnnSendToBack method
Topics | Annotations (Document/Medical only): Automation
 | Displaying and Manipulating Annotation Objects


AnnChangeUserHandle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnChangeUserHandle(HANNOBJECT hObject, unsigned uIndex)
Delphi Syntax | AnnChangeUserHandle (hObject: HANNOBJECT; uIndex: L_UINT32): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Changes properties of an existing user-defined annotation handle.

To change an existing user handle, call the AnnGetUserHandle method to get the current handle information. The AnnGetUserHandle method updates the AnnHandle property with the annotation handle information for the specified handle. Set the desired values in the AnnHandle property and then call the AnnChangeUserHandle method.

To add a new user handle to an annotation object, set the AnnHandle property with the desired handle information, and then call the AnnAddUserHandle method.

A user handle can be deleted using the AnnDeleteUserHandle method.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, AnnDeleteUserHandle method, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo), AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnClearTextTokenTable method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnClearTextTokenTable(void)
Delphi Syntax | AnnClearTextTokenTable ( ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Removes all tokens from the text token table.

Call this method to delete ALL the tokens from the text token table. This method is used with the text annotation objects that support tokens, namely the following:

ANNOBJECT_AUTOMATION

ANNOBJECT_BUTTON

ANNOBJECT_NOTE

ANNOBJECT_TEXT

ANNOBJECT_TEXTPOINTER

ANNOBJECT_STAMP

See Also

Elements: | AnnDescription property, AnnTokenString property, AnnToken property, AnnTokenType property, AnnInsertTextTokenTable method, AnnDeleteTextTokenTable method, AnnEnableEnumerateTextTokenTableEvent property, AnnEnumerateTextToken method, AnnEnumerateTextTokenTable Event
Topics: | Annotations: Automation


AnnConvert method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnConvert(HANNOBJECT hContainer, int nConvert)
Delphi Syntax | AnnConvert (hContainer: HANNOBJECT; nConvert: L_INT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Use this method to convert back and forth between container coordinates and client coordinates

The number of elements in the ClientPointX, ClientPointY, AnnContainerPointX and AnnContainerPointY arrays must be AT LEAST equal to the value in the PointsCount property.

When nConvert is ANNCONVERT_TO_CONTAINER, the ClientPointX and ClientPointY arrays must contain valid entries. If this method returns successfully, ContainerPointX and ContainerPointY will be updated with the converted points.

When nConvert is ANNCONVERT_TO_CLIENT, the ContainerPointX and ContainerPointY arrays must contain valid entries. If this method returns successfully, ClientPointX and ClientPointY will be updated with the converted points.

See Also

Elements: | ClientPointX property, ClientPointY property, AnnContainerPointX property, AnnContainerPointY property, PointsCount property, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnCopy method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnCopy(int iFormat, bool fSelected, bool fEmpty);
Delphi Syntax | Function AnnCopy(iFormat: Integer; fSelected: Boolean; fEmpty: Boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medicalonly) Copies the specified annotation objects to the Windows clipboard in either the native format or WMF format.

Use the WMF format only for copying for use in another application. LEADTOOLS reads annotations only in the native format.

See Also

Elements | AnnCut method, AnnPaste method, AnnPasteReady property, AnnRemove method, AnnInsert method, AnnCopy method
Topics | Annotations (Document/Medical only): Using the Clipboard
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Using Rulers in Annotation Objects


AnnCreate method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::L_HANDLE AnnCreate(int iType, bool bAutoInsert, bool bVisible);
Delphi Syntax | Function AnnCreate(iType: integer; bAutoInsert: Boolean; bVisible: Boolean): L_HANDLE;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Creates an annotation object of the specified type.

If bAutoInsert is set to False, the object is not inserted in any container. The object must be inserted programmatically, or destroyed by using the AnnDestroy, to avoid memory leaks.

Note:

The user should not call this method during processing of the OnAnnCreate, OnAnnDestroy or OnAnnEnumerate events.

See Also

Elements | AnnDefine method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method, AnnSetVisible method, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnCreateItem method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnCreateItem(HANNOBJECT hContainer, int nType, bool bVisible, HANNOBJECT &hObject);
Delphi Syntax | Function AnnCreateItem(hContainer: HANNOBJECT; nType: L_INT; bVisible: Boolean; var hObject: HANNOBJECT): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Creates an annotation object in a container.

You must use the AnnSet... methods to initialize the object after it is created.

See Also

Elements | AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method, AnnSetVisible method, AnnRemove method, AnnInsert method, AnnGetContainer method, AnnGetTopContainer method, AnnGetItemHandle, AnnAddUserHandle method, AnnAdjustPoint method, AnnChangeUserHandle method, AnnConvert method, AnnDefine2 method, AnnDeleteUserHandle method, AnnEnumerateHandles method, AnnGetUserHandle method, AnnGetUserHandles method, AnnHitTestExt method, AnnRestrictCursor method, AnnEnumerate method, AnnCopy method, AnnPaste method, AnnPasteReady property
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnCut method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnCut(HANNOBJECT hObject, int nFormat, bool bSelected, bool bEmpty);
Delphi Syntax | Function AnnCut(hObject: HANNOBJECT; nFormat: L_INT; bSelected: Boolean; bEmpty: Boolean): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Cuts the specified annotation objects to the Windows clipboard in either the native format or WMF format.

Use the WMF format only for copying for use in another application. LEADTOOLS reads annotations only in the native format.

Use the hObject and bSelected parameters as follows:

To copy the specified object, set hObject to that object and set fSelected to FALSE.

To copy only selected objects in a container, set hObject to the container and set bSelected to TRUE.

To copy all objects in a container, set hObject to the container and set bSelected to FALSE.

See Also

Elements | AnnCopy method, AnnPaste method, AnnPasteReady property, AnnInsert method, AnnRemove method, AnnDefine method, AnnDefine2 method, AnnCreate method, AnnCreateItem method, AnnDestroy method, AnnRemove method, AnnAddUserHandle method, AnnAdjustPoint method, AnnChangeUserHandle method, AnnConvert method, AnnDefine2 method, AnnDeleteUserHandle method, AnnEnumerateHandles method, AnnGetContainer method, AnnGetTopContainer method, AnnGetUserHandle method, AnnGetUserHandles method, AnnHitTestExt method, AnnRestrictCursor method
Topics | Annotations (Document/Medical only): Using the Clipboard
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnDefine method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnDefine(LEADTyp::L_HANDLE hObject, int x, int y, int iState);
Delphi Syntax | Function AnnDefine(hObject: L_HANDLE; x, y, iState: Integer): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Specifies the shape when creating or transforming an annotation object. This method specifies one point in the current window each time it is called.

See Also

Elements | AnnCreate method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method, AnnSetVisible method, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations


AnnDefine2 method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnDefine2(HANNOBJECT hObject, double dX, double dY, unsigned uState)
Delphi Syntax | AnnDefine2 (hObject: HANNOBJECT; dX: L_DOUBLE; dY: L_DOUBLE; uState: L_UINT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Specifies the shape when creating or transforming an annotation object. This method specifies one point in the current window each time it is called. This method is similar to the AnnDefine method, except that AnnDefine2 takes a point in container coordinates, whereas the AnnDefine method takes a point in client coordinates.

See Also

Elements: | AnnDefine method, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations


AnnDeletePage method (Main Control)

AnnDeletePage method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnDeletePage(AnsiString szName, int nPage);
Delphi Syntax | Function AnnDeletePage(szName: String; nPage: Integer): Integer;
Overview | Refer to Annotation Files.

Remarks

(Document/Medical only) Deletes a page from a multi-page annotation file. The page number is 1-based. Therefore, the first page is page 1, the second page is page 2, and so on.

This method is valid only for annotation files that contain at least two pages. If an annotation file contains only one page, calling this method will return an error.

See Also

Elements: | AnnDeletePageMemory method, AnnLoad method, AnnSaveMemory method, AnnSave method
Topics: | Annotations (Document/Medical only): Input and Output


AnnDeletePageMemory method (Main Control)

AnnDeletePageMemory method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int fastcall AnnDeletePageMemory(L_HANDLE hMem, Windows::PLongint plSize, int nPage);
Delphi Syntax | Function AnnDeletePageMemory(hMem: L_HANDLE; plSize: pLongint; nPage: Integer): Integer;
Overview | Refer to Annotation Files.

Remarks

(Document/Medical only) Deletes a page from a multi-page annotation file in memory. The page number is 1-based. Therefore, the first page is page 1, the second page is page 2, and so on. Deleting a page from an annotation file will cause the size of the annotation file to change. The argument plSize will contain the new size of the annotation file in memory. (For Delphi and C++ Builder, pass the address of a long variable). This method is valid only for annotation files that contain at least two pages. If an annotation file contains only one page, calling this method will return an error.

See Also

Elements: | AnnDeletePage method, AnnLoadMemory method, AnnSaveMemory method, AnnLoad method
Topics: | Annotations (Document/Medical only): Input and Output


AnnDeleteTextTokenTable method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnDeleteTextTokenTable(char cToken)
Delphi Syntax | AnnDeleteTextTokenTable (cToken: Char ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Deletes a text token from the annotation text token table.

Call this method to delete the token #<cToken> from the text token table.

This method returns SUCCESS (1) if cToken is successfully deleted, or if cToken was not already in the text token table. This method is used with the text annotation objects that support tokens, namely the following:

ANNOBJECT_AUTOMATION

ANNOBJECT_BUTTON

ANNOBJECT_NOTE

ANNOBJECT_PUSHPIN

ANNOBJECT_STAMP

ANNOBJECT_TEXT

ANNOBJECT_TEXTPOINTER

See Also

Elements: | AnnDescription property, AnnTokenString property, AnnToken property, AnnTokenType property, AnnInsertTextTokenTable method, AnnClearTextTokenTable method, AnnEnableEnumerateTextTokenTableEvent property, AnnEnumerateTextToken method, AnnEnumerateTextTokenTable event
Topics: | Annotations: Automation


AnnDeleteUserHandle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnDeleteUserHandle(HANNOBJECT hObject, int uIndex)
Delphi Syntax | AnnDeleteUserHandle (hObject: HANNOBJECT; uIndex: L_INT32): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Deletes an existing user-defined annotation handle.

Set uIndex to -1 to delete all the user-defined handles for annotation object hObject.

To change an existing user handle, call the AnnGetUserHandle method to get the current handle information. The AnnGetUserHandle method updates the AnnHandle property with the annotation handle information for the specified handle. Set the desired values in the AnnHandle property and then call the AnnChangeUserHandle method.

To add a new user handle to an annotation object, set the AnnHandle property with the desired handle information, and then call the AnnAddUserHandle method.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, AnnChangeUserHandle method, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo), AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnDestroy method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnDestroy(LEADTyp::L_HANDLE hObject, int iFlags);
Delphi Syntax | Function AnnDestroy(hObject: L_HANDLE; iFlags: Integer): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Deletes an annotation object and frees the memory that was used to store the object.

Note:

The user should not call this method during processing of the OnAnnCreate, OnAnnDestroy or OnAnnEnumerate events.

See Also

Elements | AnnCreate method, AnnDefine method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method, AnnSetVisible method, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnEncryptApply method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnEncryptApply(HANNOBJECT hObject, unsigned uEncryptFlags)
Delphi Syntax | AnnEncryptApply (hObject: HANNOBJECT; uEncryptFlags: L_UINT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Applies an encryptor annotation object to the underlying bitmap.

An encrypt object can have two states: it can be an encryptor or it can be a decryptor.

Use this method to apply encryptor(s), decryptor(s), or both. Applying an encryptor means that the part of the bitmap that is under the encryptor is scrambled according to the encryptor properties.

Once applied, the portion of the bitmap under the encrypt object becomes scrambled or unscrambled, and the encrypt object changes state (encryptors become decryptors, and decryptors become encryptors). Using different keys before calling this method gives different scrambling patterns. The decryptor state differs from the encryptor state in that a decryptor cannot be moved, and cannot be changed to an encryptor. The scrambling can be removed by calling AnnEncryptApply on the decryptor with the appropriate arguments. If successful, the decryptor again changes state to become an encryptor. An encryptor can be moved, and can be changed to a decryptor.

The encrypt object is useful for encrypting portions of a bitmap. After encrypting, the scrambled bitmap cannot easily be unscrambled without the associated annotation file. The scrambling can be removed by using the associated annotation file, or by using automation mode to manually change the encrypt state from encryptor to a decryptor, position the object correctly, and setting the key appropriately.

You must set the AnnFlags property before calling this method, to indicate the objects to which to apply the encryption objects. Possible values for the AnnFlags property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions)
Topics: | Annotations: Object Manipulation


AnnEnumerate method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnEnumerate(LEADTyp::L_HANDLE hObject, int iFlags, char * pszUserList);
Delphi Syntax | Function AnnEnumerate(hObject: L_HANDLE; iFlags: Integer; pszUserList: PChar): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Enumerates all objects contained in hObject.

Note:

The user should not call this method during processing of the OnAnnCreate, OnAnnDestroy or OnAnnEnumerate events.

See Also

Elements:

OnAnnEnumerate event


AnnEnumerateHandles method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnEnumerateHandles(HANNOBJECT hObject)
Delphi Syntax | AnnEnumerateHandles (hObject: HANNOBJECT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Enumerates all handles contained in hObject.

Use this method to get information about all annotation handles for an annotation object.

For each handle enumerated by this method, the OnAnnEnumerateHandles event is fired, if the AnnEnableEnumerateHandlesEvent property has been set to TRUE. The EnumerateHandles event receives a pointer to a TAnnHandleInfo class object that contains information about the handle. The following elements may contain information about the handle:

AnnType property (TAnnHandleInfo)

ID property (TAnnHandleInfo)

Index property (TAnnHandleInfo)

ContainerX property (TAnnHandleInfo)

ContainerY property (TAnnHandleInfo)

ClientX property (TAnnHandleInfo)

ClientY property (TAnnHandleInfo)

Visible property (TAnnHandleInfo)

PenColor property (TAnnHandleInfo)

FillColor property (TAnnHandleInfo)

Shape property (TAnnHandleInfo)

Cursor property (TAnnHandleInfo)

TotalHandles property (TAnnHandleInfo)

To discontinue generating OnAnnEnumerateHandles event, set the AnnEnableEnumerateHandlesEvent property to FALSE.

See Also

Elements: | AnnEnableEnumerateHandlesEvent property, OnAnnEnumerateHandles, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo), AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnEnumerateTextToken method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnEnumerateTextToken(void)
Delphi Syntax | AnnEnumerateTextToken ( ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Enumerates the text tokens in the annotation text token table.

For each text token in the table, this method generates an OnAnnEnumerateTextTokenTable event, if the AnnEnableEnumerateTextTokenTableEvent property has been set to TRUE. The OnAnnEnumerateTextTokenTable event receives information about each enumerated text token.

To discontinue generating OnAnnEnumerateTextTokenTable events, set the AnnEnableEnumerateTextTokenTableEvent property to FALSE.

See Also

Elements: | AnnDescription property, AnnTokenString property, AnnToken property, AnnInsertTextTokenTable method, AnnDeleteTextTokenTable method, AnnClearTextTokenTable method, AnnEnableEnumerateTextTokenTableEvent property, OnAnnEnumerateTextTokenTable event.
Topics: | Annotations: Object Manipulation


AnnFileInfo method (Main Control)

AnnFileInfo method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnFileInfo(AnsiString szName);
Delphi Syntax | Function AnnFileInfo(szName: String ): Integer;
Overview | Refer to Annotation Files.

Remarks

Gets information about the specified annotation file.

The AnnFileInfo method updates the following properties:

AnnInfoVersion property

AnnInfoFormat property

AnnInfoTotalPages property

See Also

Elements: | AnnFileInfoMemory method, AnnInfoFormat property, AnnInfoTotalPages property, AnnInfoVersion property, AnnLoadMemory method, AnnLoad method
Topics: | Annotations (Document/Medical only): Input and Output


AnnFileInfoMemory (Main Control)

AnnFileInfoMemory method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnFileInfoMemory(L_HANDLE hMem, int lSize);
Delphi Syntax | Function AnnFileInfoMemory (hMem: L_HANDLE; lSize: Longint): Integer;
Overview | Refer to Annotation Files.

Remarks

Gets information about an annotation file in memory.

The AnnFileInfoMemory method updates the following properties:

AnnInfoVersion property

AnnInfoFormat property

AnnInfoTotalPages property

See Also

Elements: | AnnFileInfo method, AnnInfoFormat property, AnnInfoTotalPages property, AnnInfoVersion property, AnnLoadMemory method, AnnLoad method
Topics: | Annotations (Document/Medical only): Input and Output


AnnFlip method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnFlip (bool bUseHorz, float fHorz, bool bSelected);
Delphi Syntax | Function AnnFlip(bUseHorz: Boolean; fHorz: Single; bSelected: boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Flips one or more annotation objects, top to bottom.

If the bSelected parameter is True, this method affects only the currently selected objects. Otherwise, it affects all objects.

If the bUseHorz parameter is True, this method flips all affected objects on the axis specified in the fHorz parameter. Otherwise, it flips each affected object on its own center.

Objects that contain text cannot be flipped or reversed. If a group of objects is flipped or reversed on a common axis, the text will move to the new position, but will retain its orientation.

For more information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

See Also

Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnGetAngle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetAngle(HANNOBJECT hObject, double dAngle);
Delphi Syntax | Function AnnGetAngle (hObject: HANNOBJECT; var dAngle: L_DOUBLE ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the angle of the Protractor object in the object's unit of measurement, set by the AnnSetProtractorOptions method.

This method is only valid for Protractor annotation objects (ANNOBJECT_PROTRACTOR).

See Also

Elements | AnnSetProtractorOptions method, AnnGetProtractorOptions method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Information
 | Annotations (Document/Medical only): Getting and Setting the ProtractorProperties


AnnGetArea method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetArea (HANNOBJECT hObject, unsigned &uArea);
Delphi Syntax | Function AnnGetArea (hObject: HANNOBJECT; var uArea: L_UINT32 ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the pixel count of the specified annotation object.

The pixel count is the number of pixels contained in a region extracted from the annotation object, without resizing.

See Also

Elements | GetRgnHandle method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnGetAutoBackColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetAutoBackColor(HANNOBJECT hObject, int nType, TColor &clBack)
Delphi Syntax | Function AnnGetAutoBackColor (hObject: HANNOBJECT; nType: L_INT; var clBack: TColor): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the background color of one or more annotation objects.

Please note the following:

If nType is: | Then the background color retrieved is:
ANNOBJECT_NOTE or ANNOBJECT_PUSHPIN | The background color used for Note objects and Push pin objects created by the Automation object.
ANNOBJECT_HILITE | The background color used for Hilite objects created by the Automation object.
ANNOBJECT_REDACT | The background color used for Redact objects created by the Automation object.
any other object such as ANNOBJECT_TEXT, ANNOBJECT_RECT, etc. | The background color used for all other objects, created by the automation object, which have a background color property.

VCL uses the TColor enumerated data type that covers the values that can be returned by the Windows RGB macro. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements | AnnSetForeColor method, AnnGetForeColor method, AnnSetBackColor method, AnnGetBackColor method, AnnSetAutoBackColor method
Topics | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Getting and Setting Color Properties
 | Obtaining Annotation Object Information
 | Using Color Values in LEADTOOLS


AnnGetAutoMenuItemEnable method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | intAnnGetAutoMenuItemEnable(LEADTyp::L_HANDLE hObject, int iType, int iItem);
Delphi Syntax | Function AnnGetAutoMenuItemEnable(hObject: L_HANDLE; iType: integer; iItem: integer): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns a value that indicates whether the specified menu item is enabled or disabled.

If for the specified object, the menu item’s enable state is ANNMENU_DEFAULT, the method determines whether the enable state has been set for objects of the specified type. If the enable state for objects of the specified type is also ANNMENU_DEFAULT, the method determines whether the enable state has been set for ANNOBJECT_ALL. If this is also ANNMENU_DEFAULT, the method determines whether the menu item text is nil or not nil. If it is nil, the method returns ANNMENU_DISABLE. If the menu item is not nil, the method returns ANNMENU_ENABLE.

See Also

Elements: | AnnSetAutoMenuItemEnable method, AnnAutoMenuEnable property
Topics: | Annotations (Document/Medical only): Automation


AnnGetAutoText method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetAutoText (int iItem, LEADTyp::L_PPCHAR ppText);
Delphi Syntax | Function AnnGetAutoText (iItem: Integer; ppText: L_PPCHAR): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Retrieves the current text string that is used for the specified menu item or other element that LEADTOOLS provides for automated annotations.

Call this method once, with ppText set to nil. The return value of the method will be the size (number of characters) of the text. Next, allocate the appropriate amount of memory for the ppText (size + 1), and call this method again to retrieve the string.

To modify the text strings you can use the AnnSetAutoText method.

See Also

Elements: | AnnSetAutoText method
Topics: | Annotations (Document/Medical only): Automation


AnnGetBackColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetBackColor(HANNOBJECT hObject, TColor &clBack)
Delphi Syntax | Function AnnGetBackColor (hObject: HANNOBJECT; var clBack: TColor): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the background color of the annotation object.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

To see how the background color relates to the fill modes, refer to Illustration of Fill Options for Annotations.

See Also

Elements | AnnSetForeColor method, AnnGetForeColor method, AnnSetBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Color Values in LEADTOOLS


AnnGetBitmap method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetBitmap(HANNOBJECT hObject, TBitmapHandle &Bitmap)
Delphi Syntax | Function AnnGetBitmap(hObject: HANNOBJECT; var Bitmap: TBitmapHandle): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the bitmap handle of the specified annotation object. The specified bitmap is a LEAD bitmap.

The AnnGetBitmap method is valid only for the following object types:

ANNOBJECT_POINT

ANNOBJECT_PUSHPIN

ANNOBJECT_STAMP

The ANNOBJECT_STAMP (including the Rubber Stamp) objects can display text, a bitmap, or a metafile. Initially, the ANNOBJECT_STAMP displays text. In automation, there are different Rubber Stamp tools available, which are ANNOBJECT_STAMP objects set up to use the different metafiles for each rubber stamp selection instead of text. The ANNOBJECT_PUSHPIN displays a bitmap in design mode and a secondary bitmap in run mode. Initially, the ANNOBJECT_POINT displays the bitmap of the AnnPredefinedBitmap property.

Use the AnnSetBitmap method to set the bitmap for one or more annotation objects.

For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnSetBitmap method, AnnSetSecondaryBitmap method, AnnGetSecondaryBitmap method, AnnGetMetafile, AnnSetPredefinedMetafile method, AnnGetPredefinedMetafile method, AnnGetEncryptOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnGetSecondaryMetafile method, AnnPredefinedBitmap property, AnnGetPointOptions method, AnnEncryptOptions property, AnnSetMetafile method, EncryptBitmap property, AnnPointOptions property, PointUseBitmap property, PointBitmap property
Topics: | Obtaining Annotation Object Information
 | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps


AnnGetBitmapDpiX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetBitmapDpiX(HANNOBJECT hObject, double &dBitmapDpiX);
Delphi Syntax | Function AnnGetBitmapDpiX(hObject: HANNOBJECT; var dBitmapDpiX: L_DOUBLE): L_INT;
Overview | Refer to Obtaining Annotation Object Information.

Remarks

(Document/Medical only) Gets the horizontal Bitmap DPI (dots per inch) that is used to translate the horizontal distance for an annotation automation or annotation ruler objects.

Bitmap DPI applies only to Automation and Ruler objects. For more information on automation objects, refer to Annotation Automation Object. For more information on ruler objects, refer to Ruler Annotation Object.

See Also

Elements: | AnnSetBitmapDpiX method, AnnSetBitmapDpiY method, AnnGetBitmapDpiY method, AnnSetUnit method, AnnGetUnit method, AnnGetDistance method, AnnSetGaugeLength method, AnnGetGaugeLength method, AnnTicMarkLength property
Topics: | Annotation Functions (Document/Medical only): Getting and Setting the Ruler Properties
 | New Annotation Features of Version 14.5


AnnGetBitmapDpiY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetBitmapDpiY(HANNOBJECT hObject, double &dBitmapDpiY);
Delphi Syntax | Function AnnGetBitmapDpiY(hObject: HANNOBJECT; var dBitmapDpiY: L_DOUBLE): L_INT;
Overview | Refer to Obtaining Annotation Object Information.

Remarks

(Document/Medical only) Gets the vertical Bitmap DPI (dots per inch) that is used to translate the vertical distance for an automation or ruler object.

Bitmap DPI applies only to Automation and Ruler objects. For more information on automation objects, refer to Annotation Automation Object. For more information on ruler objects, refer to Ruler Annotation Object.

See Also

Elements: | AnnSetBitmapDpiX method, AnnSetBitmapDpiY method, AnnGetBitmapDpiX method, AnnSetUnit method, AnnGetUnit method, AnnGetDistance method, AnnSetGaugeLength method, AnnGetGaugeLength method, AnnTicMarkLength property
Topics: | Annotation Functions (Document/Medical only): Getting and Setting the Ruler Properties
 | New Annotation Features of Version 14.5


AnnGetContainer method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetContainer(HANNOBJECT hObject, HANNOBJECT &hContainer)
Delphi Syntax | Function AnnGetContainer(hObject: HANNOBJECT; var hContainer: HANNOBJECT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the handle to the container of the specified annotation object.

See Also

Elements: | AnnEnumerate method, AnnCopy method, AnnPaste method, AnnPasteReady property, AnnInsert method, AnnRemove method, AnnDefine method, AnnDefine2 method, AnnCreate method, AnnCreateItem method, AnnDestroy method, AnnRemove method, AnnAddUserHandle method, AnnAdjustPoint method, AnnChangeUserHandle method, AnnConvert method, AnnDefine2 method, AnnDeleteUserHandle method, AnnEnumerateHandles method, AnnGetTopContainer method, AnnGetUserHandle method, AnnGetUserHandles method, AnnHitTestExt method, AnnRestrictCursor method
Topics: | Grouping and Ungrouping Annotation Objects
 | Displaying and Manipulating Annotation Objects
 | Obtaining Annotation Object Information
 | Annotations (Document/Medical only): Using the Clipboard
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnGetDistance method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetDistance(HANNOBJECT hObject, double &dDistance, double &dDistance2)
Delphi Syntax | AnnGetDistance (hObject: HANNOBJECT; var dDistance: L_DOUBLE; var dDistance2: L_DOUBLE): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the distance of the ruler in the specified annotation object. The unit of measure is set by calling the AnnSetUnit method.

This method can be called for ANNOBJECT_RULER, ANNOBJECT_CROSSPRODUCT, ANNOBJECT_PROTRACTOR and ANNOBJECT_POLYRULER types of annotation objects. However, please note the following:

If the annotation object is type ANNOBJECT_RULER, then the dDistance parameter is updated with the length of the ruler.

If the annotation object is type ANNOBJECT_CROSSPRODUCT, ANNOBJECT_PROTRACTOR or ANNOBJECT_POLYRULER, then dDistance is updated with the length of the primary ruler and dDistance2 is updated with the length of the second ruler. (This method does not provide a means for getting the lengths of all rulers of a polyruler object. To get that information, AnnGetDistance2 must be called.)

If the annotation object is type ANNOBJECT_CROSSPRODUCT, ANNOBJECT_PROTRACTOR or ANNOBJECT_POLYRULER, the AnnGetDistance2 method provides more information on the length of each ruler, the number of rulers, the unit of measure of each ruler and the total length of all rulers.

To determine the type of an annotation object, call the AnnGetType method.

See Also

Elements | AnnGetDistance2 method
Topics | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnGetDistance2 method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetDistance2(HANNOBJECT hObject)
Delphi Syntax | AnnGetDistance2 (hObject: HANNOBJECT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the length of each ruler that makes up an object, and the total length of all rulers.

This method works only for the following objects:

ANNOBJECT_RULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_POLYRULER

The ANNOBJECT_POLYRULER object is composed of a variable number of rulers. The other ruler objects are composed of a predetermined number of rulers, as follows:

ANNOBJECT_RULER always has one distance.

ANNOBJECT_PROTRACTOR and ANNOBJECT_CROSSPRODUCT always have two distances.

ANNOBJECT_POLYRULER can have from one to any number of distances.

This method will update the properties listed below with information about the ruler(s) contained in the specified object:

AnnTotalDistance property

AnnTotalRulerUnit property

AnnTotalSmartUnit property

AnnDistance property

AnnRulerUnit property

AnnSmartUnit property

AnnDistanceCount property

See Also

Elements: | AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnDistance property, AnnRulerUnit property, AnnSmartUnit property, AnnDistanceCount property
Topics: | Annotations: Object Manipulation
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnGetEncryptOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetEncryptOptions(HANNOBJECT hObject)
Delphi Syntax | AnnGetEncryptOptions (hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets the annotation encryption options for the specified Encrypt annotation object.

This method updates the AnnEncryptOptions property with the annotation encryption options for the object specified in hObject.

To set annotation encryption options set the AnnEncryptOptions property with the desired encryption options, and then call the AnnSetEncryptOptions method.

See Also

Elements: | AnnEncryptOptions property, AnnSetEncryptOptions method, Encryptor property (TAnnNameOptions), Flags property (TAnnNameOptions), Key property (TAnnNameOptions), NeverEncrypted property (TAnnNameOptions), SaveDecryptorKey property (TAnnNameOptions), SaveEncryptorKey property (TAnnNameOptions), ClearDecryptorKey property (TAnnNameOptions), ClearEncryptorKey property (TAnnNameOptions), EncryptBitmap property (TAnnNameOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


AnnGetFillMode method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFillMode(HANNOBJECT hObject, unsigned &uFillMode)
Delphi Syntax | Function AnnGetFillMode(hObject: HANNOBJECT; var uFillMode: L_UINT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the fill mode of the specified annotation object.

To see the possible fill modes and patterns, refer to Illustration of Fill Options for Annotations.

See Also

Elements | AnnSetFillPattern method, AnnGetFillPattern method, AnnSetFillMode method, AnnGetPolyFillMode method, AnnSetPolyFillMode method,AnnGetROP2 method, AnnSetROP2 method AnnSetBackColor method, AnnSetForeColor method, AnnGetSelected method, AnnSetSelected method, AnnGetTransparent method, AnnSetTransparent method, AnnGetTransparentColor method, AnnSetTransparentColor method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnGetFillPattern method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFillPattern (HANNOBJECT hObject, unsigned &uFillPattern);
Delphi Syntax | Function AnnGetFillPattern (hObject: HANNOBJECT; var uFillPattern: L_UINT ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the fill pattern of the specified annotation object.

To see the possible fill modes and patterns, refer to Illustration of Fill Options for Annotations.

See Also

Elements | AnnSetFillPattern method, AnnSetFillMode method, AnnGetFillMode method, AnnGetPolyFillMode method, AnnSetPolyFillMode method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnGetFontBold method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFontBold(HANNOBJECT hObject, bool &bBold)
Delphi Syntax | Function AnnGetFontBold (hObject: HANNOBJECT; var bBold: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value that indicates whether the font of the specified annotation object is bold.

See Also

Elements: | AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetFontItalic method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFontItalic(HANNOBJECT hObject, bool &bItalic)
Delphi Syntax | Function AnnGetFontItalic (hObject: HANNOBJECT; var bItalic: Boolean): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value that indicates whether the font of the specified annotation object is italic.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetFontName method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFontName(HANNOBJECT hObject, AnsiString &strName)
Delphi Syntax | Function AnnGetFontName (hObject: HANNOBJECT; var strName: String ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the font name (character string) for the text in the specified annotation object.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetFontSize method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFontSize(HANNOBJECT hObject, double &dFontSize)
Delphi Syntax | Function AnnGetFontSize (hObject: HANNOBJECT; var dFontSize: L_DOUBLE ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the current un-scaled value of the font size of the specified annotation object.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetFontStrikeThrough method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFontStrikeThrough(HANNOBJECT hObject, bool &bStrikeThrough)
Delphi Syntax | Function AnnGetFontStrikeThrough (hObject: HANNOBJECT; var bStrikeThrough: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value that indicates whether the font of the specified annotation object has a strike-through (a line through the middle of the text).

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetFontUnderline method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetFontUnderline(HANNOBJECT hObject, bool &bUnderline)
Delphi Syntax | Function AnnGetFontUnderline (hObject: HANNOBJECT; var bUnderline: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value that indicates whether the font of the specified annotation object has an underline.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetForeColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetForeColor(HANNOBJECT hObject, TColor &clFore)
Delphi Syntax | Function AnnGetForeColor (hObject: HANNOBJECT; var clFore: TColor): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the current value of the specified annotation object's foreground color.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

To see how the foreground color relates to the fill modes, refer to Illustration of Fill Options for Annotations.

See Also

Elements | AnnSetForeColor method, AnnSetBackColor method, AnnGetBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Color Values in LEADTOOLS


AnnGetGaugeLength method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetGaugeLength (HANNOBJECT hObject, double &dLength);
Delphi Syntax | Function AnnGetGaugeLength (hObject: HANNOBJECT; var dLength: L_DOUBLE ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the length of the gauge (the perpendicular lines at the ends of the Ruler object).

The gauge length applies only to Automation and Ruler objects. Refer to Annotation Automation object and Ruler Annotation Object.

See Also

Elements | AnnSetGaugeLength method, AnnSetUnit method, AnnGetUnit method, AnnGetDistance method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnGetGrouping method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnGetGrouping (LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetGrouping (hObject: L_HANDLE): Boolean;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the status of the grouping feature of the objects within the specified container.

This method is valid only for container objects.

Each container contains a "grouping" feature, which indicates whether the objects in the container should be treated as a group.

Typically, container handles are obtained by enumerating all the objects by the AnnEnumerate method, and checking the object type with the AnnGetType method.

See Also

Elements | AnnSetGrouping method, AnnGroup method, AnnUngroup method
Topics | Annotations (Document/Medical only): Object Manipulation Grouping and Ungrouping Annotation Objects
 | Displaying and Manipulating Annotation Objects


AnnGetHyperlinkParam method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetHyperlinkParam(LEADTyp::L_HANDLE hObject, int iParamIndex);
Delphi Syntax | Function AnnGetHyperlinkParam(hObject: L_HANDLE; iParamIndex: Integer): longint;
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) Returns the value of the parameter indicated by iParamIndex, for annotation objects with hyperlinks of type ANNLINK_EVENT5. Using this method with annotation objects having any other type of hyperlink will result in an error.

See Also

Elements: | AnnGetHyperlinkType method, AnnSetHyperlinkMsg method, OnAnnHyperlink event
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


AnnGetHyperlinkString method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetHyperlinkString (LEADTyp::L_HANDLE hObject, LEADTyp::L_PPCHAR ppText);
Delphi Syntax | Function AnnGetHyperlinkString (hObject: L_HANDLE; ppText: L_PPCHAR): Integer;
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) Gets the string containing the program name or the web page address, for an annotation object with a hyperlink of type ANNLINK_RUN or ANNLINK_WEBPAGE.

Call this method once, with ppText set to nil. The return value of the method will be the size (number of characters) in the hyperlink string. Next, allocate the appropriate amount of memory for the ppText(size + 1), and call this method again to retrieve the hyperlink string containing the program name or the web page address, for an annotation object with a hyperlink of type ANNLINK_RUN or ANNLINK_WEBPAGE.

See Also

Elements: | AnnSetHyperlinkString method, AnnGetHyperlinkType method
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


AnnGetHyperlinkType method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetHyperlinkType (LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetHyperlinkType (hObject: L_HANDLE): Integer;
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) Returns the hyperlink type for a given object.

See Also

Elements: | OnAnnHyperlink event, AnnSetHyperlinkMsg method, AnnSetHyperlinkString method
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


AnnGetItemHandle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::L_HANDLE AnnGetItemHandle (LEADTyp::L_PHANDLE phObjects, int iIndex);
Delphi Syntax | Function AnnGetItemHandle (phObjects: L_PHANDLE; iIndex: Integer): L_HANDLE;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns the handle of an object from an array of handles.

See Also

Elements: | OnAnnSelect event, OnAnnHyperlinkMenu event, AnnGetSelectList method
Topics: | Annotations (Document/Medical only): Automation


AnnGetLineStyle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetLineStyle (HANNOBJECT hObject, unsigned &uLineStyle);
Delphi Syntax | Function AnnGetLineStyle (hObject: HANNOBJECT; uLineStyle: L_UINT): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the line style of the specified annotation object.

See Also

Elements | AnnSetLineWidth method, AnnGetLineWidth method, AnnSetLineStyle method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnGetLineWidth method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetLineWidth(HANNOBJECT hObject, double &dLineWidth)
Delphi Syntax | Function AnnGetLineWidth (hObject: HANNOBJECT; var dLineWidth: L_DOUBLE ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the current un-scaled value of the line width of the specified annotation object.

The line width is scaled using an average of the horizontal and vertical scaling factors of the container object. For more information, refer to Low-Level Coordinate System for Annotations.

See Also

Elements: | AnnSetLineWidth method, AnnSetLineStyle method, AnnGetLineStyle method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetLocked method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnGetLocked(LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetLocked(hObject: L_HANDLE): Boolean;
Overview | Refer to Implementing Annotation Security.

Remarks

(Document/Medical only) Returns a value that indicates whether the specified object is locked.

See Also

Elements: | AnnLock method, AnnUnlock method, AnnShowLockedIcon property
Topics: | Annotations (Document/Medical only): Annotation Security


AnnGetMetafile method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetMetafile(HANNOBJECT hObject, unsigned &hFile)
Delphi Syntax | Function AnnGetMetafile(hObject: HANNOBJECT; var hFile: HMETAFILE): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Retrieves the metafile handle associated with an object.

The AnnGetMetafile method is valid only for the following object types:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

The ANNOBJECT_STAMP objects (which include the Rubber Stamp tools) can display text, a bitmap or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two.

Initially, the ANNOBJECT_STAMP object displays text. The difference between the Stamp and the Rubber Stamp is that initially whereas the Stamp does not display an image, the Rubber Stamp tools are set to display different metafiles (one for each rubber stamp selection).

Initially, the Hotspot, Freehand Hotspot, and Encrypt objects are also set to display predefined metafiles.

Use the AnnGetMetafile method to retrieve a metafile for an object. Use the AnnSetMetafile method to change the metafile for an object. Any new objects will still get the default metafile.

See Also

Elements: | AnnSetMetafile method, AnnSetPredefinedMetafile method, AnnGetPredefinedMetafile method, AnnGetEncryptOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnGetSecondaryMetafile method, AnnPredefinedBitmap property, AnnGetPointOptions method, AnnEncryptOptions property, AnnSetBitmap method, AnnSetSecondaryBitmap method, AnnGetSecondaryBitmap method, EncryptBitmap property, AnnPointOptions property, PointUseBitmap property, PointBitmap property
Topics: | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps
 | Obtaining Annotation Object Information


AnnGetNameOffsetX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetNameOffsetX (L_HANDLE hObject);
Delphi Syntax | Function AnnGetNameOffsetX (hObject: L_HANDLE): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the X-coordinate of the name offset of the specified annotation object.

The name offset of an annotation object is an offset that is relative to the upper left corner of the bounding box of the annotation. The name offset coordinates are in pixels, where the image is viewed at 100%. The name offset can be changed by:

1. | Calling the AnnSetNameOffsetX or AnnSetNameOffsetY methods
2. | Right-clicking the object in design-mode, selecting Name Properties, setting the NameOffset using the text box, and clicking "Apply".
3. | Clicking on the object name in design-mode and dragging it to a new location

When an object is created in automation mode, the newly created object will have the same name restrictions that the automation object had. That is, if the name of the automation object is restricted, the name of the newly created object is restricted. If the name of the automation object was not restricted, then the name of the newly created object will not be restricted.

See Also

Elements: | AnnGetNameRestrict method, AnnSetNameRestrict method, AnnGetNameOffsetX method, AnnGetNameOffsetY method, AnnSetNameOffsetX method, AnnSetNameOffsetY method
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnGetNameOffsetY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetNameOffsetY (L_HANDLE hObject);
Delphi Syntax | Function AnnGetNameOffsetY (hObject: L_HANDLE ): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the Y-coordinate of the name offset of the specified annotation object.

The name offset of an annotation object is an offset that is relative to the upper left corner of the bounding box of the annotation. The name offset coordinates are in pixels, where the image is viewed at 100%. The name offset can be changed by:

1. | Calling the AnnSetNameOffsetX or AnnSetNameOffsetY methods
2. | Right-clicking the object in design-mode, selecting Name Properties, setting the NameOffset using the text box, and clicking "Apply".
3. | Clicking on the object name in design-mode and dragging it to a new location

When an object is created in automation mode, the newly created object will have the same name restrictions that the automation object had. That is, if the name of the automation object is restricted, the name of the newly created object is restricted. If the name of the automation object was not restricted, then the name of the newly created object will not be restricted.

See Also

Elements: | AnnGetNameRestrict method, AnnSetNameRestrict method, AnnGetNameOffsetX method, AnnGetNameOffsetY method, AnnSetNameOffsetX method, AnnSetNameOffsetY method
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnGetNameOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetNameOptions(HANNOBJECT hObject)
Delphi Syntax | AnnGetNameOptions (hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets the annotation name options for the specified annotation object.

This method updates the AnnNameOptions property with the annotation name options for the object specified in hObject.

To set annotation name options set the AnnNameOptions property with the desired name options, and then call the AnnSetNameOptions method.

See Also

Elements: | AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations: Object Manipulation


AnnGetNameRestrict method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnGetNameRestrict (L_HANDLE hObject);
Delphi Syntax | Function AnnGetNameRestrict (hObject: L_HANDLE): Boolean;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value that indicates whether the name of the specified annotation object is restricted. If the name of an annotation object is restricted, the name will fully appear on the bitmap. If the name is not restricted, part of the name may appear on the bitmap while other parts do not.

For example, if the name of an annotation object has been restricted by calling the AnnSetNameRestrict method with the bNameRestrict parameter set to TRUE, the name offset cannot be set so that the object name is outside the bitmap (annotation container). The name offset is set by calling the AnnSetNameOffsetX method and the AnnSetNameOffsetY method. To determine the current offset, call the AnnGetNameOffsetX method and the AnnGetNameOffsetY method.

For example, consider a 200 x 200 bitmap that has a 100 x 100 button in the lower right corner and the name of the button is "Button". Attempting to set the name offset to anything larger than (43,100) will result in the name offset being set to (43,100) anyway. In addition, dragging the annotation object itself in such a way that would cause the object name to be moved outside the bitmap will cause the name offset to change.

The restriction on an object name can be changed by:

1. | Calling the AnnSetNameRestrict method.
2. | Right-clicking the object in design-mode, selecting Name Properties, setting the NameRestrict check box, and clicking "Apply".

When an object is created in automation mode, the newly created object will have the same name restrictions that the automation object had. That is, if the name of the automation object is restricted, the name of the newly created object is restricted. If the name of the automation object was not restricted, then the name of the newly created object will not be restricted.

See Also

Elements: | AnnGetNameRestrict method, AnnSetNameRestrict method, AnnGetNameOffsetX method, AnnGetNameOffsetY method, AnnSetNameOffsetX method, AnnSetNameOffsetY method
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnGetNodes method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetNodes(HANNOBJECT hObject, bool &bShowNodes, unsigned &uGapNodes);
Delphi Syntax | Function AnnGetNodes(hObject: HANNOBJECT; var bShowNodes: Boolean; var uGapNodes: L_UINT): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets information on which nodes of the annotation object should display when in design mode.

This method is valid for the following annotation objects:

ANNOBJECT_CURVE

ANNOBJECT_CURVECLOSED

ANNOBJECT_FREEHAND

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores node settings along with the other object default settings

Note: The last node is always shown. Therefore, using a large value for uGapNodes will probably result in only the first and last nodes being shown.

See Also

Elements | AnnSetNodes method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Getting and Setting Node Properties


AnnGetObjectFromTag method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::L_HANDLE AnnGetObjectFromTag(LEADTyp::L_HANDLE hObject, int lTag , bool bSelected);
Delphi Syntax | Function AnnGetObjectFromTag(hObject: L_HANDLE; lTag : longint; bSelected: Boolean): L_HANDLE;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns a handle to the object that has the specified tag.

For more information on getting and setting tags, refer to AnnGetTag method and AnnSetTag method.

See Also

Elements: | AnnGetTag method, AnnSetTag method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetOffsetX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetOffsetX (HANNOBJECT hObject, double &dOffsetX);
Delphi Syntax | Function AnnGetOffsetX (hObject: HANNOBJECT; var dOffsetX: L_DOUBLE ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Gets the X offset of the annotation object. Typically, this value is used to match the root container's offset to the offset of the associated bitmap's display rectangle.

The offset values are applied after the scalar properties, which are set by the AnnSetScalarX and AnnSetScalarY methods. For more information, refer to Low-Level Coordinate System for Annotations.

See Also

Elements | AnnSetScalarX method, AnnSetScalarY method, AnnGetScalarX method, AnnGetScalarY method, AnnSetOffsetY method, AnnGetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Automation
 | Fixed Annotations


AnnGetOffsetY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetOffsetY (HANNOBJECT hObject, double &dOffsetY);
Delphi Syntax | Function AnnGetOffsetY (hObject: HANNOBJECT; var dOffsetY: L_DOUBLE ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Gets the Y offset of the annotation object. Typically, this value is used to match the root container's offset to the offset of the associated bitmap's display rectangle.

The offset values are applied after the scalar properties, which are set by the AnnSetScalarX and AnnSetScalarY methods. For more information, refer to Low-Level Coordinate System for Annotations.

See Also

Elements | AnnSetScalarX method, AnnSetScalarY method, AnnGetScalarX method, AnnGetScalarY method, AnnSetOffsetX method, AnnSetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Automation
 | Fixed Annotations


AnnGetPointCount method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetPointCount(LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetPointCount (hObject: L_HANDLE): Longint;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns the number of vertices (corner points) in an annotation object.

AnnGetPointCount works only with the following types of objects:

ANNOBJECT_POINTER
ANNOBJECT_FREEHAND
ANNOBJECT_LINE
ANNOBJECT_POLYGON
ANNOBJECT_POLYLINE

Use the AnnGetType method to identify the object type.

For an ANNOBJECT_TEXTPOINTER object, Count is updated with the value 5.

See Also

Elements | AnnGetPointX method, AnnGetPointY method, Point property
Topics | Annotations (Document/Medical only): Automation


AnnGetPointOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetPointOptions(HANNOBJECT hObject)
Delphi Syntax | AnnGetPointOptions (hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets the annotation point options for the specified Point annotation object.

This method updates the AnnPointOptions property with the annotation point options for the object specified in hObject.

To set annotation point options set the AnnPointOptions property with the desired point options, and then call the AnnSetPointOptions method.

See Also

Elements: | AnnPointOptions property, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TAnnPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


AnnGetPointX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnPoints * AnnGetPointX (LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetPointX (hObject: L_HANDLE): TANNPOINTS;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns an object of type TAnnPoints, which contains the X coordinates of the vertices (corner points) of the specified annotation object. The X coordinates can be accessed through the Point property. This method can be used with the AnnGetPointY method to get the vertices of the object. The points that define the vertices are relative to the bitmap in the control.

When the TAnnPoints object is no longer needed, free the object by calling the procedure TAnnPoints Free ().

AnnGetPointX works only with the following types of objects:

ANNOBJECT_AUDIO
ANNOBJECT_BUTTON
ANNOBJECT_CROSSPRODUCT
ANNOBJECT_CURVE
ANNOBJECT_CURVECLOSED
ANNOBJECT_ELLIPSE
ANNOBJECT_ENCRYPT
ANNOBJECT_FREEHAND
ANNOBJECT_FREEHANDHOTSPOT
ANNOBJECT_HILITE
ANNOBJECT_HOTSPOT
ANNOBJECT_LINE
ANNOBJECT_NOTE
ANNOBJECT_POINT
ANNOBJECT_POINTER
ANNOBJECT_POLYGON
ANNOBJECT_POLYLINE
ANNOBJECT_POLYRULER
ANNOBJECT_PROTRACTOR
ANNOBJECT_PUSHPIN
ANNOBJECT_RECT
ANNOBJECT_REDACT
ANNOBJECT_RTF
ANNOBJECT_RULER
ANNOBJECT_STAMP
ANNOBJECT_TEXT
ANNOBJECT_TEXTPOINTER
ANNOBJECT_VIDEO

Use the AnnGetType method to identify the object type. Use the AnnGetPointCount method to find out how many vertices are in the object.

For an ANNOBJECT_TEXTPOINTER object, Points is updated with 5 points. The first four points are coordinates of a rectangle. The last two are the endpoints of the "pointer" segment.

See Also

Elements | AnnGetPointCount method, AnnGetPointY method, Point property
Topics | Annotations (Document/Medical only): Automation
 | New Annotation Features of Version 14.5


AnnGetPointY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnPoints * AnnGetPointY (LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetPointY (hObject: L_HANDLE): TANNPOINTS;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns an object of type TAnnPoints, which contains the Y coordinates of the vertices (corner points) of the specified annotation object. The Y coordinates can be accessed through the Point property. This method can be used with the AnnGetPointX method to get the vertices of the object. The points that define the vertices are relative to the bitmap in the control.

When the TAnnPoints object is no longer needed, free the object by calling the procedure TAnnPoints Free ().

AnnGetPointX works only with the following types of objects:

ANNOBJECT_AUDIO
ANNOBJECT_BUTTON
ANNOBJECT_CROSSPRODUCT
ANNOBJECT_CURVE
ANNOBJECT_CURVECLOSED
ANNOBJECT_ELLIPSE
ANNOBJECT_ENCRYPT
ANNOBJECT_FREEHAND
ANNOBJECT_FREEHANDHOTSPOT
ANNOBJECT_HILITE
ANNOBJECT_HOTSPOT
ANNOBJECT_LINE
ANNOBJECT_NOTE
ANNOBJECT_POINT
ANNOBJECT_POINTER
ANNOBJECT_POLYGON
ANNOBJECT_POLYLINE
ANNOBJECT_POLYRULER
ANNOBJECT_PROTRACTOR
ANNOBJECT_PUSHPIN
ANNOBJECT_RECT
ANNOBJECT_REDACT
ANNOBJECT_RTF
ANNOBJECT_RULER
ANNOBJECT_STAMP
ANNOBJECT_TEXT
ANNOBJECT_TEXTPOINTER
ANNOBJECT_VIDEO

Use the AnnGetType method to identify the object type. Use the AnnGetPointCount method to find out how many vertices are in the object.

For an ANNOBJECT_TEXTPOINTER object, Points is updated with 5 points. The first four points are coordinates of a rectangle. The last two are the endpoints of the "pointer" segment.

See Also

Elements | AnnGetPointCount method, AnnGetPointX method, Point Property
Topics | Annotations (Document/Medical only): Automation
 | New Annotation Features of Version 14.5


AnnGetPolyFillMode method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetPolyFillMode (HANNOBJECT hObject, unsigned &uPolyFillMode);
Delphi Syntax | Function AnnGetPolyFillMode (hObject: HANNOBJECT; var uPolyFillMode: L_UINT ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value that indicates how a polygonal annotation with crossing lines is filled.

See Also

Elements | AnnSetFillPattern method, AnnGetFillPattern method, AnnSetFillMode method, AnnGetFillMode method, AnnSetPolyFillMode method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnGetPredefinedMetafile method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetPredefinedMetafile(int nType, bool &bEnhanced, unsigned hMetaFile)
Delphi Syntax | Function AnnGetPredefinedMetafile(nType: L_INT; var bEnhanced: Boolean; hMetaFile: HMETAFILE): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Retrieves a copy of the specified predefined metafile.

The AnnGetPredefinedMetafile method is valid only for the following object types:

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_ENCRYPT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

Use the AnnGetPredefinedMetafile method to get the default metafiles for these objects. To reset a metafile to its original metafile, call the AnnSetPredefinedMetafile method and pass 0 to hMetafile. When the metafile handle is no longer needed, it must be freed using one of the Microsoft Windows API functions (DeleteMetaFile or DeleteEnhMetaFile).

See Also

Elements: | AnnSetMetafile method, AnnGetMetafile method, AnnSetPredefinedMetafile method, AnnGetEncryptOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnGetSecondaryMetafile method, AnnPredefinedBitmap property, AnnEncryptOptions property, AnnSetBitmap method, AnnSetSecondaryBitmap method, AnnGetSecondaryBitmap method, EncryptBitmap property
Topics: | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps
 | Obtaining Annotation Object Information


AnnGetProtractorOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetProtractorOptions(HANNOBJECT hObject, bool &bAcute, int &nUnit, AnsiString &strAbbrev, int &nPrecision, float &fArcRadius);
Delphi Syntax | Function AnnGetProtractorOptions(hObject: HANNOBJECT; var bAcute: Boolean; var nUnit: L_INT; var strAbbrev: String; var nPrecision: L_INT; var fArcRadius: Single): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the options for the specified Protractor (ANNOBJECT_PROTRACTOR) object.

See Also

Elements | AnnSetProtractorOptions method, AnnGetAngle method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Information
 | Annotations (Document/Medical only): Getting and Setting the Protractor Properties


AnnGetROP2 method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetROP2(HANNOBJECT hObject, unsigned &uROP2)
Delphi Syntax | Function AnnGetROP2(hObject: HANNOBJECT; var uROP2: L_UINT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a constant that indicates which binary raster operation (ROP2) code is being used for one or more objects. ROP2 codes specify how pen or brush colors are to be combined with the colors in the image.

The AnnGetROP2 method is valid only for the following object types:

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_CURVE

ANNOBJECT_CURVECLOSED

ANNOBJECT_ELLIPSE

ANNOBJECT_FREEHAND

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_LINE

ANNOBJECT_POINTER

ANNOBJECT_POINT

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_RECT

ANNOBJECT_RULER

ANNOBJECT_STAMP

ANNOBJECT_TEXTPOINTER

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores ROP2 settings along with the other object default settings

Using the AnnGetROP2 method with an object that does not support it causes the method to return the Error (-16), which is "Feature not supported".

For descriptions of the various types of objects and their properties, refer to Types of Annotations.

Use the AnnSetROP2 method to set the ROP2 code being used for one or more annotation objects.

See Also

Elements | AnnSetROP2 method, AnnGetFillMode method, AnnSetFillMode method, AnnGetTransparent method, AnnSetTransparent method.
Topics | Annotations (Document/Medical only): Object Manipulation
 | Altering Annotation Object Settings
 | Drawing Simple Objects
 | Obtaining Annotation Object Information
 | Using Color Values in LEADTOOLS


AnnGetScalarX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetScalarX (HANNOBJECT hContainer, double &dScalarX);
Delphi Syntax | Function AnnGetScalarX (hContainer: HANNOBJECT; var dScalarX: L_DOUBLE ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Gets the horizontal scaling factor that is applied to the annotation object. Typically, the scaling factors are applied to a root container so that the annotations will match the displayed image.

Offset values, which are set by the AnnSetOffsetX and AnnSetOffsetY methods, are applied after the scalar properties. For more information, refer to Low-Level Coordinate System for Annotations.

See Also

Elements | AnnSetScalarX method, AnnSetScalarY method, AnnGetScalarY method, AnnSetOffsetX method, AnnSetOffsetY method, AnnGetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Automation
 | Fixed Annotations


AnnGetScalarY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetScalarY (HANNOBJECT hContainer, double &dScalarY);
Delphi Syntax | Function AnnGetScalarY (hContainer: HANNOBJECT; var dScalarY: L_DOUBLE ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Gets the vertical scaling factor that is applied to the annotation object. Typically, the scaling factors are applied to a root container so that the annotations will match the displayed image.

Offset values, which are set by the AnnSetOffsetX and AnnSetOffsetY methods, are applied after the scalar properties. For more information, refer to Low-Level Coordinate System for Annotations.

See Also

Elements | AnnSetScalarX method, AnnSetScalarY method, AnnGetScalarX method, AnnSetOffsetX method, AnnSetOffsetY method, AnnGetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Automation
 | Fixed Annotations


AnnGetSecondaryBitmap method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetSecondaryBitmap(HANNOBJECT hObject, TBitmapHandle &Bitmap)
Delphi Syntax | Function AnnGetSecondaryBitmap(hObject: HANNOBJECT; var Bitmap: TBitmapHandle): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Retrieves the secondary bitmap of the specified object.

Only PushPin objects (ANNOBJECT_PUSHPIN) use a secondary bitmap.

A pushpin object has a primary bitmap (manipulated using the AnnSetBitmap and AnnGetBitmap methods), which displays whenever the text is shown; and a secondary bitmap, changed using the AnnSetSecondaryBitmap method. The primary bitmap displays with the note text. The secondary bitmap displays by itself when the note is minimized.

In design mode, the PushPin object shows the text and displays the primary bitmap. In run mode, the object shows or hides the text when clicked.

See Also

Elements: | AnnSetBitmap method, AnnSetSecondaryBitmap method
Topics: | Obtaining Annotation Object Information
 | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps
 | Drawing Simple Objects
 | Annotations (Document/Medical only): Object Manipulation
 | Altering Annotation Object Settings


AnnGetSecondaryMetafile method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetSecondaryMetafile(HANNOBJECT hObject, unsigned &hFile)
Delphi Syntax | AnnGetSecondaryMetafile(hObject: HANNOBJECT; var hFile: HMETAFILE): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets the metafile handle associated with an encryptor object when it is in the ‘decryptor’ state.

The encrypt object has two states:

Encryptor

Decryptor

Each state is displayed with its own metafile.

Use this method to retrieve the current metafile for an encrypt object in a ‘decryptor’ state. The default image is shown in the figure below:

See Also

Elements: | AnnEncryptApply method, AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnNameOptions), Flags property (TAnnNameOptions), Key property (TAnnNameOptions), NeverEncrypted property (TAnnNameOptions), SaveDecryptorKey property (TAnnNameOptions), SaveEncryptorKey property (TAnnNameOptions), ClearDecryptorKey property (TAnnNameOptions), ClearEncryptorKey property (TAnnNameOptions), EncryptBitmap property (TAnnNameOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation
 | Using Annotation Object Bitmaps


AnnGetSelectCount method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetSelectCount(void);
Delphi Syntax | Function AnnGetSelectCount: Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns the number of currently selected annotation objects.

See Also

Elements | AnnGetSelectList method, OnAnnSelect event
Topics | Annotations (Document/Medical only): Automation
 | Annotations (Document/Medical only): Using Window Coordinates to Select Objects


AnnGetSelected method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetSelected(HANNOBJECT hObject, bool &bSelected);
Delphi Syntax | Function AnnGetSelected(hObject: HANNOBJECT; var bSelected: Boolean): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value that indicates whether the specified annotation object is selected.

The AnnSet... methods can be used to set the properties of all objects that have the selected property set to TRUE.

See Also

Elements | AnnSelectRect method, AnnGetType method, AnnHitTestExt method, AnnShowLockedIcon property, AnnSelectPoint method, AnnGetSelectRect method, AnnGetSelectCount method, AnnSetSelected method, AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetVisible method, AnnDefine2 method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Information


AnnGetSelectList method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | void AnnGetSelectList (LEADTyp::L_PHANDLE phObjects);
Delphi Syntax | Procedure AnnGetSelectList (phObjects: L_PHANDLE);
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets an array of object handles for the currently selected annotation objects.

Before calling this method, call the AnnGetSelectCount method to get the number of currently selected annotation objects, and use this number to allocate memory as shown below:

nNumberOfSlectedItems = AnnGetSelectCount method ();

phObjects = AllocMem (nNumberOfSlectedItems * sizeof
 ( L_HANDLE )) ;
AnnGetSelectList(phObjects);
.
.
FreeMem(phObjects);

To get each handle in this array of handles, call the AnnGetItemHandle method.

See Also

Elements | AnnGetSelectCount method, OnAnnSelect event
Topics | Annotations (Document/Medical only): Automation
 | Displaying and Manipulating Annotation Objects


AnnGetSelectRect method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetSelected(HANNOBJECT hObject, TRect &rcSelect);
Delphi Syntax | Function AnnGetSelected(hObject: HANNOBJECT; var rcSelect: TRect): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) (Document/Medical only) Updates the rcSelect variable with the window coordinates of the rectangle that includes all selected annotation objects.

See Also

Elements | AnnSelectRect method, AnnGetType method, AnnHitTestExt method, AnnShowLockedIcon property, AnnSelectPoint method, AnnGetSelectCount method, AnnSetSelected method, AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetVisible method, AnnDefine2 method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Information
 | Annotations (Document/Medical only): Using Window Coordinates to Select Objects


AnnGetShowFlags method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetShowFlags(HANNOBJECT hObject, unsigned &uShowFlags);
Delphi Syntax | Function AnnGetShowFlags(hObject: HANNOBJECT; var uShowFlags: L_UINT): L_INT;
Overview | Refer to Using Rulers in Annotation Objects.

Remarks

(Document/Medical only) Gets a value that indicates how the Rulers, Polyrulers, Cross-products, and Protractors will be displayed.

This method is valid for the following objects:

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_RULER

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores node settings along with the other object default settings

For Protractor objects, the default value for uShowFlags is 0. For the Ruler, PolyRuler, and Cross-Product objects the default value for uShowFlags is ANNSHOW_LENGTH + ANNSHOW_TICMARKS.

See Also

Elements | AnnRulerUnit property, AnnSmartUnit property, AnnDistance property, AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnDistanceCount property, AnnRulerUnit property, AnnGetDistance2 method, AnnGetDistance method, AnnSetUnit method, AnnGetUnit method, AnnSetGaugeLength method, AnnGetGaugeLength method, AnnTicMarkLength property, AnnSetShowFlags method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Information
 | Crossproduct Annotation Object
 | Annotation Automation Object
 | Protractor Annotation Object
 | Polyruler Annotation Object
 | Ruler Annotation Object
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnGetTag method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetTag(LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetTag(hObject: L_HANDLE): longint;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns the numeric tag assigned to the specified annotation object using the AnnSetTag method.

The AnnSetTag method and the AnnGetTag method can be used to keep track of particular objects such as buttons or hot spots over time.

When a file is loaded, an OnAnnCreate event is generated for each annotation object. Add code to this event to see which tags are already used in a file.

See Also

Topics:

Annotations (Document/Medical only): Object Manipulation


AnnGetText method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetText(HANNOBJECT hObject, AnsiString &strText)
Delphi Syntax | Function AnnGetText (hObject: HANNOBJECT; var strText: String ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the text (character string) of the specified annotation object.

Note:

The text of the ruler object (which can be retrieved through AnnGetText is the length + unit abbrev. The distance is reset every time the object is changed.

AnnGetText can be used to retreive the text from a Rich Text annotation object (ANNOBJECT_RTF). However, no formatting information will be preserved. To retrieve the text with formatting, see AnnRTFText.

See Also

Elements: | AnnSetText method, AnnGetAutoText method, AnnSetAutoText method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnGetTopContainer method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | Int AnnGetTopContainer(HANNOBJECT hObject, HANNOBJECT & hTopContainer)
Delphi Syntax | Function AnnGetTopContainer(hObject: HANNOBJECT; var hTopContainer: HANNOBJECT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the handle to the root container of the specified annotation object.

See Also

Elements: | AnnEnumerate method, AnnCopy method, AnnPaste method, AnnPasteReady property, AnnInsert method, AnnRemove method, AnnDefine method, AnnDefine2 method, AnnCreate method, AnnCreateItem method, AnnDestroy method, AnnRemove method, AnnAddUserHandle method, AnnAdjustPoint method, AnnChangeUserHandle method, AnnConvert method, AnnDefine2 method, AnnDeleteUserHandle method, AnnEnumerateHandles method, AnnGetContainer method, AnnGetUserHandle method, AnnGetUserHandles method, AnnHitTestExt method, AnnRestrictCursor method
Topics: | Grouping and Ungrouping Annotation Objects
 | Displaying and Manipulating Annotation Objects
 | Obtaining Annotation Object Information


AnnGetTransparent method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetTransparent(HANNOBJECT hObject, bool &bTransparent);
Delphi Syntax | Function AnnGetTransparent(hObject: HANNOBJECT; var bTransparent: Boolean): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets a value indicating whether the bitmap is using a transparent color. A transparent color is not painted when painting an image.

The AnnGetTransparent method is valid only for the following object types when they are using a bitmap:

ANNOBJECT_POINT

ANNOBJECT_STAMP

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores transparency settings along with the other object default settings

Use the AnnSetTransparent method to set such objects to use a transparent color. By default the transparent color is white (0x00FFFFFF). Use the AnnSetTransparentColor method to set the color to be used as the transparent color. Use the AnnGetTransparent method to get a value that indicates whether the bitmap being used by the annotation object is using a transparent color. Use the AnnGetTransparentColor method to get a value that indicates which color is being used as the transparent color.

See Also

Elements | AnnSetTransparent method, AnnGetSelected method, AnnSetSelected method, AnnGetROP2 method, AnnSetROP2 method, AnnSetTransparentColor method, AnnGetTransparentColor method, AnnGetBackColor method, AnnSetBackColor method, AnnSetForeColor method, AnnGetForeColor method, AnnSetAutoBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Information
 | Annotations (Document/Medical only): Object Bitmap
 | Stamp Annotation Object
 | Point Annotation Object
 | Annotation Automation Object
 | Using Color Values in LEADTOOLS
 | Implementing Transparency
 | Displaying and Manipulating Annotation Objects


AnnGetTransparentColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetTransparentColor(HANNOBJECT hObject, TColor &clTransparent)
Delphi Syntax | Function AnnGetTransparentColor (hObject: HANNOBJECT; clTransparent: TColor): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Retrieves the transparent color set by the AnnSetTransparentColor method. By default the transparent color is white (0x00FFFFFF). A transparent color is not painted when painting an image. For information on how LEADTOOLS uses colors, refer to Using Color Values in LEADTOOLS.

The AnnGetTransparentColor method is valid only for the following object types when they are using a bitmap:

ANNOBJECT_POINT

ANNOBJECT_STAMP

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores transparency settings along with the other object default settings

Use the AnnSetTransparent method to set such objects to use a transparent color. Use the AnnSetTransparentColor method to set the color to be used as the transparent color. Use the AnnGetTransparent method to get a value that indicates whether the bitmap being used by the annotation object is using a transparent color.

VCL uses the TColor enumerated data type that covers the values that can be returned by the Windows RGB macro. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements | AnnSetTransparent method, AnnGetSelected method, AnnSetSelected method, AnnGetROP2 method, AnnSetROP2 method, AnnSetTransparentColor method, AnnGetTransparent method, AnnGetBackColor method, AnnSetBackColor method, AnnSetForeColor method, AnnGetForeColor method, AnnSetAutoBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Information
 | Annotations (Document/Medical only): Object Bitmap
 | Stamp Annotation Object
 | Point Annotation Object
 | Annotation Automation Object
 | Using Color Values in LEADTOOLS
 | Implementing Transparency
 | Displaying and Manipulating Annotation Objects


AnnGetType method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetType(LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetType(hObject: L_HANDLE): integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns a value that identifies the type of annotation object.

The following are the possible values:

Value | Meaning
ANNOBJECT_CONTAINER | Container object
ANNOBJECT_LINE | Line
ANNOBJECT_RECT | Rectangle
ANNOBJECT_ELLIPSE | Ellipse
ANNOBJECT_POLYLINE | Polyline
ANNOBJECT_POLYGON | Polygon
ANNOBJECT_POINTER | Pointer
ANNOBJECT_FREEHAND | Freehand Line
ANNOBJECT_HILITE | Highlight
ANNOBJECT_REDACT | Redaction
ANNOBJECT_TEXT | Text
ANNOBJECT_NOTE | Note
ANNOBJECT_STAMP | Stamp
ANNOBJECT_HOTSPOT | Hot spot
ANNOBJECT_BUTTON | Button
ANNOBJECT_AUDIO | Audio Clip
ANNOBJECT_RULER | Ruler Tool
ANNOBJECT_CROSSPRODUCT | Cross product Tool
ANNOBJECT_POINT | Point Tool
ANNOBJECT_PROTRACTOR | Protractor Tool
ANNOBJECT_PUSHPIN | PushPin Tool
ANNOBJECT_FREEHANDHOTSPOT | Freehand Hot Spot Tool

See Also

Elements: | AnnTool property
Topics: | Annotations (Document/Medical only): Automation


AnnGetUnit method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetUnit (HANNOBJECT hObject, AnsiString &strUnitAbbrev, unsigned &uUnit, unsigned &uPrecision);
Delphi Syntax | Function AnnGetUnit (hObject: HANNOBJECT; var strUnitAbbrev: String; var uUnit: L_UINT; var uPrecision: L_UINT ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the current unit of measurement values set by the AnnSetUnit method. The following annotation objects utilize one or more rulers as part of the annotation:

ANNOBJECT_AUTOMATION

ANNOBJECT_RULER

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_CROSSPRODUCT

To determine the unit of measure for each ruler, check the AnnRulerUnit property and the AnnSmartUnit property. The default unit of measure for ruler, polyruler, and crossproduct objects is smart English. With the smart units, the unit changes with the length. For example, if the length is 11 inches (assuming the default precision of 2 is being used), "11.00 in" displays whereas if the length is 15 inches, "1 ft 3.00 in" displays. Use the AnnSetUnit method to set the unit of measurement and its precision for the ruler. The precision indicates how many digits to display to the right of the decimal point in the length. Use the AnnGetUnit method to get the unit of measurement and its precision for the ruler. The AnnGetDistance2 method updates the following properties with information about the ruler(s) contained in the specified object:

AnnTotalDistance

AnnTotalRulerUnit

AnnTotalSmartUnit

AnnDistance

AnnRulerUnit

AnnSmartUnit

AnnDistanceCount

See Also

Elements | AnnSetGaugeLength method, AnnSetUnit method, AnnGetDistance method, AnnGetGaugeLength method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Rulers in Annotation Objects


AnnGetUserHandle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetUserHandle(HANNOBJECT hObject, unsigned uIndex)
Delphi Syntax | Function AnnGetUserHandle (hObject: HANNOBJECT; uIndex: L_UINT32 ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets information about the specified user-defined annotation handle.

This method updates the AnnHandle property with the annotation handle information for the specified handle.

To add a new user handle to an annotation object, set the AnnHandle property with the desired handle information, and then call the AnnAddUserHandle method.

To change an existing user handle, call the AnnGetUserHandle method to get the current handle information. Set the desired values in the AnnHandle property and then call the AnnChangeUserHandle method.

A user handle can be deleted using the AnnDeleteUserHandle method.

See Also

Elements: | AnnHandle property, AnnAddUserHandle method, AnnChangeUserHandle method, AnnDeleteUserHandle method, ID property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property(TAnnHandleInfo), PenColor property(TAnnHandleInfo), FillColor property(TAnnHandleInfo), Shape property(TAnnHandleInfo), Cursor property(TAnnHandleInfo), AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnGetUserHandles method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetUserHandles(HANNOBJECT hObject)
Delphi Syntax | AnnGetUserHandles (hObject: HANNOBJECT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets information about all existing user-defined annotation handles for the specified annotation object.

The AnnGetUserHandles method updates the AnnUserHandle property with the annotation handle information for all handles associated with the specified annotation object. The AnnUserHandlesCount property is updated with the number of handles retrieved by the AnnGetUserHandles method.

See Also

Elements: | AnnUserHandlesCount property, AnnUserHandle property, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnGetVisible method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnGetVisible(LEADTyp::L_HANDLE hObject);
Delphi Syntax | Function AnnGetVisible(hObject: L_HANDLE): Boolean;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Returns a value that indicates whether the specified object is visible.

See Also

Elements | AnnCreate method, AnnDefine method, AnnDestroy method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method, AnnSetVisible method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnGetWnd method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGetWnd(HANNOBJECT hObject, HWND &h_Wnd)
Delphi Syntax | Function AnnGetWnd (hObject: HANNOBJECT; var h_Wnd: HWND ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Gets the window handle of the specified annotation object.

See Also

Elements: | AnnSetWnd method
Topics: | Annotations (Document/Medical only): Global Properties


AnnGroup method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnGroup(LEADTyp::L_HANDLE hObject, int iFlags, char * pszUserList);
Delphi Syntax | Function AnnGroup(hObject: L_HANDLE; iFlags: Integer; pszUserList: PChar): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Groups a number of objects within a container.

The Group automation menu item operates like AnnGroup(hObject, ANNFLAG_RECURSE+ANNFLAG_SELECTED+ANNFLAG_CHECKMENU, nil).

If ANNFLAG_USER is included in iFlags, any user associated with an object to be "grouped" must be included in pUserList. The method checks pUserList before grouping the objects and any object that has a user not in pUserList will not be included in the group.

If ANNFLAG_USER is not included in iFlags, the user list is ignored.

Please note that if ANNFLAG_SELECTED+ANNFLAG_USER, for example, is included in iFlags, the grouped objects must have a user in pUserList AND must be selected.

See Also

Elements | AnnUngroup method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnHitTestExt method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnHitTestExt(HANNOBJECT hContainer, double dX, double dY)
Delphi Syntax | AnnHitTestExt (hContainer: HANNOBJECT; dX: L_DOUBLE; dY: L_DOUBLE ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

This method encapsulates the AnnHitTest, which gets the handle to the annotation object that is located at a specific point. (If objects overlap, it gets the front object.) AnnHitTestExt gets additional information about the annotation object handle if the handle is a default or user-defined handle. This additional information can be found in the AnnHandleIndex property and the AnnHandleID property.

See Also

Elements: | AnnHandleIndex property, AnnHandleID property, AnnPositionResult property, AnnObjectHitHandle property, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects
 | Annotations (Document/Medical only): Using Window Coordinates to Select Objects
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations


AnnInsert method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnInsert(LEADTyp::L_HANDLE hContainer, LEADTyp::L_HANDLE hObject, bool bStripContainer);
Delphi Syntax | Function AnnInsert(hContainer: L_HANDLE; hObject: L_HANDLE; bStripContainer: Boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Inserts the specified annotation object into the specified container.

If hObject is a single annotation object, set bStripContainer to False. That way the object itself is inserted.

If hObject is a container, setting bStripContainer to True will insert only the objects within the container, not the container itself.

If hObject is a container, setting bStripContainer to False will insert the container and all objects within the container.

See Also

Elements | AnnCut method, AnnPaste method, AnnPasteReady property, AnnRemove method, AnnInsert method, AnnCopy method, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics | Annotations (Document/Medical only): Using the Clipboard
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Displaying and Manipulating Annotation Objects


AnnInsertTextTokenTable method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnInsertTextTokenTable(void)
Delphi Syntax | AnnInsertTextTokenTable ( ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Inserts a text token into the text token table.

See Also

Elements: | AnnDescription property, AnnTokenString property, AnnToken property, AnnTokenType property, AnnDeleteTextTokenTable method, AnnClearTextTokenTable method, AnnEnableEnumerateTextTokenTableEvent property, AnnEnumerateTextToken method, OnAnnEnumerateTextTokenTable event
Topics: | Annotations: Automation


AnnIsFixedRect method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnnIsFixedRect(HANNOBJECT hObject, int nLeft, int nTop, int nRight, int nBottom)
Delphi Syntax | AnnIsFixedRect (hObject: HANNOBJECT; nLeft: L_INT; nTop: L_INT; nRight: L_INT; nBottom: L_INT): Boolean
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Indicates whether there are any fixed annotations in the client rectangle. This method is available in the Toolkits.

You must set the AnnFlags property before calling this method. Possible values for the AnnFlags property, when used with this method are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property, AnnPopFixedState method, AnnPushFixedState method
Topics: | Annotations: Object Manipulation


AnnLoad method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnLoad(AnsiString szFile, int nPage);
Delphi Syntax | Function AnnLoad(szFile: string; nPage: longint): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Loads the annotations from the designated file and page.

The annotations are sized to fit their original size and position relative to the bitmap in the control. If the LEADAnn Control does not have a bitmap image, an error occurs. AnnLoad will load annotations stored in LEAD files. It will also load annotations stored in a Wang compatible TIFF tag in a TIF file.

See Also

Elements | AnnSave method
Topics | Annotations (Document/Medical only): Input and Output


AnnLoadMemory method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnLoadMemory(LEADTyp::L_HANDLE hMem, int iSize, int nPage);
Delphi Syntax | Function AnnLoadMemory( hMem: L_HANDLE; iSize: longint; nPage: Integer): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Loads annotations from a file that is stored in memory.

The argument hMem can refer to either an annotation file (single page or multi-page) or a TIF file (single or multi-page). In either case, the argument nPage refers to the page number.

The annotations are sized to fit their original size and position relative to the bitmap in the control. If the LEADAnn Control does not have a bitmap image, an error occurs.

See Also

Topics:

Annotations (Document/Medical only): Input and Output


AnnLock method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnLock (LEADTyp::L_HANDLE hObject, AnsiString szKey, bool fSelected);
Delphi Syntax | Function AnnLock(hObject: L_HANDLE; szKey: string; fSelected: Boolean): integer;
Overview | Refer to Implementing Annotation Security

Remarks

(Document/Medical only) Locks annotations with the specified key. Annotations cannot be modified through the automated mode unless they are unlocked with the same key either using AnnUnlock method, or through the automated mode unlock menu item. The key is case sensitive! If the AnnShowLockedIcon property is True, the locked objects are drawn with a padlock icon on top of them. If a redact object is locked, AnnUnrealize method will fail on that object.

There is one property associated with this method. The AnnShowLockedIcon property determines how locked objects are drawn.

See Also

Elements: | AnnUnlock method, AnnUnrealize method, AnnShowLockedIcon property, OnAnnLocked event, AnnRealize method, OnAnnUnlocked event
Topics: | Annotations (Document/Medical only): Annotation Security


AnnMove method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnMove(float dxOffset, float dyOffset, bool bSelected);
Delphi Syntax | Function AnnMove (dxOffset: Single; dyOffset: Single; bSelected: Boolean): integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Moves annotation objects, using delta values that are relative to the bitmap.

If the bSelected parameter is true, this method affects only the currently selected objects. Otherwise, it affects all objects.

See Also

Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnPaste method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnPaste(void);
Delphi Syntax | Function AnnPaste: Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Pastes annotation objects from the clipboard to the LEADAnn Control. The data on the clipboard must be a LEAD annotation in native format.

Before calling this method, use the AnnPasteReady property to test the validity of data on the clipboard.

See Also

Elements | AnnCut method, AnnPaste method, AnnPasteReady property, AnnRemove method, AnnInsert method, AnnCopy method
Topics | Annotations (Document/Medical only): Using the Clipboard
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Using Rulers in Annotation Objects
 | Displaying and Manipulating Annotation Objects


AnnPopFixedState method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnPopFixedState(HANNOBJECT hObject)
Delphi Syntax | AnnPopFixedState (hObject: HANNOBJECT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Re-enables the ‘fixed’ state of the specified annotation.

You must set the AnnFlags property before calling this method. Possible values for the AnnFlags property for this method are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property, AnnIsFixedRect method, AnnPushFixedState method
Topics: | Annotations: Object Manipulation


AnnPushFixedState method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnPushFixedState(HANNOBJECT hObject)
Delphi Syntax | AnnPushFixedState (hObject: HANNOBJECT): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Temporarily disables the ‘fixed’ state of the specified annotation object.

You must set the AnnFlags property before calling this method. Possible values for the AnnFlags property for this method are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

ANNFLAG_CHECKMENU

See Also

Elements: | AnnFlags property, AnnIsFixedRect method, AnnPopFixedState method
Topics: | Annotations: Object Manipulation


AnnRealize method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnRealize(bool fRedactOnly);
Delphi Syntax | Function AnnRealize(fRedactOnly: Boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Renders the annotation objects to the bitmap, altering the bitmap, itself.

When the AnnRealize method is called, for every Redact object, the background of the image behind is saved inside the object. That background can be restored by calling the AnnUnrealize method.

See Also

Elements | AnnUnrealize method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnRemove method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnRemove(HANNOBJECT hObject)
Delphi Syntax | AnnRemove(hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Removes the specified annotation object from its current container, leaving the object with no container.

To insert the object into another container, such as the main container of the display, use the AnnInsert method.

See Also

Elements: | AnnInsert method, AnnGetContainer method, AnnGetTopContainer method, AnnGetItemHandle, AnnAddUserHandle method, AnnAdjustPoint method, AnnChangeUserHandle method, AnnConvert method, AnnDefine2 method, AnnDeleteUserHandle method, AnnEnumerateHandles method, AnnGetUserHandle method, AnnGetUserHandles method, AnnHitTestExt method, AnnRestrictCursor method, AnnEnumerate method, AnnCopy method, AnnPaste method, AnnPasteReady property, AnnDefine method, AnnCreate method, AnnCreateItem method, AnnDestroy method
Topics: | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnRestrictCursor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnRestrictCursor(HANNOBJECT hContainer, int nLeft, int nTop, int nRight, int nBottom, double dX, double dY, bool bRestrictClient)
Delphi Syntax | AnnRestrictCursor (hContainer: HANNOBJECT; nLeft: L_INT; nTop: L_INT; nRight: L_INT; nBottom: L_INT; dX: L_DOUBLE; dY: L_DOUBLE; bRestrictClient: Boolean): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Restricts the mouse cursor in conjunction with annotation objects. It should be used when creating custom annotation objects.

Calling this method always restricts the mouse cursor to the annotation container. However, depending on the arguments passed, the mouse cursor can be restricted further.

This method can be used in the following ways:

To restrict the cursor to the bounds of the container, pass 0 for left, top, right and bottom and 0 for dX and dY.

To restrict the cursor to a box around dX, dY (and the container), pass left, top, right, bottom, dX and dY.

To restrict the cursor to a box (not centered around a point), pass pass left, top, right and bottom and pass 0 for dX and dY.

To do the above, and also restrict to the client area, set bRestrictClient to TRUE.

See Also

Elements: | AnnLeftPreviousClip property, AnnTopPreviousClip property, AnnRightPreviousClip property, AnnBottomPreviousClip property, AnnCreateItem method, AnnCut method, AnnGetContainer method, AnnGetTopContainer method, AnnInsert method, AnnRemove method
Topics: | Annotations:Object Manipulation
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating and Deleting Annotations
 | Displaying and Manipulating Annotation Objects


AnnReverse method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnReverse(bool bUseVert, float fVert, bool bSelected);
Delphi Syntax | Function AnnReverse(bUseVert: boolean; fVert: single; bSelected: boolean ): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Reverses one or more annotation objects, left to right.

If the bSelected parameter is true, this method affects only the currently selected objects. Otherwise, it affects all objects.

If the bUseVert parameter is true, this method reverses all affected objects on the axis specified in the fVert parameter. Otherwise, it reverses each affected object on its own center.

An object that contains text cannot be flipped or reversed. If a group of objects is flipped or reversed on a common axis, the text will move to the new position, but will retain its orientation.

For more information on flipping, reversing or rotating annotation objects, refer to Flipping, Reversing and Rotating Annotation Objects.

See Also

Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnRotate method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnRotate(bool bUseCenter, float fCenterX, float fCenterY, float dAngle, bool bSelected);
Delphi Syntax | Function AnnRotate(bUseCenter: boolean; fCenterX: Single; fCenterY: Single; dAngle: Single; bSelected: boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medicalonly) Rotates one or more annotation objects.

If the bSelected parameter is true, this method affects only the currently selected objects. Otherwise, it affects all objects.

If the bUseCenter parameter is true, this method rotates all affected objects around the point specified by the fCenterX and fCenterY parameters. Otherwise, it rotates each affected object on its own center.

Notes, hot spots, buttons, and audio clips cannot be rotated. If a group of objects is rotated around a common center, these objects will move to new positions, but will retain their orientation.

See Also

Elements | AnnAutoRotate property
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnSave method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSave(AnsiString szFile, int iFormat, bool fSelected, int iModify, int nSavePage);
Delphi Syntax | Function AnnSave(szFile: String; iFormat: integer; fSelected: Boolean; iModify: Integer; nSavePage: Integer): integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Saves the specified annotations in a file.

Annotation Files can store multiple pages. This method saves annotations to an annotation file. It can also append, replace, or overwrite pages in an existing annotation file.

To overwrite an existing annotation file, pass SAVE_OVERWRITE for the iModify parameter (nSavePage will be ignored).

To add a page to the end of an annotation file, pass SAVE_APPEND for the iModify argument (nSavePage will be ignored).

To replace a page in an annotation file, pass SAVE_REPLACE and set iSavePage to the page number to be replaced. Note that page numbers are 1-based. Therefore, the first page is page 1, the second page is page 2, etc.

To insert a new page, pass SAVE_INSERT and set iSavePage. The new page will be inserted BEFORE the page specified in iSavePage.

Annotations can also be saved in a Wang-compatible TIFF tag. For more information concerning this option, refer to AnnSaveTag method.

See Also

Elements: | AnnLoad method, AnnSaveTag method
Topics: | Annotations (Document/Medical only): Input and Output


AnnSaveMemory method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSaveMemory(LEADTyp::L_PHANDLE phMem, int iFormat, bool bSelected, Windows::PLongint piSize, int iModify, int nSavePage);
Delphi Syntax | Function AnnSaveMemory(phMem: L_PHANDLE; iFormat: Integer; bSelected: Boolean; piSize: pLongint; iModify: Integer; nSavePage: Integer): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Saves the specified annotations to a file in memory.

Annotation Files can store multiple pages. This method saves annotations to an annotation file. It can also append, replace, or overwrite pages in an existing annotation file.

To overwrite an existing annotation file, pass SAVE_OVERWRITE for the iModify parameter (iSavePage will be ignored).

To add a page to the end of an annotation file, pass SAVE_APPEND for the iModify argument (iSavePage will be ignored).

To replace a page in an annotation file, pass SAVE_REPLACE and set iSavePage to the page number to be replaced. Note that page numbers are 1-based. Therefore, the first page is page 1, the second page is page 2, etc.

To insert a new page, pass SAVE_INSERT and set iSavePage. The new page will be inserted BEFORE the page specified in iSavePage.

To use this method, do the following:

1. | To create a new annotation memory file, declare a variable of the appropriate data type to reference the file in memory, and set the value to NULL (or 0). You can then pass its address (pass the variable by reference) in this method, which will allocate the memory, save the bitmap, and unlock the memory. To add a page to an existing annotation memory file, pass the address of the existing memory handle (which must be non-zero).
2. | Declare a long integer variable for the file-size. You can then pass its address in this method, which will update its value with the size of the file.
3. | Pass the appropriate value for iModify (SAVE_OVERWRITE, SAVE_APPEND, SAVE_REPLACE or SAVE_INSERT).
4. | If iModify is SAVE_REPLACE or SAVE_INSERT, pass the appropriate page number for iSavePage. If iModify is SAVE_OVERWRITE or SAVE_APPEND then iSavePage is ignored.
5. | Call this method to save the bitmap in the specified memory handle.

To see the correct data types, refer to the code example for your development system.

To load annotations from a file in memory, refer to the AnnLoadMemory method.

See Also

Topics:

Annotations (Document/Medical only): Input and Output


AnnSaveTag method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSaveTag(bool fWangMode, bool fSelected);
Delphi Syntax | Function AnnSaveTag(fWangMode: Boolean; fSelected: Boolean): Integer;
Overview | Refer to Implementing Annotations

Remarks

(Document/Medical only) Saves all or selected annotation objects in a Wang-compatible TIFF tag. The next time a file is saved as one of the TIFF formats, the file will contain these annotations. This tag is automatically cleared when a new image is loaded into the LEADAnn Control. For more information on TIFF formats, refer to Summary of All Supported Image File Formats.

See Also

Elements: | AnnSave method
Topics: | Annotations (Document/Medical only): Input and Output


AnnSelectPoint method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSelectPoint(HANNOBJECT hContainer, const TPoint &ptSelect);
Delphi Syntax | Function AnnSelectPoint (hContainer: HANNOBJECT; ptSelect: TPoint): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Selects the annotation object at the specified point, relative to the window. If objects overlap, this method selects the front object.

When an object is selected, the bSelected value of the AnnGetSelected method used on that object will be set to TRUE.

See Also

Elements | AnnSelectRect method, AnnHitTestExt, AnnGetType method, AnnShowLockedIcon property, AnnGetSelected method, AnnGetSelectRect method, AnnGetSelectCount method, AnnSetSelected method, AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisibl methode, AnnInsert method, AnnSetAutoDefaults method, AnnSetVisible method
Topics: | Annotations (Document/Medical only): Using Window Coordinates to Select Objects
 | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnSelectRect method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSelectRect(HANNOBJECT hContainer, const TRect &rcSelect);
Delphi Syntax | Function AnnSelectRect (hContainer: HANNOBJECT; rcSelect: TRect): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Selects all objects within the specified rectangle, relative to the window.

When an object is selected, the bSelected value of the AnnGetSelected method used on that object will be set to TRUE.

See Also

Elements | AnnGetSelectRect method, AnnHitTestExt, AnnGetType method, AnnShowLockedIcon property, AnnGetSelected method, AnnSelectPoint method, AnnGetSelectCount method, AnnSetSelected method, AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisibl methode, AnnInsert method, AnnSetAutoDefaults method, AnnSetVisible method
Topics: | Annotations (Document/Medical only): Using Window Coordinates to Select Objects
 | Annotations: Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnSendToBack method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSendToBack (HANNOBJECT hObject);
Delphi Syntax | Function AnnSendToBack (hObject: HANNOBJECT ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Reorders the specified annotation object so that it is displayed behind other objects in the same container.

This method moves the object to the beginning of the enumeration order for objects in the same container. When the container is displayed, this object is displayed first.

See Also

Elements | AnnBringToFront method, AnnBoundingRectTop property, AnnBoundingRectLeft property, AnnBoundingRectHeight property, AnnBoundingRectWidth property
Topics | Annotations (Document/Medical only): Automation
 | Displaying and Manipulating Annotation Objects
 | Annotations (Document/Medical only): Using Window Coordinates to Select Objects


AnnSetAutoBackColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetAutoBackColor(HANNOBJECT hObject, int nType, TColor &clBack)
Delphi Syntax | Function AnnSetAutoBackColor (hObject: HANNOBJECT; nType: L_INT; var clBack: TColor): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the background color of one or more annotation objects. The automation back color is used as a default for all annotation objects that are created (using automation) from that point on.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations. Please note the following:

If nType is: | Then the background color is changed for:
ANNOBJECT_NOTE or ANNOBJECT_PUSHPIN | Note objects and push pin objects created by the automation object.
ANNOBJECT_HILITE | Hilite objects created by the automation object.
ANNOBJECT_REDACT | Redact objects created by the automation object.
any other object such as ANNOBJECT_TEXT, ANNOBJECT_RECT, etc. | All other objects, created by the automation object, which have a background color property.

VCL uses the TColor enumerated data type that covers the values that can be returned by the Windows RGB macro. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements | AnnSetForeColor method, AnnGetForeColor method, AnnSetBackColor method, AnnGetBackColor method, AnnGetAutoBackColor method
Topics | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Getting and Setting Color Properties
 | Altering Annotation Object Settings
 | Using Color Values in LEADTOOLS


AnnSetAutoDefaults method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetAutoDefaults (LEADTyp::L_HANDLE hObject, int iFlags);
Delphi Syntax | Function AnnSetAutoDefaults (hObject: L_HANDLE; iFlags: Integer): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Assigns all the automation default properties to the specified annotation object.

This method simulates the action that takes place when an annotation object is created using the automated mode. An annotation object created in automated mode receives the same default properties as the automation object, such as foreground color, line width, etc. This lets you assign the same default properties in the automation object to the specified annotation object.

See Also

Elements: | AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetSelected method, AnnSetVisible method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetAutoMenuItemEnable method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetAutoMenuItemEnable(LEADTyp::L_HANDLE hObject, int iType, int iItem, int iEnable, int iFlags, char * pszUserList);
Delphi Syntax | Function AnnSetAutoMenuItemEnable(hObject: L_HANDLE; iType: Integer; iItem: Integer; iEnable: Integer; iFlags: Integer; pszUserList: PChar): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Enables or disables a menu item for one or more annotation objects.

By default, all automation menu items that are not nil are displayed.

If an automation menu item is nil, that menu item will not be displayed, even if the menu item has been enabled using this method.

The menu item strings are changed using the AnnSetAutoText method.

Menu items can be enabled or disabled for one or more than one object, depending on the object passed in the hObject parameter. The following table indicates the possible options:

Menu Item String | Status | hObject | Itype | Result
Nil | Enabled | Annotation or automation | Any type | Menu item is not displayed.
Nil | Disabled | Annotation or automation | Any type | Menu item is not displayed.
Not Nil | Disabled | Automation object | ANNOBJECT_XXX | Menu item is not displayed for all objects of type ANNOBJECT_XXX.
Not Nil | Disabled | Automation object | ANNOBJECT_ALL | Menu item is not displayed for all objects.
Not Nil | Enabled | Automation object | ANNOBJECT_XXX | Menu item is displayed for all objects of type ANNOBJECT_XXX.
Not Nil | Enabled | Automation object | ANNOBJECT_ALL | Menu item is displayed for all objects.
Not Nil | Disabled | Annotation object | Ignored | Menu item is not displayed for the specified object, based on the value of iFlags.
Not Nil | Enabled | Annotation object | Ignored | Menu item is displayed for the specified object, based on the value of iFlags.

See Also

Elements: | AnnGetAutoMenuItemEnable method, AnnAutoMenuEnable property
Topics: | Annotations (Document/Medical only): Automation


AnnSetAutoText method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetAutoText(int iItem, char * pszText);
Delphi Syntax | Function AnnSetAutoText(iItem: Integer; pszText: PChar): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the character string that is used for the specified menu item or other element that LEADTOOLS provides for automated annotations.

To get the current value of a text string, use the AnnGetAutoText method.

When this method is called with an empty string for pszText, the menu item defined by iItem will be disabled and removed from the automation menu. To re-enable the menu item, call this method again and pass a valid string.

See Also

Elements: | AnnGetAutoText method
Topics: | Annotations (Document/Medical only): Automation


AnnSetBackColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetBackColor(HANNOBJECT hObject, TColor clBack, bool bSelected)
Delphi Syntax | Function AnnSetBackColor (hObject: HANNOBJECT; clBack: TColor; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the background color of one or more annotation objects.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

To see how the background color relates to the fill modes, refer to Illustration of Fill Options for Annotations.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements | AnnSetForeColor method, AnnGetForeColor method, AnnGetBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Color Values in LEADTOOLS


AnnSetBitmap method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetBitmap(HANNOBJECT hObject, TBitmapHandle &Bitmap, bool bSelected)
Delphi Syntax | Function AnnSetBitmap(hObject: HANNOBJECT; Bitmap: TBitmapHandle, bSelected: Boolean): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the bitmap of one or more annotation objects. The specified bitmap is a LEAD bitmap.

The AnnSetBitmap method is valid only for the following object types:

ANNOBJECT_POINT

ANNOBJECT_PUSHPIN

ANNOBJECT_STAMP

The ANNOBJECT_STAMP objects (which include the Rubber Stamp tools) can display text, a bitmap or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two.

Initially, the ANNOBJECT_STAMP object displays text. The difference between the Stamp and the Rubber Stamp is that initially whereas the Stamp does not display an image, the Rubber Stamp tools are set to display different metafiles (one for each rubber stamp selection).

Use the AnnGetBitmap method to get the bitmap for one or more annotation objects.

For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetBitmap method, AnnSetSecondaryBitmap method, AnnGetSecondaryBitmap method, AnnGetMetafile, AnnSetPredefinedMetafile method, AnnGetPredefinedMetafile method, AnnGetEncryptOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnGetSecondaryMetafile method, AnnPredefinedBitmap property, AnnGetPointOptions method, AnnEncryptOptions property, AnnSetMetafile method, EncryptBitmap property, AnnPointOptions property, PointUseBitmap property, PointBitmap property
Topics: | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps
 | Altering Annotation Object Settings
 | Implementing Transparency


AnnSetBitmapDpiX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetBitmapDpiX(HANNOBJECT hObject, double dBitmapDpiX, bool bSelected);
Delphi Syntax | Function AnnSetBitmapDpiX(hObject: HANNOBJECT; dBitmapDpiX: L_DOUBLE; bSelected: Boolean): L_INT;
Overview | Refer to Altering Annotation Object Settings.

Remarks

(Document/Medical only) Sets the horizontal Bitmap DPI (dots per inch) value that is used to translate the horizontal distance for an automation object or a ruler object.

Only Automation and Ruler objects are affected. For more information on automation objects, refer to Annotation Automation Object. For more information on ruler objects, refer to Ruler Annotation Object.

Set this value to the bitmap’s X resolution, found in the BitmapXRes property. This method should be called when loading objects or pasting them from the clipboard to containers other than the Main Control's container, which can be accessed through the AnnContainer property. Otherwise, the distances shown by the ruler objects will not be accurate.

See Also

Elements | AnnSetBitmapDpiY method, AnnGetBitmapDpiX method, AnnGetBitmapDpiY method, AnnSetUnit method, AnnGetUnit method, AnnGetDistance method, AnnSetGaugeLength method, AnnGetGaugeLength method, AnnTicMarkLength property
Topics | Annotation Functions (Document/Medical only): Getting and Setting the Ruler Properties
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnSetBitmapDpiY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetBitmapDpiY(HANNOBJECT hObject, double dBitmapDpiY, bool bSelected);
Delphi Syntax | Function AnnSetBitmapDpiY(hObject: HANNOBJECT; dBitmapDpiY: L_DOUBLE; bSelected: Boolean): L_INT;
Overview | Refer to Altering Annotation Object Settings.

Remarks

(Document/Medical only) Sets the vertical Bitmap DPI (dots per inch) value that is used to translate the vertical distance for an automation object or a ruler object.

Only Automation and Ruler objects are affected. For more information on automation objects, refer to Annotation Automation Object. For more information on ruler objects, refer to Ruler Annotation Object.

Set this value to the bitmap’s Y resolution, found in the BitmapYRes property. This method should be called when loading objects or pasting them from the clipboard to containers other than the Main Control's container object, which can be accessed through the AnnContainer property. Otherwise, the distances shown by the ruler objects will not be accurate.

See Also

Elements: | AnnSetBitmapDpiX method, AnnGetBitmapDpiX method, AnnGetBitmapDpiY method, AnnSetUnit method, AnnGetUnit method, AnnGetDistance method, AnnSetGaugeLength method, AnnGetGaugeLength method, AnnTicMarkLength property
Topics: | Annotation Functions (Document/Medical only): Getting and Setting the Ruler Properties
 | New Annotation Features of Version 14.5


AnnSetEncryptOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetEncryptOptions(HANNOBJECT hObject)
Delphi Syntax | AnnSetEncryptOptions (hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Sets the encryption options for the specified Encrypt annotation object.

To set the Encryption options for one or more objects you must set the desired options in the AnnEncryptOptions property before calling this method. In addition, you must set the AnnFlags property before calling this method, to indicate the objects for which to set the encryption options. Possible values for the Flags property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

To get the annotation encryption options for a specific Encrypt annotation object, call the AnnGetEncryptOptions method. The AnnEncryptOptions property will be updated with the encryption options.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, Encryptor property (TAnnNameOptions), Flags property (TAnnNameOptions), Key property (TAnnNameOptions), NeverEncrypted property (TAnnNameOptions), SaveDecryptorKey property (TAnnNameOptions), SaveEncryptorKey property (TAnnNameOptions), ClearDecryptorKey property (TAnnNameOptions), ClearEncryptorKey property (TAnnNameOptions), EncryptBitmap property (TAnnNameOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


AnnSetFillMode method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFillMode(HANNOBJECT hObject, unsigned uFillMode, bool bSelected)
Delphi Syntax | Function AnnSetFillMode (hObject: HANNOBJECT; uFillMode: L_UINT; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the fill mode of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

Note that the AnnSetROP2 method and the AnnSetFillMode method affect each other. If you set nFillMode to ANNFILLMODE_OPAQUE, then nROP2 cannot be ANNROP2_AND. If you set nFillMode to ANNFILLMODE_TRANSLUCENT, then nROP2 has to be ANNROP2_AND. If you set nFillMode to ANNFILLMODE_TRANSPARENT, nROP2 can be anything.

See Also

Elements | AnnSetFillPattern method, AnnGetFillPattern method, AnnGetFillMode method, AnnGetPolyFillMode method, AnnSetPolyFillMode method,AnnGetROP2 method, AnnSetROP2 method AnnSetBackColor method, AnnSetForeColor method, AnnGetSelected method, AnnSetSelected method, AnnGetTransparent method, AnnSetTransparent method, AnnGetTransparentColor method, AnnSetTransparentColor method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnSetFillPattern method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFillPattern (HANNOBJECT hObject, unsigned uFillPattern, bool bSelected);
Delphi Syntax | Function AnnSetFillPattern (hObject: HANNOBJECT; uFillPattern: L_UINT; bSelected: Boolean ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the fill pattern of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements | AnnGetFillPattern method, AnnSetFillMode method, AnnGetFillMode method, AnnGetPolyFillMode method, AnnSetPolyFillMode method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnSetFontBold method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFontBold(HANNOBJECT hObject, bool bFontBold, bool bSelected)
Delphi Syntax | Function AnnSetFontBold (hObject: HANNOBJECT; bFontBold: Boolean; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the bold-font property of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetFontItalic method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFontItalic(HANNOBJECT hObject, bool bFontItalic, bool bSelected)
Delphi Syntax | Function AnnSetFontItalic (hObject: HANNOBJECT; bFontItalic: Boolean; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the italic-font property of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetFontName method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFontName(HANNOBJECT hObject, AnsiString strFontName, bool bSelected)
Delphi Syntax | Function AnnSetFontName (hObject: HANNOBJECT; strFontName: String; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the font of one or more annotation objects. You specify the name of the font in a character string.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetFontSize method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFontSize(HANNOBJECT hObject, double dFontSize, bool bSelected)
Delphi Syntax | Function AnnSetFontSize (hObject: HANNOBJECT; dFontSize: L_DOUBLE; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the font size of one or more annotation objects.

The font size of an object is relative to its container object. The height of a font is interpreted using the container's vertical scaling factor. For example, suppose you want the font to appear as a 10-point font on your screen using the current scaling factor. You would use the following calculation, where A is the pixel height of a 10-point font, B is the value that you get from the AnnGetScalarX method, and C is the value that you get from the AnnGetScalarY method:

dFontSize = A / sqrt( B * C )

For more information, refer to Low-Level Coordinate System for Annotations.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetFontStrikeThrough method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFontStrikeThrough(HANNOBJECT hObject, bool bFontStrikeThrough, bool bSelected)
Delphi Syntax | Function AnnSetFontStrikeThrough (hObject: HANNOBJECT; bFontStrikeThrough: Boolean; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Applies or removes the strike-through (a line through the middle of the text), of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnSetFontUnderline method, AnnGetFontUnderline method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetFontUnderline method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetFontUnderline(HANNOBJECT hObject, bool bFontUnderline, bool bSelected)
Delphi Syntax | Function AnnSetFontUnderline (hObject: HANNOBJECT; bFontUnderline: Boolean; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Applies or removes the underline of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetFontBold method, AnnSetFontBold method, AnnSetFontName method, AnnGetFontName method, AnnSetFontSize method, AnnGetFontSize method, AnnGetFontUnderline method, AnnSetFontStrikeThrough method, AnnGetFontStrikeThrough method, AnnSetFontItalic method, AnnGetFontItalic method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetForeColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetForeColor(HANNOBJECT hObject, TColor clFore, bool bSelected)
Delphi Syntax | Function AnnSetForeColor (hObject: HANNOBJECT; clFore: TColor; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the foreground color of one or more annotation objects.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

To see how the foreground color relates to the fill modes, refer to Illustration of Fill Options for Annotations.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements | AnnGetForeColor method, AnnSetBackColor method, AnnGetBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Color Values in LEADTOOLS


AnnSetGaugeLength method (Annotation Control)

Delphi example

C++ Builder example

Builder Syntax | int AnnSetGaugeLength (HANNOBJECT hObject, double dGaugeLength, bool bSelected);
Delphi Syntax | Function AnnSetGaugeLength (hObject: HANNOBJECT; dGaugeLength: L_DOUBLE; bSelected: Boolean ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the length of the gauge (the perpendicular lines at the ends of the Ruler object).

The gauge length property applies only to Automation and Ruler objects. Refer to AnnAutomation property.

Length is expressed in pixels, not in points. The length is for the whole line, not just from the end point of the ruler to the end point of the gauge - it is from one end of the gauge to the other end of the gauge.

See Also

Elements | AnnGetUnit method, AnnSetUnit method, AnnGetDistance method, AnnGetGaugeLength method, AnnTicMarkLength property
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnSetGrouping method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetGrouping (LEADTyp::L_HANDLE hObject, bool bAutoGroup, int iFlags);
Delphi Syntax | Function AnnSetGrouping (hObject: L_HANDLE; bAutoGroup: boolean ; iFlags: integer): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the grouping of the objects within the specified container.

This method is valid only for container objects.

Each container contains a "grouping" property, which indicates whether the objects in the container should be treated as a group.

See Also

Elements | AnnGetGrouping method, AnnGroup method, AnnUngroup method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Grouping and Ungrouping Annotation Objects
 | Displaying and Manipulating Annotation Objects


AnnSetHyperlinkMsg method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetHyperlinkMsg (LEADTyp::L_HANDLE hObject, int iType, int lParam1 , int lParam2 , int lParam3 , int lParam4 , int lParam5);
Delphi Syntax | Function AnnSetHyperlinkMsg (hObject:L_HANDLE; iType: Integer; lParam1 : longint; lParam2 : longint; lParam3 : longint; lParam4 : longint; lParam5 : longint):Integer;
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) Annotations may be hyperlinked to run a program, access a Web page, or send a user-defined message to the OnAnnHyperlink event. This method creates a hyperlink from an annotation to the OnAnnHyperlink event with either no parameters or five parameters, depending on iType.

See Also

Elements: | AnnSetHyperlinkString method
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


AnnSetHyperlinkString method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetHyperlinkString(LEADTyp::L_HANDLE hObject, int iType, char * pszHyperlink);
Delphi Syntax | Function AnnSetHyperlinkString(hObject:L_HANDLE; iType: Integer; pszHyperlink: Pchar): Integer;
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) Annotations may be hyperlinked to run a program, access a Web page, or send a user-defined message to the OnAnnHyperlink event. This method sets the string containing the name of the program, with all required command line parameters, or the URL of the Web page.

See Also

Elements: | AnnSetHyperlinkMsg method, AnnGetHyperlinkString method, AnnGetHyperlinkType
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


AnnSetLineStyle method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetLineStyle (HANNOBJECT hObject, unsigned uLineStyle, bool bSelected);
Delphi Syntax | Function AnnSetLineStyle (hObject: HANNOBJECT; uLineStyle: L_UINT; bSelected: Boolean ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the line style of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements | AnnSetLineWidth method, AnnGetLineWidth method, AnnGetLineStyle method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnSetLineWidth method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetLineWidth(HANNOBJECT hObject, double dLineWidth, bool bSelected)
Delphi Syntax | Function AnnSetLineWidth (hObject: HANNOBJECT; dLineWidth: L_DOUBLE; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the un-scaled line width of one or more annotation objects.

The line width of an object is relative to its container object, and the value is interpreted using the container's scaling factors. For example, suppose you want the line to be three pixels wide on your screen using the current scaling factors. You would use the following calculation, where A is the desired width of three pixels, B is the value that you get from the AnnGetScalarX method, and C is the value that you get from the AnnGetScalarY method:

dLineWidth = A / sqrt( B * C )

For more information, refer to Low-Level Coordinate System for Annotations.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements: | AnnGetLineWidth method, AnnSetLineStyle method, AnnGetLineStyle method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetMetafile method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetMetafile(HANNOBJECT hObject, unsigned &hFile, int nType, bool bSelected)
Delphi Syntax | Function AnnSetMetafile(hObject: HANNOBJECT; var hFile: HMETAFILE; nType: L_INT; bSelected: Boolean): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the metafile for an object that uses a metafile.

If nType == ANNMETAFILE_USER, the hFile value is the metafile handle. Metafiles can be created by using common Microsoft Windows GDI drawing functions.

If nType is one of the ANNMETAFILE_XXX values, the hFile value is ignored and the default metafiles are used instead. The annotation DLL has 28 predefined metafiles. Change the predefined metafiles by using the AnnSetPredefinedMetafile method.

The AnnSetMetafile method is valid only for the following object types:

ANNOBJECT_ENCRYPT

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_HOTSPOT

ANNOBJECT_STAMP

The ANNOBJECT_STAMP objects (which include the Rubber Stamp tools) can display text, a bitmap or a metafile. Only one of these three can be displayed at any time—setting the object to one of these destroys any settings for the other two.

Initially, the ANNOBJECT_STAMP object displays text. The difference between the Stamp and the Rubber Stamp is that initially whereas the Stamp does not display an image, the Rubber Stamp tools are set to display different metafiles (one for each rubber stamp selection). Initially, the Hotspot, Freehand Hotspot, and Encrypt objects are also set to display predefined metafiles.

Using the AnnSetMetafile method changes the metafile for the selected objects. Any new objects will still get the default metafile. To change the default metafiles for newly created objects that use metafiles, use the AnnSetPredefinedMetafile method.

Use the AnnGetMetafile method to retrieve a metafile for an object.

See Also

Elements: | AnnSetMetafile method, AnnSetPredefinedMetafile method, AnnGetPredefinedMetafile method, AnnGetEncryptOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnGetSecondaryMetafile method, AnnPredefinedBitmap property, AnnGetPointOptions method, AnnEncryptOptions property, AnnSetBitmap method, AnnSetSecondaryBitmap method, AnnGetSecondaryBitmap method, EncryptBitmap property, AnnPointOptions property, PointUseBitmap property, PointBitmap property
Topics: | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps
 | Altering Annotation Object Settings


AnnSetNameOffsetX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetNameOffsetX(L_HANDLE hObject, int NameOffsetX, bool bSelected);
Delphi Syntax | Function AnnSetNameOffsetX(hObject: L_HANDLE; NameOffsetX: Integer; bSelected: Boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the X-coordinate of the name offset of the specified annotation object.

The name offset of an annotation object is an offset that is relative to the upper left corner of the bounding box of the annotation. The name offset coordinates are in pixels, where the image is viewed at 100%. The name offset can be changed by:

1. | Calling the AnnSetNameOffsetX or AnnSetNameOffsetY methods methods
2. | Right-clicking the object in design-mode, selecting Name Properties, setting the NameOffset using the text box, and clicking "Apply".
3. | Clicking on the object name in design-mode and dragging it to a new location

When an object is created in automation mode, the newly created object will have the same name restrictions that the automation object had. That is, if the name of the automation object is restricted, the name of the newly created object is restricted. If the name of the automation object was not restricted, then the name of the newly created object will not be restricted.

See Also

Elements: | AnnGetNameRestrict method, AnnSetNameRestrict method, AnnGetNameOffsetX method, AnnGetNameOffsetY method, AnnSetNameOffsetX method, AnnSetNameOffsetY method
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnSetNameOffsetY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetNameOffsetY (L_HANDLE hObject, int NameOffsetY, bool bSelected);
Delphi Syntax | Function AnnSetNameOffsetY (hObject: L_HANDLE; NameOffsetY: Integer; bSelected: Boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the Y-coordinate of the name offset of the specified annotation object.

The name offset of an annotation object is an offset that is relative to the upper left corner of the bounding box of the annotation. The name offset coordinates are in pixels, where the image is viewed at 100%. The name offset can be changed by:

1. | Calling the AnnSetNameOffsetX or AnnSetNameOffsetY methods
2. | Right-clicking the object in design-mode, selecting Name Properties, setting the NameOffset using the text box, and clicking "Apply".
3. | Clicking on the object name in design-mode and dragging it to a new location

When an object is created in automation mode, the newly created object will have the same name restrictions that the automation object had. That is, if the name of the automation object is restricted, the name of the newly created object is restricted. If the name of the automation object was not restricted, then the name of the newly created object will not be restricted.

See Also

Elements: | AnnGetNameRestrict method, AnnSetNameRestrict method, AnnGetNameOffsetX method, AnnGetNameOffsetY method, AnnSetNameOffsetX method, AnnSetNameOffsetY method
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnSetNameOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetNameOptions(HANNOBJECT hObject)
Delphi Syntax | AnnSetNameOptions (hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Sets the name options for the specified annotation object.

To set the name options for one or more objects you must set the desired options in the AnnNameOptions property before calling this method. In addition, you must set the AnnFlags property before calling this method, to indicate the objects for which to set the name options. Possible values for the Flags property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

To get the annotation name options for a specific annotation object, call the AnnGetNameOptions method. The AnnNameOptions property will be updated with the name options.

See Also

Elements: | AnnGetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations: Object Manipulation


AnnSetNameRestrict method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetNameRestrict (L_HANDLE hObject, bool bNameRestrict, bool bSelected);
Delphi Syntax | Function AnnSetNameRestrict (hObject: L_HANDLE; bNameRestrict: Boolean; bSelected: Boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets a value that determines whether the name of the specified annotation object is restricted. If the name of an annotation object is restricted, the name will fully appear on the bitmap. If the name is not restricted, part of the name may appear on the bitmap while other parts do not.

For example, if the name of an annotation object has been restricted by calling the AnnSetNameRestrict method with the bNameRestrict parameter set to TRUE, the name offset cannot be set so that the object name is outside the bitmap (annotation container). The name offset is set by calling the AnnSetNameOffsetX method and the AnnSetNameOffsetY method. To determine the current offset, call the AnnGetNameOffsetX method and the AnnGetNameOffsetY method.

For example, consider a 200 x 200 bitmap that has a 100 x 100 button in the lower right corner and the name of the button is "Button". Attempting to set the name offset to anything larger than (43,100) will result in the name offset being set to (43,100) anyway. In addition, dragging the annotation object itself in such a way that would cause the object name to be moved outside the bitmap will cause the name offset to change.

The restriction on an object name can be changed by:

1. | Calling the AnnSetNameRestrict method.
2. | Right-clicking the object in design-mode, selecting Name Properties, setting the NameRestrict check box, and clicking "Apply".

When an object is created in automation mode, the newly created object will have the same name restrictions that the automation object had. That is, if the name of the automation object is restricted, the name of the newly created object is restricted. If the name of the automation object was not restricted, then the name of the newly created object will not be restricted.

See Also

Elements: | AnnGetNameRestrict method, AnnSetNameRestrict method, AnnGetNameOffsetX method, AnnGetNameOffsetY method, AnnSetNameOffsetX method, AnnSetNameOffsetY method
Topics: | Annotations (Document/Medical only):Object Manipulation


AnnSetNodes method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetNodes(HANNOBJECT hObject, bool bShowNodes, unsigned uGapNodes, bool bSelected);
Delphi Syntax | Function AnnSetNodes(hObject: HANNOBJECT; bShowNodes: Boolean; uGapNodes: L_UINT; bSelected: Boolean): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Determines which nodes of the annotation object should display when in design mode.

This method is valid for the following annotation objects:

ANNOBJECT_CURVE

ANNOBJECT_CURVECLOSED

ANNOBJECT_FREEHAND

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores node settings along with the other object default settings.

If hObject is a Polygon, Polyline, Freehand Hot Spot, or Freehand object, this method determines how the nodes for the object will be displayed in design mode.

If hObject is an Automation object, this method determines how the nodes will be displayed for the next Polygon, Polyline, Freehand Hot Spot, or Freehand object created in automated mode.

If hObject is a Container object, this method determines how the nodes of the Polygons, Polylines, Freehand Hot Spot, or Freehand objects within the container will be displayed.

If bShowNodes is FALSE, uGapNodes will be ignored since the nodes will not be shown.

Note: The last node is always shown. Therefore, using a large value for uGapNodes will probably result in only the first and last nodes being shown.

See Also

Elements | AnnSetNodes method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Getting and Setting Node Properties
 | Altering Annotation Object Settings


AnnSetOffsetX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetOffsetX (HANNOBJECT hObject, double dOffsetX, bool bSelected);
Delphi Syntax | Function AnnSetOffsetX (hObject: HANNOBJECT; dOffsetX: L_DOUBLE; bSelected: Boolean ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Sets the X offset of the annotation object. Typically, this value is used to match the root container's offset to the offset of the associated bitmap's display rectangle.

The offset values are applied after the scalar properties, which are set by the AnnSetScalarX and AnnSetScalarY methods. For more information, refer to Low-Level Coordinate System for Annotations.

The value of the AnnContainer property cannot be passed for the hObject parameter.

See Also

Elements | AnnSetScalarX method, AnnSetScalarY method, AnnGetScalarX method, AnnGetScalarY method, AnnSetOffsetY method, AnnGetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Automation
 | Fixed Annotations


AnnSetOffsetY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetOffsetY (HANNOBJECT hObject, double dOffsetY, bool bSelected);
Delphi Syntax | Function AnnSetOffsetY (hObject: HANNOBJECT; dOffsetY: L_DOUBLE; bSelected: Boolean ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Sets the Y offset of the annotation object. Typically, this value is used to match the root container's offset to the offset of the associated bitmap's display rectangle.

The offset values are applied after the scalar properties, which are set by the AnnSetScalarX and AnnSetScalarY methods. For more information, refer to Low-Level Coordinate System for Annotations.

The value of the AnnContainer property cannot be passed for the hObject parameter.

See Also

Elements | AnnSetScalarX method, AnnSetScalarY method, AnnGetScalarX method, AnnGetScalarY method, AnnSetOffsetX method, AnnGetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Automation
 | Fixed Annotations


AnnSetPointOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetPointOptions(HANNOBJECT hObject)
Delphi Syntax | AnnSetPointOptions (hObject: HANNOBJECT ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

Sets the point options for the specified annotation object.

To set the point options for one or more objects you must set the desired options in the AnnPointOptions property before calling this method. In addition, you must set the AnnFlags property before calling this method, to indicate the objects for which to set the point options. Possible values for the AnnFlags property are:

0

ANNFLAG_SELECTED

ANNFLAG_NOTTHIS

ANNFLAG_RECURSE

ANNFLAG_NOTCONTAINER

ANNFLAG_NOINVALIDATE

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TAnnPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


AnnSetPoints method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetPoints(HANNOBJECT hObject, LPANNPOINT pPoints, unsigned uCount)
Delphi Syntax | Function AnnSetPoints (hObject: HANNOBJECT; pPoints: LPANNPOINT; uCount: L_UINT): L_INT
Overview | Refer to Point Annotation Object.

Remarks

(Document/Medical only) Defines the shape of an annotation object, such as a polygon, that requires multiple points.

Coordinates of an object's points are relative to its container object. The coordinates are interpreted using the container's scaling factors and offsets, which are described in Low-Level Coordinate System for Annotations.

For annotation objects that are defined by a rectangle, use the AnnRect... properties.

You can position a Point object using the following (Delphi):

var
ptAnn: ANNPOINT;
begin
ptAnn.x:= 100;
ptAnn.y:= 200;
LEADAnn1.AnnSetPoints( hPoint, @ptAnn, 1 );

end;

where ptAnn defined as ANNPOINT and contains the desired position.

To set the points of a cross-product object, do the following:

var
ptAnn: Array [ 0..4 ] of ANNPOINT;
begin
// Assign values for ptAnn x and y from 0 through 4
LEADAnn1.AnnSetPoints( hXproduct, @ptAnn, 5 );

end;

hXproduct is the handle to the cross-product object. ptAnn[0].x, ptAnn[0].y and ptAnn[1].x, ptAnn[1].y are the points for the primary ruler. ptAnn[2].x, ptAnn[2].y is the intersection point. ptAnn[3].x, ptAnn[3].y and ptAnn[4].x, ptAnn[4].y are the points for the secondary ruler.

To set the points of a protractor object, do the following:

var
ptAnn: Array [ 0..4 ] of ANNPOINT;
begin
// Assign values for ptAnn x and y from 0 through 2
LEADAnn1.AnnSetPoints( hProtractor, @ptAnn, 3 );

end;

hProtractor is the handle to the protractor object. ptAnn[0].x, ptAnn[0].y and ptAnn[2].x, ptAnn[2].y are the endpoints for the two rulers. ptAnn[1].x, ptAnn[1].y is the intersection point. This is shown below:

When calling AnnSetPoints on a ANNOBJECT_TEXTPOINTER object, specify three points. The three points are (Upper Left), (Lower Right), (Anchor).

AnnSetPoints works only with the following types of objects:

ANNOBJECT_POINTER

ANNOBJECT_FREEHAND

ANNOBJECT_LINE

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

ANNOBJECT_POINT

ANNOBJECT_PROTRACTOR

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_TEXTPOINTER

ANNOBJECT_POLYRULER

See Also

Elements: | AnnRectHeight property, AnnRectLeft property, AnnRectTop property, AnnRectWidth property, AnnBoundingRectTop property, AnnBoundingRectLeft property, AnnBoundingRectHeight property, AnnBoundingRectWidth property, AnnGetPointCount method, AnnGetPointX method, AnnGetPointY method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetPolyFillMode method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetPolyFillMode (HANNOBJECT hObject, unsigned uPolyFillMode, bool bSelected);
Delphi Syntax | Function AnnSetPolyFillMode (hObject: HANNOBJECT; uPolyFillMode: L_UINT; bSelected: Boolean ): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the value that determines how a polygonal annotation with crossing lines is filled.

This method affects only polygon objects. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

See Also

Elements | AnnSetFillPattern method, AnnGetFillPattern method, AnnSetFillMode method, AnnGetFillMode method, AnnGetPolyFillMode method
Topics | Annotations (Document/Medical only): Object Manipulation


AnnSetPredefinedMetafile method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetPredefinedMetafile(int nType, unsigned hMetaFile)
Delphi Syntax | Function AnnSetPredefinedMetafile(nType: L_INT; hMetaFile: HMETAFILE): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Changes a predefined metafile.

This method affects the Stamp, Rubber Stamp, Hotspot, and Freehand Hotspot objects created by the automation object. For example, if you replace the ANNMETAFILE_APPROVED default metafile with another metafile, then objects created by the automation mode when the ANNTOOL_STAMP_APPROVED tool is set will look like the new metafile.

A predefined metafile can be reset to its original metafile by passing 0 for hMetafile. For example, to reset the Hotspot and Freehand Hotspot predefined metafiles to their original values, use the following code:

AnnSetPredefinedMetafile(ANNMETAFILE_HOTSPOT, 0);

Use the AnnGetPredefinedMetafile method to get the default metafiles for these objects. When the metafile handle is no longer needed, it must be freed using one of the Microsoft Windows API functions (DeleteMetaFile or DeleteEnhMetaFile).

See Also

Elements: | AnnSetMetafile method, AnnGetMetafile method, AnnSetPredefinedMetafile method, AnnGetEncryptOptions method, AnnSetEncryptOptions method, AnnEncryptApply method, AnnGetSecondaryMetafile method, AnnPredefinedBitmap property, AnnEncryptOptions property, AnnSetBitmap method, AnnSetSecondaryBitmap method, AnnGetSecondaryBitmap method, EncryptBitmap property
Topics: | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps
 | Altering Annotation Object Settings


AnnSetProtractorOptions method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetProtractorOptions(HANNOBJECT hObject, bool bAcute, int nUnit, AnsiString strAbbrev, int nPrecision, float fArcRadius, bool bSelected);
Delphi Syntax | Function AnnSetProtractorOptions(hObject: HANNOBJECT; bAcute: Boolean; nUnit: L_INT; strAbbrev: String; nPrecision: L_INT; fArcRadius: Single; bSelected: Boolean): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets various options for a Protractor object (ANNOBJECT_PROTRACTOR). To obtain or restore the default abbreviation for a unit of measurement, call the AnnSetProtractorOptions method and add ANNUNIT_DEF_ABBR [0x4000] to the unit value passed in nUnit.

Note:

This method can be called for Container objects, allowing Protractor objects within the container to be changed. The setting in bSelected determines which objects are changed.

See Also

Elements | AnnGetProtractorOptions method, AnnGetAngle method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Altering Annotation Object Settings
 | Annotations (Document/Medical only): Getting and Setting the Protractor Properties


AnnSetROP2 method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetROP2(HANNOBJECT hObject, unsigned uROP2, bool bSelected)
Delphi Syntax | Function AnnSetROP2(hObject: HANNOBJECT; uROP2: L_UINT; bSelected: Boolean): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the ROP2 code for one or more annotation objects. ROP2 codes specify how pen or brush colors are to be combined with the colors in the image.

It is possible to use the AnnSetROP2 method to turn a simple rectangle into a hilite-type object. This is the only way to have a hilite object that has different colors for border and interior. To do that, draw a rectangle with a thick border, choose different foreground and background colors (using the AnnSetForeColor method and the AnnSetBackColor method), and then call this method with uROP2 set to ANNROP2_AND.

The AnnSetROP2 method is valid only for the following object types:

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_CURVE

ANNOBJECT_CURVECLOSED

ANNOBJECT_ELLIPSE

ANNOBJECT_FREEHAND

ANNOBJECT_FREEHANDHOTSPOT

ANNOBJECT_LINE

ANNOBJECT_POINTER

ANNOBJECT_POINT

ANNOBJECT_POLYGON

ANNOBJECT_POLYLINE

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_RECT

ANNOBJECT_RULER

ANNOBJECT_STAMP

ANNOBJECT_TEXTPOINTER

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores ROP2 settings along with the other object default settings

For descriptions of the various types of objects and their properties, refer to Types of Annotations.

Note that the AnnSetROP2 method and the AnnSetFillMode method affect each other. If you set nFillMode to ANNFILLMODE_OPAQUE, then nROP2 cannot be ANNROP2_AND. If you set nFillMode to ANNFILLMODE_TRANSLUCENT, then nROP2 has to be ANNROP2_AND. If you set nFillMode to ANNFILLMODE_TRANSPARENT, nROP2 can be anything.

Use the AnnGetROP2 method to obtain the ROP2 code being used for one or more annotation objects.

When working with automated annotations, note that it is possible to change the color of the pen that is used for highlighting and selecting by setting the AnnAutoHilightPen property for that automation object.

See Also

Elements | AnnGetROP2 method, AnnGetFillMode method, AnnSetFillMode method, AnnGetTransparent method, AnnSetTransparent method.
Topics | Annotations (Document/Medical only): Object Manipulation
 | Altering Annotation Object Settings
 | Drawing Simple Objects
 | Using Color Values in LEADTOOLS
 | Changing the Annotation Automation Pen Highlight Color


AnnSetScalarX method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetScalarX (HANNOBJECT hObject, double dScalarX, bool bSelected);
Delphi Syntax | Function AnnSetScalarX (hObject: HANNOBJECT; dScalarX: L_DOUBLE; bSelected: Boolean ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Sets the horizontal scaling factor that is applied to the annotation object. Typically, the scaling factors are applied to a root container so that the annotations will match the displayed image.

Offset values, which are set by the AnnSetOffsetX and AnnSetOffsetY methods, are applied after the scalar properties. For more information, refer to Low-Level Coordinate System for Annotations.

The value of the AnnContainer property cannot be passed for the hObject parameter.

See Also

Elements | AnnSetScalarY method, AnnGetScalarX method, AnnGetScalarY method, AnnSetOffsetX method, AnnSetOffsetY method, AnnGetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Autoamtion
 | Fixed Annotations


AnnSetScalarY method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetScalarY (HANNOBJECT hObject, double dScalarY, bool bSelected);
Delphi Syntax | Function AnnSetScalarY (hObject: HANNOBJECT; dScalarY: L_DOUBLE; bSelected: Boolean ): L_INT;
Overview | Refer to Low-Level Coordinate System for Annotations.

Remarks

(Document/Medical only) Sets the vertical scaling factor that is applied to the annotation object. Typically, the scaling factors are applied to a root container so that the annotations will match the displayed image.

Offset values, which are set by the AnnSetOffsetX and AnnSetOffsetY methods, are applied after the scalar properties. For more information, refer to Low-Level Coordinate System for Annotations.

The value of the AnnContainer property cannot be passed for the hObject parameter.

See Also

Elements | AnnSetScalarX method\, AnnGetScalarX method, AnnGetScalarY method, AnnSetOffsetX method, AnnSetOffsetY method, AnnGetOffsetY method, AnnGetOffsetX method, AnnFixed property, AnnPushFixedState method, AnnPopFixedState method, AnnIsFixedRect method
Topics | Annotations (Document/Medical only): Autoamtion
 | Fixed Annotations


AnnSetSecondaryBitmap method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetSecondaryBitmap(HANNOBJECT hObject, TBitmapHandle Bitmap, bool bSelected)
Delphi Syntax | Function AnnSetSecondaryBitmap(hObject: HANNOBJECT; Bitmap: TBitmapHandle; bSelected: Boolean): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the secondary bitmap used by the specified annotation object. Only PushPin objects (ANNOBJECT_PUSHPIN) use a secondary bitmap.

A PushPin object has a primary bitmap (manipulated using the AnnSetBitmap and AnnGetBitmap methods), which displays whenever the text is shown; and a secondary bitmap, changed using the AnnSetSecondaryBitmap method. The primary bitmap is shown with the note text. The secondary bitmap is shown by itself when the note is minimized.

In design mode, the PushPin object shows the text and displays the primary bitmap. In the run mode the object shows or hides the text when clicked.

See Also

Elements: | AnnSetBitmap method, AnnGetSecondaryBitmap method
Topics: | Obtaining Annotation Object Information
 | Annotations (Document/Medical only): Object Bitmap
 | Using Annotation Object Bitmaps
 | Drawing Simple Objects
 | Annotations (Document/Medical only): Object Manipulation
 | Altering Annotation Object Settings


AnnSetSelected method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetSelected(LEADTyp::L_HANDLE hObject, bool bValue, bool bSelected);
Delphi Syntax | Function AnnSetSelected(hObject: L_HANDLE; bValue: boolean; bSelected: boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the Selected property for one or more annotation objects.

See Also

Elements | AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetVisible method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnSetShowFlags method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetShowFlags(HANNOBJECT hObject, unsigned uShowFlags, bool bSelected);
Delphi Syntax | Function AnnSetShowFlags(hObject: HANNOBJECT; uShowFlags: L_UINT; bSelected: Boolean): L_INT;
Overview | Refer to Using Rulers in Annotation Objects.

Remarks

(Document/Medical only) Determines how the rulers will be displayed.

This method is valid for the following objects:

ANNOBJECT_CROSSPRODUCT

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_RULER

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores node settings along with the other object default settings

For Protractor objects, the default value for uShowFlags is 0. For the Ruler, PolyRuler, and Cross-Product objects the default value for uShowFlags is ANNSHOW_LENGTH + ANNSHOW_TICMARKS.

See Also

Elements | AnnRulerUnit property, AnnSmartUnit property, AnnDistance property, AnnTotalDistance property, AnnTotalRulerUnit property, AnnTotalSmartUnit property, AnnDistanceCount property, AnnRulerUnit property, AnnGetDistance2 method, AnnGetDistance method, AnnSetUnit method, AnnGetUnit method, AnnSetGaugeLength method, AnnGetGaugeLength method, AnnTicMarkLength property, AnnGetShowFlags method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Crossproduct Annotation Object
 | Annotation Automation Object
 | Protractor Annotation Object
 | Polyruler Annotation Object
 | Ruler Annotation Object
 | Altering Annotation Object Settings
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnSetTag method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetTag(LEADTyp::L_HANDLE hObject, int iTag);
Delphi Syntax | Function AnnSetTag(hObject: L_HANDLE; iTag: longint): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Assigns a numeric tag to identify an annotation object. Use the AnnGetTag method to get the tag.

The AnnGetTag method and the AnnSetTag method can be used to keep track of particular objects such as buttons or hot spots over time.

When a file is loaded, an OnAnnCreate event is generated for each annotation object. Add code to this event to see which tags are already used in a file.

See Also

Topics:

Annotations (Document/Medical only): Object Manipulation


AnnSetText method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetText(HANNOBJECT hObject, AnsiString strText, bool bSelected)
Delphi Syntax | Function AnnSetText (hObject: HANNOBJECT; strText: String; bSelected: Boolean ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the text (character string) of one or more annotation objects.

This method does not affect objects that do not have this property or that do not let you change the property. For descriptions of the various types of objects and their properties, refer to Types of Annotations.

This method can be used to load unformatted text into an ANNOBJECT_RTF object. To load rich text into an ANNOBJECT_RTF object, see the documentation for AnnRTFText.

See Also

Elements: | AnnGetText method, AnnGetAutoText method, AnnSetAutoText method
Topics: | Annotations (Document/Medical only): Object Manipulation


AnnSetTransparent method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetTransparent(HANNOBJECT hObject, bool bTransparent, bool bSelected);
Delphi Syntax | Function AnnSetTransparent(hObject: HANNOBJECT; bTransparent: Boolean; bSelected: Boolean): L_INT;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets one or more bitmap objects to use a transparent color. A transparent color is not painted when painting an image.

The AnnSetTransparent method is valid only for the following object types when they are using a bitmap:

ANNOBJECT_POINT

ANNOBJECT_STAMP

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores transparency settings along with the other object default settings

Use the AnnSetTransparent method to set such objects to use a transparent color. By default the transparent color is white (0x00FFFFFF). Use the AnnSetTransparentColor method to set the color to be used as the transparent color. Use the AnnGetTransparent method to get a value that indicates whether the bitmap being used by the annotation object is using a transparent color. Use the AnnGetTransparentColor method to get a value that indicates which color is being used as the transparent color.

In order for the transparent bitmaps to be painted properly the LTEFX14N.DLL needs to be present for WIN32. If the appropriate DLL is not present, the transparent bitmap stamps will be painted as non-transparent bitmap stamps.

When this method is applied to an automation object, it indicates whether the next stamp created will be transparent.

When an object has a bitmap with a region and the object is transparent, the inside of the region is considered non-transparent. If the bitmap has no region, and the object is transparent, a region is created from all non-white pixels, so the white pixels are considered transparent.

See Also

Elements | AnnGetTransparent method, AnnGetSelected method, AnnSetSelected method, AnnGetROP2 method, AnnSetROP2 method, AnnSetTransparentColor method, AnnGetTransparentColor method, AnnGetBackColor method, AnnSetBackColor method, AnnSetForeColor method, AnnGetForeColor method, AnnSetAutoBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Bitmap
 | Stamp Annotation Object
 | Point Annotation Object
 | Annotation Automation Object
 | Using Color Values in LEADTOOLS
 | Implementing Transparency
 | Altering Annotation Object Settings
 | Displaying and Manipulating Annotation Objects


AnnSetTransparentColor method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetTransparentColor(HANNOBJECT hObject, TColor clTransparent, bool bSelected)
Delphi Syntax | Function AnnSetTransparentColor (hObject: HANNOBJECT; clTransparent: TColor; bSelected: Boolean): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the color to be used as a transparent color. A transparent color is not painted when painting an image. For information on how LEADTOOLS uses colors, refer to Using Colors in LEADTOOLS.

The AnnSetTransparentColor method is valid only for the following object types when they are using a bitmap:

ANNOBJECT_POINT

ANNOBJECT_STAMP

In addition, the Automation object (ANNOBJECT_AUTOMATION) stores transparent color settings along with the other object default settings.

Use the AnnSetTransparent method to set such objects to use a transparent color. By default the transparent color is white (0x00FFFFFF). Use the AnnSetTransparentColor method to set the color to be used as the transparent color. Use the AnnGetTransparent method to get a value that indicates whether the bitmap being used by the annotation object is using a transparent color. Use the AnnGetTransparentColor method to get a value that indicates which color is being used as the transparent color.

This transparent color is used only if the object is set to use a transparent color by calling the AnnSetTransparent method.

If hObject is a container object, then bSelected indicates which objects to process. If hObject is an automation object, all objects created by this automation object will have this transparent color.

In design mode, the transparent color can be picked by selecting the Transparent color from the Properties menu. If the object’s bitmap has a palette, a dialog box will appear so that a color can be selected from the palette colors. If the object’s bitmap does not have a palette, the standard Windows color pick dialog box is used to select a transparent color.

VCL uses the TColor enumerated data type that covers the values that can be returned by the Windows RGB macro. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements | AnnSetTransparent method, AnnGetSelected method, AnnSetSelected method, AnnGetROP2 method, AnnSetROP2 method, AnnGetTransparentColor method, AnnGetTransparent method, AnnGetBackColor method, AnnSetBackColor method, AnnSetForeColor method, AnnGetForeColor method, AnnSetAutoBackColor method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Annotations (Document/Medical only): Object Bitmap
 | Stamp Annotation Object
 | Point Annotation Object
 | Annotation Automation Object
 | Using Color Values in LEADTOOLS
 | Implementing Transparency
 | Altering Annotation Object Settings
 | Displaying and Manipulating Annotation Objects


AnnSetUnit method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetUnit (HANNOBJECT hObject, unsigned uUnit, AnsiString strUnitAbbrev, unsigned uPrecision, bool bSelected);
Delphi Syntax | Function AnnSetUnit (hObject: HANNOBJECT; uUnit: L_UINT; strUnitAbbrev: String; uPrecision: L_UINT; bSelected: Boolean ): L_INT;
Overview | Refer to Using Rulers in Annotation Objects

Remarks

(Document/Medical only) Sets the unit of measurement for a ruler.

The following annotation objects utilize one or more rulers as part of the annotation:

ANNOBJECT_AUTOMATION

ANNOBJECT_RULER

ANNOBJECT_POLYRULER

ANNOBJECT_PROTRACTOR

ANNOBJECT_CROSSPRODUCT

To determine the unit of measure for each ruler, check the AnnRulerUnit property and the AnnSmartUnit property. The default unit of measure for ruler, polyruler, and crossproduct objects is smart English. With the smart units, the unit changes with the length. For example, if the length is 11 inches (assuming the default precision of 2 is being used), "11.00 in" displays whereas if the length is 15 inches, "1 ft 3.00 in" displays. Use the AnnSetUnit method to set the unit of measurement and its precision for the ruler. The precision indicates how many digits to display to the right of the decimal point in the length. Use the AnnGetUnit method to get the unit of measurement and its precision for the ruler. The AnnGetDistance2 method updates the following properties with information about the ruler(s) contained in the specified object:

AnnTotalDistance

AnnTotalRulerUnit

AnnTotalSmartUnit

AnnDistance

AnnRulerUnit

AnnSmartUnit

AnnDistanceCount

Refer to the AnnAutomation property.

See Also

Elements | AnnGetUnit method, AnnSetGaugeLength method, AnnGetDistance method, AnnGetGaugeLength method, AnnTicMarkLength property
Topics | Annotations (Document/Medical only): Object Manipulation
 | Using Rulers in Annotation Objects
 | New Annotation Features of Version 14.5


AnnSetUser method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetUser(LEADTyp::L_HANDLE hObject, char * pOldUser, char * pNewUser, bool bSelected);
Delphi Syntax | Function AnnSetUser(hObject: L_HANDLE; pOldUser: PChar; pNewUser: PChar; bSelected: Boolean): Integer;
Overview | Refer to Implementing Annotation Security.

Remarks

(Document/Medical only) Sets the user string for the specified object.

If the specified object does not have a specified user, set pOldUser to Nil and set pNewUser to the new user string.

To change an object’s user, set pOldUser to the old user string and set pNewUser to the new user string. For any object having a specified user, you must know the old user string in order to change the user.

You can change an object from having a specified user to having no user by setting pOldUser to the old user string and setting pNewUser to Nil.

Please note that when using bSelected to change the user on more than one object, only those objects with a user set to pOldUser will be changed. For example, if pOldUser is set to "YourObject" and pNewUser is set to "MyObject", and bSelected is True, only those objects having user "YourObject" will be changed. Objects with other users, or with Nil users will not be modified.

See Also

Elements: | AnnLock method, OnAnnLocked event, OnAnnUnlocked event, AnnUnlock method
Topics: | Annotations (Document/Medical only): Annotation Security


AnnSetVisible method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetVisible (LEADTyp::L_HANDLE hObject, bool bVisible, int iFlags, char * pszUserList);
Delphi Syntax | Function AnnSetVisible (hObject: L_HANDLE; bVisible: Boolean; iFlags: Integer; pszUserList: PChar): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) When an object is not visible, it cannot be displayed. Some objects (notably containers) may be transparent, but if their visible-object property is True, a user can select them with a mouse.

This function applies to multiple and selected objects based on values of the iFlags parameter.

To make objects belonging to a user visible, you must set ANNFLAG_USER in iFlags, pass the user name in pUserList, and set bVisible to True.

See Also

Elements | AnnCreate method, AnnDefine method, AnnDestroy method, AnnGetVisible method, AnnInsert method, AnnSetAutoDefaults method, AnnSetSelected method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnSetWnd method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnSetWnd(HANNOBJECT hObject, HWND h_Wnd)
Delphi Syntax | Function AnnSetWnd (hObject: HANNOBJECT; h_Wnd: HWND ): L_INT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the window handle for all objects.

Set this property on the root container, and all objects in the container inherit the property.

The value of the AnnContainer property cannot be passed for the hObject parameter.

See Also

Elements: | AnnGetWnd method
Topics: | Annotations (Document/Medical only): Global Properties


AnnUndo method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnUndo (void);
Delphi Syntax | Function AnnUndo(): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Reverses the last change that was made using automated annotations.

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

For information about grouping multiple operations into a single undo process, refer to the AnnAddUndoNode method.

Calling this method is the same as selecting Undo on the automation menu.

See Also

Elements | AnnUndoEnable property, AnnUndoDepth property, AnnAddUndoNode method
Topics | Annotations (Document/Medical only): Automation
 | Undoing Automation Operations


AnnUngroup method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnUngroup(LEADTyp::L_HANDLE hObject, int iFlags, char * pszUserList);
Delphi Syntax | Function AnnUngroup(hObject: L_HANDLE; iFlags: Integer; pszUserList: PChar): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Ungroups a group of objects.

See Also

Elements | AnnGroup method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


AnnUnlock method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnUnlock(LEADTyp::L_HANDLE hObject, AnsiString szKey);
Delphi Syntax | Function AnnUnlock(hObject: L_HANDLE; szKey: string): Integer;
Overview | Refer to Implementing Annotation Security.

Remarks

(Document/Medical only) Unlocks annotations with the specified key. Use the same key used in AnnLock method. The key is case sensitive!

See Also

Elements: | AnnLock method, OnAnnUnlocked event, OnAnnLocked event
Topics: | Annotations (Document/Medical only): Annotation Security


AnnUnrealize method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnUnrealize(LEADTyp::L_HANDLE hObject, bool fSelected);
Delphi Syntax | Function AnnUnrealize (hObject:L_HANDLE; fSelected: Boolean): Integer;
Overview | Refer to Implementing Annotations

Remarks

(Document/Medical only) Restores the background of a redact object. This method is valid only for redact or container objects. When the AnnRealize method called with RedactOnly specified, for every Redact object, the background of the image behind is saved inside the object. That background can be restored by calling AnnUnrealize. AnnUnrealize will restore the background from a redact object that contains a background bitmap. The background of a locked object cannot be restored until the object is unlocked. If hObject is a container, then fSelected indicates whether all the Redact objects included in the container should be restored, or if only selected objects should be restored. If hObject is a Redact object, fSelected is ignored.

Note:

When AnnRealize methodAnnRealizemethod is called, if all objects are realized, any Redact objects that are realized cannot be unrealized.

See Also

Elements | AnnRealize method, AnnUnlock method
Topics | Annotations (Document/Medical only): Object Manipulation
 | Displaying and Manipulating Annotation Objects


SetMousePos method (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | int SetMousePos(int x, int y, bool bUpdatePos);
Delphi Syntax | Function SetMousePos(x: longint; y: longint; bUpdatePos: Boolean): Integer;
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Sets the coordinates for the automation object to use when processing mouse messages and changes the position of the cursor.

This method can be called while processing the OnAnnMouseXXX events.

See Also

Elements:

OnAnnMouseDown event, OnAnnMouseMove event, OnAnnMouseUp event


OnAnnChange event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnChangeEvent OnAnnChange (LEADTyp::L_HANDLE hObject)
Delphi Syntax | OnAnnChange (hObject: L_HANDLE): TAnnChangeEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs when any property of an annotation object changes.

When an action affects more than one object, this event occurs once for each affected object. This happens, for example, if a user changes the font for a group of selected objects.

See Also

Topics:

Annotations (Document/Medical only): Annotation Events


OnAnnClicked event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnClickedEvent OnAnnClicked (LEADTyp::L_HANDLE hObject);
Delphi Syntax | OnAnnClicked(hObject: L_HANDLE): TAnnClickedEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs when the user clicks on a button or hot spot annotation object.

The object handle that this event receives can be used to immediately identify the object, but it should not be used as a unique identifier over time. (The annotation undo feature can cause object handles to change.) Therefore, to keep track of particular objects over time, use the AnnSetTag method and the AnnGetTag method.

See Also

Topics:

Annotations (Document/Medical only): Annotation Events


OnAnnCreate event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnCreateEvent OnAnnCreate (LEADTyp::L_HANDLE hObject)
Delphi Syntax | OnAnnCreate (hObject: L_HANDLE): TAnnCreateEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs whenever an annotation object is added by any means, including loading from a file, pasting from the clipboard, or drawing with an annotation tool selection.

The object handle that this event receives can be used to immediately identify the object, but it should not be used as a unique identifier over time. (The annotation undo feature can cause object handles to change.) Therefore, to keep track of particular objects such as buttons or hot spots over time, use the AnnSetTag method and the AnnGetTag method.

When a file is loaded, an OnAnnCreate event is generated for each annotation object. Add code to this event to see which tags are already used in a file.

See Also

Topics | Annotations (Document/Medical only): Annotation Events
 | Using Rulers in Annotation Objects


OnAnnDestroy event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnDestroyEvent OnAnnDestroy (LEADTyp::L_HANDLE hObject)
Delphi Syntax | OnAnnDestroy (hObject: L_HANDLE): TAnnDestroyEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs when an annotation object is deleted. If the user deletes several objects at the same time, a separate event occurs for each object.

See Also

Topics:

Annotations (Document/Medical only): Annotation Events


OnAnnDrawn event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnDrawnEvent OnAnnDrawn (LEADTyp::L_HANDLE hObject);
Delphi Syntax | OnAnnDrawn (hObject: L_HANDLE): TAnnDrawnEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs after the user finishes drawing an annotation object.

This is different from the OnAnnCreate event, which occurs whenever an object is added by any means, including loading from a file or pasting from the clipboard.

This event is useful for setting the annotation tool selection for the next operation. For example, it is common to change the tool to a selection pointer after an object is drawn.

See Also

Topics | Annotations (Document/Medical only): Annotation Events
 | Using Rulers in Annotation Objects


OnAnnEnumerate event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnEnumerateEvent OnAnnEnumerate (LEADTyp::L_HANDLE hObject);
Delphi Syntax | OnAnnEnumerate (hObject: L_HANDLE): TAnnEnumerateEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs for each object enumerated in the AnnEnumerate method.

See Also

Elements: | AnnEnumerate method
Topics: | Annotations (Document/Medical only): Annotation Events


OnAnnEnumerateHandles Event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnEnumerateHandlesEvent OnAnnEnumerateHandles= int __fastcall (__closure *TAnnEnumerateHandlesEvent)( HANNOBJECT hObject, TAnnHandleInfo* AnnHandleInfo)
Delphi Syntax | TAnnEnumerateHandlesEvent OnAnnEnumerateHandles = Function (hObject: HANNOBJECT; AnnHandleInfo: AnnHandleInfo): L_INT of object
Overview | Refer to Implementing Annotations.

Remarks

Occurs for each handle enumerated by the AnnEnumerateHandles method.

The AnnHandleInfo parameter can be used to obtain detailed information about an annotation object handle. It can also be used to change some (but not all) of the properties of a user handle. All properties of an annotation object handle can be changed EXCEPT the location. The properties of a handle that can be changed within this event are:

  • ID property

  • Visible property

  • PenColor property

  • FillColor property

  • Shape property

  • Cursor property

See Also

Elements: | AnnEnumerateHandles method, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


OnAnnEnumerateTextTokenTable Event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnEnumerateTextTokenTableEvent OnAnnEnumerateTextTokenTable = void __fastcall (__closure *TAnnEnumerateTextTokenTableEvent)(int nTextTokenCount, char cToken, AnsiString strDescription, AnsiString strTokenString, int nTokenType)
Delphi Syntax | TAnnEnumerateTextTokenTableEvent OnAnnEnumerateTextTokenTable = Procedure (nTextTokenCount: L_INT; cToken: Char; strDescription: String; strTokenString: String; nTokenType: L_INT )
Overview | Refer to Implementing Annotations.

Remarks

Occurs for each token enumerated in the AnnEnumerateTextToken method.

See Also

Elements: | AnnDescription property, AnnTokenString property, AnnToken property, AnnInsertTextTokenTable method, AnnDeleteTextTokenTable method, AnnClearTextTokenTable method, AnnEnableEnumerateTextTokenTableEvent property, AnnEnumerateTextToken method,
Topics: | Annotations: Object Manipulation


OnAnnHyperlink event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnHyperlinkEvent OnAnnHyperlink (LEADTyp::L_HANDLE hObject, int iParamCount, int lParam1, int lParam2, int lParam3, int lParam4, int lParam5);
Delphi Syntax | OnAnnHyperlink (hObject: L_HANDLE; iParamCount: integer; lParam1: longint; lParam2: longint; lParam3: longint; lParam4: longint; lParam5: longint): TAnnHyperlinkEvent
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) This event occurs when AnnUserMode property is set to ANNUSERMODE_RUN and an object with an ANNLINK_EVENT or ANNLINK_EVENT5 hyperlink type is clicked.

See Also

Elements: | AnnHyperlinkMenuEnable property, AnnGetHyperlinkType method, AnnUserMode property, AnnGetHyperlinkParam method
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


OnAnnHyperlinkMenu event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnHyperlinkMenuEvent OnAnnHyperlinkMenu (LEADTyp::L_PHANDLE phObjects, int iCount);
Delphi Syntax | OnAnnHyperlinkMenu (phObjects: L_PHANDLE; iCount: Integer): TAnnHyperlinkMenuEvent
Overview | Refer to Implementing Annotation Hyperlinks.

Remarks

(Document/Medical only) This event occurs whenever the user clicks on the Hyperlink menu item provided for automated annotations. The menu item is enabled and disabled using AnnHyperlinkMenuEnable property.

See Also

Elements: | AnnHyperlinkMenuEnable property
Topics: | Annotations (Document/Medical only): Annotation Hyperlinks


OnAnnLocked event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnLockedEvent OnAnnLocked (LEADTyp::L_HANDLE hObject);
Delphi Syntax | OnAnnLocked (hObject: L_HANDLE): TAnnLockedEvent
Overview | Refer to Implementing Annotation Security.

Remarks

(Document/Medical only) This event occurs whenever the user locks an object. The event will occur once for each object, if a group of objects is locked.

See Also

Elements: | AnnLock method, OnAnnUnlocked event, AnnUnlock method
Topics: | Annotations (Document/Medical only): Annotation Security


OnAnnMenu event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnMenuEvent OnAnnMenu (TAnnMenu* AnnMenu);
Delphi Syntax | OnAnnMenu (AnnMenu: TAnnMenu): TAnnMenuEvent
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Occurs just before an annotation automation menu is displayed.

The AnnMenu parameter is an object that references the menu that will be displayed. Use this AnnMenu object to modify the menu prior to displaying it.

The following properties and methods are associated with the AnnMenu object:

Count property

ItemString property

ItemID property

ItemType property

ItemChecked property

ItemEnabled property

DeleteItem method

AddItem method

GetSubMenu Method

See Also

Elements: | Count property, ItemString property, ItemID property, ItemType property, ItemChecked property, ItemEnabled property, DeleteItem method, AddItem method, GetSubMenu Method
Topics: | Annotations (Document/Medical only): Automation


OnAnnMouseDown event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnMouseDownEvent OnAnnMouseDown (int Button, int Shift, int x, int y);
Delphi Syntax | OnAnnMouseDown (Button: integer; Shift: integer; x: longint; y: longint): TAnnMouseDownEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs when the user presses a mouse button in design mode.

See Also

Elements: | OnAnnMouseMove event, OnAnnMouseUp event
Topics: | Annotations (Document/Medical only): Annotation Events


OnAnnMouseMove event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnMouseMoveEvent OnAnnMouseMove (int Button, int Shift, int x, int y);
Delphi Syntax | OnAnnMouseMove (Button: integer; Shift: integer; x: longint; y: longint): TAnnMouseMoveEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs when the user moves the mouse over the LEADAnn Control in design mode.

See Also

Elements: | OnAnnMouseDown event, OnAnnMouseUp event
Topics: | Annotations (Document/Medical only): Annotation Events


OnAnnMouseUp event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnMouseUpEvent OnAnnMouseUp (int Button, int Shift, int x, int y);
Delphi Syntax | OnAnnMouseUp (Button: Integer; Shift: Integer; x: longint; y: longint): TAnnMouseUpEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs when the user releases a mouse button in design mode.

See Also

Elements: | OnAnnMouseMove event, OnAnnMouseDown event
Topics: | Annotations (Document/Medical only): Annotation Events


OnAnnSelect event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnSelectEvent OnAnnSelect (LEADTyp::L_PHANDLE phObjects, int iCount);
Delphi Syntax | OnAnnSelect (phObjects: L_PHANDLE; iCount: Integer): TAnnSelectEvent
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only) Occurs when annotation objects are selected or deselected. If iCount is 0, then no objects are selected. If you click outside all the annotation objects, this event will still be fired and iCount will be 0.

See Also

Elements: | AnnGetSelectCount method, AnnGetSelectList method,AnnGetItemHandlemethod.
Topics: | Annotations (Document/Medical only): Automation, Annotations (Document/Medical only): Annotation Events


OnAnnToolChecked event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnToolCheckedEvent OnAnnToolChecked (int iTool);
Delphi Syntax | OnAnnToolChecked (iTool: Integer): TAnnToolCheckedEvent
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) This event is fired when the user clicks on an annotation toolbar button. In this case, iTool contains the ANNTOOL_XXX value that indicates the selected tool.

If the AutoSetTool Propertyof AnnToolbar is set to True, the AnnTool property of the LEADAnn control has already been set to iTool.

Note:

iTool contains the same value as the Tool property of AnnToolbar.

See Also

Elements: | AutoSetTool property, ButtonBitmapUp property, ButtonBitmapDown property, ButtonColumns property, ButtonCount property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method , h_Wnd property, Tool property, Visible property
Topics: | Annotations (Document/Medical only): Automation


OnAnnToolDestroy event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnToolDestroyEvent OnAnnToolDestroy (void);
Delphi Syntax | OnAnnToolDestroy: TAnnToolDestroyEvent
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) This event is fired when the user closes the annotation toolbar by clicking on the close button at the top of the annotation toolbar.

See Also

Elements: | AutoSetTool property, ButtonBitmapUp property, ButtonBitmapDown property, ButtonColumns property, ButtonCount property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property, OnAnnToolChecked event
Topics: | Annotations (Document/Medical only): Automation


OnAnnUnlocked event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnUnlockedEvent OnAnnUnlocked (LEADTyp::L_HANDLE hObject);
Delphi Syntax | OnAnnUnlocked (hObject: L_HANDLE): TAnnUnlockedEvent
Overview | Refer to Implementing Annotation Security.

Remarks

(Document/Medical only) This event occurs whenever the user unlocks an object. The event will occur once for each object if a group of objects is unlocked.

See Also

Elements: | AnnUnlock method, OnAnnLocked event, AnnLock method
Topics: | Annotations (Document/Medical only): Annotation Security


OnAnnUserMenu event (Annotation Control)

C++ Builder example

Delphi example

Builder Syntax | TAnnUserMenuEvent OnAnnUserMenu (int nID);
Delphi Syntax | OnAnnUserMenu (nID: longint): TAnnUserMenuEvent
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) This event is fired when a user-defined menu item has been clicked in an annotation automation menu. The user-defined menu items can be added to the annotation automation menu by processing the OnAnnMenu event and adding user-defined items with the AddItem method.

When a user selects a menu item added with the AddItem method, the OnAnnUserMenu event is fired. The nID parameter passed to this event is the same nID passed to the AddItem method when the item was added to the menu.

See Also

Elements: | OnAnnMenu event, AddItem method
Topics: | Annotations (Document/Medical only): Automation


AllowSelection property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int AllowSelection
Delphi Syntax | AllowSelection: Integer
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies whether or not automatic item selection is allowed.

If automatic item selection is enabled, items are automatically selected and de-selected when the user clicks on them using the mouse.

Value | Meaning
ALLOWSELECTION_NONE | Automatic selection is disabled, selection is manual
ALLOWSELECTION_SINGLE | Automatic selection of single items is enabled
ALLOWSELECTION_MULTI | Automatic selection of multiple items is enabled

The default setting is ALLOWSELECTION_NONE.

Note:

when ALLOWSELECTION_MULTI is enabled, the user can select multiple items using the mouse and the CTRL and SHIFT keys.

See Also

Elements: | SelectionStyle property, SelectionColor property, OnItemSelected event, Item property, SelectAll method, HitTest method
Topics: | Raster Images: Displaying Images


BackColor property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor BackColor
Delphi Syntax | BackColor: TColor
Overview | Refer to Using the Image List Control.

Remarks

Sets the background color of the ImageList Control.

See Also

Elements: | ForeColor property, ItemBackgroundColor property, BorderColor property, Font property
Topics: | Raster Images: Displaying Images


BitonalScaling property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Leadvcl::TBitonalScaling BitonalScaling
Delphi Syntax | BitonalScaling: TBitonalScaling
Overview | Refer to Using the Image List Control.

Remarks

(Published property, Document/Medical only) Sets options to improve the display of bitonal bitmaps in the ImageList Control. The default is btsNormal.

Setting | Description
btsNormal | Causes bitonal images to be displayed normally when they are scaled.
btsFavorBlack | Enables a bias in preserving black objects when displaying zoomed-out 1-bit images. This can prevent the disappearance of fine lines and details, but it slows down the display.
btsScaleToGray | Enables grayscaling of 1-bit images when they are displayed. This improves the readability of the images when they are zoomed in or zoomed out, but it slows down the display.

See Also

Elements: | PaintDither property
Topics: | Raster Images: Displaying Images


BorderColor property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor BorderColor
Delphi Syntax | BorderColor: TColor
Overview | Refer to Using the Image List Control.

Remarks

Sets the border color of the ImageList Control.

See Also

Elements: | ForeColor property, ItemBackgroundColor property, BackColor property, Font property
Topics: | Raster Images: Displaying Images


ColumnCount property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ColumnCount
Delphi Syntax | ColumnCount: Integer
Overview | Refer to Using the Image List Control.

Remarks

Gets the current number of columns of items in the ImageList Control.

See Also

Elements: | Insert method, Remove method, RowCount, Count property, Clear method, Item property
Topics: | Raster Images: Displaying Images


Count property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int Count
Delphi Syntax | Count: Integer
Overview | Refer to Using the Image List Control.

Remarks

Gets the current number of items in the ImageList Control.

Note:

Item indexing begins with 0 and continues to Count - 1

See Also

Elements: | Item property, RowCount property, ColumnCount property, PageCount property, Insert method, EnsureVisible method, Remove method, Clear method
Topics: | Raster Images: Displaying Images


CurrentPage property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int CurrentPage
Delphi Syntax | CurrentPage : Integer
Overview | Refer to Using the Image List Control.

Remarks

Gets the number of the currently visible page of items in the ImageList Control.

This will return the highest visible page number in the ImageList Control. Pages are calculated using the total number of rows or columns (depending on the scroll style) and the total number of rows or columns (depending on the scroll style) that are completely visible in the ImageList Control's client area. A page is not visible unless its first row/column is completely visible.

See Also

Elements: | PageCount property, Insert method, Remove method, RowCount property, ColumnCount property, Count property, Clear method, Item property, ScrollItems method
Topics: | Raster Images: Displaying Images


DisplayItemText property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | bool DisplayItemText
Delphi Syntax | DisplayItemText: Boolean
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies whether or not each Item's Text attribute is to be displayed as a label for the item.

The default setting is True.

See Also

Elements: | Font property, ItemBackgroundColor property, ItemWidth property, ItemHeight property, ItemVerticalSpacing property, ItemHorizontalSpacing property, Item property
Topics: | Raster Images: Displaying Images


EnableKeyboard property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableKeyboard
Delphi Syntax | EnableKeyboard: Boolean
Overview | Refer to Using the Image List Control.

Remarks

(published property) Enables or disables the ImageList control's automatic processing of the keyboard.

Setting | Meaning
TRUE | ImageList Control will process the keyboard
FALSE | ImageList Control will not process the keyboard

When automatic keyboard processing is enabled, the ImageList Control will process the following keys:

Key | Event
PageUp Up Arrow Left Arrow | scroll up/left one item (depends on scroll style)
PageDown Down Arrow Right Arrow | scroll down/right one item (depends on scroll style)
Ctrl + PageUp Ctrl + Up Ctlr + Left Home | scroll up/left to beginning of list (depends on scroll style)
Ctrl + PageDown Ctrl + Down Ctlr + Right End | scroll up/left to end of list (depends on scroll style)

Note: | If the setting for AllowSelection is not ALLOWSELECTION_NONE, then the selected item will move up, down, left, or right, depending on the key(s) being processed. If AllowSelection is set to ALLOWSELECTION_MULTI, multiple items can be selected using the CTRL and/or SHIFT keys in conjunction with the keys listed above.
 | The default setting is True.

See Also

Elements: | ScrollStyle property, AllowSelection property
Topics: | Raster Images: Displaying Images


EnableMethodErrors property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableMethodErrors
Delphi Syntax | EnableMethodErrors : Boolean
Overview | Refer to Using the ImageList Control

Remarks

Specifies whether LEADTOOLS generates runtime exceptions (in addition to method return values). If EnableMethodErrors is TRUE, the runtime exceptions will be generated. If FALSE, they will not be generated.

See Also

Elements: | Error property, ErrorMsg property.
Topics: | Raster Images: Displaying Images


EnableOLEDragMethod property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableOLEDragMethod;
Delphi Syntax | EnableOLEDragMethod: Boolean;
Overview | Refer to Drag and Drop.

Remarks

(Persistent property, available at design time) Enables or disables the OLE drag and drop operation in the ImageList Control. Possible values are:

Setting | Description
TRUE | Enables drag-and-drop operation.
FALSE | Disables drag-and-drop operation.

If EnableOLEDragMethod is TRUE:

an OnOLEStartDrag event will occur when the drag process begins,

an OnOLEDragOver event will occur while the image is being dragged over the ImageList control, and

an OnOLECompleteDrag event will occur when the dragging process is over and the image is dropped.

In addition, an OnOLEGiveFeedback event will occur while the image is being dragged over the ImageList control to determine the visual feedback for the drag-and-drop operation.

The drag-and-drop operation will paste the selected image to another ImageList control.

Note:

You have to set the AllowSelection property to ALLOWSELECTION_SINGLE before starting the drag/drop operation.

See Also

Elements: | OLEDragCursor property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEDragOver event, OnOLEGiveFeedback event, AllowSelection property
Topics: | Raster Images: Displaying Images


Error property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int Error
Delphi Syntax | Error : Integer
Overview | Refer to Using the Image List Control.

Remarks

(Read Only)Gets the result of last ImageList operation. If the last Image List method resulted in no errors, this property returns SUCCESS.

See Also

Elements: | EnableMethodErrors property, ErrorMsg property
Topics: | Raster Images: Displaying Images


ErrorMsg property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString ErrorMsg
Delphi Syntax | ErrorMsg : String
Overview | Refer to Using the Image List Control.

Remarks

(Read Only) Gets the description of the result of the last Thumbnail Browser operation. If the last Image List method resulted in no errors, this property returns an empty string.

See Also

Elements: | EnableMethodErrors property, Error property
Topics: | Raster Images: Displaying Images


FirstVisibleItem property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int FirstVisibleItem
Delphi Syntax | FirstVisibleItem: Longint;
Overview | Refer to Using the Image List Control.

Remarks

(Read only) (Runtime only) Contains the index of the first visible item in the ImageList Control's view. This is a 0-based index.

See Also

Elements: | ViewSize property, RowCount property, ColumnCount property, Count property
Topics: | Raster Images: Displaying Images


Font property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TFont Font
Delphi Syntax | Font : TFont
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the Font object for displaying each item's Text attribute when DisplayItemText is set to True.

In Delphi and C++ Builder, you can set the Font object's properties at design time by double-clicking the ImageList Control's Font property in the Object Inspector window. At run time, you set these properties as in the following example: LEADImgList1.Font.Name := ‘Arial’.

See Also

Elements: | ForeColor property, ItemBackgroundColor property, BackColor property, BorderColor property, DisplayItemText property.
Topics: | Raster Images: Displaying Images


ForeColor property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ForeColor
Delphi Syntax | ForeColor : TColor
Overview | Refer to Using the Image List Control.

Remarks

Sets the color to be used for drawing each item's Text attribute when DisplayItemText is set to True.

See Also

Elements: | DisplayItemText property, BorderColor property, ItemBackgroundColor property, BackColor property, Font property.
Topics: | Raster Images: Displaying Images


Item property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | TLEADImageListItem* Item[int nIndex]
Delphi Syntax | Item[nIndex: Integer] : TLEADImageListItem
Overview | Refer to Using the Image List Control.

Remarks

This property returns an item from the ImageList Control's collection of items.

The index of the first item is 0, and the index of the last item is Count -1.

The Item object has the following properties (attributes):

Property | Type | Description
Bitmap | TBitmapHandle | The handle of the item’s bitmap
Text | String | The item’s text attribute.
Data | LongInt | Extra data for user-defined use.
Selected | Boolean | Selected flag. True if item is selected. False if item is not selected.
TextExt | String | The item’s Extra text attribute.

The Bitmap property can be used to copy or change the image that an item is displaying.

The Text property can be displayed as a label for the item if DisplayItemText is set to True.

The Data property can be used to store extra, user-defined information for each item.

The Selected property is used to indicate if an item is selected or not. When an item is selected, it is displayed according to the value set in the SelectionStyle and SelectionColor properties.

The TextExt property can be used to store an extra text string for the item. For example, the filename could be stored in Text (which gets displayed in the control), and the fully qualified path and filename in TextExt.

See Also

Elements | Count property, RowCount property, PageCount property, ColumnCount property, Insert method, Remove method, Clear method, SelectAll method, SelectionStyle property, SelectionColor property
Topics | Raster Images: Displaying Images


ItemBackgroundColor property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ItemBackgroundColor
Delphi Syntax | ItemBackgroundColor : TColor
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the color to use as the background of each item that is displayed.

The default setting is clBtnFace.

See Also

Elements: | ItemWidth property, ItemHeight property, ItemVerticalSpacing property, ItemHorizontalSpacing property, DisplayItemText property
Topics: | Raster Images: Displaying Images


ItemHeight property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ItemHeight
Delphi Syntax | ItemHeight: Integer
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the height for displayed items. The unit of measure is in pixels.

The default setting is 115 pixels.

See Also

Elements: | ItemBackgroundColor property, ItemWidth property, ItemVerticalSpacing property, ItemHorizontalSpacing property, DisplayItemText property
Topics: | Raster Images: Displaying Images


ItemHorizontalSpacing property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ItemHorizontalSpacing
Delphi Syntax | ItemHorizontalSpacing : Integer
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the horizontal distance between displayed items. The unit of measure is in pixels.

The default setting is 5 pixels.

See Also

Elements: | ItemBackgroundColor property, ItemWidth property, ItemHeight property, ItemVerticalSpacing property, DisplayItemText property
Topics: | Raster Images: Displaying Images


ItemVerticalSpacing property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ItemVerticalSpacing
Delphi Syntax | ItemVerticalSpacing : Integer
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the vertical distance between displayed items. The unit of measure is in pixels.

The default setting is 5 pixels.

See Also

Elements: | ItemBackgroundColor property, ItemWidth property, ItemHeight property, ItemHorizontalSpacing property, DisplayItemText property
Topics: | Raster Images: Displaying Images


ItemWidth property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ItemWidth
Delphi Syntax | ItemWidth: Integer
Overview | Refer to Using the Image List Control.

Remarks

(Published property,) Specifies the width for displayed items. The unit of measure is in pixels.

The default setting is 115 pixels.

See Also

Elements: | ItemBackgroundColor property, ItemHeight property, ItemVerticalSpacing property, ItemHorizontalSpacing property, DisplayItemText property
Topics: | Raster Images: Displaying Images


OLEDragCursor property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | L_HCURSOR OLEDragCursor;
Delphi Syntax | OLEDragCursor: L_HCURSOR;
Overview | Refer to Drag and Drop.

Remarks

Gets or sets a custom mouse icon for the OLE drag-and-drop operation.

Set this property to use something other than the default drag-and-drop cursors.

To enable the use of custom drag-and-drop cursors, set the bUseDefaultCursor parameter to FALSE within the OnOLEGiveFeedback event. Otherwise, set the bUseDefaultCursor parameter to TRUE within the event.

See Also

Elements: | EnableOLEDragMethod property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEDragOver event, OnOLEGiveFeedback event, AllowSelection property
Topics: | Raster Images: Displaying Images


OwnerDrawItems property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | bool OwnerDrawItems
Delphi Syntax | OwnerDrawItems: Boolean
Overview | Refer to Using the Image List Control.

Remarks

Enables or disables custom/user-defined painting of the ImageList Control's items. Possible values are:

Setting | Description
TRUE | The user is responsible for drawing each ImageList Control item when the OwnerDrawItem event occurs.
FALSE | The toolkit is responsible for drawing each ImageList Control item.

This property must be set to TRUE in order for the OwnerDrawItem event to occur.

See Also

Elements: | OwnerDrawItem event, Item property
Topics: | Raster Images: Displaying Images


PageCount property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int PageCount
Delphi Syntax | PageCount: Integer
Overview | Refer to Using the Image List Control.

Remarks

(Read-only) Gets the current number of pages of items in the ImageList Control.

This will return the total number of pages of items in the ImageList Control. Pages are calculated using the total number of rows or columns (depending on the scroll style) and the total number of rows or columns (depending on the scroll style) that are completely visible in the ImageList Control's client area.

See Also

Elements: | CurrentPage property, Insert method, Remove method, RowCount property, ColumnCount property, Count property, Clear method, Item property, ScrollItems method
Topics: | Raster Images: Displaying Images


PaintDither property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Leadvcl::TPaintDither PaintDither
Delphi Syntax | PaintDither: TPaintDither
Overview | Refer to Using the Image List Control.

Remarks

(published property) Specifies the type of dithering to use when painting an image on a device with 256 colors or less in the ImageList Control. The default is pdOrdered.

Setting | Description
pdOrdered | Use ordered dithering.
pdDiffusion | Use error diffusion.

See Also

Elements: | BitonalScaling
Topics: | Raster Images: Displaying Images


PaintScaling property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Leadvcl::TPaintScaling PaintScaling
Delphi Syntax | PaintScaling: TPaintScaling
Overview | Refer to Using the Image List Control.

Remarks

(Persistent property, available at design time) Type of resizing to use when painting in the ImageList control.

Default is psNormal, which is the fastest. Possible values are:

Value | Meaning
psNormal | normal resize (fastest)
psResample | bilinear interpolation (slower than psNormal, but produces better looking results)
psBicubic | bicubic interpolation (slowest, best quality)

For 1-bit images, the PaintScaling is considered only if BitonalScaling is btsNormal. Otherwise, the FavorBlack and ScaleToGray options take precedence over PaintScaling.

psBicubic produces the same result as psResample when zooming out on an image.

See Also

Elements: | BitonalScaling property
Topics: | Raster Images: Displaying Images


RowCount property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int RowCount
Delphi Syntax | RowCount: Integer
Overview | Refer to Using the Image List Control.

Remarks

(Read-only) Gets the current number of rows of items in the ImageList Control.

See Also

Elements: | Insert method, Remove method, ColumnCount property, Count property, Clear method, Item property
Topics: | Raster Images: Displaying Images


ScrollStyle property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ScrollStyle
Delphi Syntax | ScrollStyle: Integer
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the direction the ImageList Control scrolls the displayed items.

Value | Meaning
SCROLLSTYLE_VERTICAL | Control has vertical scrollbar
SCROLLSTYLE_HORIZONTAL | Control has horizontal scrollbar

The default setting is SCROLLSTYLE_VERTICAL.

See Also

Elements: | OnScroll event, ScrollItems method, EnsureVisible method
Topics: | Raster Images: Displaying Images


SelectedCount property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int SelectedCount;
Delphi Syntax | SelectedCount: Longint;
Overview | Refer to Using the Image List Control.

Remarks

(Read only) (Runtime only) Gets the number of currently selected items in the ImageList control

See Also

Elements: | Count property, SelectedItems property, Item property
Topics: | Raster Images: Displaying Images


SelectedItems property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | TLEADImageListItem * SelectedItems[Index: Integer];
Delphi Syntax | SelectedItems[Index: Integer]: TLEADImageListItem;
Overview | Refer to Using the Image List Control.

Remarks

(Runtime only) This property contains an array of the ImageList items that are currently selected in the ImageList Control.

For more information on the TLEADImageListItem data type, refer to the Item property.

See Also

Elements: | Count property, SelectedCount property, Item property
Topics: | Raster Images: Displaying Images


SelectionColor property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor SelectionColor
Delphi Syntax | SelectionColor: TColor
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the color to use to display items that have the selected attribute when the SelectionStyle property is set to SELECTIONSTYLE_SELECTCOLOR.

The default setting is clBlue.

See Also

Elements: | AllowSelection property, SelectionStyle property, OnItemSelected event, Item property, SelectAll method, HitTest method
Topics: | Raster Images: Displaying Images


SelectionStyle property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int SelectionStyle
Delphi Syntax | SelectionStyle: Integer
Overview | Refer to Using the Image List Control.

Remarks

(Published property) Specifies the style used to display items that have the selected attribute.

Setting | Description
SELECTIONSTYLE_SELECTCOLOR | show selected items using the SelectionColor
SELECTIONSTYLE_PRESSEDBUTTON | show selected items as pressed buttons
SELECTIONSTYLE_USERBITMAP | show selected items using a user-defined bitmap.

The default setting is SELECTIONSTYLE_SELECTCOLOR.

See Also

Elements: | SetSelectionBitmap method, AllowSelection property, SelectionColor property, OnItemSelected event, Item property, SelectAll method, HitTest method
Topics: | Raster Images: Displaying Images


ViewSize property (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ViewSize;
Delphi Syntax | ViewSize: Longint;
Overview | Refer to Using the Image List Control.

Remarks

(Read only) (Runtime only) Contains the ImageList Control's view size.

The value of this property may be in rows or columns. The value depends on the current scroll style. If the ScrollStyle property is SCROLLSTYLE_VERTICAL, then the value will indicate rows. If the ScrollStyle property is SCROLLSTYLE_HORIZONTAL, then the value will indicate columns.

For more information on the LEADImageListItem data type, refer to the Item property.

See Also

Elements: | ScrollStyle property, FirstVisibleItem property
Topics: | Raster Images: Displaying Images


Clear method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall Clear(void);
Delphi Syntax | Function Clear: Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Removes all items from the ImageList Control and frees the memory associated with the items.

See Also

Elements: | Insert method, Remove method, Count property, Sort method
Topics: | Raster Images: Displaying Images


EnsureVisible method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall EnsureVisible(int nIndex);
Delphi Syntax | Function EnsureVisible(nIndex: Integer): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Scrolls the items in the ImageList Control such that the item specified is completely visible.

See Also

Elements: | Item property, ScrollItems method, ScrollStyle property, Insert method
Topics: | Raster Images: Displaying Images


ExportBitmapList method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ExportBitmapList(int nStartIndex, int nItemsToExport, HBITMAPLIST &hExportedBitmapList);
Delphi Syntax | Function ExportBitmapList(nStartIndex: L_INT; nItemsToExport: L_INT; var hExportedBitmapList: HBITMAPLIST): L_INT;
Overview | Refer to Using the ImageList Control.

Remarks

Exports a number of bitmaps from the Image List control to a bitmap list.

The list of bitmaps will be exported from the Image List control into the passed hExportedBitmapList starting from nStartIndex to (nStartIndex + nItemsToExport –1).

After calling this method successfully, the hExportedBitmapList parameter should be updated with the exported bitmaps.

See Also

Elements: | ImportBitmapList method, Sort method, SortExt method, Item property, InsertAt method, Remove method, Count property, InsertFromBitmapList method, LoadFromFile method, SaveToFile method.
Topics: | Raster Images: Displaying Images


HitTest method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall HitTest(int x, int y);
Delphi Syntax | Function HitTest(x : Integer; y: Integer): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Queries the specified location to determine if the point is over an ImageList Control item.

See Also

Elements: | Item property, AllowSelection property, OnItemSelected event.
Topics: | Raster Images: Displaying Images


ImportBitmapList method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int ImportBitmapList(HBITMAPLIST hList, int nStartIndex, int nItemsToInsert, AnsiString strText, AnsiString strTextExt);
Delphi Syntax | Function ImportBitmapList(hList: HBITMAPLIST; nStartIndex: L_INT; nItemsToInsert: L_INT; strText: String; strTextExt: String): L_INT;
Overview | Refer to Using the ImageList Control.

Remarks

Imports a list of bitmaps to the Image List control.

The list of bitmaps found in the passed hList parameter will be inserted into the Image List control starting from nStartIndex to (nStartIndex + nItemsToInsert –1).

See Also

Elements: | ExportBitmapList method, Sort method, SortExt method, Item property, InsertAt method, Remove method, Count property, InsertFromBitmapList method, LoadFromFile method, SaveToFile method.
Topics: | Raster Images: Displaying Images


Insert method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall Insert(LEADTyp::TBitmapHandle Bitmap, System::AnsiString sText, int Data);
Delphi Syntax | Function Insert(Bitmap : TBitmapHandle; sText: String; Data: Integer): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Inserts a new item into the ImageList Control. Insertion occurs at the end of the list.

See Also

Elements: | Item property, InsertAt method, Remove method, Count property, Sort method, InsertFromBitmapList method, LoadFromFile method, SaveToFile method
Topics: | Raster Images: Displaying Images


InsertAt method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall InsertAt(LEADTyp::TBitmapHandle Bitmap, System::AnsiString sText, int Data, int nIndex);
Delphi Syntax | Function InsertAt(Bitmap : TBitmapHandle; sText: String; Data: Integer; nIndex: Integer): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Inserts a new item into the ImageList Control at the specified index. All items past nIndex are pushed up one position. The index is zero-based.

See Also

Elements: | Item property, Insert method, Remove method, Count property, Sort method, InsertFromBitmapList method, LoadFromFile method, SaveToFile method
Topics: | Raster Images: Displaying Images


InsertFromBitmapList method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall InsertFromBitmapList(LEADTyp::HBITMAPLIST BitmapList , System::AnsiString sDefaultText);
Delphi Syntax | Function InsertFromBitmapList( BitmapList: HBitmapList; sDefaultText: String ): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Inserts new items into the ImageList Control from the specified LEAD Bitmap List. All items are inserted with the same Text attribute, specified in pszDefaultText. You can change this after the items are inserted using the Item collection property.

See Also

Elements: | Item property, InsertAt method, Remove method, Count property, Sort method, Insert method, LoadFromFile method, SaveToFile method
Topics: | Raster Images: Displaying Images


IsSupportLocked method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | bool __fastcall IsSupportLocked(int iType);
Delphi Syntax | Function IsSupportLocked(iType : integer): Boolean;
Overview | Refer to Using the Image List Control.

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
Topics: | Raster Images: Displaying Images


LoadDatabase method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadDatabase(AnsiString FileName);
Delphi Syntax | Function LoadDatabase(FileName: String): Integer;
Overview | Refer to Using the ImageList Control .

Remarks

Call this method to load items from a previously saved database (multi-page TIFF file).

The text for each item will be read from the CMNT_SZNAMEOFPAGE comment.

See Also

Elements: | SaveToFile method, SaveDatabase method, LoadFromFile method
Topics: | Raster Images: Displaying Images


LoadFromFile method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall LoadFromFile(System::AnsiString sFile, int nBits, int nStart, int nItems);
Delphi Syntax | Function LoadFromFile (sFile: String; nBits: Integer; nStart: Integer; nItems: Integer): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Inserts new items into the ImageList Control from the specified file. This method supports loading multiple pages from a multi-page file. All items are inserted with the same Text attribute, which is the filename. You can change this after the items are inserted using the Item collection property.

See Also

Elements: | Item property, Insert method, InsertAt method, Remove method, Count property, Sort method, InsertFromBitmapList method, SaveToFile method
Topics: | Raster Images: Displaying Images


Remove method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall Remove(int nIndex);
Delphi Syntax | Function Remove( nIndex: nIndex): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Removes the specified item from the ImageList Control and frees the memory associated with the item.

See Also

Elements: | Item property, Insert method, InsertAt method, Count property, Sort method, InsertFromBitmapList method, LoadFromFile method, SaveToFile method
Topics: | Raster Images: Displaying Images


SaveDatabase method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int SaveDatabase (AnsiString FileName, bool bSelected);
Delphi Syntax | Function SaveDatabase (FileName: String; bSelected: Boolean): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Call this method to save the ImageList's contents as a database (multi-page TIFF file).

The items will be saved as pages in a multi-page TIFF file.

The format of the pages will be as follows:

BitsPerPixel | Format
1 | FILE_CCITT_GROUP4
8 | FILE_TIF_PACKBITS
24 | FILE_TIF_JPEG
Other | FILE_TIF

The text for each item will be saved in the CMNT_SZNAMEOFPAGE comment.

See Also

Elements: | SaveToFile method, LoadDatabase method, LoadFromFile method, SaveTileHeight property, SaveTileWidth property
Topics: | Raster Images: Displaying Images


SaveToFile method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall SaveToFile(System::AnsiString sFile, int nFormat, int nBits, int nQFactor, bool bSelected);
Delphi Syntax | Function SaveToFile (sFile: String; nFormat: Integer; nBits: Integer; nQFactor: Integer; bSelected: Boolean): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Saves the items from the ImageList Control into the specified file. This method supports saving into any of the multi-page file formats supported by LEADTOOLS. If bSelected is True, only the items with the Selected attribute of True are saved.

See Also

Elements: | Item property, Insert method, InsertAt method, Remove method, Count property, Sort method, InsertFromBitmapList method, LoadFromFile method
Topics: | Raster Images: Displaying Images


ScrollItems method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ScrollItems(int nAmount);
Delphi Syntax | Function ScrollItems(nAmount: Integer): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Scrolls the items in the ImageList Control by the specified amount. The direction of the scroll depends on the current setting for ScrollStyle.

See Also

Elements: | Item property, OnScroll event, EnsureVisible method, ScrollStyle property, Insert method
Topics: | Raster Images: Displaying Images


SelectAll method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall SelectAll(bool bFlag);
Delphi Syntax | Function SelectAll(bFlag: Boolean): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Selects or deselects all items in the ImageList Control.

Use this method to set the Selected attribute for all items to bFlag.

See Also

Elements: | Item property, Clear method
Topics: | Raster Images: Displaying Images


SetSelectionBitmap method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int SetSelectionBitmap (Graphics::TColor crTransparent, TBitmapHandle Bitmap);
Delphi Syntax | Function SetSelectionBitmap (crTransparent: TColor; Bitmap: TBitmapHandle):Integer;
Overview | Refer to Using the Image List Control .

Remarks

Displays selected items using the specified user-defined bitmap when the SelectionStyle property is set to SELECTIONSTYLE_USERBITMAP. The specified bitmap will be drawn with the specified color as transparent, and will be centered around each selected item.

See Also

Elements: | ItemWidth property, ItemHeight property, SelectionStyle property
Topics: | Raster Images: Displaying Images


Sort method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall Sort(bool bAscending);
Delphi Syntax | Function Sort(bAscending: Boolean): Integer;
Overview | Refer to Using the ImageList Control.

Remarks

Sorts the items in the ImageList Control based on their Text attribute.

See Also

Elements: | Item property, Insert method, InsertAt method, Count property, Remove method, InsertFromBitmapList method, LoadFromFile method, SaveToFile method
Topics: | Raster Images: Displaying Images


SortExt method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | int SortExt(L_BOOL bAscending, L_BOOL bCaseSensitive, L_BOOL bUseExtText, unsigned uFlags);
Delphi Syntax | Function SortExt(bAscending: L_BOOL; bCaseSensitive: L_BOOL; bUseExtText: L_BOOL; uFlags: L_UINT32): L_INT;
Overview | Refer to Using the ImageList Control.

Remarks

Sorts the items in the ImageList Control according to the passed options.

See Also

Elements: | Sort method, ImportBitmapList method, ExportBitmapList method, Item property, InsertAt method, Remove method, Count property, InsertFromBitmapList method, LoadFromFile method, SaveToFile method.
Topics: | Raster Images: Displaying Images


UnlockSupport method (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall UnlockSupport(int iType, System::AnsiString sKey);
Delphi Syntax | procedure UnlockSupport(iType: integer; sKey : String);
Overview | Refer to Using the Image List Control.

Remarks

Unlocks support for an optional feature, such as LEADTOOLS Document/Medical capabilities.

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

Note:

Unlocking the Document/Medical editions capabilities is necessary only if you upgrade another product to a Document/Medical product. If your current CD is labeled Document/Medical, the Document/Medical capabilities are enabled automatically; your application does not have to unlock them.

See Also

Elements: | IsSupportLocked method.
Topics: | Raster Images: Displaying Images


OnItemSelected event (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall ItemSelected(TObject *Sender, int nIndex)
Delphi Syntax | procedure ItemSelected(Sender: TObject; nIndex: Integer)
Overview | Refer to Using the ImageList Control.

Remarks

Occurs when an item’s Selected attribute is automatically set to True in response to the user clicking the item.

See Also

Elements: | AllowSelection property, SelectionStyle property, SelectionColor property, Item property
Topics: | Raster Images: Displaying Images


OnOLECompleteDrag event (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | TOLECompleteDragEvent OnOLECompleteDrag (TmouseButton Button, TShiftState Shift, int X, int Y);
Delphi Syntax | OnOLECompleteDrag (Button: TMouseButton; Shift: TShiftState; X, Y: Integer): TOLECompleteDragEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs when the dragging operation is complete and the image is dropped.

Please note that only the Left mouse button is used in the drag and drop process.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLEStartDrag event, OnOLEDragOver event, OnOLEGiveFeedback event, AllowSelection property
Topics: | Raster Images: Displaying Images


OnOLEDragOver event (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | TOLEDragOverEvent OnOLEDragOver (TmouseButton Button, TShiftState Shift, int X, int Y);
Delphi Syntax | OnOLEDragOver (Button: TMouseButton; Shift: TShiftState; X, Y: Integer): TOLEDragOverEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs while dragging an image over the ImageList control. It also provides the ImageList control with feedback pertaining to the cursor position and the button used in the drag and drop process.

Please note that only the Left mouse button is used in the drag and drop process.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEGiveFeedback event, AllowSelection property
Topics: | Raster Images: Displaying Images


OnOLEGiveFeedback event (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | TOLEGiveFeedbackEvent OnOLEGiveFeedback (bool &bUseDefaultCursor);
Delphi Syntax | OnOLEGiveFeedback (var bUseDefaultCursor: Boolean): TOLEGiveFeedbackEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs while an image is being dragged over the ImageList control to determine the visual feedback for the drag-and-drop operation.

Note:

To use a custom cursor during the drag and drop process, set the OLEDragCursor property to the custom cursor and set the bUseDefaultCursor parameter to FALSE within the OnOLEGiveFeedback event.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEDragOver event, AllowSelection property
Topics: | Raster Images: Displaying Images


OnOLEStartDrag event (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | TOLEStartDragEvent OnOLEStartDrag (TMouseButton Button, TShiftState Shift, int X, int Y);
Delphi Syntax | OnOLEStartDrag (Button: TMouseButton; Shift: TShiftState; X, Y: Integer): TOLEStartDragEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs when the drag-and-drop operation starts, and indicates whether a drop can be accepted. If the drag and drop operation fails, this event will not be generated.

To start the drag-and-drop operation:

1. | Set the EnableOLEDragMethod property to TRUE.
2. | Set the AllowSelection property to ALLOWSELECTION_SINGLE.
3. | Select an image in this Image List control.
4. | Press the left mouse button down on the same Image List Control and drag the selected image. The OnOLEStartDrag event will occur.

Please note that only the Left mouse button is used in the drag and drop process.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLECompleteDrag event, OnOLEDragOver event, OnOLEGiveFeedback event, AllowSelection property
Topics: | Raster Images: Displaying Images


OnScroll event (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall Scroll(TObject *Sender)
Delphi Syntax | procedure Scroll(Sender: TObject);
Overview | Refer to Using the Image List Control.

Remarks

Occurs when a user scrolls the items using the scrollbar.

See Also

Topics:

Raster Images: Displaying Images


OwnerDrawItem event (ImageList Control)

C++ Builder example

Delphi example

Builder Syntax | TOwnerDrawItemEvent OnOwnerDrawItemEvent (int Index, HDC h_DC, int ItemLeft, int ItemTop, int ItemRight, int ItemBottom, int ItemBackLeft, int ItemBackTop, int ItemBackRight, int ItemBackBottom);
Delphi Syntax | OnOwnerDrawItemEvent (Index: Integer; h_DC: HDC; ItemLeft: Integer; ItemTop: Integer; ItemRight: Integer; ItemBottom: Integer; ItemBackLeft: Integer; ItemBackTop: Integer; ItemBackRight: Integer; ItemBackBottom: Integer):TOwnerDrawItemEvent;
Overview | Refer to Using the Image List Control.

Remarks

Occurs when an item in the ImageList Control needs to be repainted. This event occurs only if the OwnerDrawItems property has been set to TRUE.

This event must be used for custom/user-defined painting of ImageList items.

See Also

Elements: | OwnerDrawItems property, Item property
Topics: | Raster Images: Displaying Images


Bitmap property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | LEADTyp::TBitmapHandle Bitmap
Delphi Syntax | Bitmap : TBitmapHandle
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Gets the bitmap returned when the ISISAcquire method is used to scan an image.

If you assign from this property to a Main Control Bitmap property , a copy of the image will be made in the target Main Control, unless the Main Control's RefBitmap property is set to True. Assigning to this property is only allowed with a value of 0 to delete its image and free the associated memory.

See Also

Elements: | RefBitmap property, ISISAcquire method
Topics: | Raster Images: Scanning Images using ISIS


DriverName property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | System::AnsiString DriverName
Delphi Syntax | DriverName : String
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Contains the string representing the currently selected driver. It is filled by the ISISSelect method. Set this property to change the default driver.

See Also

Elements: | ISISSelect method
Topics: | Raster Images: Scanning Images using ISIS


EnableISISEvent property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | bool EnableISISEvent
Delphi Syntax | EnableISISEvent : Boolean
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Indicates whether to enable the OnISISPage event. If EnableISISEvent is True, OnISISPage event is enabled for multipage scanning. If it is False, OnISISPage event is disabled for multipage scanning.

Set EnableISISEvent property to False in the OnISISPage event to cancel multipage scanning.

See Also

Elements: | OnISISPage event, ISISAcquireMulti method, PagesDiscarded property
Topics: | Raster Images: Scanning Images using ISIS


EnableMethodErrors property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | bool EnableMethodErrors
Delphi Syntax | EnableMethodErrors : Boolean
Overview | Refer to Using ISIS to Scan Images

Remarks

(Document/Medical) Specifies whether LEADTOOLS generates runtime exceptions (in addition to method return values). If EnableMethodErrors is True, the runtime exceptions will be generated. If False, they will not be generated.

See Also

Elements: | ISISAcquireMulti method, ISISAcquire method, ISISSelect method,
 | ISISGetTag method, ISISSetTag method, ISISLoadDriver method, ISISUnloadDriver method, Error property, ErrorMsg property


Error property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int Error
Delphi Syntax | Error : Integer
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Gets the result of last ISIS operation. If the last ISIS method resulted in no errors, this property returns SUCCESS.

See Also

Elements: | EnableMethodErrors property, ErrorMsg property
Topics: | Raster Images: Scanning Images using ISIS


ErrorMsg property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | System::AnsiString ErrorMsg
Delphi Syntax | ErrorMsg : String
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Gets description of the result of last ISIS operation. If the last ISIS method resulted in no errors, this property returns an empty string.

See Also

Elements: | EnableMethodErrors property, Error property
Topics: | Raster Images: Scanning Images using ISIS


IsISISAvailable property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | bool IsISISAvailable
Delphi Syntax | IsISISAvailable : Boolean
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Indicates whether ISIS support DLLs are present. If IsISISAvailable is True, the ISIS support DLLs were successfully located and loaded. If IsISISAvailable is False, the DLLs were not located and were not loaded successfully.

Note:

This property only indicates whether the ISIS support DLLs have been properly installed. It does not indicate the presence of the scanner driver itself. You must get the ISIS scanner driver from either the scanner manufacturer or from Pixel Translations. The .chn or .chw file must be in your path for ISIS scanning to work.

See Also

Elements: | ISISSelect method
Topics: | Raster Images: Scanning Images using ISIS


PagesDiscarded property (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int PagesDiscarded
Delphi Syntax | PagesDiscarded : Integer
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Gets the number of ScanAhead pages that are discarded if the ISISAcquireMulti method is canceled and the ScanAhead tag has been set. For more information on tags, refer to the ISISSetTag method and the ISISGetTag method.

To cancel multipage scanning, set the EnableISISEvent property to False in the OnISISPage event.

See Also

Elements: | ISISAcquireMulti method, ISISSetTag method, ISISGetTag method, OnISISPage event, EnableISISEvent property
Topics: | Raster Images: Scanning Images using ISIS


ISISAcquire method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISAcquire(Cardinal uFlags);
Delphi Syntax | function ISISAcquire(uFlags : Cardinal) : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Scans a single page into the Bitmap property.

You must call the ISISLoadDriver method before calling ISISAcquire.

If you wish to use this bitmap with the Main Control, you can copy the image by assigning the ISIS Bitmap to the Main Bitmap after acquiring the image. Alternatively, to avoid a copy, set the Main Control's RefBitmap property to True before assigning the ISIS Control's Bitmap to the Main Control. For example:

Lead1.RefBitmap = True;
Lead1.Bitmap = LeadIsis1.Bitmap;
Lead1.RefBitmap = False;

See Also

Elements: | Bitmap property
Topics: | Raster Images: Scanning Images using ISIS


ISISAcquireMulti method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISAcquireMulti(System::AnsiString BaseFileName, Cardinal uFlags, int nFormat, bool bMultiPage);
Delphi Syntax | function ISISAcquireMulti(BaseFileName : String; uFlags : Cardinal; nFormat : Integer; bMultiPage : Boolean) : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Scans multiple pages into a multipage file or into multiple single page files.

You must set the EnableISISEvent property to True, before calling ISISAcquireMulti, in order to generate OnISISPage events.

You must call the ISISLoadDriver method before calling ISISAcquireMulti.

To handle the scanned pages in the OnISISPage event, you can copy the image to a Main Control for processing

ex.

Lead1.Bitmap = LeadIsis1.Bitmap;

Alternatively, to avoid a copy, set the Main Control's RefBitmap property to True before assigning the ISIS Control's Bitmap to the Main Control. For example:

Lead1.RefBitmap = True;
Lead1.Bitmap = LeadIsis1.Bitmap;
Lead1.RefBitmap = False;

See Also

Elements: | ISISAcquire method, EnableISISEvent property, PagesDiscarded property, ISISGetTag method, ISISSetTag method, OnISISPage event
Topics: | Raster Images: Scanning Images using ISIS


ISISGetASCIITag method (ISIS® Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ISISGetASCIITag(unsigned uTag, LEADTyp::L_PPCHAR ppszValue, bool bDefault);
Delphi Syntax | Function ISISGetASCIITag(uTag:Cardinal; ppszValue: L_PPCHAR; bDefault: Boolean ): Integer;
Overview | Using ISIS® to Scan Images

Remarks

(Document/Medical), Gets the current or default value of the ISIS® Scanner Driver tag designated in uTag.

The ISISLoadDriver method must be called before calling the ISISGetASCIITag method.

See Also

Elements: | ISISSetASCIITag method, ISISSetTag method, ISISGetASCIITagChoiceCount method, ISISGetASCIITagChoice method, ISISGetTagChoiceCount method, ISISGetTagChoice method, ISISAcquire method, ISISAcquireMulti method, ISISGetTag method, ISISSetTag method
Topics: | Raster Images: Scanning Images using ISIS


ISISGetASCIITagChoice method (ISIS® Control)

C++Builder example

Delphi example

Builder Syntax | int __fastcall ISISGetASCIITagChoice (unsigned uTag, int nIndex, LEADTyp::L_PPCHAR ppszValue);
Delphi Syntax | Function ISISGetASCIITagChoice (uTag: Cardinal; nIndex: Integer; ppszValue: L_PPCHAR): Integer;
Overview | Using ISIS® to Scan Images

Remarks

(Document/Medical) Gets the value or choice, at the specified index, of the ISIS® Scanner Driver tag designated in uTag.

The ISISLoadDriver method must be called before calling the ISISGetASCIITagChoice method.

See Also

Elements: | ISISSetASCIITag method, ISISGetASCIITagChoiceCount method, ISISGetASCIITag method, ISISGetTagChoiceCount method, ISISGetTagChoice method, ISISAcquire method, ISISAcquireMulti method, ISISSetTag method, ISISGetTag method
Topics: | Raster Images: Scanning Images using ISIS


ISISGetASCIITagChoiceCount method (ISIS® Control)

C++ Builder example

Delphi example

Builder Syntax | int__fastcall ISISGetASCIITagChoiceCount (unsigned uTag, Windows::PLongint plCount);
Delphi Syntax | Function ISISGetASCIITagChoiceCount (uTag: Cardinal; plCount: pLongInt): Integer;
Overview | Using ISIS® to Scan Images

Remarks

(Document/Medical) Gets the number of possible values or choices for the ISIS® Scanner Driver tag designated in uTag.

The ISISLoadDriver method must be called before calling the ISISGetASCIITagChoiceCount method.

See Also

Elements: | ISISGetASCIITagChoice method, ISISGetASCIITag method, ISISSetASCIITag method, ISISSetTag method, ISISGetTagChoiceCount method, ISISGetTagChoice method, ISISAcquire method, ISISAcquireMulti method, ISISGetTag method, ISISSetTag method
Topics: | Raster Images: Scanning Images using ISIS


ISISGetTag method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISGetTag(Cardinal uTag, int &nValue);
Delphi Syntax | function ISISGetTag(uTag : Cardinal; var nValue : Integer) : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Gets the current value of the ISIS Scanner Driver tag designated in uTag.

You must call the ISISLoadDriver method before calling ISISGetTag.

See Also

Elements: | ISISSetTag method , ISISAcquire method, ISISAcquireMulti method
Topics: | Raster Images: Scanning Images using ISIS


ISISGetTagChoice method (ISIS® Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ISISGetTagChoice (unsigned uTag, int nIndex, Windows::PLongint plValue);
Delphi Syntax | Function ISISGetTagChoice (uTag: Cardinal; nIndex: Integer; plValue: pLongint): Integer;
Overview | Using ISIS® to Scan Images

Remarks

(Document/Medical) Gets the value or choice, at the specified index, of the ISIS® Scanner Driver tag designated in uTag.

The ISISLoadDriver method must be called before calling the ISISGetTagChoice method.

See Also

Elements: | ISISGetTagChoiceCount method, ISISSetTag method, ISISGetTag method, ISISSetASCIITag method, ISISGetASCIITagChoiceCount method, ISISGetASCIITagChoice method, ISISGetASCIITag method, ISISAcquire method, ISISAcquireMulti method
Topics: | Raster Images: Scanning Images using ISIS


ISISGetTagChoiceCount method (ISIS® Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ISISGetTagChoiceCount (unsigned uTag, Windows::PLongint plCount);
Delphi Syntax | Function ISISGetTagChoiceCount (uTag: Cardinal; plCount: pLongint): Integer;
Overview | Using ISIS® to Scan Images

Remarks

(Document/Medical) Gets the number of possible values or choices for the ISIS® Scanner Driver tag designated in uTag.

The ISISLoadDriver method must be called before calling the ISISGetTagChoiceCount method.

See Also

Elements: | ISISGetTagChoice method, ISISGetTag method, ISISSetTag method, ISISSetASCIITag method, ISISGetASCIITag method, ISISGetASCIITagChoice method, ISISGetASCIITagChoiceCount method, ISISAcquire method, ISISAcquireMulti method
Topics: | Raster Images: Scanning Images using ISIS


ISISLoadDriver method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISLoadDriver(void);
Delphi Syntax | function ISISLoadDriver : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Loads the driver set in the DriverName property. You must load the ISIS Driver before calling ISISAcquire, ISISAcquireMulti, ISISGetTag, or ISISSetTag.

If DriverName property is an empty string, the currently selected driver will be loaded.

See Also

Elements: | ISISLoadDriver method, ISISAcquire method, ISISAcquireMulti method,
 | ISISGetTag method, ISISSetTag method, DriverName property
Topics: | Raster Images: Scanning Images using ISIS


ISISSelect method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISSelect(void);
Delphi Syntax | function ISISSelect : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Displays the ISIS Scanner Select dialog box, allowing the user to select an ISIS driver currently installed, or to add a new ISIS driver. The DriverName property will be updated with the selected driver.

See Also

Elements: | IsISISAvailable property, DriverName property, ISISLoadDriver method
Topics: | Raster Images: Scanning Images using ISIS


ISISSetASCIITag method (ISIS® Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ISISSetASCIITag (unsigned uTag, char * pszValue);
Delphi Syntax | Function ISISSetASCIITag (uTag: Cardinal; pszValue: PChar): Integer;
Overview | Using ISIS® to Scan Images

Remarks

(Document/Medical) Sets the current value of the ISIS® Scanner Driver tag designated in uTag.

The ISISLoadDriver method must be called before calling the ISISSetASCIITag method.

See Also

Elements: | ISISGetASCIITag method, ISISGetASCIITagChoiceCount method, ISISGetASCIITagChoice method, ISISGetTagChoiceCount method, ISISGetTagChoice method, ISISSetTag method, ISISGetTag method, ISISAcquire method, ISISAcquireMulti method
Topics: | Raster Images: Scanning Images using ISIS


ISISSetScanOptions method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISSetScanOptions(void);
Delphi Syntax | function ISISSetScanOptions : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Displays the ISIS Scan Options dialog box. You must call the ISISLoadDriver method before calling ISISSetScanOptions.

See Also

Elements: | ISISAcquire method, EnableISISEvent property, PagesDiscarded property, ISISGetTag method, ISISSetTag method, OnISISPage event
Topics: | Raster Images: Scanning Images using ISIS


ISISSetTag method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISSetTag(Cardinal uTag, int nValue);
Delphi Syntax | function ISISSetTag (uTag : Cardinal; nValue : Integer) : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Sets one of the supported ISIS Scanner Driver tags.

You must call the ISISLoadDriver method before calling ISISSetTag.

When determining the color format, tags must be set in the following order:

TAG_SAMPLESPERPIXEL

TAG_BITSPERSAMPLE

TAG_COMPRESSION

When setting the following tags, the tags must be set in the following order:

TAG_XRESOLUTION

TAG_YRESOLUTION

TAG_XPOSITION

TAG_YPOSITION

TAG_IMAGELENGTH

TAG_IMAGEWIDTH

See Also

Elements: | ISISGetTag method, ISISAcquire method, ISISAcquireMulti method
Topics: | Raster Images: Scanning Images using ISIS


ISISUnloadDriver method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | int __fastcall ISISUnloadDriver(void);
Delphi Syntax | function ISISUnloadDriver : Integer;
Overview | Using ISIS to Scan Images

Remarks

(Document/Medical) Unloads the ISIS driver. You must unload the ISIS driver when you are finished with ISIS support.

See Also

Elements: | ISISLoadDriver method, ISISAcquire method, ISISAcquireMulti method,
 | ISISGetTag method, ISISSetTag method, DriverName property
Topics: | Raster Images: Scanning Images using ISIS


IsSupportLocked method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | bool __fastcall IsSupportLocked(int iType);
Delphi Syntax | function IsSupportLocked(iType: Integer): Boolean;
Overview | Refer to Miscellaneous Methods and Properties.

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

Topics:

Support: Version and License Information


UnlockSupport method (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | void __fastcall UnlockSupport(int iType, System::AnsiString Key);
Delphi Syntax | procedure UnlockSupport(iType: Integer; Key: String);
Overview | Refer to Miscellaneous Methods and Properties.

Remarks

Unlocks support for an optional feature, such as LEADTOOLS Document/Medical capabilities.

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

See Also

Topics:

Support: Version and License Information


OnISISPage event (ISIS Control)

C++ Builder 4.0 example

Delphi example

Builder Syntax | TISISPageEvent OnISISPage
 | typedef void __fastcall (__closure *TISISPageEvent)(System::TObject* Sender, int nPage, System::AnsiString FileName);
Delphi Syntax | OnISISPage : TISISPageEvent
 | Type TISISPageEvent = procedure (Sender: TObject; nPage : Integer; FileName : String) of object;
Overview | Refer to Using ISIS to Scan Images

Remarks

(Document/Medical) OnISISPage event is called after each page is acquired by the ISISAcquireMulti method.

You must set the EnableISISEvent property to True, before calling ISISAcquireMulti, in order to generate OnISISPage events.

In the OnISISPage event, the Bitmap property will hold the current page. You can copy this to a Main Control for further processing, saving, etc.

To handle the scanned pages in the OnISISPage event, you can copy the image to a Main Control for processing

ex.

Lead1.Bitmap = LeadIsis1.Bitmap;

Alternatively, to avoid a copy, set the Main Control's RefBitmap property to True before assigning the ISIS Control's Bitmap to the Main Control. For example:

Lead1.RefBitmap = True;
Lead1.Bitmap = LeadIsis1.Bitmap;
Lead1.RefBitmap = False;

See Also

Elements: | ISISAcquireMulti method, EnableISISEvent property
Topics: | Raster Images: Scanning Images using ISIS


AnimationBackColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor AnimationBackColor
Delphi Syntax | AnimationBackColor: TColor
Overview | Refer to Playing an Animation.

Remarks

Background color for animation playback.

This property applies to the temporary target bitmap that LEADTOOLS creates for animation playback.

This property is initialized when you take any of the following actions which create or replace the control's bitmap list:

Load an image file.

Capture an image from the screen.

Copy another control's bitmap list by assigning the BitmapList property.

When you load an animated GIF file, the initial value is based on the global background color specified in the file. Otherwise, the default is black.

When you save an animated GIF file, this value is saved as a global value in the file.

When setting this property, you can specify a COLORREF value (the return value of the RGB function).

See Also

Elements: | AnimationBitsPerPixel property, AnimationPalette property, AnimationWidth property, AnimationHeight property
Topics: | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information
 | Raster Images: Playing Animated Images
 | Using Color Values in LEADTOOLS


AnimationBitsPerPixel property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AnimationBitsPerPixel
Delphi Syntax | AnimationBitsPerPixel: Integer
Overview | Refer to Playing an Animation.

Remarks

Specifies the bits per pixel of the target bitmap that is used for animation playback.

This property applies to the temporary target bitmap that LEADTOOLS creates for animation playback.

This property is initialized when you take any of the following actions which create or replace the control's bitmap list:

Load an image file.

Capture an image from the screen.

Copy another control's bitmap list by assigning the BitmapList property.

If you make any subsequent changes in the color resolution of the loaded bitmaps, you should update this property before playing the list as an animation.

See Also

Elements: | AnimationBackColor property, AnimationPalette property, AnimationWidth property, AnimationHeight property
Topics: | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information
 | Raster Images: Playing Animated Images


AnimationEnable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnimationEnable
Delphi Syntax | AnimationEnable: Boolean
Overview | Refer to Playing an Animation.

Remarks

Starts or stops an animation playback.

Setting | Description
TRUE | Starts an animation playback.
FALSE | Stops an animation playback.

See Also

Elements: | AutoAnimate property, AutoAnimationLoop property, AnimationLoop property, OnAnimate event
Topics: | Raster Images: Playing Animated Images


AnimationHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AnimationHeight
Delphi Syntax | AnimationHeight: Integer
Overview | Refer to Playing an Animation.

Remarks

Specifies the height of the target bitmap that is used for animation playback. The unit of measure is pixels.

This property applies to the temporary target bitmap that LEADTOOLS creates for animation playback.

This property is initialized when you take any of the following actions which create or replace the control's bitmap list:

Load an image file.

Capture an image from the screen.

Copy another control's bitmap list by assigning the BitmapList property.

If you resize the loaded bitmaps, this property is not updated, and you may need to update this property before playing the list as an animation.

When you load an animated GIF file, the initial value is based on the global height specified in the file. Otherwise, the default is the same as the first bitmap in the list.

When you save an animated GIF file, this value is saved as a global value in the file.

See Also

Elements: | AnimationBackColor property, AnimationBitsPerPixel property, AnimationPalette property, AnimationWidth property
Topics: | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information
 | Raster Images: Playing Animated Images


AnimationLoop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AnimationLoop
Delphi Syntax | AnimationLoop: Boolean
Overview | Refer to Playing an Animation.

Remarks

Controls whether an animation plays continuously.

Setting | Description
TRUE | After the last bitmap in the list, the playback begins again with the first bitmap.
FALSE | After the last bitmap in the list, the playback stops.

When you save an animated GIF file, this value is saved as a global value in the file. For an example showing how to create and save an animated GIF file, refer to Creating and Saving an Animated Gif File for Delphi or Creating and Saving an Animated Gif File for C++ Builder.

See Also

Elements: | AutoAnimate property, AutoAnimationLoop property, AnimationEnable property, OnAnimate event
Topics: | Raster Images: Playing Animated Images


AnimationPalette property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor AnimationPalette [int index];
Delphi Syntax | AnimationPalette [index: Integer]: TColor;
Overview | Refer to Playing an Animation.

Remarks

Sets a color in the palette used for animation playback. This is a property of the temporary target bitmap.

The palette is an array of 256 elements. Each element is a long integer value containing the red, green and blue (RGB) components of the color. You can specify a color using the RGB function.

Palettes are used only for images that are 8 bits per pixel or less.

This property is initialized when you take any of the following actions which create or replace the control's bitmap list:

Load an image file.

Capture an image from the screen.

Copy another control's bitmap list by assigning the BitmapList property.

When you load an animated GIF file, the initial value is based on the global palette specified in the file. Otherwise, the default is the same as the first bitmap in the list.

When you save an animated GIF file, this value is saved as a global value in the file.

See Also

Elements: | AnimationBackColor property, AnimationBitsPerPixel property, AnimationWidth property, AnimationHeight property
Topics: | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information
 | Raster Images: Playing Animated Images


AnimationWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AnimationWidth
Delphi Syntax | AnimationWidth: Integer
Overview | Refer to Playing an Animation.

Remarks

Specifies the width of the target bitmap that is used for animation playback. The unit of measure is pixels.

This property applies to the temporary target bitmap that LEADTOOLS creates for animation playback.

This property is initialized when you take any of the following actions which create or replace the control's bitmap list:

Load an image file.

Capture an image from the screen.

Copy another control's bitmap list by assigning the BitmapList property.

If you resize the loaded bitmaps, this property is not updated, and you may need to update this property before playing the list as an animation.

When you load an animated GIF file, the initial value is based on the global width specified in the file. Otherwise, the default is the same as the first bitmap in the list.

When you save an animated GIF file, this value is saved as a global value in the file.

See Also

Elements: | AnimationBackColor property, AnimationBitsPerPixel property, AnimationPalette property, AnimationHeight property
Topics: | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information
 | Raster Images: Playing Animated Images


AnnOptions property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AnnOptions
Delphi Syntax | AnnOptions: Integer
Overview | Refer to New Annotation Features of Version 14.5.

Remarks

Gets and sets options to enable the user interface and other annotation options introduced in version 14.5. This function is available in the Document/Medical Toolkits.

In version 14.5 of LEADTOOLS, many changes to annotations have been introduced. Some of these features change the way annotations look. Other features change the behavior of the user interface (automated mode). To maintain backward compatibility, the new features are disabled by default. To enable these features, set the AnnOptions property with the desired flags, also you can check the property AnnOptions to get the current Version 14.5 options.

You can use bitwise OR to specify more than one value. Possible values are:

Value | Meaning
OPTIONS_NEW_STAMP_METAFILES | [0x0001] Uses the new rubber stamp styles
OPTIONS_NEW_TOOLBAR | [0x0002] Displays the new XP style annotation toolbar
OPTIONS_NEW_ALPHA | [0x0004] Displays new “alpha” option in the Fill mode dialog
OPTIONS_NEW_ROTATE | [0x0008] Displays rotate handles on objects in design mode
OPTIONS_NEW_SIDE_HANDLES | [0x0010] Displays side handles on rectangular objects in design mode
OPTIONS_NEW_MULTI_SELECT | [0x0020] Displays a multi-select outline of multiply selected objects, along with the new multi-select resize behavior
OPTIONS_NEW_CURSORS | [0x0040] Displays different cursors for each of the annotation tools, and when hovering over handles in design mode.
OPTIONS_NEW_ESC_CANCEL | [0x0080] Allows the user to cancel current action by pressing ESC. Actions include annotation creation and manipulation.
OPTIONS_NEW_CALIBRATE_RULER | [0x0100] Enables ruler calibrate feature in design mode
OPTIONS_NEW_DOT_DASH_LINES | [0x0200] Draws the dash and dot line styles with line width greater than 1 pixel.
OPTIONS_NEW_TEXT_OPTIONS | [0x0400] Enables new text annotation options including show/hide text, show/hide border, and changing text color.
OPTIONS_NEW_ALL | Enables ALL the new options. The value for this constant is the logical “or” of all the above flags.

See Also

Elements: | CreateTB method, ButtonCount property, ButtonColumns property, ButtonRows property, AnnAutoCursor property, AnnSave method, AnnSaveMemory method, AnnLoad method, AnnLoadMemory method
Topics: | Annotation Toolbar
 | Annotations (Document/Medical only): Implementing Automation
 | Annotations (Document/Medical only): Creating Custom Annotations
 | New Annotation Features of Version 14.5


AutoAnimate property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AutoAnimate
Delphi Syntax | AutoAnimate: Boolean
Overview | Refer to Playing an Animation.

Remarks

(Persistent property, available at design time) Causes an animation to begin playing as the file containing an animation is loaded.

Animation may be slower while a file is loading. An alternative for more reliable playback speed is to set the AnimationEnable property after the file is loaded.

Setting | Description
TRUE | Enables the play-while-load feature.
FALSE | Disables the play-while-load feature.

See Also

Elements: | AutoAnimationLoop property, AnimationLoop property, AnimationEnable property, OnAnimate event
Topics: | Raster Images: Playing Animated Images


AutoAnimationLoop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AutoAnimationLoop
Delphi Syntax | AutoAnimationLoop: Integer
Overview | Refer to Playing an Animation.

Remarks

(Persistent property, available at design time) Lets you force continued looping of an animation after it is loaded if the AutoAnimate property is TRUE.

Animated GIF files may continue looping by default, but for AVI files, you must set this property if you want continuous looping after the file is loaded.

Setting | Description
AUTOANIMATIONLOOP_DEFAULT | Use the files default value for continuous looping after loading.
AUTOANIMATIONLOOP_INFINITE | Force continuous looping after loading.

See Also

Elements: | AutoAnimate property, AnimationLoop property, AnimationEnable property, OnAnimate event
Topics: | Raster Images: Playing Animated Images


AutoCADFilesColorScheme property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned AutoCADFilesColorScheme
Delphi Syntax | AutoCADFilesColorScheme : L_UINT32
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets the color scheme that LEADTOOLS uses when loading AutoCAD (DXF and DWG) files.

AutoCAD (DXF and DWG) files can be loaded with either black or white background. This property lets you decide on what color scheme to use. Black on White or White on Black. Possible values are:

Value | Meaning
AUTOCADFILES_COLORSCHEME_BLACKONWHITE | [0] Use Black as the default and White as the background color. This is the default value.
AUTOCADFILES_COLORSCHEME_WHITEONBLACK | [1] Use White as the default and Black as the background color.

Note that this property only effects colors number 0 and 7 in the standard AutoCAD color profile. Other colors will not be affected.

This property may be used with the following vector file formats: DXF and DWG. For more information on these file formats and their availability, refer to Summary of All Supported Image File Formats.

See Also

Elements: | PDFYResolution property, PDFDisplayDepth property, PDFTextAlpha property, PDFGraphicsAlpha property, PDFUseLibFonts property, PLTPenWidth property, PLTPenColor property, RTFTopMarg property, RTFBottomMarg property, RTFRightMarg property, RTFLeftMarg property, RTFPaperWidth property, RTFPaperHeight property, PTKResolution property
Topics: | Raster Images: Loading Files


AutoFloater property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AutoFloater
Delphi Syntax | AutoFloater : Boolean
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Sets the mode of floater creation.

If it is True, the floater mode is Automatic, and a floater can be created from the Main Control's region using the EnableFloater property. If False, you can manually create a floater from the Main Control's region by assigning the Bitmap property to the Floater property.

If you assign a bitmap to the Floater property, the AutoFloater property is automatically set to False. Likewise, if you change the AutoFloater property to True, the Floater property is set to 0 and its associated bitmap, if any, is freed.

Whenever this property is False, the EnableFloater property is forced to be False.

See Also

Elements: | Floater property, EnableFloater property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


AutoRepaint property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AutoRepaint
Delphi Syntax | AutoRepaint: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Enables automatic repainting of the bitmap.

When this property is TRUE, any change in the bitmap causes the bitmap to repaint. At run time, you can set the property to FALSE temporarily to change more than one property before repainting. Alternatively, you can use the ForceRepaint method to control repainting.

Setting | Description
TRUE | Enables automatic repainting of the bitmap.
FALSE | Disables automatic repainting of the bitmap.

See Also

Elements: | ForceRepaint method, PaintRgnOnly property, RepaintRect method
Topics: | Raster Images: Displaying Images


AutoRubberBand property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AutoRubberBand
Delphi Syntax | AutoRubberBand: Boolean
Overview | Refer to Marking a Selection with a Rubberband.

Remarks

Automates the rubberband so that it appears whenever the mouse is moved with the left button down.

The rubberband is a one-pixel outline of a rectangle on the display surface. It is automatically resized with each mouse movement.

Value | Meaning
TRUE | Enable automation of the rubberband.
FALSE | Disable automation of the rubberband.

See Also

Elements: | OnRubberBand event
Topics: | Working with the Control: Client Area Usage


AutoScroll property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AutoScroll
Delphi Syntax | AutoScroll: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Enables automatic implementation of scroll bars.

Setting | Description
TRUE | Enables automatic implementation of scroll bars if the image display is bigger than the control.
FALSE | Disables automatic implementation of scroll bars.

See Also

Elements: | AutoRepaint property, AutoSetRects property, PaintSizeMode property, PaintZoomFactor property, AutoSize property
Topics: | Raster Images: Displaying Images


AutoSetRects property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AutoSetRects
Delphi Syntax | AutoSetRects: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Enables or disables the automatic adjustment of display rectangles when bitmap dimensions change.

Setting | Description
TRUE | The source and destination display rectangles change when the bitmap changes. This occurs, for example, when loading a bitmap. The top and left values change to 0. The width and height values change according to the settings of the PaintSizeMode property and the PaintZoomFactor property.
FALSE | Disables automatic adjustment of rectangles.

Note:

If you disable automatic adjustment of rects, you must update all four rects in order for the display to be correct when the size of the image is changed.

See Also

Elements: | AutoRepaint property, PaintSizeMode property, PaintZoomFactor property, AutoScroll property, AutoSize property
Topics: | Raster Images: Displaying Images


AutoSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool AutoSize
Delphi Syntax | AutoSize: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Automatically sizes the Main Control to the size of the bitmap, if possible.

If the bitmap is larger than the current window, the control is resized to fit the image, regardless of the size of its container.

This property is effective when loading a bitmap and when taking any action (such as rotating a bitmap) that changes the dimensions of the bitmap.

Setting | Description
TRUE | Automatically size the LEAD control to the size of the bitmap, if possible.
FALSE | The size of the bitmap does not affect the size of the LEAD control.

See Also

Elements: | AutoRepaint property, AutoSetRects property, PaintSizeMode property, PaintZoomFactor property, AutoScroll property
Topics: | Raster Images: Displaying Images


BackColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TColor BackColor
Delphi Syntax | BackColor: TColor
Overview | Refer to Displaying an Image.

Remarks

Sets the background color of the bitmap.

See Also

Topics: | Working with the Control: General Behavior
 | Raster Images: Displaying Images


BackErase property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool BackErase
Delphi Syntax | BackErase: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Causes the bitmap to erase the background before painting. This erases the previous image before displaying the next image. Otherwise, the next image overlaps the previous image.

Setting | Description
TRUE | Erase the background of the control.
FALSE | Do not erase the background of the control.

See Also

Elements: | BitonalScaling property, PaintDither property, PaintEffect property, PaintPalette property, PaintROP3 property, PaintGamma property, PaintIntensity property, PaintContrast property
Topics: | Raster Images: Displaying Images


BackgroundImageHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BackgroundImageHeight
Delphi Syntax | BackgroundImageHeight: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the height of the source rectangle that defines which part of a bitmap to use for the background of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | DrawShape method, ShapeBackgroundStyle property, BackgroundImageLeft property, BackgroundImageTop property, BackgroundImageWidth property
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


BackgroundImageLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BackgroundImageLeft
Delphi Syntax | BackgroundImageLeft: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the X coordinate of the origin of the source rectangle that defines which part of a bitmap to use for the background of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | DrawShape method, ShapeBackgroundStyle property, BackgroundImageTop property, BackgroundImageWidth property, BackgroundImageHeight property
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


BackgroundImageTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BackgroundImageTop
Delphi Syntax | BackgroundImageTop: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the Y coordinate of the origin of the source rectangle that defines which part of a bitmap to use for the background of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | DrawShape method, ShapeBackgroundStyle property, BackgroundImageLeft property, BackgroundImageWidth property, BackgroundImageHeight property
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


BackgroundImageWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BackgroundImageWidth
Delphi Syntax | BackgroundImageWidth: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the width of the source rectangle that defines which part of a bitmap to use for the background of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | DrawShape method, ShapeBackgroundStyle property, BackgroundImageLeft property, BackgroundImageTop property, BackgroundImageHeight property
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


BezierSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BezierSize;
Delphi Syntax | BezierSize: Integer;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

(Read only) Indicates the size of the arrays (BezierX property and BezierY property) used to store the vertices of the Bezier curve.

This property is updated by the CurveToBezier method.

See Also

Elements: | BezierX property, BezierY property, CurveToBezier method, CurveX property, CurveY property, CurveSize property, CurveTension property, CurveType property, SetRgnCurve method
Topics: | Raster Images: Creating and Using a Region


BezierX property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BezierX [int iIndex];
Delphi Syntax | BezierX [iIndex: Integer]: Longint;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

(Read only) Gets an array of long values that represent the X coordinates for the control points of the Bezier curve.

The number of points in the array is contained in the BezierSize property.

This property is updated by the CurveToBezier method.

See Also

Elements: | BezierSize property, BezierY property, CurveToBezier method, CurveX property, CurveY property, CurveSize property, CurveTension property, CurveType property, SetRgnCurve method
Topics: | Raster Images: Creating and Using a Region


BezierY property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BezierY [int iIndex];
Delphi Syntax | BezierY [iIndex: Integer]: Longint
Overview | Refer to Creating and Using a Bitmap Region

Remarks

(Read only) Gets an array of long values that represent the Y coordinates for the control points of the Bezier curve.

The number of points in the array is contained in the BezierSize property.

This property is updated by the CurveToBezier method.

See Also

Elements: | BezierSize property, BezierX property, CurveToBezier method, CurveX property, CurveY property, CurveSize property, CurveTension property, CurveType property, SetRgnCurve method
Topics: | Raster Images: Creating and Using a Region


Bitmap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TBitmapHandle Bitmap
Delphi Syntax | Bitmap: TbitmapHandle
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

Is the handle of the bitmap.

Setting this property to 0 clears the bitmap from memory. You can assign its value to another Main Control's Bitmap property to create a copy.

If a region is defined for the bitmap, the region is also freed or copied.

When assigning to this property, a copy of the source control's bitmap is made unless the Main Control's RefBitmap property is set to True. Use the RefBitmap property to avoid having a second copy of the source image in memory.

See Also

Elements: | RefBitmap property
Topics: | Raster Images: Creating and Deleting Images
 | Raster Images: Creating and Maintaining Lists of Images
 | Raster Images: Copying Images


BitmapAlpha property (Main Control)

C++ 4.0 example

Delphi example

Builder Syntax | TBitmapHandle BitmapAlpha
Delphi Syntax | BitmapAlpha: TBitmapHandle
Overview | Refer to Working with the Alpha Channel.

Remarks

Lets you get or set alpha-channel data in a bitmap.

Typically, an alpha channel contains a mask that is used for transparency. This property, used with the region processing methods, lets you implement transparency in saved images.

When you get the value of this property (assigning it to another Main Control) you get an 8-bit grayscale bitmap that matches the current alpha channel data. When you set the value from another Main Control, LEADTOOLS interprets the bitmap data, if necessary, to update the alpha channel data.

Only 16- and 32-bit images can have an alpha channel. If you set this property in a control that has any other color resolution, the bitmap is converted to 32-bit. (If you want 16-bit, you should change it using the ColorRes method, if necessary, before setting the property.)

This method does not support signed data images, but only DICOM images are supported as signed data. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image, other than a DICOM image, is passed to this method.

See Also

Elements: | SetRgnColor method, GetRgnHandle method, SetRgnHandle method
Topics: | Implementing Transparency


BitmapBits property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapBits
Delphi Syntax | BitmapBits: Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Read only) Is the number of bits per pixel for the bitmap.

See Also

Elements: | BitmapHeight property, BitmapWidth property, BitmapXRes property, BitmapYRes property, ColorCount property
Topics: | Raster Images: Getting Current Information


BitmapBytesPerLine property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapBytesPerLine.
Delphi Syntax | BitmapBytesPerLine: Integer;
Overview | Examining and Altering Bitmaps

Remarks

Indicates the Number of bytes per line of the bitmap loaded in main control.

See Also

Elements: | GetBitmapRow method, GetBitmapRowCol method, PutBitmapRowCol method, PutBitmapRow method,BitmapOrder property.
Topics: | Raster Images: Getting / Setting Rows from Bitmaps


BitmapCompression property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapCompression
Delphi Syntax | BitmapCompression: Integer
Overview | Refer to Super Compressed Bitmaps

Remarks

Indicates the compression used in storing the bitmap in memory.

Reading the property gives the user the current compression used by the bitmap.

When the property is set, the bitmap's compression is changed to match the desired compression. An exception occurs if the compression type is invalid. For example, trying to compress a bitmap that is not 1-bit, or trying to super-compress a bitmap that is not 1-bit, 8-bit, or 24-bit will result in an exception.

See Also

Elements: | Load method, LoadCompressed property
Topics: | Raster Images: Getting Current Information


BitmapDataPath property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::WideString BitmapDataPath
Delphi Syntax | BitmapDataPath: WideString
Overview | Refer to Implementing Internet Features.

Remarks

(Persistent property, available at design time) Loads the specified bitmap asynchronously. The value can be a local pathname or an Internet URL.

To manage the loading, you can use the ReadyState property and the OnReadyStateChanged event.

See Also

Elements: | ReadyState property, OnReadyStateChanged event
Topics: | Raster Images: Loading Files


BitmapDelay property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapDelay
Delphi Syntax | BitmapDelay: longint
Overview | Refer to Playing an Animation.

Remarks

Sets or gets the animation playback delay in milliseconds (ms).

The delay is the wait period before the bitmap is displayed during playback. It can be different for each bitmap in a list (but it is usually the same).

See Also

Elements: | BitmapDisposalMethod property, BitmapEnableTransparency property, BitmapTransparentColor property
Topics: | Raster Images: Playing Animated Images


BitmapDisposalMethod property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapDisposalMethod
Delphi Syntax | BitmapDisposalMethod: Integer
Overview | Refer to Playing an Animation.

Remarks

Sets or gets the animation playback disposal method.

The disposal method can be different for each bitmap in a list (but it is usually the same). The following are constants for the disposal methods used after rendering an image in an animation playback:

Value | Meaning
PLAYDISPOSE_NONE | Do nothing.
PLAYDISPOSE_LEAVE | Leave the target bitmap as is.
PLAYDISPOSE_RESTOREBACKGROUND | Restore the background.
PLAYDISPOSE_RESTOREPREVIOUS | Restore the previous image.

See Also

Elements: | BitmapDelay property, BitmapEnableTransparency property, BitmapTransparentColor property
Topics: | Raster Images: Playing Animated Images


BitmapEnableTransparency property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool BitmapEnableTransparency
Delphi Syntax | BitmapEnableTransparency: Boolean
Overview | Refer to Playing an Animation.

Remarks

Enables or disables the use of a transparent color when playing an animation.

The color is specified by the BitmapTransparentColor property. The use of transparency can be different for each bitmap in a list (but it is usually the same).

Value | Meaning
TRUE | Enable transparency.
FALSE | Disable transparency.

See Also

Elements: | BitmapDelay property, BitmapDisposalMethod property, BitmapTransparentColor property
Topics: | Raster Images: Playing Animated Images
 | Implementing Transparency


BitmapHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapHeight
Delphi Syntax | BitmapHeight: Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Read only) Is the height of the bitmap. The unit of measure is pixels.

See Also

Elements: | BitmapBits property, BitmapWidth property, BitmapXRes property, BitmapYRes property, ColorCount property
Topics: | Raster Images: Getting Current Information


BitmapLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapLeft
Delphi Syntax | BitmapLeft: Integer
Overview | Refer to Playing an Animation.

Remarks

Specifies the X coordinate of the origin of the bitmap relative to the target bitmap during animation playback. The unit of measure is pixels.

See Also

Elements: | BitmapTop property
Topics: | Raster Images: Playing Animated Images


BitmapList property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::HBITMAPLIST BitmapList
Delphi Syntax | BitmapList: HBitmapList
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

Is the handle of the bitmap list.

You can use this property to copy an entire list of bitmaps from one Main Control to another. You can also set this property to 0 to free all bitmaps in the list.

See Also

Topics: | Raster Images: Creating and Maintaining Lists of Images
 | Raster Images: Copying Images


BitmapListCount property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal BitmapListCount
Delphi Syntax | BitmapListCount: Cardinal
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

(Read only) Is the number of bitmaps in the control's bitmap list.

See Also

Topics:

Raster Images: Creating and Maintaining Lists of Images


BitmapListIndex property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal BitmapListIndex
Delphi Syntax | BitmapListIndex: Cardinal
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

Is the index of the current bitmap in the control's bitmap list.

You can set this property to specify the current bitmap. For example, if you wanted to resize all bitmaps in a list, you would use a loop that updates this property before calling the Size method.

See Also

Topics:

Raster Images: Creating and Maintaining Lists of Images


BitmapOrder property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapOrder;
Delphi Syntax | BitmapOrder: Integer;
Overview | Examining and Altering Bitmaps

Remarks

Indicates the Order of the bitmap loaded in main control.

Possible values are:

Value | Meaning
ORDER_RGB | Red, Green, Blue Order.
ORDER_BGR | Blue, Green, Red Order.
ORDER_GRAY | Gray Order.

See Also

Elements: | GetBitmapRow method, GetBitmapRowCol method, PutBitmapRowCol method,BitmapBytesPerLine Property, PutBitmapRow method.
Topics: | Raster Images: Getting / Setting Rows from Bitmaps


BitmapPalette property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapPalette (int iIndex)
Delphi Syntax | BitmapPalette (iIndex:Integer):TColorRef
Overview | Refer to Managing Palettes

Remarks

Sets a color in the bitmap's palette.

The palette is an array of 256 elements. Each element is a long integer value containing the red, green and blue (RGB) components of the color. You can specify a color using the RGB function.

Palettes are used only for images that are 8 bits per pixel or less.

See Also

Topics:

Raster Images: Palettes


BitmapSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapSize
Delphi Syntax | BitmapSize: Longint
Overview | Refer to Super Compressed Bitmaps

Remarks

(Read only) Gets the number of bytes used by the bitmap data.

See Also

Elements: | BitmapHeight property, BitmapWidth property, BitmapBits property, BitmapCompression property
Topics: | Raster Images: Getting Current Information


BitmapTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapTop
Delphi Syntax | BitmapTop: Integer
Overview | Refer to Playing an Animation.

Remarks

Specifies the Y coordinate of the origin of the bitmap relative to the target bitmap during animation playback. The unit of measure is pixels.

See Also

Elements: | BitmapLeft property
Topics: | Raster Images: Playing Animated Images


BitmapTransparentColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor BitmapTransparentColor
Delphi Syntax | BitmapTransparentColor: TColor
Overview | Refer to Playing an Animation.

Remarks

Specifies the color to use for transparency in an animation playback.

You can specify a COLORREF value (the return value of the RGB function).

See Also

Elements: | BitmapDelay property, BitmapDisposalMethod property, BitmapEnableTransparency property
Topics: | Raster Images: Playing Animated Images
 | Implementing Transparency
 | Using Color Values in LEADTOOLS


BitmapWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapWidth
Delphi Syntax | BitmapWidth: Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Read only) Is the width of the bitmap. The unit of measure is pixels.

See Also

Elements: | BitmapBits property, BitmapHeight property, BitmapXRes property, BitmapYRes property, ColorCount property
Topics: | Raster Images: Getting Current Information


BitmapXRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapXRes
Delphi Syntax | BitmapXRes:Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Dots per inch in the width direction.

This value is commonly used for printing. Loading an image from a file updates this property, using the value stored in the file.

See Also

Elements | BitmapBits property, BitmapHeight property, BitmapWidth property, BitmapYRes property, ColorCount property
Topics | Raster Images: Getting Current Information
 | Using Rulers in Annotation Objects


BitmapYRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BitmapYRes
Delphi Syntax | BitmapYRes:Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Dots per inch in the height direction.

This value is commonly used for printing. Loading an image from a file updates this property, using the value stored in the file.

See Also

Elements | BitmapBits property, BitmapHeight property, BitmapWidth property, BitmapXRes property, ColorCount property
Topics | Raster Images: Getting Current Information
 | Using Rulers in Annotation Objects


BitonalScaling property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TBitonalScaling BitonalScaling
Delphi Syntax | BitonalScaling:TBitonalScaling
Overview | Refer to Displaying an Image.

Remarks

(Document/Medical only, persistent property, available at design time) Sets options to improve the display of bitonal bitmaps when they are scaled (zoomed in or zoomed out).

Setting | Description
btsNormal | Causes bitonal images to be displayed normally when they are scaled.
btsFavorBlack | Enables a bias in preserving black objects when displaying zoomed-out 1-bit images. This can prevent the disappearance of fine lines and details, but it slows down the display.
btsScaleToGray | Enables grayscaling of 1-bit images when they are displayed. This improves the readability of the images when they are zoomed in or zoomed out, but it slows down the display.

See Also

Elements: | BackErase property, PaintDither property, PaintEffect property, PaintPalette property, PaintROP3 property, PaintGamma property, PaintIntensity property, PaintContrast property
Topics: | Raster Images: Displaying Images


CenterImage property (Main Control)

Builder example

Delphi example

Builder Syntax | bool CenterImage
Delphi Syntax | CenterImage : Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Enables or disables the automatic adjustment of display rectangles in order to center the image in the control's client area, when the width and/or height of the destination rectangle is smaller than the width and/or height of the client area.

For example, this can be used to center a small image when it is displayed in a control that is larger than the image's dimensions. This can also be used in conjunction with PaintSizeMode property and PaintZoomFactor property to center an image when the zoomed display dimensions are smaller than the control's dimensions.

See Also

Elements: | AutoSetRects property, DstLeft property, DstTop property, DstWidth property, DstHeight property, DstClipLeft property, DstClipTop property, DstClipHeight property, DstClipWidth property, AutoScroll property, PaintSizeMode property, PaintZoomFactor property
Topics: | Raster Images: Displaying Images


ColorCount property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorCount
Delphi Syntax | ColorCount:Integer
Overview | Refer to Examining and Altering Bitmaps

Remarks

(Read Only) Returns the number of unique colors in the current bitmap.

This property supports signed data images.

See Also

Elements: | BitmapBits property, BitmapHeight property, BitmapWidth property, BitmapXRes property, BitmapYRes property
Topics: | Raster Images: Getting Current Information


ColorPlanes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::TBitmapHandle ColorPlanes [int nIndex]
Delphi Syntax | ColorPlanes [nIndex:Integer]: TBitmapHandle
Overview | Refer to Managing Color Separations.

Remarks

Is the array of grayscale bitmaps created by the ColorSeparate method.

You can merge the bitmaps in the array by using the ColorMerge method. The separations follow the color order of the image data. In most cases, this is the same as the abbreviation of the color-plane model. For example, in a CMYK separation, ColorPlanes[0] is the cyan plane. The only exception is RGB, where the image data is usually stored as blue-green-red, and ColorPlanes[0] is the blue plane.

You can use the Assignment operator to copy a separation bitmap to or from a Main Control. For example, in Delphi:

Lead2.Bitmap := Lead1.ColorPlanes[0]

You can also free a separation bitmap from memory by assigning it a value of 0.

See Also

Topics: | Raster Images: Doing Color Space Conversions
 | Examining and Altering Bitmaps


Comment property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::Variant Comment(int nIndex);
Delphi Syntax | Comment(nIndex: Integer): Variant;
Overview | Refer to Maintaining File Comments.

Remarks

Is the array of comments to be saved with the next call of the Save or SaveMemory method.

Some file formats can contain comments, and some cannot, and each file format has its own set of comment types. With the Comment property, you can get and set the value of any comment in the array. The index into the array (specified using a constant) determines the type of comment, as described in Types of File Comments.

There is only one array of comments for your application, regardless of how may Main Controls your application contains. You control the contents of the array; loading or saving a file does not initialize the array. You can clear the array by setting each element of the array to Empty.

If you want to preserve existing comments in a file when you save an image, you must use the ReadComment method to update the array.

See Also

Elements:

ReadComment method


ConvertX property (Main Control)

C++ Builder example1

Delphi example1

C++ Builder example2

Delphi example2

Builder Syntax | int ConvertX;
Delphi Syntax | ConvertX: Integer;
Overview | Refer to Displaying an Image.

Remarks

(Read only, Runtime only) This property is updated with the X coordinate generated by calling the ClientToBitmap method or the BitmapToClient method.

See Also

Elements: | ConvertY property, ClientToBitmap method, BitmapToClient method
Topics: | Working with the Control: Client Area Usage
 | Raster Images: Displaying Images


ConvertY property (Main Control)

C++ Builder example1

Delphi example1

C++ Builder example2

Delphi example2

Builder Syntax | int ConvertY;
Delphi Syntax | ConvertY: Integer;
Overview | Refer to Displaying an Image.

Remarks

(Read only, Runtime only) This property is updated with the Y coordinate generated by calling the ClientToBitmap method or the BitmapToClient method.

See Also

Elements: | ConvertX property, ClientToBitmap method, BitmapToClient method
Topics: | Working with the Control: Client Area Usage
 | Raster Images: Displaying Images


CurveClose property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CurveClose;
Delphi Syntax | CurveClose: Integer
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Value that indicates how the curve is closed. This property is used only when the CurveType property is CURVE_STANDARD. Possible values are:

Value | Meaning
CURVE_NO_CLOSE | [0x0] For n points, draw (n – 3) segments. For example, for points {P0, P1, P2, P3, P4}, draw segments P1P2 and P2P3.
CURVE_CLOSE | [0x1] For n points draw (n) segments. For example, for points {P0, P1, P2, P3, P4}, draw segments P0P1, P1P2, P2P3, P3P4, P4P0.
CURVE_PARTIAL_CLOSE | [0x2] For n points draw (n – 1) segments. For example, for points {P0, P1, P2, P3, P4}, draw segments P0P1, P1P2, P2P3, P3P4 (but not P4P0).

In the following diagram, the resulting region is shown in gray.

To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

See Also

Elements: | CurveX property, CurveY property, SetRgnCurve method, CurveSize property, CurveToBezier method, CurveType property, CurveTension property
Topics: | Raster Images: Creating and Using a Region


CurveSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CurveSize;
Delphi Syntax | CurveSize: Integer
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Indicates the size of the arrays (CurveX property and CurveY property) used to store the vertices of the curve.

This property is used by both the SetRgnCurve method and the CurveToBezier method.

The CurveType property can define two types of curves:

If the CurveType property is CURVE_STANDARD, the points contained in the CurveX property and the CurveY property represent a smooth curve that goes through all of the points. In this case, the CurveSize property must be at least three.

If the CurveType property is CURVE_BEZIER, the points contained in the CurveX property and the CurveY property represent a series of Bezier curves that use the points as control points. In this case, the CurveSize property must be 3n + 1, where n >= 1. For example, CurveSize can be 4, 7, 10, 13, and so on. The first four points define the first Bezier curve, and each subsequent group of three points defines the next Bezier curve, using the last point of the previous Bezier curve as the starting point.

To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

See Also

Elements: | CurveX property, CurveY property, SetRgnCurve method, CurveTension property, CurveToBezier method, CurveType property, CurveClose property
Topics: | Raster Images: Creating and Using a Region


CurveTension property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | double CurveTension;
Delphi Syntax | CurveTension: L_DOUBLE;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Indicates the "straightness" of the curves that connect points.

This property is used only when CurveType property is CURVE_STANDARD. Valid values are between 0.0 and 1.0, where 0.0 indicates straight lines, and 1.0 indicates lines with the highest curvature. A typical value is 0.5.

To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

See Also

Elements: | CurveX property, CurveY property, SetRgnCurve method, CurveSize property, CurveToBezier method, CurveType property, CurveClose property
Topics: | Raster Images: Creating and Using a Region


CurveType property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CurveType;
Delphi Syntax | CurveType: Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Indicates the type of curve defined by the array of points specified in the CurveX property and the CurveY property. Possible values are:

Value | Meaning
CURVE_BEZIER | The points specified in the CurveX and CurveY properties define a Bezier curve.
CURVE_STANDARD | The points specified in the CurveX and CurveY properties define a standard curve.

This property must be set to CURVE_STANDARD to use the CurveX and CurveY arrays with the CurveToBezier method.

To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

See Also

Elements: | CurveX property, CurveY property, SetRgnCurve method, CurveSize property, CurveToBezier method, CurveTension property, CurveClose property
Topics: | Raster Images: Creating and Using a Region


CurveX property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CurveX [int iIndex];
Delphi Syntax | CurveX [iIndex: Integer]: Longint
Overview | Refer to Creating and Using a Bitmap Region

Remarks

An array of integer values that represent the X coordinates for the points that define the curve.

This property is used by both the SetRgnCurve method and the CurveToBezier method.

The position is relative to the LEAD bitmap in memory.

To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

See Also

Elements: | CurveY property, SetRgnCurve method, CurveSize property, CurveToBezier method, CurveTension property, CurveClose property, CurveType property
Topics: | Raster Images: Creating and Using a Region


CurveY property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CurveY [int iIndex];
Delphi Syntax | CurveY [iIndex: Integer] Longint;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

An array of float values that represent the Y coordinates for the points that define the curve.

This property is used by both the SetRgnCurve method and the CurveToBezier method.

The position is relative to the LEAD bitmap in memory.

To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

See Also

Elements: | CurveX property, SetRgnCurve method, CurveSize property, CurveToBezier method, CurveTension property, CurveClose property, CurveType property
Topics: | Raster Images: Creating and Using a Region


DataChanged property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool DataChanged
Delphi Syntax | DataChanged: Boolean
Overview | Refer to Using a Data Source.

Remarks

Indicates whether the bitmap is current with the database field.

Use this property when the Main Control is bound to a data control using the DataSource and DataField properties.

Setting | Description
TRUE | The bitmap in the control is not the same as in the current record.
FALSE | The bitmap in the control, if any, is the same as the data in the current record.

See Also

Topics:

Databases: Data Binding


DataField property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString DataField
Delphi Syntax | DataField: String
Overview | Refer to Using a Data Source.

Remarks

(Persistent property, available at design time) Binds the Main Control to a database field.

The DataSource property of a bound Main Control specifies a valid data source control name, and the DataField property specifies a valid field name in the data control's DataSet property. Together, these properties specify which bitmap appears in the Main Control.

See Also

Topics:

Databases: Data Binding


DataLoadBits property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DataLoadBits
Delphi Syntax | DataLoadBits: Integer
Overview | Refer to Using a Data Source.

Remarks

(Persistent property, available at design time) Specifies the bits per pixel for the bitmap that is loaded into memory from a database field.

Support for 12 and 16-bit grayscale images is only available in the Document/Medical toolkits.

Use this property when the Main Control is bound to a data control using the DataSource and DataField properties.

Value | Meaning
0 | Keep the original field's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap
4 | 4 bits per pixel in the resultant bitmap
8 | 8 bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap

See Also

Topics:

Databases: Data Binding


DataSaveBits property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DataSaveBits
Delphi Syntax | DataSaveBits: Integer
Overview | Refer to Using a Data Source.

Remarks

(Persistent property, available at design time) Specifies the bits per pixel to use when adding or updating an image field in a database record.

Use this property when the Main Control is bound to a data control using the DataSource and DataField properties.

The format of the saved image, which is specified using the DataSaveFormat property, determines the valid bits per pixel. For valid values, refer to Formats of Output Files.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Topics:

Databases: Data Binding


DataSaveFormat property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DataSaveFormat
Delphi Syntax | DataSaveFormat: Integer
Overview | Refer to Using a Data Source.

Remarks

(Persistent property, available at design time) Specifies the file format to use when adding or updating an image field in a database record.

Use this property when the Main Control is bound to a data control using the DataSource and DataField properties.

For valid values, refer to Formats of Output Files.

See Also

Topics:

Databases: Data Binding


DataSaveQuality property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DataSaveQuality
Delphi Syntax | DataSaveQuality: Integer
Overview | Refer to Using a Data Source.

Remarks

(Persistent property, available at design time) Specifies the image quality, when using CMP or JPEG compression to add or update an image field in a database record.

Use this property when the Main Control is bound to a data control using the DataSource and DataField properties.

For possible values, refer to Compression Quality Factors.

See Also

Topics:

Databases: Data Binding


DataSource property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Db::TDataSource* DataSource
Delphi Syntax | DataSource: TDataSource
Overview | Refer to Using a Data Source.

Remarks

(Persistent property, available at design time) Sets the data control through which the Main Control is bound to the database.

To bind a control to a field in a database at run time, you must specify a data control in this property at design time. To complete the connection with a database, you must also provide the name of a Field object in the DataField property.

See Also

Topics:

Databases: Data Binding


DJVResolution property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DJVResolution
Delphi Syntax | DJVResolution : L_INT
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets the display resolution, in dots per inch, that LEADTOOLS uses when loading DJV files.

The default value for this property is 96 DPI.

See Also

Elements: | PDFXResolution property, PDFYResolution property, PDFDisplayDepth property, PDFTextAlpha property, PDFGraphicsAlpha property, PDFUseLibFonts property, PDFInitDir property
Topics: | Raster Images: Loading Files


DocCleanBitmap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | LEADTyp::TBitmapHandle DocCleanBitmap;
Delphi Syntax: | DocCleanBitmap : TBitmapHandle;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)LEAD bitmap that also contains a region that has the Elements: removed by a document cleaning method.

This property is updated only if XXX_SINGLE_REGION | XXX_LEAD_REGION is set in the uFlags parameter of one of the following methods:

BorderRemove method

DotRemove method

HolePunchRemove method

InvertedText method

LineRemove method

Smooth method

Set this property to 0 at any time to free the resources associated with it.

The purpose of this property is to copy this bitmap to another Main control in order to access the region information.

NOTE:

This property should not be used in conjunction with the RefBitmap property (i.e. RefBitmap = TRUE). Also, this property should only be used with the Main Control.

See Also

Elements: | hDocCleanRgn property
Topics: | Raster Images: Cleaning - up 1-Bit Images


DocCleanSuccess property (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | int DocCleanSuccess
Delphi Syntax: | DocCleanSuccess : LongInt;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)Indicates the status or behavior of the document cleaning events.

Set this property during the following events:

OnBorderRemove event

OnDotRemove event

OnHolePunchRemove event

OnInvertedText event

OnLineRemove event

OnSmooth event

Possible values are:

Value | Meaning
0 | Abort the process.
SUCCESS_REMOVE | Remove the object (dot, line, inverted text, border, etc.).
SUCCESS_NOREMOVE | Do not remove the object (dot, line, inverted text, border, etc.).

See Also

Elements: | OnSmooth event, OnInvertedText event, OnLineRemove event, OnDotRemove event, OnBorderRemove event, OnHolePunchRemove event.
Topics: | Raster Images: Cleaning - up 1-Bit Images


DrawFillColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor DrawFillColor
Delphi Syntax | DrawFillColor: TColor
Overview | Refer to Drawing Simple Objects.

Remarks

(Persistent property, available at design time) Specifies the interior color of a drawing object.

You can specify a COLORREF value (the return value of the RGB function).

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap
 | Using Color Values in LEADTOOLS


DrawFillStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TBrushStyle DrawFillStyle
Delphi Syntax | DrawFillStyle: TBrushStyle
Overview | Refer to Drawing Simple Objects.

Remarks

(Persistent property, available at design time) Specifies the fill pattern of a drawing object. For possible values refer to Delphi or C++ Builder documentation.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawMode property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TPenMode DrawMode
Delphi Syntax | DrawMode: TPenMode
Overview | Refer to Drawing Simple Objects.

Remarks

(Persistent property, available at design time) Determines how each pixel of a drawing object is combined with the existing pixel on the target surface (the screen or bitmap, as specified by the DrawPersistence property).

For normal drawing, use pmCopy. The DrawPenColor property specifies the pen color. For rubberband-style interactive display, use pmNot(as shown in the code example).

For a list of available mode values, refer to your C++ Builder or Delphi documentation. In C++ Builder, search for TPen. In Delphi, search for pens, select Using pens and click on Mode.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawPenColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor DrawPenColor
Delphi Syntax | DrawPenColor: TColor
Overview | Refer to Drawing Simple Objects.

Remarks

(Persistent property, available at design time) Specifies the line color of the drawing object.

You can specify a COLORREF value (the return value of the RGB function.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap
 | Using Color Values in LEADTOOLS


DrawPenStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TPenStyle DrawPenStyle
Delphi Syntax | DrawPenStyle: TPenStyle
Overview | Refer to Drawing Simple Objects.

Remarks

(Persistent property, available at design time) Specifies the line style of the drawing object. For possible values refer to Delphi or C++ Builder documentation.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawPenWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawPenWidth
Delphi Syntax | DrawPenWidth: Integer
Overview | Refer to Drawing Simple Objects.

Remarks

(Persistent property, available at design time) Specifies the width, in pixels, of the lines of a drawing object.

If the target is the screen, the measurement is in screen pixels; if the target is the bitmap, it is in bitmap pixels. Therefore, if you draw to the bitmap, and the displayed image is scaled down (the destination rectangle is smaller than the source rectangle), thin lines may not appear on the displayed image. This happens because scaling down an image causes some pixels to be thrown out. In a bitonal (black and white) image, you can overcome this problem with favor-black setting of the BitonalScaling property, which is Document/Medical only.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawPersistence property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool DrawPersistence
Delphi Syntax | DrawPersistence: Boolean
Overview | Refer to Drawing Simple Objects and Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Determines whether drawing objects are drawn on the screen or on the bitmap. When drawing text to the bitmap, the best quality is achieved when the image is not scaled (when PaintSizeMode = smNormal).

Whether you draw to the screen or to the bitmap, drawing objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

Value | Meaning
TRUE | Draw to the bitmap.
FALSE | Draw to the screen.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap
 | Examining and Altering Bitmaps


DropAutoLoad property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool DropAutoLoad
Delphi Syntax | DropAutoLoad: Boolean
Overview | Refer to Loading a Bitmap from a File.

Remarks

Determines whether the Main Control will automatically load an image file that is dropped onto it in a drag-and-drop operation.

If this property is set to TRUE and the DropFilesAllowed property is set to TRUE, any files dropped onto the LEAD control will be loaded automatically. The default value is TRUE.

Value | Meaning
TRUE | If DropFilesAllowed is also TRUE, then dropped files are loaded automatically.
FALSE | Dropped files are not loaded automatically.

See Also

Elements: | DropFilesAllowed property, OnDropFile event
Topics: | Working with the Control: General Behavior
 | Raster Images: Loading Files


DropFilesAllowed property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool DropFilesAllowed
Delphi Syntax | DropFilesAllowed: Boolean
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Persistent property, available at design time) Determines whether the Main Control will attempt to load an image file that is dropped onto it in a drag-and-drop operation.

If DropFilesAllowed is TRUE, an OnDropFile event will occur for each file dropped.

The drag-and-drop operation loads the image at its own bits per pixel. If it is a multipage file, only the first page is loaded.

Value | Meaning
TRUE | Loading an image through a drag-and-drop operation is enabled.
FALSE | Loading an image through a drag-and-drop operation is disabled.

See Also

Elements: | DropAutoLoad property, OnDropFile event
Topics: | Working with the Control: General Behavior
 | Raster Images: Loading Files


DstClipHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DstClipHeight
Delphi Syntax | DstClipHeight: Integer
Overview | Refer to Displaying an Image.

Remarks

The height of the destination clipping rectangle used when painting.

The initial value is the height of the bitmap. You can set this property or use the SetDstClipRect method to change the value. The position of the clipping rectangle is relative to the Main Control. The unit of measure is pixels.

See Also

Elements: | DstClipLeft property, DstClipTop property, DstClipWidth property
Topics: | Raster Images: Displaying Images


DstClipLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DstClipLeft
Delphi Syntax | DstClipLeft: Integer
Overview | Refer to Displaying an Image.

Remarks

The X coordinate of the origin of the destination clipping rectangle used when painting.

The initial value is 0. You can set this property or use the SetDstClipRect method to change the value. The position of the clipping rectangle is relative to the Main Control. The unit of measure is pixels.

See Also

Elements: | DstClipHeight property, DstClipTop property, DstClipWidth property
Topics: | Raster Images: Displaying Images


DstClipTop property (Main Control)

C++ Builder example

Delphi 2.0 example

Builder Syntax | int DstClipTop
Delphi Syntax | DstClipTop: Integer
Overview | Refer to Displaying an Image.

Remarks

The Y coordinate of the origin of the destination clipping rectangle used when painting.

The initial value is 0. You can set this property or use the SetDstClipRect method to change the value. The position of the clipping rectangle is relative to the Main Control. The unit of measure is pixels.

See Also

Elements: | DstClipHeight property, DstClipLeft property, DstClipWidth property
Topics: | Raster Images: Displaying Images


DstClipWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DstClipWidth
Delphi Syntax | DstClipWidth: Integer
Overview | Refer to Displaying an Image.

Remarks

The width of the destination clipping rectangle used when painting.

The initial value is the width of the bitmap. You can set this property or use the SetDstClipRect method to change the value. The position of the clipping rectangle is relative to the Main Control. The unit of measure is pixels.

See Also

Elements: | DstClipHeight property, DstClipLeft property, DstClipTop property
Topics: | Raster Images: Displaying Images


DstHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DstHeight
Delphi Syntax | DstHeight: Integer
Overview | Refer to Displaying an Image.

Remarks

The height of the destination rectangle used when painting.

The initial value is the height of the bitmap. You can set this property or use the SetDstRect method to change the value. The position of the rectangle is relative to the Main Control. The unit of measure is pixels.

Because of a Windows limitation, destination rectangle measurements, when measured in pixels, cannot exceed the maximum value of an integer. On WIN32 systems, this is rarely a problem. An alternative for scaling large images is to make the source rectangle smaller, using the SetSrcRect method.

See Also

Elements: | DstLeft property, DstTop property, DstWidth property
Topics: | Raster Images: Displaying Images


DstLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DstLeft
Delphi Syntax | DstLeft: Integer
Overview | Refer to Displaying an Image.

Remarks

The X coordinate of the origin of the destination rectangle used when painting.

The initial value is 0. You can set this property or use the SetDstRect method to change the value. The position of the rectangle is relative to the Main Control. The unit of measure is pixels.

The AutoScroll property must be FALSE before setting DstLeft or DstTop.

See Also

Elements: | DstHeight property, DstTop property, DstWidth property
Topics: | Raster Images: Displaying Images


DstTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DstTop
Delphi Syntax | DstTop: Integer
Overview | Refer to Displaying an Image.

Remarks

The Y coordinate of the origin of the destination rectangle used when painting.

The initial value is 0. You can set this property or use the SetDstRect method to change the value. The position of the rectangle is relative to the Main Control. The unit of measure is pixels.

The AutoScroll property must be FALSE before setting DstLeft or DstTop.

See Also

Elements: | DstHeight property, DstLeft property, DstWidth property
Topics: | Raster Images: Displaying Images


DstWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DstWidth
Delphi Syntax | DstWidth: Integer
Overview | Refer to Displaying an Image.

Remarks

The width of the destination rectangle used when painting.

The initial value is the width of the bitmap. You can set this property or use the SetDstRect method to change the value. The position of the rectangle is relative to the Main Control. The unit of measure is pixels.

Because of a Windows limitation, destination rectangle measurements, when measured in pixels, cannot exceed the maximum value of an integer. On WIN32 systems, this is rarely a problem. An alternative for scaling large images is to make the source rectangle smaller, using the SetSrcRect method.

See Also

Elements: | DstHeight property, DstLeft property, DstTop property
Topics: | Raster Images: Displaying Images


EffectDelay property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal EffectDelay
Delphi Syntax | EffectDelay: Cardinal
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Delay between graining steps, in milliseconds.

This property affects both paint effects (specified by the PaintEffect property) and transition effects (specified by the TransitionEffect property).

Use the EffectGrain and EffectDelay properties to control the speed of the display. EffectGrain controls the size of the painting increment, and EffectDelay controls the time between increments.

See Also

Elements: | PaintEffect property, TransitionEffect property
Topics: | Raster Images: Implementing Special Effects


EffectGrain property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal EffectGrain
Delphi Syntax | EffectGrain: Cardinal
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Graining size. This is the smallest size (pixel width or height) to be updated when painting an effect. Using a small grain makes the painting smoother, but takes longer to paint. Using a large grain makes the painting more coarse, but paints faster. Valid values are 1 to 256.

This property affects both paint effects (specified by the PaintEffect property) and transition effects (specified by the TransitionEffect property).

Use the EffectGrain and EffectDelay properties to control the speed of the display. EffectGrain controls the size of the painting increment, and EffectDelay controls the time between increments.

See Also

Elements: | PaintEffect property, TransitionEffect property
Topics: | Raster Images: Implementing Special Effects


EnableFloater property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableFloater
Delphi Syntax | EnableFloater: Boolean
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Enables automatic creation of a floater from a user-defined region when the AutoFloater property is set to True.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control’s bitmap.

To create a floater automatically, set the mode by assigning True to the AutoFloater property, define a region in the Main Control's Bitmap and set the EnableFloater property to True. If the mouse is clicked anywhere inside the region, a floater is created from this region. It can then be dragged to another location inside the bitmap. Clicking inside the bitmap and outside the region causes the floater to be pasted and the region to be canceled.

When the bitmap has a region, whether the floater is enabled or not, some methods act on the region, rather than the whole bitmap. For a list of affected methods, refer to Raster Images: Where the Region Preempts the Bitmap.

If the floater is enabled, some methods will act on the floater rather than the whole bitmap. For a list of affected methods refer to Raster Images: Methods That Transform the Region and the Bitmap.

Possible values are:

Value | Meaning
TRUE | Enable Automatic Creation of a floater.
FALSE | Disable Automatic Creation of a floater.

See Also

Elements: | SetRgnEllipse method, SetRgnRect method, SetRgnColor method, PolygonSize property, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


EnableKeyboard property (Main Control)

C++ Builder example | Delphi example
Builder Syntax | bool EnableKeyboard
Delphi Syntax | EnableKeyboard: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Enables or disables the LEADTOOLS Main VCL control's automatic processing of the arrow and page-up/page-down keys, as scroll messages, when an image is displayed larger than the control. In order to enable automatic keyboard processing, the EnableKeyboard property, the AutoScroll property and the EnableScroll property must all be set to True. Possible values for the EnableKeyboard property are:

Value | Meaning
TRUE | Process the keys and scroll the image. (Default)
FALSE | Ignore the keys.

When automatic keyboard processing is enabled, the Main Control will process the following keys as scroll messages:

Key | Event
PageUp | Scroll up/left one item (depends on scroll style)
Up Arrow |
Left Arrow |
PageDown | Scroll down/right one item (depends on scroll style)
Down Arrow |
Right Arrow |

See Also

Elements: | EnableScroll Property, AutoScroll property
Topics: | Raster Images: Displaying Images


EnableMethodErrors property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableMethodErrors
Delphi Syntax | EnableMethodErrors: Boolean
Overview | Refer to Controlling Events.

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

Topics:

Working with the Control: General Behavior


EnableOLEDragMethod property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableOLEDragMethod;
Delphi Syntax | EnableOLEDragMethod: Boolean;
Overview | Refer to Drag and Drop.

Remarks

(Persistent property, available at design time) Enables or disables the OLE drag and drop operation in the Main Control. Possible values are:

Setting | Description
TRUE | Enables drag-and-drop operation.
FALSE | Disables drag-and-drop operation.

If EnableOLEDragMethod is TRUE:

an OnOLEStartDrag event will occur when the drag process begins,

an OnOLEDragOver event will occur while the image is being dragged over the Main control, and

an OnOLECompleteDrag event will occur when the dragging process is over and the image is dropped.

In addition, an OnOLEGiveFeedback event will occur while the image is being dragged over the Main control to determine the visual feedback for the drag-and-drop operation.

The drag-and-drop operation will paste the dragged image to another Main Control.

See Also

Elements: | OLEDragCursor property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEDragOver event, OnOLEGiveFeedback event
Topics: | Raster Images: Displaying Images


EnableProgressEvent property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableProgressEvent
Delphi Syntax | EnableProgressEvent:Boolean
Overview | Refer to Controlling Events.

Remarks

(Persistent property, available at design time) Specifies whether LEADTOOLS generates an OnStatus event, to indicate the completion percentage of the current LEADTOOLS function.

If this property is set to TRUE, you can use the OnStatus event to update a status bar or to detect a user interrupt.

This property can also be used to cancel a load process by setting it to FALSE during a load process.

Setting | Description
TRUE | Generate status events.
FALSE | If this property is set to FALSE outside the load process, OnStatus events will not be generated. If this property is set to FALSE during a load process, the load process is canceled.

See Also

Topics:

Working with the Control: General Behavior


EnableScroll property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableScroll
Delphi Syntax | EnableScroll: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Specifies whether LEADTOOLS will process scroll messages when an image is displayed larger than the control and AutoScroll has been set to True. Please note that setting this property to False will not remove the scroll bars, but will only disable the processing of the scroll messages.

Possible values are:

Value | Meaning
TRUE | Process scroll messages and scroll the image. (Default)
FALSE | Ignore scroll messages.

See Also

Elements: | EnableKeyboard property, AutoScroll property
Topics: | Raster Images: Displaying Images


EnableZoomInRect property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableZoomInRect
Delphi Syntax | EnableZoomInRect:Boolean
Overview | Refer to Capturing an Image from the Screen.

Remarks

Shows or hides the ZoomIn rectangle for the ZoomIn method. Possible values are:

Setting | Description
TRUE | Show the ZoomIn rectangle in addition to the mouse pointer.
FALSE | Show only the ZoomIn magnifying glass mouse pointer.

See Also

Elements: | ZoomIn method
Topics: | Raster images: Capturing a screen image


Error property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Error
Delphi Syntax | Error: Integer
Overview | Refer to Miscellaneous Methods and Properties.

Remarks

Gives the error code resulting from the last method called or property set. If the last operation performed was successful, the value is SUCCESS.

For a list of error codes, refer to Error Codes.

See Also

Elements:

EnableMethodErrrors property, ErrorMsg property


ErrorMsg property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString ErrorMsg
Delphi Syntax | ErrorMsg: String
Overview | Refer to Miscellaneous Methods and Properties.

Remarks

Gives the description of the error resulting from the last method called or property set. If the last operation performed was successful, the value is the empty string.

See Also

Elements:

EnableMethodErrrors property, Error property


FileSizeWritten property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FileSizeWritten;
Delphi Syntax | FileSizeWritten: Integer;
Overview | Refer to Saving a Bitmap to a File

Remarks

(Read only) Gets the length of a file written, in bytes, when using the SaveOffset method.

This property is automatically updated with the correct length if the SaveOffset method is successful.

See Also

Elements: | SaveOffset method, SavePad4 property
Topics: | Raster Images: Saving Files


Floater property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::TBitmapHandle Floater
Delphi Syntax | Floater: TBitmapHandle
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Specifies the floater bitmap for the Main Control.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

The behavior of this property depends on the AutoFloater property as follows:

If AutoFloater is True, you can use the EnableFloater property to enable automatic creation of a floater using the mouse. In this case, this property is automatically assigned a value depending on the user mouse actions.

If AutoFloater is False, you can create the floater bitmap by assigning the Main Control's Bitmap property to it. The floater bitmap that this creates is the size of the bounding rectangle of the main bitmap's region, and it contains the same region as the main bitmap.

You can also make a copy of the floater bitmap by assigning it to the another Main Control's Bitmap property.

Note:

If AUTOPROCESS is set in the UIFlags property for any Dialog, and the image has a floater, this floater will be pasted and the region will be freed, if the user clicks OK in the Dialog.

See Also

Elements: | FloaterVisible property, IsPtInFloater method, EnableFloater property, AutoFloater property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstClipHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstClipHeight
Delphi Syntax | FloaterDstClipHeight: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The height of the destination clipping rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is the height of the Main Control's client area. You can set this property or use the more-efficient SetFloaterDstClipRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstHeight property, FloaterDstLeft property, FloaterDstTop property, FloaterDstWidth property, FloaterDstClipLeft property, FloaterDstClipTop property, FloaterDstClipWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstClipLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstClipLeft
Delphi Syntax | FloaterDstClipLeft: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The X coordinate of the origin of the destination clipping rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is 0. You can set this property or use the more-efficient SetFloaterDstClipRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstHeight property, FloaterDstLeft property, FloaterDstTop property, FloaterDstWidth property, FloaterDstClipHeight property, FloaterDstClipTop property, FloaterDstClipWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstClipTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstClipTop
Delphi Syntax | FloaterDstClipTop: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The Y coordinate of the origin of the destination clipping rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is 0. You can set this property or use the more-efficient SetFloaterDstClipRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstHeight property, FloaterDstLeft property, FloaterDstTop property, FloaterDstWidth property, FloaterDstClipHeight property, FloaterDstClipLeft property, FloaterDstClipWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstClipWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstClipWidth
Delphi Syntax | FloaterDstClipWidth: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The width of the destination clipping rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is the height of the Main Control's client area. You can set this property or use the more-efficient SetFloaterDstClipRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstHeight property, FloaterDstLeft property, FloaterDstTop property, FloaterDstWidth property, FloaterDstClipHeight property, FloaterDstClipLeft property, FloaterDstClipTop property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstHeight
Delphi Syntax | FloaterDstHeight: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The height of the destination rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is the unscaled height of the floater bitmap. You can set this property or use the more-efficient SetFloaterDstRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstLeft property, FloaterDstTop property, FloaterDstWidth property, FloaterDstClipHeight property, FloaterDstClipLeft property, FloaterDstClipTop property, FloaterDstClipWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstLeft
Delphi Syntax | FloaterDstLeft: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The X coordinate of the origin of the destination rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is 0. You can set this property or use the more-efficient SetFloaterDstRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstHeight property, FloaterDstTop property, FloaterDstWidth property, FloaterDstClipHeight property, FloaterDstClipLeft property, FloaterDstClipTop property, FloaterDstClipWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstTop
Delphi Syntax | FloaterDstTop: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The Y coordinate of the origin of the destination rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is 0. You can set this property or use the more-efficient SetFloaterDstRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstHeight property, FloaterDstLeft property, FloaterDstWidth property, FloaterDstClipHeight property, FloaterDstClipLeft property, FloaterDstClipTop property, FloaterDstClipWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterDstWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterDstWidth
Delphi Syntax | FloaterDstWidth: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The width of the destination rectangle used when painting the Main Control's floater bitmap.

If the AutoSetRects property is set to True, the initial value of this property is the unscaled width of the floater bitmap. You can set this property or use the more-efficient SetFloaterDstRect method to change the value.

The position of the rectangle is relative to the Main Control's client area.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterDstHeight property, FloaterDstLeft property, FloaterDstTop property, FloaterDstClipHeight property, FloaterDstClipLeft property, FloaterDstClipTop property, FloaterDstClipWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterHeight
Delphi Syntax | FloaterHeight: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

(Read only) Is the unscaled height of the floater bitmap.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterWidth property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterVisible property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool FloaterVisible
Delphi Syntax | FloaterVisible: Boolean
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Displays or hides the Main Control's floater bitmap.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | Floater property, IsPtInFloater method
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FloaterWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FloaterWidth
Delphi Syntax | FloaterWidth: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

(Read only) Is the unscaled width of the floater bitmap.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | FloaterHeight property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


FrameColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor FrameColor
Delphi Syntax | FrameColor: TColor
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the border color of the three-dimensional frame that you add to the Main Control.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame. Other properties described in Adding a Frame to the Control, specify the inner and outer bands that give the frame a three-dimensional appearance.

See Also

Topics:

Working with the Control: General Behavior


FrameInnerHiliteColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor FrameInnerHiliteColor
Delphi Syntax | FrameInnerHiliteColor: TColor
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the inner highlight color of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

See Also

Topics:

Working with the Control: General Behavior


FrameInnerShadowColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor FrameInnerShadowColor
Delphi Syntax | FrameInnerShadowColor: TColor
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the inner shadow color of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

See Also

Topics:

Working with the Control: General Behavior


FrameInnerStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TFrameInnerStyle FrameInnerStyle
Delphi Syntax | FrameInnerStyle: TFrameInnerStyle
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the style of the inner band of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

The following are possible values of the FrameInnerStyle property:

Value | Meaning
fisInset | Inner band inset
fisRaised | Inner band raised

See Also

Topics:

Working with the Control: General Behavior


FrameInnerThickness property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal FrameInnerThickness
Delphi Syntax | FrameInnerThickness: Cardinal
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the thickness of the inner band of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

See Also

Topics:

Working with the Control: General Behavior


FrameOuterHiliteColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor FrameOuterHiliteColor
Delphi Syntax | FrameOuterHiliteColor: TColor
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the outer highlight color of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

See Also

Topics:

Working with the Control: General Behavior


FrameOuterShadowColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor FrameOuterShadowColor
Delphi Syntax | FrameOuterShadowColor: TColor
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the outer shadow color of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

See Also

Topics:

Working with the Control: General Behavior


FrameOuterStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TFrameOuterStyle FrameOuterStyle
Delphi Syntax | FrameOuterStyle: TFrameOuterStyle
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the style of the outer band of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

The following are possible values of the FrameInnerStyle property:

Value | Meaning
fosInset | Outer band inset
fosRaised | Outer band raised

See Also

Topics:

Working with the Control: General Behavior


FrameOuterThickness property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal FrameOuterThickness
Delphi Syntax | FrameOuterThickness: Cardinal
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the thickness of the outer band of the three-dimensional frame that you add to the Main Control. This property works with others described in Adding a Frame to the Control to give the frame a three-dimensional appearance.

The FrameThickness property determines the thickness of the frame, and you can set the thickness to 0 to disable the frame.

See Also

Topics:

Working with the Control: General Behavior


FrameThickness property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal FrameThickness
Delphi Syntax | FrameThickness: Cardinal
Overview | Refer to Adding a Frame to the Control.

Remarks

(Persistent property, available at design time) Specifies the thickness of the frame that you add to the Main Control. You can set the thickness to 0 to disable the frame.

Other properties described in Adding a Frame to the Control give the frame a three-dimensional appearance.

See Also

Topics:

Working with the Control: General Behavior


GradientEndColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor GradientEndColor
Delphi Syntax | GradientEndColor : TColor
Overview | Refer to Gradients and Patterns.

Remarks

(Persistent property, available at design time) Works with related properties to specify a gradient color for use when you implement a transitional paint effect or when you draw a three-dimensional shape or text object.

A gradient color starts as one color and ends as another, with the specified number of transitional colors from start to end. Related properties work together as follows:

GradientStyle specifies the style.

GradientStartColor specifies the starting color.

GradientEndColor specifies the ending color.

GradientSteps specifies the number of colors from start to end.

See Also

Topics: | Raster Images: Implementing Special Effects
 | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


GradientStartColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor GradientStartColor
Delphi Syntax | GradientStartColor: TColor
Overview | Refer to Gradients and Patterns.

Remarks

(Persistent property, available at design time) Works with related properties to specify a gradient color for use when you implement a transitional paint effect or when you draw a three-dimensional shape or text object.

A gradient color starts as one color and ends as another, with the specified number of transitional colors from start to end. Related properties work together as follows:

GradientStyle specifies the style.

GradientStartColor specifies the starting color.

GradientEndColor specifies the ending color.

GradientSteps specifies the number of colors from start to end.

See Also

Topics: | Raster Images: Implementing Special Effects
 | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


GradientSteps property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal GradientSteps
Delphi Syntax | GradientSteps: Cardinal
Overview | Refer to Gradients and Patterns.

Remarks

(Persistent property, available at design time) Works with related properties to specify a gradient color for use when you implement a transitional paint effect or when you draw a three-dimensional shape or text object.

A gradient color starts as one color and ends as another, with the specified number of transitional colors from start to end. Related properties work together as follows:

GradientStyle specifies the style.

GradientStartColor specifies the starting color.

GradientEndColor specifies the ending color.

GradientSteps specifies the number of colors from start to end.

See Also

Topics: | Raster Images: Implementing Special Effects
 | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


GradientStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal GradientStyle
Delphi Syntax | GradientStyle: Cardinal
Overview | Refer to Gradients and Patterns.

Remarks

(Persistent property, available at design time) Specifies the style of a gradient color for use when you implement a transitional paint effect or when you draw a three-dimensional shape or text object.

A gradient color starts as one color and ends as another, with the specified number of transitional colors from start to end. Related properties work together as follows:

GradientStyle specifies the style.

GradientStartColor specifies the starting color.

GradientEndColor specifies the ending color.

GradientSteps specifies the number of colors from start to end.

For possible values of the GradientStyle property, refer to Gradients.

See Also

Topics: | Raster Images: Implementing Special Effects
 | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


HasMagGlass property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | bool HasMagGlass
Delphi Syntax | HasMagGlass : Boolean
Overview | Refer to Using the Magnifying Glass

Remarks

(Read only) Determines whether the control has a magnifying glass attached to it. Possible values are:

Value | Meaning
TRUE | The control has a magnifying glass attached to it.
FALSE | The control does not have a magnifying glass attached to it.

See Also

Elements: | StartMagGlass method, StopMagGlass method, UpdateMagGlassShape method
Topics: | Raster Images: Displaying Images


HasRgn property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool HasRgn
Delphi Syntax | HasRgn :Boolean
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Determines whether a region is defined in the LEAD bitmap.

When a bitmap has a region, some methods act on the region, rather than the whole bitmap. For a list of affected methods, refer to Raster Images: Where the Region Preempts the Bitmap.

Value | Meaning
TRUE | The bitmap has a region.
FALSE | The bitmap does not have a region.

See Also

Elements: | IsPtInRgn method, GetRgnArea method, RgnHeight property, RgnLeft property, RgnTop property, RgnWidth property
Topics: | Raster Images: Creating and Using a Region


hDocCleanRgn property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | HRGN hDocCleanRgn;
Delphi Syntax | hDocCleanRgn : HRGN;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)Window HRGN that is updated with a Windows region that contains all the elements removed by one of the document cleaning methods listed below. This property is updated when the document cleaning method returns. It is updated only if the XXX_SINGLE_REGION flag is set in the uFlags parameter of one of the following methods:

BorderRemove method

DotRemove method

HolePunchRemove method

InvertedText method

LineRemove method

Smooth method

Set this property to 0 at any time to free the resources associated with it.

See Also

Elements: | BorderRemove method, DotRemove method, HolePunchRemove method, InvertedText method, LineRemove method, Smooth method
Topics: | Raster Images: Cleaning - up 1-Bit Images


HistogramGrayTable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int HistogramGrayTable [int nIndex]
Delphi Syntax | HistogramGrayTable [nIndex: Integer]: Integer
Overview | Refer to Using Histograms.

Remarks

(Medical only) Is a table that charts the number of occurrences of each intensity level in a 12-bit or 16-bit grayscale bitmap.

Intensity levels in a grayscale bitmap can range from 0 to (216 – 1), depending on whether the image is 12-bit or 16-bit grayscale, and the LowBit and HighBit of the image. The LowBit and HighBit identify which bits in a 12-bit or 16-bit entry are used. The LowBit and HighBit can be obtained by calling the GetMinMaxBits method and then looking at the MinBit and MaxBit properties.

Specifically, a histogram table for a 12-bit or 16-bit grayscale image will have 2(HighBit – LowBit + 1) entries.

Each intensity value present in the image corresponds to a specific table index. The number of entries in the HistogramGrayTable can be found by examining the HistogramGrayTableSize property. The HistogramGrayTableSize property and the HistogramGrayTable property both can change after each call to the GetHistogramGray method. For more information on the relationship between the intensity value and the location of the count within the HistogramGrayTable, refer to the GetHistogramGray method.

See Also

Elements: | GetHistogramGray method, HistogramGrayTableSize property, GetHistogram method, HistogramTable property
Topics: | Raster Images: Using Histograms
 | Changing Brightness and Contrast


HistogramGrayTableSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int HistogramGrayTableSize;
Delphi Syntax | HistogramGrayTableSize: Integer;
Overview | Refer to Using Histograms.

Remarks

(Read Only) (Medical only) Is the number of entries in the HistogramGrayTable. This property (along with the HistogramGrayTable) is filled after each call to the GetHistogramGray method.

Intensity levels in a grayscale bitmap can range from 0 to (216 – 1), depending on whether the image is 12-bit or 16-bit grayscale, and the LowBit and HighBit of the image. The LowBit and HighBit identify which bits in a 12-bit or 16-bit entry are used. The LowBit and HighBit can be obtained by calling the GetMinMaxBits method and then looking at the MinBit and MaxBit properties.

Specifically, a histogram table for a 12-bit or 16-bit grayscale image will have 2(HighBit – LowBit + 1) entries.

Each intensity value present in the image corresponds to a specific table index. The number of entries in the HistogramGrayTable can be found by examining the HistogramGrayTableSize property. The HistogramGrayTableSize property and the HistogramGrayTable property both can change after each call to the GetHistogramGray method. For more information on the relationship between the intensity value and the location of the count within the HistogramGrayTable, refer to the GetHistogramGray method.

See Also

Elements: | GetHistogramGray method, HistogramGrayTable property, GetHistogram method, HistogramTable property
Topics: | Raster Images: Using Histograms
 | Changing Brightness and Contrast


HistogramTable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int HistogramTable [int iIndex]
Delphi Syntax | HistogramTable [iIndex:Integer]:LongInt
Overview | Refer to Using Histograms.

Remarks

(Read-only) Is a table that charts the number of occurrences of each intensity level in the bitmap.

Intensity levels range from 0 to the value of HistogramTableSize property - 1. The current intensity values correspond to the table indexes. You can load the table with values for red, green, blue, or all color channels. Use the GetHistogram method to update the table.

See Also

Elements: | HistogramTableSize property, GetHistogram method, HistogramGrayTable property
Topics: | Raster Images: Using Histograms
 | Changing Brightness and Contrast


HistogramTableSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int HistogramTableSize
Delphi Syntax | HistogramTableSize: Integer
Overview | Refer to Using Histograms.

Remarks

Specifies the number of entries in the HistogramTable property.

This value that must be set for this property depends on the color resolution (bits per pixel) of the image, as follows:

Table Size | BPP
65536 | 64 or 48
256 | Any other color (non-grayscale) value, or grayscale 8

For 12 and 16 bit grayscale images, use the HistogramGrayTableSize property

See Also

Elements: | HistogramTable property, GetHistogram method, HistogramGrayTableSize property
Topics: | Raster Images: Using Histograms
 | Changing Brightness and Contrast


HScrollInfo property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TLEADScrollInfo* HscrollInfo;
Delphi Syntax | HScrollInfo: TLEADScrollInfo;
Overview | Refer to Scrolling an Image.

Remarks

(Runtime only) Contains the object that references the control's horizontal scrollbar information.

The TLEADScrollInfo Class has the following properties:

Property | Description
Min | (Read only) Integer value that is updated with the minimum scroll range value.
Max | (Read only) Integer value that is updated with the maximum scroll range value.
Page | Integer value that gets or sets the scroll page size, in pixels.
Line | integer value that gets or sets the size of the scroll line, in pixels. This is the amount that will be scrolled by line left or line right. The line value must be <= the page value.
Pos | Integer value that gets or sets the thumb position (current position) of the scrollbar. This value can be set to scroll the display.
Visible | (Read only) Boolean flag that indicates whether the scrollbar is visible. If this is TRUE, the scrollbar is visible. If this value is FALSE, the scrollbar is not visible.
Width | (Read only) integer value that is updated with the size of the scrollbar.

See Also

Elements: | AutoScroll property, VScrollInfo property, OnScroll event
Topics: | Raster Images: Displaying Images


HScrollStep property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int HScrollStep
Delphi Syntax | HScrollStep: Integer
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Determines the approximate number of times the user clicks the horizontal scroll bar arrow button before the thumb tab is moved all the way to the end.

See Also

Elements: | AutoScroll property, VScrollStep property
Topics: | Working with the Control: Client Area Usage


HTable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_UINT HTable [L_UINT uIndex]
Delphi Syntax | HTable [uIndex: L_UINT]: L_UINT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Hue lookup table. This is one of the four tables that the RemapHue method uses to change the bitmap's hue, saturation and value. This property is used only if the bUseHTable parameter is set to TRUE when the RemapHue method is called. Hue, Saturation, and Value levels range from 0 to RemapHueTablesSize-1. Therefore, the lookup tables each have RemapHueTablesSize-1 entries. The current hue, saturation and value of a pixel correspond to the table indexes. If the bUseMaskTable parameter is set to TRUE when the RemapHue method is called and the MaskTable [i] entry for a particular hue is not zero, then the hue is changed to the hue in HTable [i]. If MaskTable [i] is 0 then HTable [i] is ignored. For example, if RemapHue is called with both bUseMaskTable and bUseHTable set to TRUE, then if a pixel has a hue of 85 and the MaskTable [85] is not 0, the hue of the pixel is changed to HTable [85].

Traditionally, hue ranges from 0 to 359. For the lookup table, the range of 0 to 359 is remapped to a range of 0.. RemapHueTablesSize-1. For example, if RemapHueTablesSize= 256

Color | Hue (0..359) | Hue (0..255)
Red | 0 | 0
Green | 120 | 85
Blue | 240 | 170

See Also

Elements: | RemapHue method, MaskTable property, STable property, RemapHueTablesSize property, VTable property, HSV_HfromRGB method, HSV_SfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Modifying Intensity Values


InfoAnimation property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool InfoAnimation
Delphi Syntax | InfoAnimation: Boolean
Overview | Refer to Playing an Animation.

Remarks

(Read only) Indicates whether the specified file is an animation file.

If this value is TRUE, the file is played as an animation as it is loaded (when the AutoAnimate property is TRUE).

This property is TRUE only for animated GIF files and AVI files. Keep in mind, however, that any multipage file can be loaded to create a bitmap list, and any bitmap list can be played as an animation after it is loaded or created.

Use the GetFileInfo method to update this property.

Setting | Description
TRUE | The file is an animated GIF or AVI file.
FALSE | The file is not an animated file (although it may be a multipage file).

See Also

Elements | InfoColorSpace property, GetFileInfo method, InfoAnimationHeight property, InfoAnimationWidth property
Topics | Raster Images: Playing Animated Images


InfoAnimationHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoAnimationHeight
Delphi Syntax | InfoAnimationHeight: Integer
Overview | Refer to Playing an Animation.

Remarks

(Read only) Is the height that will be used for the target bitmap when playing an animation.

Use the GetFileInfo method to update this property. The value of this property is valid only if the InfoAnimation property is TRUE. The unit of measure is pixels.

See Also

Elements | InfoColorSpace property, GetFileInfo method, InfoAnimation property, InfoAnimationWidth property
Topics | Raster Images: Playing Animated Images


InfoAnimationWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoAnimationWidth
Delphi Syntax | InfoAnimationWidth: Integer
Overview | Refer to Playing an Animation.

Remarks

(Read only) Is the width that will be used for the target bitmap when playing an animation.

Use the GetFileInfo method to update this property. The value of this property is valid only if the InfoAnimation property is TRUE. The unit of measure is pixels.

See Also

Elements | GetFileInfo method, InfoAnimation property, InfoAnimationHeight property
Topics | Raster Images: Playing Animated Images


InfoBits property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoBits
Delphi Syntax | InfoBits:Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the number of bits per pixel of the specified image file.

Use the GetFileInfo method to update this property.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Elements | InfoColorSpace property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoColorSpace property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoColorSpace;
Delphi Syntax | InfoColorSpace: L_INT;
Overview | Refer to Loading a Bitmap from a File

Remarks

(Read only) This property is updated by the GetFileInfo method with the color space of the file. The possible values are:

Value | Meaning
COLORSPACE_BGR | [0] Color space is RGB or BGR
COLORSPACE_YUV | [1] Color space is YUV or YCbCr
COLORSPACE_CMYK | [2] Color space is CMYK
COLORSPACE_CIELAB | [3] Color space is CIELab

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Elements: | InfoCompress property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property, InfoBits property, InfoAnimation property, InfoAnimationHeight property, InfoHasAlpha property, InfoIFD property, InfoLayers property, InfoTotalPages property, InfoViewPerspective property, InfoXres property, InfoYres property, GetFileInfo method, WriteTag method
Topics: | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information

Make the following changes to the Implementing TIFF Tags programming topic (additions are highlighted in green):

To write tag(s) to a file, use the WriteTag method.

To enumerate all tags in a TIFF or Exif file use the EnumTags method. For each tag enumerated, an OnEnumTags event is generated. Through this event, you can obtain information about, or otherwise process, each tag that is enumerated.


InfoCompress property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString InfoCompress
Delphi Syntax | InfoCompress: String
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the compression method of the specified image file.

Use the GetFileInfo method to update this property.

See Also

Elements | InfoColorSpace property, InfoBits property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoFormat property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoFormat
Delphi Syntax | InfoFormat:Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the format of the specified image file.

Use the GetFileInfo method to update this property. For possible values, refer to Formats of Input Files.

See Also

Elements | InfoColorSpace property, InfoBits property, InfoCompress property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoHasAlpha property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool InfoHasAlpha
Delphi Syntax | InfoHasAlpha : Boolean
Overview | Refer to Loading a Bitmap from a Files.

Remarks

(Read only) Indicates whether the specified file contains an Alpha Bitmap.

Use the GetFileInfo method to update this property.

Setting | Description
TRUE | The file contains an Alpha Bitmap.
FALSE | The file does not contain an Alpha Bitmap.

See Also

Elements | InfoColorSpace property, GetFileInfo method, InfoAnimation property, InfoAnimationHeight property, InfoAnimationWidth property, InfoBits property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoTotalPages property, InfoWidth property, InfoXRes property, InfoYRes property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information
 | PNG Files and Transparency


InfoHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoHeight
Delphi Syntax | InfoHeight:Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the height of the image in the specified file.

The unit of measure is pixels. Use the GetFileInfo method to update this property.

See Also

Elements | InfoColorSpace property, InfoBits property, InfoCompress property, InfoFormat property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoIFD property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoIFD;
Delphi Syntax | InfoIFD : LongInt;
Overview | Refer to Loading and Saving Large TIFF Files.

Remarks

Specifies the offset within the current file of the current page.

This property value is valid only if it is greater than 0. A value of zero indicates that the file format does not support Image File Directories (IFDs).

The value of this property can be used for the LoadIFD property and the SaveIFD property to speed up loading and saving of TIFF files with many pages.

See Also

Elements | InfoColorSpace property, LoadIFD property, SaveIFD property
Topics | Raster Images: Loading and Saving Large TIFF Files


InfoLayers property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoLayers
Delphi Syntax | InfoLayers: Integer
Overview | Refer to Layers in Files

Remarks

Represents the total number of layers present in a file.

Currently, only PSD files support layers, but not all PSD files have layers.

Use this property to determine which layers can be loaded from a file.

See Also

Elements | InfoColorSpace property, LoadLayer method, GetFileInfo method, InfoTotalPages property, LayerLeft property, LayerTop property, Save method, SaveLayers property
Topics | Raster Images: Getting and Setting File Information


InfoPage property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoPage
Delphi Syntax | InfoPage:Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the page number, in a multipage file, of the image.

Use the GetFileInfo method to update this property. The resulting value is either the page number specified in the method or the last page in the file. It is the last page only if the specified number was greater than the total pages in the file.

See Also

Elements | InfoColorSpace property, InfoBits property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoPCDRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool InfoPCDRes [int n]
Delphi Syntax | InfoPCDRes [n:Integer]:Boolean
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is true if the resolution specified by the index value is in the PhotoCD file.

You load the values of this property by using the GetFileInfo method.

Before loading a bitmap from a file, use the PCDRes property to specify which resolution to load. (The PhotoCD format is read only; so the PhotoCD resolution is not an issue when saving a file.)

See Also

Elements | InfoColorSpace property, InfoBits property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPage property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoSizeDisk property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoSizeDisk
Delphi Syntax | InfoSizeDisk:LongInt
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the size of the specified image file.

Use the GetFileInfo method to update this property. The value is expressed in bytes.

See Also

Elements | InfoColorSpace property, InfoBits property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoSizeMem property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoSizeMem
Delphi Syntax | InfoSizeMem:LongInt
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the amount of memory required to load a bitmap from the specified file.

Use the GetFileInfo method to update this property. The value is expressed in bytes.

See Also

Elements | InfoColorSpace property, InfoBits property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoTotalPages property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoTotalPages
Delphi Syntax | InfoTotalPages:Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Represents the total number of pages in a multipage file.

See Also

Elements: | InfoBits property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics: | Raster Images: Getting and Setting File Information


InfoViewPerspective property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoViewPerspective;
Delphi Syntax | InfoViewPerspective: Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the view perspective of the specified image file.

Use the GetFileInfo method to update this property.

Possible values are:

TOP_LEFT | [1] Top-left of image is first in memory.
BOTTOM_LEFT | [4] Bottom-left of image is first in memory.
TOP_RIGHT | [2] Top-right of image is first in memory.
BOTTOM_LEFT180 | [2] Same as TOP_RIGHT, which is BOTTOM_LEFT rotated clockwise by 180 degrees.
BOTTOM_RIGHT | [3] Bottom-right of image is first in memory.
TOP_LEFT180 | [3] Same as BOTTOM_RIGHT, which is TOP_LEFT rotated clockwise by 180 degrees.
RIGHT_TOP | [6] First row is the right side, first column is top side.
TOP_LEFT90 | [6] Same as RIGHT_TOP, which is TOP_LEFT rotated clockwise by 90 degrees.
LEFT_BOTTOM | [8] First row is the left side, first column is top side.
TOP_LEFT270 | [8] Same as LEFT_BOTTOM, which is TOP_LEFT rotated clockwise by 270 degrees.
LEFT_TOP | [5] First row is the left side, first column is the top side
BOTTOM_LEFT90 | [5] Same as LEFT_TOP, which is BOTTOM_LEFT rotated clockwise by 90 degrees
RIGHT_BOTTOM | [7] First row is the right side, first column is the bottom side
BOTTOM_LEFT270 | [7] Same as RIGHT_BOTTOM, which is BOTTOM_LEFT rotated clockwise by 270 degrees

See Also

Elements | InfoColorSpace property, GetFileInfo method, InfoBits property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoWidth
Delphi Syntax | InfoWidth:Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Is the width of the image in the specified file.

The unit of measure is pixels. Use the GetFileInfo method to update this property.

See Also

Elements | InfoColorSpace property, InfoBits property, InfoCompress property, InfoFormat property, InfoHeight property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoXRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoXRes
Delphi Syntax | InfoXRes: Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Gets the X resolution in the specified file.

Use the GetFileInfo method to update this property.

See Also

Elements | InfoColorSpace property, InfoYRes property, InfoBits property, InfoCompress property, InfoFormat property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


InfoYRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoYRes
Delphi Syntax | InfoYRes: Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Read only) Gets the Y resolution in the specified file.

Use the GetFileInfo method to update this property.

See Also

Elements | InfoColorSpace property, InfoXRes property, InfoBits property, InfoCompress property, InfoFormat property, InfoPage property, InfoPCDRes property, InfoSizeDisk property, InfoSizeMem property, InfoWidth property
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


IsGrayscale property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int IsGrayscale
Delphi Syntax | IsGrayscale: Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Is an indicator of the kind of grayscale palette, if any, that a bitmap has.

Grayscale images can be 1-bit, 4-bit, or 8-bit. With a 1-bit image, you can use this property to check for inversion (for example, white lines on a black background) caused by an inverted palette.

Value | Meaning
GRAY_NO | Not grayscale.
GRAY_ORDEREDNORMAL | Normally ordered grayscale (dark to light).
GRAY_ORDEREDINVERSE | Reverse ordered grayscale (light to dark).
GRAY_NOTORDERED | Unordered grayscale.

See Also

Topics:

Raster Images: Doing Color Expansion or Reduction


IsSigned property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool IsSigned
Delphi Syntax | IsSigned: Boolean
Overview | Refer to Examining and Altering Bitmaps

Remarks

Indicates whether the bitmap currently loaded in the control contains signed data. This property is valid only if the control contains a bitmap. Possible values are:

Value | Meaning
TRUE | The bitmap data is signed.
FALSE | The bitmap data is not signed.

If this property is TRUE, the signed bitmap data should be converted to unsigned using the ConvertSignedToUnsigned method. If the bitmap data is signed, image processing and the paint functions may not work correctly. Currently, only TIF files contain signed data. A bitmap with signed data will not be loaded unless the LoadSigned property is set to TRUE before loading the image.

If this property is FALSE, no further processing is needed.

Support for 12 and 16-bit gray-scale images is only available in the Document/Medical toolkits.

See Also

Elements: | LoadFast property, LoadSigned property, ConvertSignedToUnsigned method
Topics: | Raster Images: Doing Color Expansion or Reduction
 | Raster Images: Getting and Setting File Information


J2KCBS_ErrorResilienceSymbol property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KCBS_ErrorResilienceSymbol
Delphi Syntax | J2KCBS_ErrorResilienceSymbol: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether a 4 symbol marker is included for each bit-plane, following the normalization pass. Possible values are:

Value | Meaning
TRUE | A 4 symbol marker is included for each bit-plane, following the normalization pass.
FALSE | A 4 symbol marker is not included for each bit-plane, following the normalization pass.

See Also

Elements: | J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCBS_PredictableTermination property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KCBS_PredictableTermination
Delphi Syntax | J2KCBS_PredictableTermination: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the encoder has a predictable termination policy and identifies that the policy was used in the code-stream COD/COC markers. This can be used to implement error detection and concealment. Possible values are:

Value | Meaning
TRUE | The encoder has a predictable termination policy and identifies that the policy was used in the COD/COC markers.
FALSE | The encoder does not have a predictable termination policy.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCBS_ResetContextOnBoundaries property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KCBS_ResetContextOnBoundaries
Delphi Syntax | J2KCBS_ResetContextOnBoundaries: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the arithmetic coder's probability models are reset between coding passes. This controls where the end of encoded data is and limits the amount of potentially lost data in the event of a transmission error. Possible values are:

Value | Meaning
TRUE | The arithmetic coder's probability models are reset between coding passes.
FALSE | The arithmetic coder's probability models are not reset between coding passes.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCBS_SelectiveACBypass property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KCBS_SelectiveACBypass
Delphi Syntax | J2KCBS_SelectiveACBypass: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the "lazy coding mode" is adopted. If the lazy coding mode is adopted, trailing bit-planes bypass the arithmetic coder except in the normalization pass. Possible value are:

Value | Meaning
TRUE | The "lazy-coding mode" is adopted. Trailing bit-planes bypass the arithmetic coder except in the normalization pass.
FALSE | The arithmetic encoder will be used on all passes.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCBS_TerminationOnEachPass property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KCBS_TerminationOnEachPass
Delphi Syntax | J2KCBS_TerminationOnEachPass: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the arithmetic code-word generation process stops on a byte boundary at the end of each coding pass. Possible values are:

Value | Meaning
TRUE | The arithmetic code-word generation process stops on a byte boundary at the end of each coding pass.
FALSE | The arithmetic code-word generation process does not stop on a byte boundary at the end of each coding pass.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCBS_VerticallyCausalContext property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KCBS_VerticallyCausalContext
Delphi Syntax | J2KCBS_VerticallyCausalContext: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether the context models are restricted to being vertically causal within each sub-block. Possible values are:

Value | Meaning
TRUE | The context models are restricted to being vertically causal within each sub-block.
FALSE | The context models are not restricted to being vertically causal within each sub-block.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCodBlockHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KCodBlockHeight
Delphi Syntax | J2KCodBlockHeight: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Height of the code block, following wavelet transformation. The value must be a power of 2. It must be at least 4 and less than or equal to 1024.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCodBlockWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KCodBlockWidth
Delphi Syntax | J2KCodBlockWidth: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Width of the code block, following wavelet transformation. The value must be a power of 2. It must be at least 4 and less than or equal to 1024.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCompressionControl property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KCompressionControl
Delphi Syntax | J2KCompressionControl: Integer
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates how to determine the resulting compression. The value of this property determines which property should be used for determining the compression. Possible values are:

Value | Meaning
J2K_COMPRESSION_LOSSLESS | Lossless compression.
J2K_COMPRESSION_RATIO | Compress the file based on the value of the J2KCompressionRatio property.
J2K_COMPRESSION_TARGETSIZE | Compress the file based on the target file size in the J2KTargetFileSize property.
J2K_COMPRESSION_QFACTOR | Compress the file based on the quality factor used when saving the file.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KCompressionRatio property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | float J2KCompressionRatio
Delphi Syntax | J2KCompressionRatio: Single
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates the compression ratio to use. This value is used only if the J2KCompressionControl property is set to J2K_COMPRESSION_RATIO.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KDecompLevel property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KDecompLevel
Delphi Syntax | J2KDecompLevel: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Number of resolution levels in the compressed file. The maximum number of levels depends on the size of the image. Passing values that are too large will cause the save operation to fail. Each resolution level is one-half the size of the previous resolution, starting with the full image resolution. The default value is 5.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KDerivedBaseExponent property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KDerivedBaseExponent
Delphi Syntax | J2KDerivedBaseExponent: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

The base exponent used for derived quantization.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KDerivedBaseMantissa property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KDerivedBaseMantissa
Delphi Syntax | J2KDerivedBaseMantissa: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

The base mantissa used for derived quantization.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KDerivedQuantization property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KDerivedQuantization
Delphi Syntax | J2KDerivedQuantization: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether to use derived quantization or expounded quantization. Possible values are:

Value | Meaning
TRUE | Use derived quantization.
FALSE | Use expounded quantization.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KGuardBits property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KGuardBits
Delphi Syntax | J2KGuardBits: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Number of extra bits to consider when encoding an image. This prevents coding overflow. Possible values are 0 - 7. The default is 2.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KProgressOrder property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KProgressOrder
Delphi Syntax | J2KProgressOrder: Integer
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates the order of progression. Possible values are:

Value | Description
J2K_LAYER_RESOLUTION_COMPONENT_POSITION | [0] Quality–axis order.
J2K_RESOLUTION_LAYER_COMPONENT_POSITION | [1] Resolution-axis order.
J2K_RESOLUTION_POSITION_COMPONENT_LAYER | [2] Resolution-axis order.
J2K_POSITION_COMPONENT_RESOLUTION_LAYER | [3] Position–axis order.
J2K_COMPONENT_POSITION_RESOLUTION_LAYER | [4] Color-axis order.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KROIControl property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KROIControl
Delphi Syntax | J2KROIControl: Integer
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Gets or sets an integer value that indicates how to define the region of interest. Possible values are:

Value | Description
J2K_USE_OPTION_RECT: | [0] Use the rectangle specified in the J2KROIRect property to define the region of interest.
J2K_USE_LEAD_REGION: | [1] Use the LEAD bitmap region to define the region of interest.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KUseROI Property.
Topics: | Raster Images: Saving Files


J2KROIRect property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TRect J2KROIRect
Delphi Syntax | J2KROIRect: TRect
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Gets or sets the coordinates of the region of interest rectangle within the image.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KUseROI Property, J2KROIControl property
Topics: | Raster Images: Saving Files


J2KTargetFileSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KTargetFileSize
Delphi Syntax | J2KTargetFileSize: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates the size of the target file, in bytes. This value is used only if the J2KCompressionControl property is set to J2K_COMPRESSION_TARGETSIZE.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KUseColorTransform property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KUseColorTransform
Delphi Syntax | J2KUseColorTransform: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Indicates whether to convert an RGB image to YUV space before compressing. (YUV space provides greater compression with higher image quality.) Possible values are:

Value | Meaning
TRUE | Convert to YUV space before compressing. (Default)
FALSE | Do not convert to YUV space before compressing.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KUseEPHMarker property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KUseEPHMarker
Delphi Syntax | J2KUseEPHMarker: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether to use the EPH marker. Possible values are:

Value | Meaning
TRUE | Use the EPH marker.
FALSE | Do not use the EPH marker. (Default)

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KUseROI property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KUseROI
Delphi Syntax | J2KUseROI: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Gets or sets a boolean flag that indicates whether to use a region of interest. Possible values are:

Value | Meaning
TRUE | Use a region of interest as specified in the J2KROIControl property.
FALSE | Do not use a region of interest. If you do not want to use a region of interest, set this property to FALSE. Otherwise, there may be a significant compression and speed performance loss.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property, J2KROIControl Property, J2KROIRect Property.
Topics: | Raster Images: Saving Files


J2KUseSOPMarker property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool J2KUseSOPMarker
Delphi Syntax | J2KUseSOPMarker: Boolean
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Boolean value that indicates whether to use the SOP marker. Possible values are:

Value | Meaning
TRUE | Use the SOP marker.
FALSE | Do not use the SOP marker. (Default)

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KXOsiz property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KXOsiz
Delphi Syntax | J2KXOsiz: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Horizontal offset from the origin of the reference grid to the left side of the image area.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KXTOsiz property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KXTOsiz
Delphi Syntax | J2KXTOsiz: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Horizontal offset from the origin of the reference grid to the left side of the first tile.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KXTsiz property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KXTsiz
Delphi Syntax | J2KXTsiz: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Width of one reference tile, with respect to the reference grid.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KYOsiz property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KYOsiz
Delphi Syntax | J2KYOsiz: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Vertical offset from the origin of the reference grid to the top of the image area.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KYTOsiz property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KYTOsiz
Delphi Syntax | J2KYTOsiz: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Vertical offset from the origin of the reference grid to the top of the first tile.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


J2KYTsiz property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int J2KYTsiz
Delphi Syntax | J2KYTsiz: Longint
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Height of one reference tile, with respect to the reference grid.

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KSetDefaults method, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property
Topics: | Raster Images: Saving Files


JBIG2GBATX1 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATX1
Delphi Syntax | JBIG2GBATX1: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the X location of the adaptive template pixel A1.

Possible values range from -128 to 127.

When the value of the JBIG2GBATY1 property is zero, then the possible values of this property will range from –128 to –1

The default value is 3.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2GBATX2 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATX2
Delphi Syntax | JBIG2GBATX2: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the X location of the adaptive template pixel A2.

Possible values range from -128 to 127

When the value of the JBIG2GBATY2 property is zero, then the possible values will range from –128 to –1.

The default value is -3.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2GBATX3 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATX3
Delphi Syntax | JBIG2GBATX3: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the X location of the adaptive template pixel A3.

Possible values range from -128 to 127.

When the value of the JBIG2GBATY3 property is zero, then the possible values range from –128 to -1.

The default value is 2.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATY3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2GBATX4 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATX4
Delphi Syntax | JBIG2GBATX4: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the X location of the adaptive template pixel A4.

Possible values range from -128 to 127.

When the value of the JBIG2GBATY4 property is zero, then the possible values are range from –128 to -1.

The default value is -2.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2GBATY1 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATY1
Delphi Syntax | JBIG2GBATY1: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the Y location of the adaptive template pixel A1.

Possible values range from -128 to 0.

The default value is -1.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2GBATY2 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATY2
Delphi Syntax | JBIG2GBATY2: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the Y location of the adaptive template pixel A2.

Possible values range from -128 to 0.

The default value is -1.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2GBATY3 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATY3
Delphi Syntax | JBIG2GBATY3: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the Y location of the adaptive template pixel A3.

Possible values range from -128 to 0.

The default value is -2.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2GBATY4 property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Shortint JBIG2GBATY4
Delphi Syntax | JBIG2GBATY4: ShortInt
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets the Y location of the adaptive template pixel A4.

Possible values range from -128 to 0.

The default value is -2.

See Also

Elements: | JBIG2SaveFlags property, JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATX4 property
Topics: | Raster Images: Saving Files


JBIG2SaveFlags property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | unsigned JBIG2SaveFlags;
Delphi Syntax | JBIG2SaveFlags: L_UINT32
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets flags that indicate the unwanted JBIG2 segments and whether to use the typical prediction (TP). You can use a bit wise OR (|) to specify more than one flag. Possible values are:

Value | Meaning
0 | Do nothing.
FLAG_JBIG2_REMOVE_MARKER | [0x0001] Removes the two bytes marker from generic region segment data.
FLAG_JBIG2_REMOVE_HEADER_SEGMENT | [0x0002] Removes JBIG2 header.
FLAG_JBIG2_REMOVE_EOP_SEGMENT | [0x0004] Removes End Of Page segment.
FLAG_JBIG2_REMOVE_EOF_SEGMENT | [0x0008] Removes End Of File segment.
FLAG_JBIG2_TPON | [0x0010] Uses typical prediction (TP) while encoding.

The default value is 0.

See Also

Elements: | JBIG2TemplateType property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


JBIG2TemplateType property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | Byte JBIG2TemplateType
Delphi Syntax | JBIG2TemplateType: L_UCHAR
Overview | Refer to Saving a Bitmap to a File.

Remarks

Gets or sets a value that specifies the template to be used for the template-based arithmetic encoder. Possible values are:

Value
Meaning
Template

0

Three lines with 16 pixels template.

1

Three lines with 13 pixels template.

2

Three lines with 10 pixels template.

3

Two lines with 10 pixels template.

The default value is 0.

See Also

Elements: | JBIG2SaveFlags property, JBIG2GBATX1 property, JBIG2GBATY1 property, JBIG2GBATX2 property, JBIG2GBATY2 property, JBIG2GBATX3 property, JBIG2GBATY3 property, JBIG2GBATX4 property, JBIG2GBATY4 property
Topics: | Raster Images: Saving Files


LayerBlendModeKey property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | AnsiString LayerBlendModeKey[int iLayer]
Delphi Syntax | LayerBlendModeKey[iLayer: Integer]: String
Overview | Refer to Layers in Files

Remarks

Gets or sets the blend mode key, a four byte character array, for the layer(s).

Possible values are:

Value | Meaning
'norm' | Normal
'dark' | Darken
'lite' | Lighten
'hue' | Hue
'sat' | Saturation
'colr' | Color
'lum' | Luminosity
'mul' | Multiply
'scrn' | Screen
'diss' | Dissolve
'over' | Overlay
'hLit' | Hard light
'sLit' | Soft light
'diff' | Difference
'smud' | Exclusion
'div' | Color dodge
'idiv' | Color burn

For more information, refer to FILE FORMATS SPECIFICATION from Adobe.

See Also

Elements:

LayerClipping property, LayerOpacity property, LayerLeft property, LayerMaskBitmap property, LayerTop property, Save method, SaveLayers property


LayerClipping property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LayerClipping[int iLayer]
Delphi Syntax | LayerClipping[iLayer: Integer]: Integer
Overview | Refer to Layers in Files

Remarks

Gets or sets the clipping value for the layer.

A value of 0 represents base and 1 represents non-base.

For more information, refer to FILE FORMATS SPECIFICATION from Adobe.

See Also

Elements:

LayerBlendModeKey property, LayerOpacity property, LayerLeft property, LayerMaskBitmap property, LayerTop property, Save method, SaveLayers property


LayerLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LayerLeft [int iLayer]
Delphi Syntax | LayerLeft [iLayer: integer]: Integer
Overview | Refer to Layers in Files

Remarks

When iLayer is 0, LayerLeft [0] is a read-only property and contains information that was last read from the file using the LoadLayer method.

When iLayer is > 0, then LayerLeft [iLayer] contains positioning information for the layers that will be saved in the file. In this case, LayerLeft [iLayer] contains the left offset for layer iLayer. It is the corresponding offset for element iLayer in the bitmap list.

This information will be used the next time the Save method is called to save a PSD file.

See Also

Elements: | LayerTop property, Save method, SaveLayers property, LayerOpacity property, LayerClipping property, LayerBlendModeKey property, LayerMaskBitmap property
Topics: | Raster Images: Saving Files


LayerMaskBitmap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TBitmapHandle LayerMaskBitmap[int iLayer]
Delphi Syntax | LayerMaskBitmap [iLayer: Integer]: TBITMAPHANDLE
Overview | Refer to Layers in Files

Remarks

Gets or sets the mask bitmap for the layer. The mask bitmap is an 8-bit grayscale bitmap. The value of each pixel in the mask layer bitmap determines the transparency of the corresponding layer bitmap. A value of 0 represents full transparency while a value of $FF represents complete opacity. Intermediate values represent translucency. If the mask bitmap does not exist, then the layer is considered to be visible (it is as if the mask bitmap contained only $FF pixels.

For more information, refer to FILE FORMATS SPECIFICATION from Adobe.

See Also

Elements:

LayerBlendModeKey property, LayerOpacity property, LayerLeft property, LayerClipping property, LayerTop property, Save method, SaveLayers property


LayerOpacity property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LayerOpacity [int iLayer]
Delphi Syntax | LayerOpacity [iLayer: integer]: integer
Overview | Refer to Layers in Files

Remarks

Gets or sets the opacity value for the layer.

A value of 0 represents full transparency and 255 is completely opaque. Intermediate values represent translucency.

For more information, refer to FILE FORMATS SPECIFICATION from Adobe.

See Also

Elements:

LayerBlendModeKey property, LayerClipping property, LayerLeft property, LayerMaskBitmap property, LayerTop property, Save method, SaveLayers property


LayerTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LayerTop[int iLayer]
Delphi Syntax | LayerTop [iLayer: integer]: Integer
Overview | Refer to Layers in Files

Remarks

When iLayer is 0, LayerLeft [0] is a read-only property and contains information that was last read from the file using the LoadLayer method.

When iLayer is > 0, then LayerTop [iLayer] contains positioning information for the layers that will be saved in the file. In this case, LayerTop [iLayer] contains the top offset for layer iLayer. It is the corresponding offset for element iLayer in the bitmap list.

This information will be used the next time the Save method is called to save a PSD file.

See Also

Elements: | LayerLeft property, Save method, SaveLayers property, LayerOpacity property, LayerClipping property, LayerBlendModeKey property, LayerMaskBitmap property
Topics: | Raster Images: Saving Files


LevelHighBit property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LevelHighBit
Delphi Syntax | LevelHighBit:Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) Sets the value of the highest bit considered as image data when painting a 12 or 16-bit grayscale image. Valid values are : 0 <= LevelHighBit <= BitmapBits property. For example, to specify that only the high (most significant) 8 bits of a 16-bit grayscale image are considered part of the image, set Level LowBit property to 8 and LevelHighBit property to 15 (not 16! 15 - 8 + 1 = 8 bits). To consider only the lowest 8 bits, set LevelLowBit to 0 and LevelHighBit to 7 (not 8!).

This property does not change the image data, only the way it is painted. Set the WindowLevelBitmap property to TRUE and call the WindowLevel method to change the image data to match the display image.

See Also

Elements: | WindowLevel method, LevelLowBit property
Topics: | Raster Images: Palettes


LevelLowBit property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LevelLowBit
Delphi Syntax | LevelLowBit:Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) Sets the value of the lowest bit considered as image data when painting a 12 or 16-bit grayscale image. Valid values are : 0 <= LevelLowBit <= LevelHighBit property. For example, to specify that only the high (most significant) 8 bits of a 16-bit grayscale image are considered part of the image, set Level LowBit property to 8 and LevelHighBit property to 15 (not 16! 15 - 8 + 1 = 8 bits). To consider only the lowest 8 bits, set LevelLowBit to 0 and LevelHighBit to 7 (not 8!).

This property does not change the image data, only the way it is painted. Set the WindowLevelBitmap property to TRUE and call the WindowLevel method to change the image data to match the display image.

See Also

Elements: | WindowLevel method, LevelHighBit property
Topics: | Raster Images: Palettes


LevelLUT property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor LevelLUT [int n]
Delphi Syntax | LevelLUT [n:Integer]:TColor
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Document/Medical only) Gets or sets a color stored in the Window Level Lookup Table (LUT). The LUT specifies a remapping palette that can be used to change the color of every pixel painted on the screen. For each pixel, LevelLowBit property and LevelHighBit property are used to generate a value between 0 and LevelLUTLength - 1. This value is used as an index into the LevelLUT palette to obtain the corresponding color. By default the interval 0 to LevelLUTLength - 1 is remapped to 0 to 255 and the corresponding gray value is used.

See Also

Elements: | LevelLowBit property, LevelHighBit property, LevelLUTLength property, WindowLevel method
Topics: | Raster Images: Palettes


LevelLUTLength property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal LevelLUTLength;
Delphi Syntax | LevelLUTLength: Cardinal;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Document/Medical only) (Read Only) Gets the length of the LevelLUT remapping palette. It is equal to 2 raised to the power of (LevelHighBit - LevelLowBit + 1).

See Also

Elements: | LevelLUT property, LevelHighBit property, LevelLowBit property
Topics: | Raster Images: Palettes


LoadFast property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool LoadFast
Delphi Syntax | LoadFast: Boolean
Overview | Refer to Loading a Bitmap from a File.

Remarks

Flag that indicates whether to use the fast loading algorithm while loading LEAD ABC files. The fast loading algorithm provides faster loading with less image details. Possible values are:

Value | Meaning
True | Use the fast loading algorithm.
False | Don't use the fast loading algorithm. This is the default value.

See Also

Elements: | LoadSigned property, IsSigned property
Topics: | Raster Images: Loading Files


LoadIFD property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadIFD;
Delphi Syntax | LoadIFD : LongInt;
Overview | Refer to Loading and Saving Large TIFF Files.

Remarks

Specifies the offset within the current file of the page to load.

The LoadIFD property can be used to speed up the loading of TIFF files with many pages.

If the value of this property is <= 7, the LoadXXX methods will ignore this property. This property is only valid for TIFF files. The default value is 0, which indicates that the file format does not support IFDs.

If the value of this property is >= 8, then when information about a TIF file is retrieved, the page at the offset given by this property will be page 1. The page after will be page 2, etc. When the current TIF file is no longer needed, this property must be reset to 0, otherwise the processing of any other TIF files will be incorrect.

See Also

Elements: | InfoIFD property, SaveIFD property
Topics: | Raster Images: Loading and Saving Large TIFF Files


LoadInfoBits property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadInfoBits
Delphi Syntax | LoadInfoBits: Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies the bits per pixel of the image data to be loaded. LEADTOOLS uses this value only if it fails to find the value in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4).

LEADTOOLS checks the LoadInfoFormat property first. If that property has a non-zero value, it uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Elements: | OnLoadInfo event, LoadInfoFlags property, LoadInfoFormat property, LoadInfoHeight property, LoadInfoOffset property, LoadInfoWidth property, LoadInfoXRes property, LoadInfoYRes property
Topics: | Raster Images: Loading Files


LoadInfoFlags property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal LoadInfoFlags
Delphi Syntax | LoadInfoFlags: Cardinal
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies format information about the image data to be loaded. LEADTOOLS uses these flags only if it fails to find the value in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4) and RAW uncompressed data.

LEADTOOLS checks the LoadInfoFormat property first. If that property has a non-zero value, it uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

The following are valid values. When it is appropriate, you can use a bitwise OR ( | ) to specify more than one value.

LOADINFO_TOPLEFT, LOADINFO_TOPLEFT90 and LOADINFO_TOPLEFT270 cannot be combined using the bitwise OR.

LOADINFO_REVERSE can be combined with LOADINFO_TOPLEFT, LOADINFO_TOPLEFT90 or LOADINFO_TOPLEFT270. If LOADINFO_REVERSE is set, every line is reversed before being put into the bitmap.

Flag | Meaning
LOADINFO_TOPLEFT | The image has a TOP_LEFT view perspective.
LOADINFO_ORDERRGB | The color order is RGB.
LOADINFO_WHITEONBLACK | The image is white-on-black.
LOADINFO_LSB | The least significant bit is filled first.
LOADINFO_TOPLEFT90 | The image has a TOP_LEFT90 view perspective. (Document/Medical only).
LOADINFO_TOPLEFT270 | The image has a TOP_LEFT270 view perspective. (Document/Medical only).
LOADINFO_REVERSE | The image is reversed (Mirrored.)
0 | Clear the flags, defaulting to their opposite meanings.
LOADINFO_TOPLEFT180 | [0x00000080] The image has a TOP_LEFT180 view perspective. (Document/Medical only)
LOADINFO_BOTTOMLEFT90 | [0x00000100] The image has a BOTTOM_LEFT90 view perspective. (Document/Medical only)
LOADINFO_BOTTOMLEFT180 | [0x00000200] The image has a BOTTOM_LEFT180 view perspective. (Document/Medical only)
LOADINFO_BOTTOMLEFT270 | [0x00000400] The image has a BOTTOM_LEFT270 view perspective. (Document/Medical only)
LOADINFO_PAD4 | [0x00000800] Each line is padded to a multiple of 4 bytes. (raw data only)
LOADINFO_PALETTE | [0x00001000] A palette is supplied in the rgbQuad field. (raw data only)
LOADINFO_BITFIELDS | 3 color masks are specified in the rgbColorMask field. This is for raw Bitfield compressed data only.
LOADINFO_ORDERGRAY | Image is grayscale.
LOADINFO_MOTOROLAORDER | Image bytes are in Motorola byte order. Valid only for 16, 48 and 64-bit.)

See Also

Elements: | OnLoadInfo event, LoadInfoBits property, LoadInfoFormat property, LoadInfoHeight property, LoadInfoOffset property, LoadInfoWidth property, LoadInfoXRes property, LoadInfoYRes property
Topics: | Raster Images: Loading Files


LoadInfoFormat property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadInfoFormat
Delphi Syntax | LoadInfoFormat: Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies format of the image data to be loaded. LEADTOOLS uses this value only if it fails to find the value in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4).

LEADTOOLS checks the LoadInfoFormat property first. If this property has a non-zero value, LEADTOOLS uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

The following are valid formats:

FILE_FAX_G3_1D | Raw FAX, compressed using CCITT group 3, 1 dimension.
FILE_FAX_G3_2D | Raw FAX, compressed using CCITT group 3, 2 dimensions.
FILE_FAX_G4 | Raw FAX, compressed using CCITT group 4.
FILE_RAW | Raw uncompressed data
FILE_RAW_RLE4 | Raw RLE4 compressed, 4 bit data. (Read only)
FILE_RAW_RLE8 | Raw RLE8 compressed, 8 bit data. (Read only)
FILE_RAW_BITFIELDS | Raw BITFIELD data, 16 or 32-bit data. (Read only)
FILE_RAW_PACKBITS | Raw PackBits compression. (Read only)

See Also

Elements: | OnLoadInfo event, LoadInfoBits property, LoadInfoFlags property, LoadInfoHeight property, LoadInfoOffset property, LoadInfoWidth property, LoadInfoXRes property, LoadInfoYRes property
Topics: | Raster Images: Loading Files


LoadInfoHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadInfoHeight
Delphi Syntax | LoadInfoHeight: Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies the height, in pixels, of the image to be loaded. LEADTOOLS uses this value only if it fails to find format information in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4).

If you want LEADTOOLS to automatically recognize any fax file, set the LoadInfoWidth and LoadInfoHeight properties to -1 once, at the beginning of the program.

LEADTOOLS checks the LoadInfoFormat property first. If that property has a non-zero value, it uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

See Also

Elements: | OnLoadInfo event, LoadInfoBits property, LoadInfoFlags property, LoadInfoFormat property, LoadInfoOffset property, LoadInfoWidth property, LoadInfoXRes property, LoadInfoYRes property
Topics: | Raster Images: Loading Files


LoadInfoOffset property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal LoadInfoOffset
Delphi Syntax | LoadInfoOffset : Cardinal
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies the position of the first byte of image data to be loaded. This can be 0 if your file does not have a header. LEADTOOLS uses this value only if it fails to find format information in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4).

LEADTOOLS checks the LoadInfoFormat property first. If that property has a non-zero value, it uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

See Also

Elements: | OnLoadInfo event, LoadInfoBits property, LoadInfoFlags property, LoadInfoFormat property, LoadInfoHeight property, LoadInfoWidth property, LoadInfoXRes property, LoadInfoYRes property
Topics: | Raster Images: Loading Files


LoadInfoWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadInfoWidth
Delphi Syntax | LoadInfoWidth : Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies the width, in pixels, of the image to be loaded. LEADTOOLS uses this value only if it fails to find format information in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4).

If you want LEADTOOLS to automatically recognize any fax file, set the LoadInfoWidth and LoadInfoHeight properties to -1 once, at the beginning of the program.

LEADTOOLS checks the LoadInfoFormat property first. If that property has a non-zero value, it uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

See Also

Elements: | OnLoadInfo event, LoadInfoBits property, LoadInfoFlags property, LoadInfoFormat property, LoadInfoHeight property, LoadInfoOffset property, LoadInfoXRes property, LoadInfoYRes property
Topics: | Raster Images: Loading Files


LoadInfoXRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadInfoXRes
Delphi Syntax | LoadInfoXRes : Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies the horizontal resolution, in DPI (dots per inch), of the image to be loaded. LEADTOOLS uses this value only if it fails to find format information in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4).

LEADTOOLS checks the LoadInfoFormat property first. If that property has a non-zero value, it uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

See Also

Elements: | OnLoadInfo event, LoadInfoBits property, LoadInfoFlags property, LoadInfoFormat property, LoadInfoHeight property, LoadInfoOffset property, LoadInfoWidth property, LoadInfoYRes property
Topics: | Raster Images: Loading Files


LoadInfoYRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadInfoYRes
Delphi Syntax | LoadInfoYRes : Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies the vertical resolution, in DPI (dots per inch), of the image to be loaded. LEADTOOLS uses this value only if it fails to find format information in the file header. You can use this and the other LoadInfo... properties for loading raw FAX data (CCITT Group 3 or Group 4).

LEADTOOLS checks the LoadInfoFormat property first. If that property has a non-zero value, it uses the other LoadInfo... property values. Keep in mind that when these values are used, LEADTOOLS does not validate the data in the file. If you want LEADTOOLS to validate the data, you must set the LoadInfoFormat property to zero.

See Also

Elements: | OnLoadInfo event, LoadInfoBits property, LoadInfoFlags property, LoadInfoFormat property, LoadInfoHeight property, LoadInfoOffset property, LoadInfoWidth property, LoadInfoXRes property
Topics: | Raster Images: Loading Files


LoadResolutionCount property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadResolutionCount;
Delphi Syntax | LoadResolutionCount:Integer;
Overview | Refer to Implementing PhotoCD and FlashPix Features.

Remarks

The number of available resolutions in the specified PhotoCD, FlashPix, or JBIG file.

The ReadLoadResolutions method updates this property.

The GetLoadResolution method can also update this property, setting it to 1.

See Also

Elements: | ReadLoadResolutions method, LoadResolutionHeight property, LoadResolutionWidth property, PCDRes property, SetLoadResolution method, GetLoadResolution method, SaveResolutionCount property, SaveResolutionHeight property, SaveResolutionWidth property
Topics: | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


LoadResolutionHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadResolutionHeight [int nIndex]
Delphi Syntax | LoadResolutionHeight[nIndex: Integer]:Longint
Overview | Refer to Implementing PhotoCD and FlashPix Features.

Remarks

Is the height component in an array that specifies the available dimensions in a PhotoCD, FlashPix, or JBIG file.

The ReadLoadResolutions method updates this property. The LoadResolutionCount property specifies the number of available dimensions.

The GetLoadResolution method can also update this property with the current value for loading a file.

See Also

Elements: | ReadLoadResolutions method, LoadResolutionCount property, LoadResolutionWidth property, PCDRes property, SetLoadResolution method, GetLoadResolution method, SaveResolutionHeight property, SaveResolutionWidth property
Topics: | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


LoadResolutionWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadResolutionWidth [int nIndex];
Delphi Syntax | LoadResolutionWidth[nIndex: Integer]:Longint;
Overview | Refer to Implementing PhotoCD and FlashPix Features.

Remarks

Is the height component in an array that specifies the available dimensions in a PhotoCD, FlashPix, or JBIG file.

The ReadLoadResolutions method updates this property. The LoadResolutionCount property specifies the number of available dimensions.

The GetLoadResolution method can also update this property with the current value for loading a file.

See Also

Elements: | ReadLoadResolutions method, LoadResolutionCount property, LoadResolutionHeight property, PCDRes property, SetLoadResolution method, GetLoadResolution method, SaveResolutionHeight property, SaveResolutionWidth property
Topics: | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


LoadSigned property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool LoadSigned
Delphi Syntax | LoadSigned: Boolean
Overview | Refer to Loading a Bitmap from a File

Remarks

Indicates how to load files with signed bitmap data. Possible values are:

Value | Meaning
TRUE | Do not automatically convert signed images before loading.
FALSE | Automatically convert signed images to unsigned at load time.

LEADTOOLS automatically converts signed images to unsigned by setting the negative pixels to 0.

If this property is TRUE, the signed image should be converted by calling the ConvertSignedToUnsigned method. If signed images are not converted, the images may not be painted properly and the image processing methods will not perform correctly.

To determine whether a bitmap is signed or not, check the IsSigned property.

See Also

Elements: | LoadFast property, IsSigned property, ConvertSignedToUnsigned method
Topics: | Raster Images: Loading Images
 | Examining and Altering Bitmaps


LoadUseViewPerspective property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool LoadUseViewPerspective
Delphi Syntax | LoadUseViewPerspective: Boolean
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Document/Medical only, persistent property, available at design time) Determines whether a bitmap with a rotated view perspective keeps its internal orientation when it is loaded.

Note:

This property does not affect the orientation of the displayed image. You do not have to account for view perspective in the VCL unless you call certain LEADTOOLS DLL functions, which are noted in the LEADTOOLS API documentation.

This property is most useful if you want to retain the existing view perspective when loading TIFF images that are stored with a rotated view perspective. Setting this property to TRUE may speed the loading of a file that contains a rotated image. After an image is loaded, the rotated view perspective may slow down other operations.

Setting | Description
TRUE | Keep the bitmap's rotated view perspective when loading.
FALSE | If a bitmap in a file has a rotated view perspective, convert the internal data to a top-left orientation when loading.

See Also

Topics:

Raster Images: Loading Files


MagGlassBitonalScaling property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TBitonalScaling MagGlassBitonalScaling;
Delphi Syntax | MagGlassBitonalScaling: TBitonalScaling;
Overview | Refer to Using the Magnifying Glass

Remarks

(Document/Medical only, Persistent property, available at design time.) Sets options to improve the display of bitonal bitmaps in the Magnify Glass. The default is btsNormal.

Setting | Description
btsNormal | Causes bitonal images to be displayed normally when they are scaled.
btsFavorBlack | Enables a bias in preserving black objects when displaying zoomed-out 1-bit images. This can prevent the disappearance of fine lines and details, but it slows down the display.
btsScaleToGray | Enables grayscaling of 1-bit images when they are displayed. This improves the readability of the images when they are zoomed in or zoomed out, but it slows down the display.

See Also

Elements: | StartMagGlass method, StopMagGlass method, MagGlassPaintPalette property, MagGlassPaintDither property, MagGlassPaintScaling property, MagGlassMaskCount property, MagGlassMask property, MagGlassPointer property.
Topics: | Raster Images: Displaying Images


MagGlassFlags property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal MagGlassFlags
Delphi Syntax | MagGlassFlags : Cardinal
Overview | Refer to Using the Magnifying Glass

Remarks

Flags that indicate which colors in the zoomed image of the Magnifying Glass will be displayed, which colors will be masked, and whether the Magnifying Glass will be manually updated. Possible values are:

The following flags indicate which colors will be displayed and which will be masked:

Value | Meaning
MAGGLASS_MASK_NORMAL | [$0000] Only those colors present in the MagGlassMask property will be masked in the Magnifying Glass display area. All other colors will be displayed.
MAGGLASS_MASK_INVERT | [$0001] Only those colors present in the MagGlassMask property will be displayed in the Magnifying Glass display area. All other colors will be masked.

The following flag indicates whether the Magnifying Glass will be manually updated.

Value | Meaning
MAGGLASS_MANUAL_UPDATE | [$0002] LEADTOOLS will not handle the mouse events in order to manipulate the Magnifying Glass. The user must control the Magnifying Glass by using the ShowMagGlass and SetMagGlassPos methods.

See Also

Elements: | MagGlassMask property, MagGlassMaskCount property, OnMagGlassCursor event, StartMagGlass method, StopMagGlass method, ShowMagGlass method, SetMagGlassPos method
Topics: | Raster Images: Displaying Images


MagGlassMask property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor MagGlassMask
Delphi Syntax | MagGlassMask[ uIndex : Cardinal]:TColor
Overview | Refer to Using the Magnifying Glass

Remarks

Array that specifies the color(s) to mask out of the zoomed magnifying glass display.

Allocate this array by setting the MagGlassMaskCount property.

See Also

Elements: | StartMagGlass method, StopMagGlass method, MagGlassPaintPalette property, MagGlassBitonalScaling property, MagGlassPaintDither property, MagGlassPaintScaling property, MagGlassMaskCount property, MagGlassPointer property.
Topics: | Raster Images: Displaying Images


MagGlassMaskCount property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal MagGlassMaskCount
Delphi Syntax | MagGlassMaskCount : Cardinal
Overview | Refer to Using the Magnifying Glass

Remarks

The number of entries in the MagGlassMask property array.

Allocate the MagGlassMask property array by setting this property.

See Also

Elements: | StartMagGlass method, StopMagGlass method, MagGlassPaintPalette property, MagGlassBitonalScaling property, MagGlassPaintDither property, MagGlassPaintScaling property, MagGlassMask property, MagGlassPointer property.
Topics: | Raster Images: Displaying Images


MagGlassPaintContrast property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MagGlassPaintContrast
Delphi Syntax | MagGlassPaintContrast: L_INT
Overview | Refer to Using the Magnifying Glass

Remarks

Contrast correction value used by the Magnifying Glass when it paints the zoomed area.

Setting the contrast value that is used by the Magnifying Glass lets you adjust the displayed contrast of the zoomed area without changing the bitmap data.

Possible values range from -1000 to +1000. A positive value increases the contrast of the zoomed display area. A negative value decreases the contrast of the zoomed area.

See Also

Elements: | MagGlassPaintGamma property, MagGlassPaintIntensity property, StartMagGlass method, StopMagGlass method.
Topics: | Raster Images: Displaying Images.


MagGlassPaintDither property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaintDither MagGlassPaintDither
Delphi Syntax | MagGlassPaintDither: TPaintDither
Overview | Refer to Using the Magnifying Glass

Remarks

(Persistent property, available at design time) Specifies the type of dithering to use when painting an image on a device with 256 colors or less in the Magnify Glass. The default is pdOrdered.

Ordered dithering is faster than error diffusion, but the quality of the image is not as good.

Setting | Description
pdOrdered | Use ordered dithering.
pdDiffusion | Use error diffusion.

See Also

Elements: | StartMagGlass method, StopMagGlass method, MagGlassPaintPalette property, MagGlassBitonalScaling property, MagGlassPaintScaling property, MagGlassMaskCount property, MagGlassMask property, MagGlassPointer property.
Topics: | Raster Images: Displaying Images


MagGlassPaintGamma property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MagGlassPaintGamma
Delphi Syntax | MagGlassPaintGamma: L_INT
Overview | Refer to Using the Magnifying Glass

Remarks

Gamma correction value used by the Magnifying Glass when it paints the zoomed area.

Setting the gamma correction that is used by the Magnifying Glass lets you adjust the displayed brightness of the zoomed area without changing the bitmap data.

Intensity values ideally follow a logarithmic progression, because the eye perceives changes in intensity as being equal when the ratio of change is equal. For example, we would see a change from 0.1 to 0.2 as being equal to a change from 0.2 to 0.4.

Gamma is a standard constant that is used to calculate the progression. For most CRTs the gamma constant is in the range of 2.2 to 2.5.

Because this property is an unsigned integer, it is 100 times the actual gamma value. For example, use 235 to set a gamma value of 2.35.

See Also

Elements: | MagGlassPaintContrast property, MagGlassPaintIntensity property, StartMagGlass method, StopMagGlass method.
Topics: | Raster Images: Displaying Images.


MagGlassPaintIntensity property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MagGlassPaintIntensity
Delphi Syntax | MagGlassPaintIntensity: L_INT
Overview | Refer to Using the Magnifying Glass

Remarks

(Persistent property, available at design time) Intensity correction value used by Magnifying Glass when it paints the zoomed area.

Setting the intensity value that is used by the Magnifying Glass lets you adjust the displayed brightness of the zoomed area without changing the bitmap data.

Possible values range from -1000 to +1000. A positive value lightens the zoomed area. A negative value darkens the zoomed area.

See Also

Elements: | MagGlassPaintContrast property, MagGlassPaintGamma property, StartMagGlass method, StopMagGlass method.
Topics: | Raster Images: Displaying Images.


MagGlassPaintPalette property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaletteType MagGlassPaintPalette
Delphi Syntax | MagGlassPaintPalette: TPaletteType
Overview | Refer to Using the Magnifying Glass

Remarks

(Persistent property, available at design time) Specifies whether to force the use of a fixed palette when painting images on a device that displays 256 colors or less in the Magnify Glass.

Using the fixed palette improves the overall display of multiple images. You can specify either the LEAD fixed palette or the Netscape fixed palette. The Netscape fixed palette is the same palette used by Netscape Navigator and Microsoft Internet Explorer. The default is ppAuto.

Setting | Description
ppAuto | Use the bitmap's own palette if available; otherwise use the LEAD fixed palette.
ppFixed | Always use the LEAD fixed palette.
ppAutoNetscape | Use the bitmap's own palette if available; otherwise use the Netscape fixed palette.
ppFixedNetscape | Always use the Netscape fixed palette.

See Also

Elements: | StartMagGlass method, StopMagGlass method, MagGlassBitonalScaling property, MagGlassPaintDither property, MagGlassPaintScaling property, MagGlassMaskCount property, MagGlassMask property, MagGlassPointer property.
Topics: | Raster Images: Displaying Images


MagGlassPaintScaling property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaintScaling MagGlassPaintScaling
Delphi Syntax | MagGlassPaintScaling: TPaintScaling
Overview | Refer to Using the Magnifying Glass

Remarks

(Persistent property, available at design time.) Type of resizing to use when painting the Magnify Glass.

Default is psNormal, which is the fastest. Possible values are:

Value | Meaning
psNormal | normal resize (fastest)
psResample | bilinear interpolation (slower than psNormal, but produces better looking results)
psBicubic | bicubic interpolation (slowest, best quality)

For 1-bit images, the MagGlassPaintScaling is considered only if MagGlassBitonalScaling is btsNormal. Otherwise, the FavorBlack and ScaleToGray options take precedence over MagGlassPaintScaling.

psBicubic produces the same result as psResample when zooming out on an image.

See Also

Elements: | StartMagGlass method, StopMagGlass method, MagGlassPaintPalette property, MagGlassBitonalScaling property, MagGlassPaintDither property, MagGlassMaskCount property, MagGlassMask property, MagGlassPointer property.
Topics: | Raster Images: Displaying Images


MagGlassPointer property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Controls::TCursor MagGlassPointer
Delphi Syntax | MagGlassPointer: TCursor
Overview | Refer to Using the Magnifying Glass

Remarks

(Persistent property, available at design time.) Sets or gets the value that indicates the type of mouse pointer used in the Magnify Glass. For a list of available cursors, refer to your compiler’s help file.

See Also

Elements: | StartMagGlass method, StopMagGlass method, MagGlassPaintPalette property, MagGlassBitonalScaling property, MagGlassPaintDither property, MagGlassPaintScaling property, MagGlassMaskCount property, MagGlassMask property.
Topics: | Raster Images: Displaying Images


MaskBitmap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TBitmapHandle MaskBitmap;
Delphi Syntax | MaskBitmap: TBitmapHandle;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Gets or sets the mask bitmap.

This property is updated by the CreateMaskFromRgn method.

The mask bitmap will be updated with a 1-bit, black-and-white image after calling the CreateMaskFromBitmapRgn method, where pixels from the region are white, and all others are black.

The user can also directly assign a bitmap to this property, but the bitmap must be a 1-bit mask image.

The image in this property is used by the SetRgnFromMask method to create or modify a region in the Bitmap property.

Therefore, before calling SetRgnFromMask The MaskBitmap property must contain the mask bitmap to be used by this method.

See Also

Elements: | CreateMaskFromBitmapRgn method, SetRgnFromMask method, SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, PolygonSize property, OffsetRgn method, SetRgnColor method.
Topics: | Raster Images: Creating and Using a Region


MaskTable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_UINT MaskTable [L_UINT uIndex]
Delphi Syntax | MaskTable [uIndex: L_UINT]: L_UINT
Overview | Refer to Changing Brightness and Contrast.

Remarks

Lookup table that identifies the valid values in the HTable. This is one of the four tables that the RemapHue method uses to change the bitmap's hue, saturation and value. Hue, Saturation, and Value levels range from 0 to RemapHueTablesSize-1. Therefore, the lookup tables each have RemapHueTablesSize-1 entries. The current hue, saturation and value of a pixel correspond to the table indexes. If the bUseMaskTable parameter is set to TRUE when the RemapHue method is called, then this table is used to identify which values in the HTable property are valid. If MaskTable [i] is non-zero, then HTable [i] is to be used. If MaskTable [i] is 0 then HTable [i] is ignored.

See Also

Elements: | RemapHue method, HTable property, STable property, RemapHueTablesSize property, VTable property, HSV_HfromRGB method, HSV_SfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Modifying Intensity Values


MaxBit property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MaxBit
Delphi Syntax | MaxBit:Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) (Read Only) Gets the maximum bit value of the pixels in the image. For example, in a 12-bit grayscale image MaxBit would be <= 11 and MinBit would be >= 0. This value is not affected by LevelLowBit property or LevelHighBit property.

This value is only valid after calling GetMinMaxBits method.

The MinBit, MaxBit, MinVal and MaxVal values are useful for setting up the LevelLUT property for remapping to a user palette.

See Also

Elements: | GetMinMaxBits method, MinBit property, LevelLowBit property, LevelHighBit property, WindowLevel method, MinVal, MaxVal
Topics: | Raster Images: Palettes


MaxVal property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MaxVal
Delphi Syntax | MaxVal: Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Document/Medical only) (Read Only) Gets the maximum intensity value of the pixels in the image. This value is not affected by LevelLowBit property or LevelHighBit property.

This value is only valid after calling GetMinMaxVal method.

The MinBit, MaxBit, MinVal and MaxVal values are useful for setting up the LevelLUT property for remapping to a user palette.

See Also

Elements | GetMinMaxVal method, MinVal property, LevelLowBit property, LevelHighBit property, WindowLevel method, MinBit, MaxBit
Topics | Raster Images: Palettes


MinBit property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MinBit
Delphi Syntax | MinBit:Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) (Read Only) Gets the minimum bit value of the pixels in the image. For example, in a 12-bit grayscale image MaxBit would be <= 11 and MinBit would be >= 0. This value is not affected by LevelLowBit property or LevelHighBit property.

This value is only valid after calling GetMinMaxBits method.

The MinBit, MaxBit, MinVal and MaxVal values are useful for setting up the LevelLUT property for remapping to a user palette.

See Also

Elements: | GetMinMaxBits method, MaxBit property, LevelLowBit property, LevelHighBit property, WindowLevel method, MinVal, MaxVal
Topics: | Raster Images: Palettes


MinVal property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MinVal
Delphi Syntax | MinVal: Integer
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Document/Medical only) (Read Only) Gets the minimum intensity value of the pixels in the image. This value is not affected by LevelLowBit property or LevelHighBit property.

This value is only valid after calling GetMinMaxVal method.

The MinBit, MaxBit, MinVal and MaxVal values are useful for setting up the LevelLUT property for remapping to a user palette.

See Also

Elements | GetMinMaxVal method, MaxVal property, LevelLowBit property, LevelHighBit property, WindowLevel method, MinBit, MaxBit
Topics | Raster Images: Palettes


OCXBitmap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | OLE_HANDLE OCXBitmap
Delphi Syntax | OCXBitmap: OLE_HANDLE
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

This property is used to copy images between the VCL Main Control and the LEADTOOLS ActiveX controls.

When you read this property, if an image is allocated in the Main Control, this property is filled with a handle to that image. You can use this to assign an image from the VCL Main Control to a LEADTOOLS ActiveX control, such as the Dicom or OCR ActiveX controls.

When you write to this property, if an image exists in the VCL Main Control, it is freed, and then replaced with the new image. You can use this to assign an image to the VCL Main Control from a LEADTOOLS ActiveX control.

Note, when you read this property a copy of the image is made. In order to free that copy, you can assign 0 to this property.

Note:

This property should not be used to assign TO the LEAD Isis or LEAD Dlg ActiveX controls, but can be used to assign FROM those controls.

See Also

Topics:

Raster Images: Copying Images


OLEDragCursor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_HCURSOR OLEDragCursor;
Delphi Syntax | OLEDragCursor: L_HCURSOR;
Overview | Refer to Drag and Drop.

Remarks

Gets or sets a custom mouse icon for the OLE drag-and-drop operation.

Set this property to use something other than the default drag-and-drop cursors.

To enable the use of custom drag-and-drop cursors, set the bUseDefaultCursor parameter to FALSE within the OnOLEGiveFeedback event. Otherwise, set the bUseDefaultCursor parameter to TRUE within the event.

See Also

Elements: | EnableOLEDragMethod property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEDragOver event, OnOLEGiveFeedback event
Topics: | Raster Images: Displaying Images


PaintContrast property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PaintContrast
Delphi Syntax | PaintContrast: Integer
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Contrast correction value used by painting operations.

Setting the contrast value that is used for painting lets you adjust the displayed contrast of all images without changing the bitmap data.

Possible values range from -1000 to +1000. A positive value increases the contrast of the displayed image. A negative value decreases the contrast of the image.

When applying contrast, gamma, and intensity changes to an image, LEAD applies the changes in the following order:

Contrast

Intensity

Gamma

See Also

Elements: | BackErase property, BitonalScaling property, PaintDither property, PaintEffect property, PaintPalette property, PaintROP3 property, PaintGamma property, PaintIntensity property
Topics: | Raster Images: Displaying Images
 | Changing Brightness and Contrast


PaintDither property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaintDither PaintDither
Delphi Syntax | PaintDither: TPaintDither
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Specifies the type of dithering to use when painting an image on a device with 256 colors or less.

Ordered dithering is faster than error diffusion, but the quality of the image is not as good.

Setting | Description
pdOrdered | Use ordered dithering.
pdDiffusion | Use error diffusion.

See Also

Elements: | BackErase property, BitonalScaling property, PaintEffect property, PaintPalette property, PaintROP3 property, PaintGamma property, PaintIntensity property, PaintContrast property
Topics: | Raster Images: Displaying Images
 | Raster Images: Doing Color Expansion or Reduction


PaintEffect property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PaintEffect
Delphi Syntax | PaintEffect:Integer
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Sets the effect to be used when painting the image.

LEADTOOLS provides over 2000 defined constant identifiers for effects.

For possible values for this property, refer to Effects.

Multipass painting for the EFX_EFFECT_PUSH_CLASS is disabled.

See Also

Elements: | BackErase property, BitonalScaling property, PaintDither property, PaintPalette property, PaintROP3 property, PaintGamma property, PaintIntensity property, PaintContrast property
Topics: | Raster Images: Displaying Images


PaintGamma property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal PaintGamma
Delphi Syntax | PaintGamma: Cardinal
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Gamma correction value used by painting operations.

Setting the gamma correction that is used for painting lets you adjust the displayed brightness of all images without changing the bitmap data.

Intensity values ideally follow a logarithmic progression, because the eye perceives changes in intensity as being equal when the ratio of change is equal. For example, we would see a change from 0.1 to 0.2 as being equal to a change from 0.2 to 0.4.

Gamma is a standard constant that is used to calculate the progression. For most CRTs the gamma constant is in the range of 2.2 to 2.5.

Because this property is an unsigned integer, it is 100 times the actual gamma value. For example, use 235 to set a gamma value of 2.35.

When applying contrast, gamma, and intensity changes to an image, LEAD applies the changes in the following order:

Contrast

Intensity

Gamma

See Also

Elements: | BackErase property, BitonalScaling property, PaintDither property, PaintEffect property, PaintPalette property, PaintROP3 property, PaintIntensity property, PaintContrast property
Topics: | Raster Images: Displaying Images
 | Changing Brightness and Contrast


PaintIntensity property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PaintIntensity
Delphi Syntax | PaintIntensity: Integer
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Intensity correction value used by painting operations.

Setting the intensity value that is used for painting lets you adjust the displayed brightness of all images without changing the bitmap data.

Possible values range from -1000 to +1000. A positive value lightens the displayed image. A negative value darkens the image.

When applying contrast, gamma, and intensity changes to an image, LEAD applies the changes in the following order:

Contrast

Intensity

Gamma

See Also

Elements: | BackErase property, BitonalScaling property, PaintDither property, PaintEffect property, PaintPalette property, PaintROP3 property, PaintGamma property, PaintContrast property
Topics: | Raster Images: Displaying Images
 | Changing Brightness and Contrast


PaintMaxPasses property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal PaintMaxPasses
Delphi Syntax | PaintMaxPasses : Cardinal
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Maximum passes for a pattern brush when implementing a paint effect or transition effect. Use 1 for painting in one pass. Multipass painting for the EFX_EFFECT_PUSH_CLASS is disabled.

If you specify more than one pass, a pattern brush paints some of the pixels on each pass, and the painting is complete when you finish all of the passes. The OnPaintNotify event, which occurs before painting and after each pass, lets you change the behavior of the effect before it finishes.

See Also

Elements: | PaintEffect property, TransitionEffect property, PaintPass property, OnPaintNotify event, PaintNotificationDelay property
Topics: | Raster Images: Implementing Special Effects


PaintNotificationDelay property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal PaintNotificationDelay
Delphi Syntax | PaintNotificationDelay : Cardinal
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Delay between paint passes, in milliseconds.

If you specify more than one pass when painting a special effect, a pattern brush paints some of the pixels on each pass, and the painting is complete when you finish all of the passes. The OnPaintNotify event occurs before painting and after each pass. The PaintNotificationDelay property specifies the delay in that event.

See Also

Elements: | PaintEffect property, TransitionEffect property, PaintMaxPasses property, PaintPass property, OnPaintNotify event
Topics: | Raster Images: Implementing Special Effects


PaintPalette property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaletteType PaintPalette
Delphi Syntax | PaintPalette: TPaletteType
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Specifies whether to force use of a fixed palette when painting images on a device that displays 256 colors or less.

Using the fixed palette improves the overall display of multiple images. You can specify either the LEAD fixed palette or the Netscape fixed palette. The Netscape fixed palette is the same palette used by Netscape Navigator and Microsoft Internet Explorer.

Setting | Description
ppAuto | Use the bitmap's own palette if available; otherwise use the LEAD fixed palette.
ppFixed | Always use the LEAD fixed palette.
ppAutoNetscape | Use the bitmap's own palette if available; otherwise use the Netscape fixed palette.
ppFixedNetscape | Always use the Netscape fixed palette.

See Also

Elements: | BackErase property, BitonalScaling property, PaintDither property, PaintEffect property, PaintROP3 property, PaintGamma property, PaintIntensity property, PaintContrast property
Topics: | Raster Images: Displaying Images


PaintPass property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal PaintPass
Delphi Syntax | PaintPass : Cardinal
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) The current pass during a paint effect or transition effect.

You can set this value in the OnPaintNotify event if you want to skip or repeat a pass (for example, if you want to end with a blend of old and new images).

See Also

Elements: | PaintEffect property, TransitionEffect property, PaintMaxPasses property, OnPaintNotify event, PaintNotificationDelay property
Topics: | Raster Images: Implementing Special Effects


PaintRgnOnly property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool PaintRgnOnly
Delphi Syntax | PaintRgnOnly: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Determines whether only the current region of the bitmap paints. Painting can be automated with the AutoRepaint property or forced with the ForceRepaint method.

Value | Meaning
TRUE | Paint only the current region.
FALSE | Paint any part of the bitmap that is within the display rectangles.

See Also

Elements: | AutoRepaint property, ForceRepaint method
Topics: | Raster Images: Displaying Images
 | Implementing Transparency


PaintROP3 property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PaintROP3
Delphi Syntax | PaintROP3: LongInt
Overview | Refer to Displaying an Image.

Remarks

Specifies the Windows ROP3 code to use when painting.

The default (for normal painting) is SRCCOPY. You can specify any of the ROP3 codes that the Windows BitBlt function uses.

See Also

Elements: | BackErase property, BitonalScaling property, PaintDither property, PaintEffect property, PaintPalette property, PaintGamma property, PaintIntensity property, PaintContrast property
Topics: | Raster Images: Displaying Images


PaintScaling property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaintScaling PaintScaling
Delphi Syntax | PaintScaling: TPaintScaling
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Type of resizing to use during painting.

Default is psNormal, which is the fastest. Possible values are:

Value | Meaning
psNormal | normal resize (fastest)
psResample | bilinear interpolation (slower than psNormal, but produces better looking results)
psBicubic | bicubic interpolation (slowest, best quality)

For 1-bit images, the PaintScaling is considered only if BitonalScaling is btsNormal. Otherwise, the FavorBlack and ScaleToGray options take precedence over PaintScaling.

psBicubic produces the same result as psResample when zooming out on an image.

See Also

Elements: | BitonalScaling property
Topics: | Raster Images: Displaying Images


PaintSizeMode property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaintSizeMode PaintSizeMode
Delphi Syntax | PaintSizeMode: TPaintSizeMode
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Determines the behavior of the AutoSetRects property, which automatically adjusts the display rectangles. It adjusts the destination rectangle as follows:

Setting | Description
smNormal | Width is the bitmap width. Height is the bitmap height.
smStretch | Width is the control's client area width. Height is the client area height. The aspect ratio is not preserved.
smFitSides | Width is the control's client area width. Height is set proportionally to maintain the aspect ratio. The AutoScroll property implements the vertical scroll bar.
smFit | The largest possible width or height is set to the control's client area width or height. The remaining dimension is set proportionally to maintain the aspect ratio.
smZoom | The width and height are set to the bitmap width and height multiplied by the PaintZoomFactor property.

See Also

Elements: | AutoRepaint property, AutoSetRects property, PaintZoomFactor property, AutoScroll property, AutoSize property
Topics: | Raster Images: Displaying Images


PaintSizeUseDPI property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool PaintSizeUseDPI
Delphi Syntax | PaintSizeUseDPI: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Determines whether the automated scaling methods and properties account for the physical resolution of the bitmap.

The physical resolution of a bitmap is measured in dots per inch (DPI). When you load an image, the BitmapXRes and BitmapYRes properties are updated with the DPI values for the horizontal and vertical resolution. Some images have different horizontal and vertical resolutions (for example: 300 by 600). In such cases, the displayed images will appear elongated if you do not account for the resolution.

Value | Meaning
TRUE | Account for the physical resolution.
FALSE | Do not account for the physical resolution.

See Also

Topics:

Raster Images: Displaying Images


PaintWhileLoad property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool PaintWhileLoad
Delphi Syntax | PaintWhileLoad: Boolean
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Persistent property, available at design time) Causes the bitmap to paint while the image file is loading. This lets the user see the progress of the load.

This property works only when the display mode is 32K colors (16-bit) or higher.

Setting | Description
TRUE | Paint the bitmap while the image is loading.
FALSE | Paint the bitmap when the image is finished loading.

See Also

Topics:

Raster Images: Loading Files


PaintZoomFactor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PaintZoomFactor
Delphi Syntax | PaintZoomFactor: Integer
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Is the zoom factor that is used when the AutoSetRects property is TRUE.

You can read and write this property when the PaintSizeMode property is smZoom.

This property is read only when the PaintSizeMode property is set to another value. When it is set to smStretch, the zoom factor is the smallest of the width or height zoom factors (the aspect ratio is not preserved).

If the AutoSetRects property is FALSE, this property is not valid.

See Also

Elements: | AutoRepaint property, AutoSetRects property, PaintSizeMode property, AutoScroll property, AutoSize property
Topics: | Raster Images: Displaying Images


PanWinBitonalScaling property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TBitonalScaling PanWinBitonalScaling;
Delphi Syntax | PanWinBitonalScaling: TBitonalScaling;
Overview | Refer to Using a PanWindow.

Remarks

(Document/Medical only, persistent property, available at design time) Sets options to improve the display of bitonal bitmaps in the PanWindow. The default is btsNormal.

Setting | Description
btsNormal | Causes bitonal images to be displayed normally when they are scaled.
btsFavorBlack | Enables a bias in preserving black objects when displaying zoomed-out 1-bit images. This can prevent the disappearance of fine lines and details, but it slows down the display.
btsScaleToGray | Enables grayscaling of 1-bit images when they are displayed. This improves the readability of the images when they are zoomed in or zoomed out, but it slows down the display.

See Also

Elements: | OnPanWin event, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PanWinHeight;
Delphi Syntax | PanWinHeight: Integer;
Overview | Refer to Using a PanWindow.

Remarks

(Persistent and available at design time.) Sets the requested height of the PanWindow (the default is 150) or gets the current height of the Pan Window, when the Pan Window is visible. A "get" performed on an invisible window returns the height of the last active PanWindow, or, if a PanWindow has not been created, 150.

Note:

the actual size of the PanWindow will depend on the aspect ratio of the image

See Also

Elements: | PanWinBitonalScaling property, OnPanWin event, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinIcon property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TIcon* PanWinIcon
Delphi Syntax | PanWinIcon: TIcon
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time.) Sets a custom PanWindow icon. This is the icon that will appear in the corner of the Pan Window's title bar if the PanWinSysMenu property is TRUE. This defaults to none, which means Windows will choose the icon.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, OnPanWin event, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinPaintDither property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaintDither PanWinPaintDither
Delphi Syntax | PanWinPaintDither: TPaintDither
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time) Specifies the type of dithering to use when painting an image on a device with 256 colors or less in the PanWindow. The default is pdOrdered.

Ordered dithering is faster than error diffusion, but the quality of the image is not as good.

Setting | Description
pdOrdered | Use ordered dithering.
pdDiffusion | Use error diffusion.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, OnPanWin event, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinPaintPalette property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaletteType PanWinPaintPalette
Delphi Syntax | PanWinPaintPalette: TPaletteType
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time) Specifies whether to force the use of a fixed palette when painting images on a device that displays 256 colors or less in the PanWindow.

Using the fixed palette improves the overall display of multiple images. You can specify either the LEAD fixed palette or the Netscape fixed palette. The Netscape fixed palette is the same palette used by Netscape Navigator and Microsoft Internet Explorer. The default is ppAuto.

Setting | Description
ppAuto | Use the bitmap's own palette if available; otherwise use the LEAD fixed palette.
ppFixed | Always use the LEAD fixed palette.
ppAutoNetscape | Use the bitmap's own palette if available; otherwise use the Netscape fixed palette.
ppFixedNetscape | Always use the Netscape fixed palette.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, OnPanWin event, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinPaintScaling property (Main Control)

Builder Syntax | TPaintScaling PanWinPaintScaling
Delphi Syntax | PanWinPaintScaling: TPaintScaling
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time) Type of resizing to use when painting the PanWindow.

Default is psNormal, which is the fastest. Possible values are:

Value | Meaning
psNormal | normal resize (fastest)
psResample | bilinear interpolation (slower than psNormal, but produces better looking results)
psBicubic | bicubic interpolation (slowest, best quality)

For 1-bit images, the PanWinPaintScaling is considered only if PanWinBitonalScaling is btsNormal. Otherwise, the FavorBlack and ScaleToGray options take precedence over PanWinPaintScaling.

psBicubic produces the same result as psResample when zooming out on an image.

See Also

Elements: | OnPanWin event, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinPointer property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Controls::TCursor PanWinPointer
Delphi Syntax | PanWinPointer: TCursor
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time.) Sets or gets the value that indicates the type of mouse pointer used in the Pan Window. For a list of available cursors, refer to your compiler’s help file.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, OnPanWin event, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinRectColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TColor PanWinRectColor;
Delphi Syntax | PanWinRectColor: TColor;
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time.) Gets or sets the color used to draw the Pan Window's Pan Rect. The default color is RED.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, OnPanWin event, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinSysMenu property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool PanWinSysMenu
Delphi Syntax | PanWinSysMenu:Boolean
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time.) Indicates whether or not to include the system menu on the PanWindow. If PanWinSysMenu is True, the system menu will be included on the PanWindow. If it is False, the menu will not be included. The default is True.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, OnPanWin event, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinTitle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString PanWinTitle
Delphi Syntax | PanWinTitle: String
Overview | Refer to Using a PanWindow.

Remarks

(Persistent property, available at design time.) Gets or sets the string for the title bar of the PanWindow.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, OnPanWin event, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PanWinWidth
Delphi Syntax | PanWinWidth: Integer
Overview | Refer to Using a PanWindow.

Remarks

(Persistent and available at design time.) Sets the requested width of the PanWindow (the default is 150) or gets the current width of the Pan Window, when the Pan Window is visible. A "get" performed on an invisible window returns the width of the last active PanWindow, or, if a PanWindow has not been created, 150.

Note:

the actual size of the PanWindow will depend on the aspect ratio of the image

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, OnPanWin event, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinX property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PanWinX
Delphi Syntax | PanWinX:Integer
Overview | Refer to Using a PanWindow.

Remarks

(Persistent and available at design time.) Get or sets the X coordinate used to locate the PanWindow. The default is 0.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, OnPanWin event, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PanWinY property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PanWinY
Delphi Syntax | PanWinY:Integer
Overview | Refer to Using a PanWindow.

Remarks

(Persistent and available at design time.) Get or sets the Y coordinate used to locate the PanWindow. The default is 0.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, OnPanWin event, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


PatternBackColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor PatternBackColor
Delphi Syntax | PatternBackColor : TColor
Overview | Refer to Gradients and Patterns.

Remarks

(Persistent property, available at design time) Works with related properties to specify a solid color or pattern for use when you implement a transitional paint effect or when you draw a three-dimensional shape.

Related properties work together as follows:

PatternStyle specifies the style, which can be solid, transparent (for three-dimensional shapes only), or any of several line patterns.

PatternBackColor specifies the background color of the pattern.

PatternForeColor property specifies the foreground color of the pattern.

See Also

Topics: | Raster Images: Implementing Special Effects
 | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


PatternForeColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor PatternForeColor
Delphi Syntax | PatternForeColor : TColor
Overview | Refer to Gradients and Patterns.

Remarks

(Persistent property, available at design time) Works with related properties to specify a solid color or pattern for use when you implement a transitional paint effect or when you draw a three-dimensional shape.

Related properties work together as follows:

PatternStyle specifies the style, which can be solid, transparent (for three-dimensional shapes only), or any of several line patterns.

PatternBackColor specifies the background color of the pattern.

PatternForeColor property specifies the foreground color of the pattern.

See Also

Topics: | Raster Images: Implementing Special Effects
 | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


PatternStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPatternStyle PatternStyle
Delphi Syntax | PatternStyle : TPatternStyle
Overview | Refer to Gradients and Patterns.

Remarks

(Persistent property, available at design time) Works with related properties to specify a solid color or pattern for use when you implement a transitional paint effect or when you draw a three-dimensional shape.

Related properties work together as follows:

PatternStyle specifies the style, which can be solid, transparent (for three-dimensional shapes only), or any of several line patterns.

PatternBackColor specifies the background color of the pattern.

PatternForeColor propertyspecifies the foreground color of the pattern.

For a list of possible values, refer to PatternStyles.

See Also

Topics: | Raster Images: Implementing Special Effects
 | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


PCDRes property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PCDRes
Delphi Syntax | PCDRes:Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Sets the resolution to be used for loading or converting a PhotoCD file.

Use the InfoPCDRes property to see which resolutions are available in a PhotoCD file.

Setting | Description
L_PCD_BASE_OVER_64 | [0] 64 x 96
L_PCD_BASE_OVER_16 | [1] 128 x 192
L_PCD_BASE_OVER_4 | [2] 256 x 384
L_PCD_BASE | [3] (Default) 512 x 768
L_PCD_4BASE | [4] 1024 x 1536
L_PCD_16BASE | [5] 2048 x 3072

See Also

Elements: | ReadLoadResolutions method, LoadResolutionCount property, LoadResolutionHeight property, LoadResolutionWidth property, SetLoadResolution method, GetLoadResolution method
Topics: | Raster Images: Loading Files


PDFDisplayDepth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PDFDisplayDepth;
Delphi Syntax | PDFDisplayDepth : integer ;
Overview | Refer to Implementing PDF Plug in Features.

Remarks

(Published property, available at design time) Sets the pixel depth value that LEADTOOLS uses when loading PDF, PS or EPS files.

Value | Meaning
1 | 1 bit per pixel in the resultant bitmap
2 | 4 bits per pixel in the resultant bitmap
3 | 8 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap

The default setting is 24.

See Also

Elements: | PDFXResolution property, PDFYResolution property, PDFTextAlpha property, PDFGraphicsAlpha property, PDFUseLibFonts property, PDFInitDir property
Topics: | Raster Images: Loading Files


PDFEnable128bit property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool PDFEnable128bit
Delphi Syntax | PDFEnable128bit: Boolean
Overview | Refer to Implementing PDF Plug in Features.

Remarks

Gets or sets a flag that specifies the encryption method that will be used. Possible values are:

Value | Meaning
TRUE | Use an RC4 128-bit encryption key.
FALSE | Use an RC4 40-bit encryption key.

See Also

Elements: | PDFUserPassword property, PDFOwnerPassword property, PDFEncryptFlags property, PDFInitDir property
Topics: | Raster Images : Saving Files


PDFEncryptFlags property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned PDFEncryptFlags
Delphi Syntax | PDFEncryptFlags: L_UINT32
Overview | Refer to Implementing PDF Plug in Features.

Remarks

Gets or sets flags that indicate the access rights users of the document will have. These values may be combined using a bitwise OR(|). Possible values are:

Value | Meaning
PDF_SECURITYFLAGS_REV2_PRINTDOCUMENT | Give the user of the PDF document permission to print the document.
PDF_SECURITYFLAGS_REV3_PRINTFAITHFUL | [128 bit only] Give the user of the PDF document permission to print the document in high quality.
PDF_SECURITYFLAGS_REV2_MODIFYDOCUMENT | Give the user of the PDF document permission to edit the document.
PDF_SECURITYFLAGS_REV2_EXTRACTTEXT | Give the user of the PDF document permission to extract text from the document.
PDF_SECURITYFLAGS_REV3_EXTRACTTEXTGRAPHICS | [128 bit only] Give the user of the PDF document permission to extract graphics from the document.
PDF_SECURITYFLAGS_REV2_MODIFYANNOTATION | Give the user of the PDF document permission to edit annotations.
PDF_SECURITYFLAGS_REV3_FILLFORM | Give the user of the PDF document permission to fill in forms in the document.
PDF_SECURITYFLAGS_REV3_ASSEMBLEDOCUMENT | [128 bit only] Give the user of the PDF document permission to add pages to or delete pages from the document.

See Also

Elements: | PDFUserPassword property, PDFEnable128bit property, PDFOwnerPassword property, PDFInitDir property
Topics: | Raster Images : Saving Files


PDFGraphicsAlpha property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PDFGraphicsAlpha;
Delphi Syntax | PDFGraphicsAlpha: integer;
Overview | Refer to Implementing PDF Plug in Features.

Remarks

(Published property, available at design time) Sets the flag that indicates what type of graphics anti-aliasing that LEADTOOLS uses when loading PDF, PS or EPS files.

Value | Meaning
1 | Do not use graphics anti-aliasing.
2 | Use 2-bit graphics anti-aliasing.
4 | Use 4-bit graphics anti-aliasing.

The default setting is 1.

Graphics anti-aliasing slows down the drawing of the resulting bitmap.

Graphics anti-aliasing can only be used if PDFDisplayDepth property is set to 8 or greater.

See Also

Elements: | PDFXResolution property, PDFYResolution property, PDFDisplayDepth property, PDFTextAlpha property, PDFUseLibFonts property, PDFInitDir property
Topics: | Raster Images: Loading Files


PDFInitDir property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | AnsiString PDFInitDir
Delphi Syntax | PDFInitDir: String;
Overview | Refer to Implementing PDF Plug in Features.

Remarks

Gets or sets the path of the PDF Lib, Font and Resource initialization directories.

The default PDF initialization directories path is stored in the system registry key: "HKEY_LOCAL_MACHINE\SOFTWARE\LEAD Technologies, Inc.\Pdf\GS_LIB". If this property is not set, the engine will look for the PDF initialization files in the default PDF initialization directories path (specified by the registry key).

See Also

Elements: | PreLoadFilters method, IgnoreFilters method, PDFXResolution property, PDFYResolution property, PDFTextAlpha property, PDFGraphicsAlpha property, PDFUseLibFonts property, PDFUserPassword property, PDFEnable128bit property, PDFEncryptFlags property, PDFSaveUseDPI property
Topics: | Working with the Control: General Behavior


PDFOwnerPassword property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | AnsiString PDFOwnerPassword
Delphi Syntax | PDFOwnerPassword: String
Overview | Refer to Implementing PDF Plug in Features.

Remarks

Gets or sets a string that contains the owner password. This should be provided to prevent users from changing access/protection settings.

See Also

Elements: | PDFUserPassword property, PDFEnable128bit property, PDFEncryptFlags property, PDFInitDir property
Topics: | Raster Images : Saving Files


PDFSaveUseDPI property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool PDFSaveUseDPI
Delphi Syntax | PDFSaveUseDPI: Boolean
Overview | Refer to Implementing PDF Plug in Features.

Remarks

Indicates whether to use the bitmap's DPI in calculating page dimensions when saving a PDF file. The BitmapXRes property and the BitmapYRes property are updated with the bitmap's DPI when a bitmap is loaded. If this property is TRUE, the values in the BitmapXRes and BitmapYRes properties will be used to calculate the page dimensions when a PDF file is saved.

Possible values are:

Value | Meaning
TRUE | Use the bitmap's DPI in calculating page dimensions when saving a PDF file.
FALSE | Ignore bitmap DPI when saving a PDF file.

The default setting is FALSE.

See Also

Elements: | PDFDisplayDepth property, PDFGraphicsAlpha property, PDFTextAlpha property, PDFUseLibFonts property, PDFXResolution property, PDFYResolution property, PDFInitDir property
Topics: | Raster Images: Saving Files


PDFTextAlpha property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PDFTextAlpha;
Delphi Syntax | PDFTextAlpha: integer;
Overview | Refer to Implementing PDF Plug in Features.

Remarks

(Published property, available at design time) Sets the flag that indicates what type of font anti-aliasing that LEADTOOLS uses when loading PDF, PS or EPS files.

Value | Meaning
1 | Do not use font anti-aliasing.
2 | Use 2-bit font anti-aliasing.
4 | Use 4-bit font anti-aliasing.

The default setting is 4.

Aliasing is the effect on all pixel devices where diagonal and curved lines have a zigzag appearance. As pixels get larger, this effect becomes more noticeable. Anti-aliasing refers to methods designed to decrease or eliminate this effect. Shading the pixels along the borders of the affected lines does this.

Font anti-aliasing slows down the drawing of the resulting bitmap.

Font anti-aliasing can only be used if PDFDisplayDepth property is set to 8 or greater.

See Also

Elements: | PDFXResolution property, PDFYResolution property, PDFDisplayDepth property, PDFGraphicsAlpha property, PDFUseLibFonts property, PDFInitDir property
Topics: | Raster Images: Loading Files


PDFUseLibFonts property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool PDFUseLibFonts;
Delphi Syntax | PDFUseLibFonts: Boolean;
Overview | Refer to Implementing PDF Plug in Features.

Remarks

(Published property, available at design time) Sets the flag that indicates whether to use fonts installed by the PDF module or system fonts when loading PDF, PS or EPS files.

Value | Meaning
TRUE | Use the PDF module installed fonts.
FALSE | Use the system fonts.

The default setting is TRUE.

See Also

Elements: | PDFXResolution property, PDFYResolution property, PDFDisplayDepth property, PDFTextAlpha property, PDFGraphicsAlpha property, PDFInitDir property
Topics: | Raster Images: Loading Files


PDFUserPassword property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | AnsiString PDFUserPassword
Delphi Syntax | PDFUserPassword: String
Overview | Refer to Implementing PDF Plug in Features.

Remarks

Gets or sets a string that contains the user password. This should be provided to protect the document from being opened/read.

See Also

Elements: | PDFOwnerPassword property, PDFEnable128bit property, PDFEncryptFlags property, PDFInitDir property
Topics: | Raster Images : Saving Files


PDFXResolution property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PDFXResolution ;
Delphi Syntax | PDFXResolution : integer ;
Overview | Refer to Implementing PDF Plug in Features.

Remarks

(Published property, available at design time) Sets the horizontal DPI (dots per inch) value that LEADTOOLS uses when loading PDF, PS or EPS files.

The default for this property is 96.

See Also

Elements: | PDFYResolution property, PDFDisplayDepth property, PDFTextAlpha property, PDFGraphicsAlpha property, PDFUseLibFonts property, PDFInitDir property
Topics: | Raster Images: Loading Files


PDFYResolution property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PDFYResolution;
Delphi Syntax | PDFYResolution: integer;
Overview | Refer to Implementing PDF Plug in Features.

Remarks

(Published property, available at design time) Sets the vertical DPI (dots per inch) value that LEADTOOLS uses when loading PDF, PS or EPS files.

The default for this property is 96.

See Also

Elements: | PDFXResolution property, PDFDisplayDepth property , PDFTextAlpha property, PDFGraphicsAlpha property , PDFUseLibFonts property, PDFInitDir property
Topics: | Raster Images: Loading Files


Pixel property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Pixel [int nCol][int nRow];
Delphi Syntax | Pixel [nCol: Integer; nRow: Integer]: TColorRef;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Sets or gets the value of the specified pixel in the current bitmap.

The position is relative to the bitmap in the control. The unit of measure is pixels.

The standard Windows values for COLORREF(OLE_COLOR) represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format $00BBGGRR represents the blue, green, and red color values for the specified pixel, where $BB is the blue value, $GG is the green value and $RR is the red value. If $01000000 is set in the COLORREF value ($010000ZZ), the lower 8 bits ($ZZ) represent an index into the bitmap's palette which holds the color value.You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes As Color Values.

In the Document/Medical toolkits, the COLORREF value may represent a 16 bit grayscale value if the pBitmap is a 12 or 16-bit grayscale. So that the value is not confused with an RGB value, the COLORREF_GRAY16 mask ($04000000) is set. In this case ($0400YYYY), the lower 16 bits ($YYYY) of the COLORREF value represent the 16-bit grayscale value. ($0400FFFF is 16-bit white and $04000000is 16-bit black.) This is not a standard Windows value. Therefore, LEADTOOLS elements will recognize a COLORREF having this format, but Windows elements will not. For information on converting from a 16-bit value, refer to Converting 16-bit Grayscale Values.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Getting Current Information
 | Using Color Values in LEADTOOLS


PLTPenColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | COLORREF PLTPenColor [uIndex: L_UINT];
Delphi Syntax | PLTPenColor [uIndex: L_UINT]: COLORREF;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets an array of colors that represent pen colors used by an HPGL file.

Default values are:

PLTPenColor[0] | RGB( 255, 255, 255 )
PLTPenColor[1] | RGB( 0, 0, 0 )
PLTPenColor[2] | RGB( 255, 0, 0 )
PLTPenColor[3] | RGB( 0, 255, 0 )
PLTPenColor[4] | RGB( 255, 255, 0 )
PLTPenColor[5] | RGB( 0, 0, 255 )
PLTPenColor[6] | RGB( 255, 0, 255 )
PLTPenColor[7] | RGB( 0, 255, 255 )

If this property is not set before loading a PLT file, the default values listed above will be used.

See Also

Elements: | PLTPenWidth property
Topics: | Raster Images: Loading Files
 | Using Color Values in LEADTOOLS


PLTPenWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PLTPenWidth [uIndex: L_UINT];
Delphi Syntax | PLTPenWidth[uIndex: L_UINT]: L_INT;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets an array of integers that represent pen widths used by an HPGL file.

Default values are:

PLTPenWidth[0] | 1
PLTPenWidth[1] | 1
PLTPenWidth[2] | 1
PLTPenWidth[3] | 1
PLTPenWidth[4] | 1
PLTPenWidth[5] | 1
PLTPenWidth[6] | 1
PLTPenWidth[7] | 1

If this property is not set before loading a PLT file, the default values listed above will be used.

See Also

Elements: | PLTPenColor property
Topics: | Raster Images: Loading Files


PolygonPoint property (Main Control)

C++ 4.0 example

Delphi example

Builder Syntax | tagPOINT PolygonPoint [Cardinal uIndex];
Delphi Syntax | PolygonPoint [uIndex: Cardinal]:TPoint;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Specifies the Point of a vertex of a polygonal region.

The position is relative to the LEAD bitmap in memory. The unit of measure is pixels.

To create a polygonal region, you must first build an ordered array of points for the vertices of the polygon; then create the region based on the array. The PolygonSize property specifies the size of the array. You can either specify a large array to start with, or you can increase the size of the array when necessary (without losing the existing points). For each vertex, you update the array by setting the indexed PolygonPoint.

You can then call the SetRgnPolygon method to add the region to the bitmap.

See Also

Topics:

Raster Images: Creating and Using a Region


PolygonSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal PolygonSize
Delphi Syntax | PolygonSize: Cardinal
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Specifies the size of the array used to store the vertices when creating a polygonal region.

To create a polygonal region, you must first build an ordered array of points for the vertices of the polygon; then create the region based on the array. The PolygonSize property specifies the size of the array. You can either specify a large array to start with, or you can increase the size of the array when necessary (without losing the existing points). For each vertex, you update the array by setting the indexed PolygonPoint property.

You can then call the SetRgnPolygon method to add the region to the bitmap.

See Also

Elements: | SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, SetRgnColor method, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


PreferredLoadFormat property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PreferredLoadFormat;
Delphi Syntax | PreferredLoadFormat : Integer;
Overview | Refer to Loading a Bitmap from a File

Remarks

Contains the file format to try first when recognizing files for loading or getting file information, etc. For a list of possible values, refer to Formats of Input Files. For example, if your application is going to work with lots of PNG files, you can set this to FILE_PNG. Then, when a file is loaded, LEADTOOLS will test to see if the file is a PNG first. If it is not, then LEADTOOLS will continue with its normal process for recognizing a file.

Set this property to - 1 for normal behavior.


ProgressivePasses property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ProgressivePasses
Delphi Syntax | ProgressivePasses: Integer
Overview | Refer to Loading a Bitmap from a File.

Remarks

Specifies the number of paint-while-load passes when the file is a progressive LEAD or JPEG file.

This property is also valid when reading (but not when writing) interlaced PNG files.

When the PaintWhileLoad property is TRUE, the full dimensions of the image can paint quickly on the first pass. Then, the image becomes progressively clearer on subsequent passes.

You can set this property before saving a LEAD or JPEG file to specify the possible number of passes. You can set it before loading a progressive LEAD or JPEG file (or an interlaced PNG file) to determine how many passes are actually used.

Technically, only files with more than three passes are progressive files. They include full color in the low-resolution first pass; subsequent passes improve the resolution. Files that contain two or three passes are multiscan files. They include grayscale information in the first pass, and color information in the subsequent pass or passes.

Setting | Description
0 | (When saving) Save as an ordinary CMP or JPEG file, not a progressive file.
Any positive number | (When saving or loading) Use the specified number of passes.
PROGRESSIVEPASSES_WHEN_MEANINGFUL | (Only when loading) Stop painting when full clarity is achieved.
PROGRESSIVEPASSES_ALWAYS | (Only when loading) Use the number of passes specified in the file being loaded.
PROGRESSIVEPASSES_ONCE | (Only when loading) Paint once with full clarity.

For more information on progressive loading of JBIG files, refer to Implementing JBIG Features.

See Also

Topics: | Raster Images: Loading Files
 | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information


PTKResolution property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PTKResolution;
Delphi Syntax | PTKResolution: Integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets the display resolution that LEADTOOLS uses when loading PTOCA and AFP: PTOCA files.

The default for this property is 96.

See Also

Elements: | PDFYResolution property, PDFDisplayDepth property, PDFTextAlpha property, PDFGraphicsAlpha property, PDFUseLibFonts property, PLTPenWidth property, PLTPenColor property, RTFTopMarg property, RTFBottomMarg property, RTFRightMarg property, RTFLeftMarg property, RTFPaperWidth property, RTFPaperHeight property
Topics: | Raster Images: Loading Files


RasterizeViewMode property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RasterizeViewMode;
Delphi Syntax | RasterizeViewMode: integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Published property, available at design time) Sets the viewport mode value that LEADTOOLS uses when loading the following Vector file formats: DXF, DWG, WMF, EMF, PCT, CGM, DRW, PLT, TIF (with a DXF saved internally) and Intergraph Vector.

Value | Meaning
L2D_USE_BEST | Fit the drawing into current viewport width and height. Final image size is less than or equal to viewport size.
L2D_USE_WIDTH | Use the current viewport width. Calculate new height, preserving the aspect ratio. Final image size has the same width as the current viewport width, with the height less than or equal to the current viewport height.
L2D_USE_HEIGHT | Use the current viewport height. Calculate the new width, preserving the aspect ratio. Final image size has the same height as the current viewport height, with the width less than or equal to the current viewport width.
L2D_USE_WIDTH_HEIGHT | Use both the width and the height (stretch image if necessary). Final image size has the same width and height as the current viewport size.

See Also

Elements: | RasterizeViewportWidth property, RasterizeViewportHeight property
Topics: | Raster Images: Loading Files


RasterizeViewportHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RasterizeViewportHeight;
Delphi Syntax | RasterizeViewportHeight: integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Published property, available at design time) Sets the viewport height value that LEADTOOLS uses when loading the following Vector file formats: DXF, DWG, WMF, EMF, PCT, CGM, DRW, PLT, TIF (with a DXF saved internally) and Intergraph Vector.

A 3D file format usually doesn't have a physical size. The user can specify a viewport (physical size upto which the drawing can be rendered) by using RasterizeViewportHeight and RasterizeViewportWidth. How the drawing is to be rendered inside this viewport depends on the current viewport mode set with RasterizeViewMode.

The default for this property is 480.

See Also

Elements: | RasterizeViewportWidth property, RasterizeViewMode property
Topics: | Raster Images: Loading Files


RasterizeViewportWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RasterizeViewportWidth;
Delphi Syntax | RasterizeViewportWidth: integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

(Published property, available at design time) Sets the viewport width value that LEADTOOLS uses when loading the following Vector file formats: DXF, DWG, WMF, EMF, PCT, CGM, DRW, PLT, TIF (with a DXF saved internally) and Intergraph Vector.

A 3D file format usually doesn't have a physical size. The user can specify a viewport (physical size upto which the drawing can be rendered) by using RasterizeViewportWidth and RasterizeViewportHeight. How the drawing is to be rendered inside this viewport depends on the current viewport mode set with RasterizeViewMode.

The default for this property is 640.

See Also

Elements: | RasterizeViewportHeight property, RasterizeViewMode property
Topics: | Raster Images: Loading Files


ReadyState property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TReadyState ReadyState
Delphi Syntax | ReadyState: TReadyState
Overview | Refer to Implementing Internet Features.

Remarks

Indicates the current state of an image that is loaded asynchronously using the BitmapDataPath property.

Value | Description
rsLoading | Currently loading
rsComplete | Finished loading

See Also

Elements: | BitmapDataPath property, OnReadyStateChanged event
Topics: | Raster Images: Loading Files


RefBitmap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool RefBitmap
Delphi Syntax | RefBitmap: Boolean
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

Indicates whether an assignment to the Bitmap property should do a copy or simply reference the source control's Bitmap property.

This is used mainly to communicate between the Main control. When this property is TRUE, any assignments to the Main Control's Bitmap property will cause the Main Control to reference the source control's Bitmap, instead of making a copy. This can be used to reduce memory load when dealing with large images.

When this property is FALSE, an assignment to the Main Control's Bitmap proprety will create a copy of the source control's Bitmap in memory.

Note:

When this property is set to True, any assignment to the Main Control's Bitmap property will invalidate the bitmap in the source control. If the source control is a Main Control, its ForceRepaint method should be called.

You should set this property back to False after making an assignment if you do not always wish to make references. For example:

LEAD1.RefBitmap = True
LEAD1.Bitmap = Lead2.Bitmap
Lead2.ForceRepaint;
LEAD1.RefBitmap = False

See Also

Elements:

Main Bitmap property


RemapHueTablesSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_UINT RemapHueTablesSize
Delphi Syntax | RemapHueTablesSize: L_UINT
Overview | Refer to Changing Brightness and Contrast.

Remarks

Gets or sets the number of entries in the MaskTable, HTable, STable, and VTable properties.

The value that must be set for this property depends on the color resolution (bits per pixel) of the image, as follows:

BPP | Table Size
16-bit image | 65536
12-bit image | 4096
8-bit image | 256

Note that you have to set this property to one of the above values before using MaskTable, HTable, STable, and VTable properties.

See Also

Elements: | RemapHue method, MaskTable property, HTable property, STable property, VTable property, HSV_HfromRGB method, HSV_SfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Modifying Intensity Values


RemapTable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned RemapTable [int n];
Delphi Syntax | RemapTable [n:Integer]: Word;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Is the lookup table that the RemapIntensity method uses to change the bitmap's intensity values.

Intensity levels range from 0 to the value of RemapTableSize property - 1. The current intensity values correspond to the table indexes. The values of the entries are the new values to be applied.

See Also

Elements: | RemapIntensity method, RemapTableSize property
Topics: | Raster Images: Modifying Intensity Values


RemapTableSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RemapTableSize
Delphi Syntax | RemapTableSize: Integer
Overview | Refer to Changing Brightness and Contrast.

Remarks

Specifies the number of entries in the RemapTable property.

This value that must be set for this property depends on the color resolution (bits per pixel) of the image, as follows:

BPP | Table Size
Color 64, 48 or grayscale 16 | 65536
Grayscale 12 | 4096
Any other value | 256

See Also

Elements: | RemapIntensity method, RemapTable property
Topics: | Raster Images: Modifying Intensity Values


RenderCenter property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool RenderCenter
Delphi Syntax | RenderCenter: Boolean
Overview | Refer to Printing an Image.

Remarks

Boolean value that indicates whether to center the image. An image can be centered vertically, horizontally, or both, depending on the values of the RenderCenter property and the iTop and iLeft parameters passed to the Render method. Possible values are:

Setting | Description
TRUE | Center the image horizontally and/or vertically, depending on the values of the iTop and iLeft parameters of the Render method. This is the default value.
FALSE | Do not center the image horizontally and/or vertically, regardless of the values of the iTop and iLeft parameters of the Render method.

If the RenderCenter property is set to TRUE, and the iTop parameter of the Render method is 0, the image will be centered vertically.

If the RenderCenter property is set to TRUE, and the iLeft parameter of the Render method is 0, the image will be centered horizontally.

If the RenderCenter property is set to TRUE, and both the iTop and iLeft parameters of the Render method are 0, the image will be centered vertically and horizontally.

If the RenderCenter property is FALSE, the image will not be centered.

See Also

Elements: | Render method
Topics: | Raster Images: Printing Images


RgnFrameColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor RgnFrameColor;
Delphi Syntax | RgnFrameColor : TColor;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Color used to highlight a reigion by displaying a filled color representation of the region. This property is only valid when the RgnFrameType property is set to ftColor.

This color will be XORed with colors within a region to determine the new colors for displaying the region. The color corresponding to a particular part of the region is determined as follows:

Region Color Displayed = (color of pixel in region) XOR (crRgnColor)

This is particularly useful when displaying regions with black and white images. All black pixels in a region are displayed with color RgnFrameColor, and all white pixels are displayed ~(RgnFrameColor). For example, suppose that RgnFrameColor is light green (BGR 0x80FF40). All black pixels in the region are displayed as RgnFrameColor. All white pixels in the region are displayed as 0xFFFFFF XOR 0x80FF40 = 0x7F00BF, which is purple.

See Also

Elements: | RgnFrameType property
Topics: | Raster Images: Creating and Using a Region


RgnFrameType property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TRgnFrameType RgnFrameType
Delphi Syntax | RgnFrameType: TRgnFrameType
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Displays or hides an outline of the current region.

Value | Meaning
ftNone | Hide the frame.
ftStatic | Display a static frame. The frame, itself, is inside the region.
ftAnimated | Display an animated frame. The frame, itself, is inside the region.

See Also

Elements: | RgnMarkingMode property, OnRgnChange event
Topics: | Raster Images: Creating and Using a Region


RgnHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RgnHeight
Delphi Syntax | RgnHeight: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

(Read only) The height of the bounding rectangle of the bitmap region.

The size is unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | HasRgn property, IsPtInRgn method, GetRgnArea method, RgnLeft property, RgnTop property, RgnWidth property
Topics: | Raster Images: Creating and Using a Region


RgnLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RgnLeft
Delphi Syntax | RgnLeft: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The X coordinate of the origin of the bounding rectangle of the bitmap region.

The position is unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | HasRgn property, IsPtInRgn method, GetRgnArea method, RgnHeight property, RgnTop property, RgnWidth property
Topics: | Raster Images: Creating and Using a Region


RgnMarkingMode property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TRgnMarkingMode RgnMarkingMode
Delphi Syntax | RgnMarkingMode: TRgnMarkingMode
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Enables automatic creation of a bitmap region, based on MouseDown, MouseMove, and MouseUp events.

This method supports creation of a rectangle, rounded rectangle, ellipse, or freehand region. It automatically handles scaling differences between the displayed image and the bitmap. On the MouseDown event, it begins outlining where the region will appear on the screen. It updates the outline on each MouseMove event. Then, on the MouseUp event, it deletes the displayed outline and creates the bitmap region. To make an outline of the region visible at that point, you must set the RgnFrameType property.

Value | Meaning
mmNone | Disable automatic creation of a bitmap region.
mmRectangle | Enable creation of a rectangular region.
mmRoundRect | Enable creation of a rounded rectangular region.
mmEllipse | Enable creation of an elliptical region.
mmFreehand | Enable creation of a freehand region, which is actually a polygonal region, with one vertex for each MouseMove event.

See Also

Elements: | OnRgnChange event, RgnFrameType property
Topics: | Raster Images: Creating and Using a Region


RgnTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RgnTop
Delphi Syntax | RgnTop: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

The Y coordinate of the origin of the bounding rectangle of the bitmap region.

The position is unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | HasRgn property, IsPtInRgn method, GetRgnArea method, RgnHeight property, RgnLeft property, RgnWidth property
Topics: | Raster Images: Creating and Using a Region


RgnWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RgnWidth
Delphi Syntax | RgnWidth: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

(Read only) The width of the bounding rectangle of the bitmap region.

The size is unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | HasRgn property, IsPtInRgn method, GetRgnArea method, RgnHeight property, RgnLeft property, RgnTop property
Topics: | Raster Images: Creating and Using a Region


RTFBottomMarg property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_DOUBLE RTFBottomMarg;
Delphi Syntax | RTFBottomMarg: L_DOUBLE;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets a value that represents the width of the bottom margin used when loading RTF files in LEADTOOLS.

Default value is 1 inch.

See Also

Elements: | RTFRightMarg property, RTFTopMarg property, RTFLeftMarg property, RTFPaperWidth property, RTFPaperHeight property
Topics: | Raster Images: Loading Files


RTFLeftMarg property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_DOUBLE RTFLeftMarg;
Delphi Syntax | RTFLeftMarg: L_DOUBLE;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets a value that represents the width of the left margin used when loading RTF files in LEADTOOLS.

Default value is 1.25 inch.

See Also

Elements: | RTFRightMarg property, RTFTopMarg property, RTFBottomMarg property, RTFPaperWidth property, RTFPaperHeight property
Topics: | Raster Images: Loading Files


RTFPaperHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_DOUBLE RTFPaperHeight;
Delphi Syntax | RTFPaperHeight: L_DOUBLE;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets a value that represents the height of the paper used when loading RTF files in LEADTOOLS.

Default value is 11.69 inches.

See Also

Elements: | RTFRightMarg property, RTFTopMarg property, RTFBottomMarg property, RTFLeftMarg property, RTFPaperWidth property
Topics: | Raster Images: Loading Files


RTFPaperWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_DOUBLE RTFPaperWidth;
Delphi Syntax | RTFPaperWidth: L_DOUBLE;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets a value that represents the width of the paper used when loading RTF files in LEADTOOLS.

Default value is 8.27 inches.

See Also

Elements: | RTFRightMarg property, RTFTopMarg property, RTFBottomMarg property, RTFLeftMarg property, RTFPaperHeight property
Topics: | Raster Images: Loading Files


RTFRightMarg property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_DOUBLE RTFRightMarg;
Delphi Syntax | RTFRightMarg: L_DOUBLE;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets a value that represents the width of the right margin used when loading RTF files in LEADTOOLS.

Default value is 1.25 inch.

See Also

Elements: | RTFBottomMarg property, RTFTopMarg property, RTFLeftMarg property, RTFPaperWidth property, RTFPaperHeight property
Topics: | Raster Images: Loading Files


RTFTopMarg property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_DOUBLE RTFTopMarg;
Delphi Syntax | RTFTopMarg: L_DOUBLE;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets a value that represents the width of the top margin used when loading RTF files in LEADTOOLS.

Default value is 1 inch.

See Also

Elements: | RTFBottomMarg property, RTFRightMarg property, RTFLeftMarg property, RTFPaperWidth property, RTFPaperHeight property
Topics: | Raster Images: Loading Files


RubberBandHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RubberBandHeight
Delphi Syntax | RubberBandHeight: Integer
Overview | Refer to Marking a Selection with a Rubberband

Remarks

Sets or gets the current height of the rubberband, which is a one-pixel outline of a rectangle on the display surface.

You can also use the SetRubberBandRect method to change the rectangle. Use the RubberbandVisible property to turn the rubberband on or off.

See Also

Elements: | RubberBandLeft property, RubberBandTop property, RubberBandVisible property, RubberBandWidth property, SetRubberBandRect method
Topics: | Working with the Control: Client Area Usage


RubberBandLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RubberBandLeft
Delphi Syntax | RubberBandLeft:Integer
Overview | Refer to Marking a Selection with a Rubberband

Remarks

Sets or gets the current X coordinate of the origin of the rubberband, which is a one-pixel outline of a rectangle on the display surface.

You can also use the SetRubberBandRect method to change the rectangle. Use the RubberbandVisible property to turn the rubberband on or off.

See Also

Elements: | RubberBandHeight property, RubberBandTop property, RubberBandVisible property, RubberBandWidth property, SetRubberBandRect method
Topics: | Working with the Control: Client Area Usage


RubberBandTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RubberBandTop
Delphi Syntax | RubberBandTop:Integer
Overview | Refer to Marking a Selection with a Rubberband

Remarks

Sets or gets the current Y coordinate of the origin of the rubberband, which is a one-pixel outline of a rectangle on the display surface.

You can also use the SetRubberBandRect method to change the rectangle. Use the RubberbandVisible property to turn the rubberband on or off.

See Also

Elements: | RubberBandHeight property, RubberBandLeft property, RubberBandVisible property, RubberBandWidth property, SetRubberBandRect method
Topics: | Working with the Control: Client Area Usage


RubberBandVisible property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool RubberBandVisible
Delphi Syntax | RubberBandVisible: Boolean
Overview | Refer to Marking a Selection with a Rubberband

Remarks

Controls the visibility of the rubberband, which is a one-pixel outline of a rectangle on the display surface.

Typically, you would use this method to display an area that the user selects with a mouse. This method works with the following method and properties:

The SetRubberBandRect method sets the size and position of the rectangle.

The RubberbandHeight property is the current height.

The RubberbandLeft property is the current X coordinate of the origin of the rubberband.

The RubberbandTop property is the current Y coordinate of the origin of the rubberband..

The RubberbandWidth property is the current width.

Setting | Description
TRUE | Makes the rubberband visible (turning it on).
FALSE | Makes the rubberband invisible (turning it off).

See Also

Elements: | RubberBandHeight property, RubberBandLeft property, RubberBandTop property, RubberBandWidth property, SetRubberBandRect method
Topics: | Working with the Control: Client Area Usage


RubberBandWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RubberBandWidth
Delphi Syntax | RubberBandWidth:Integer
Overview | Refer to Marking a Selection with a Rubberband

Remarks

Sets or gets the current width of the rubberband, which is a one-pixel outline of a rectangle on the display surface.

You can also use the SetRubberBandRect method to change the rectangle. Use the RubberbandVisible property to turn the rubberband on or off.

See Also

Elements: | RubberBandHeight property, RubberBandLeft property, RubberBandTop property, RubberBandVisible property, SetRubberBandRect method
Topics: | Working with the Control: Client Area Usage


SaveIFD property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SaveIFD;
Delphi Syntax | SaveIFD : LongInt;
Overview | Refer to Loading and Saving Large TIFF Files.

Remarks

Specifies the offset within the current file of the reference page used when saving a page in a TIFF file. If this property is 0, then page 1 is the first page in the file. If this property is not 0, then page 1 is the page that starts at the offset.

The SaveIFD property can be used to speed up the process of appending, replacing or deleting a page inside a TIFF file with many pages.

The page starting at the offset given by this property is treated as page 1. The next page can be replaced by setting the SavePage property to 2 and calling the Save method. To delete the page after the one indicated by SaveIFD, call DeletePage("test.tif", 2).

Due to the organization of TIFF files, SaveIFD can be used to speed up the replacement, deletion and insertion of pages after the offset indicated by SaveIFD. However, to delete the page indicated by SaveIFD, by calling DeletePage("test.tif", 1), LEADTOOLS will have to go through all the pages from the beginning of the file, to get to the page to delete. Consequently, there will be no speed improvement in this situation.

When the current TIF file is no longer needed, this property must be reset to 0, otherwise the processing of any other TIF files will be incorrect.

See Also

Elements: | InfoIFD property, LoadIFD property, DeletePage method
Topics: | Raster Images: Loading and Saving Large TIFF Files


SaveInterlaced property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool SaveInterlaced
Delphi Syntax | SaveInterlaced : Boolean
Overview | Refer to Saving a Bitmap to a File.

Remarks

Determines whether GIF files are saved as interlaced files.

Value | Meaning
TRUE | Whenever a GIF file is saved, make it an interlaced file.
FALSE | Whenever a GIF file is saved, make it non-interlaced.

See Also

Topics:

Raster Images: Saving Files


SaveLayers property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool SaveLayers
Delphi Syntax | SaveLayers: Boolean
Overview | Refer to Layers in Files

Remarks

Indicates whether PSD files are saved with or without layers. Possible values are:

Value | Meaning
TRUE | When a PSD file is saved, all the bitmaps in the list are saved as layers. The LayerLeft and LayerTop properties contain positioning information for each layer.
FALSE | PSD files are saved without layers. The layer information is ignored.

See Also

Elements: | Save method, SaveLayers property, LayerLeft property, LayerTop property
Topics: | Raster Images: Saving Files


SaveLSB property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool SaveLSB
Delphi Syntax | SaveLSB : Boolean
Overview | Refer to Saving a Bitmap to a File.

Remarks

Indicates whether to save TIFF 1-bit images or RAW uncompressed data least significant bit first or most significant bit first. Possible values are:

Value | Meaning
TRUE | Save TIFF 1-bit or RAW uncompressed images least significant bit first.
FALSE | Save TIFF 1-bit or RAW uncompressed images most significant bit first.

When saving RAW uncompressed data, the bits in each byte can be reversed by setting this property to TRUE.

Saving TIFF 1-bit images least significant bit first is used only when saving uncompressed and fax compressed images.

The default is FALSE (most significant bit first).

To save Class F compatible images, it is recommended that you save files with SaveLSB set to true. In addition, the image’s BitmapXRes should be 204, 300 or 400, and the BitmapYRes should be 98, 196, 300 or 400.

See Also

Elements: | BitmapXRes property, BitmapYRes property, Save method
Topics: | Raster Images: Saving Files


SavePad4 property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool SavePad4
Delphi Syntax | SavePad4: Boolean
Overview | Refer to Saving a Bitmap to a File

Remarks

Indicates whether to save RAW uncompressed data with each line padded so that the length is a multiple of 4 bytes. Possible values are:

Value | Meaning
TRUE | Save RAW uncompressed images with each line padded to a multiple of four bytes.
FALSE | Save RAW uncompressed images with no padding at the end of each line.

When saving RAW uncompressed data, each row of data can be saved as is, or padded so that the byte-length is a multiple of four (4).

See Also

Elements: | SaveOffset method, FileSizeWritten property, SaveTileHeight property, SaveTileWidth property
Topics: | Raster Images: Saving Files


SavePage property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SavePage
Delphi Syntax | SavePage : Integer
Overview | Refer to Saving a Bitmap to a File.

Remarks

Represents a page number in a multipage file. This property is used only if the iModify parameter of the Save method is SAVE_REPLACE or SAVE_INSERT. If iModify is SAVE_REPLACE, SavePage represents the number of the page to replace (the first page is page 1). If iModify is SAVE_INSERT, SavePage represents the number of the page in front of which the new page will be inserted. For example, if SavePage is 1 and iModify is SAVE_INSERT, then the page you save will become the first page in the file.

See Also

Topics: | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information


SavePageNumberTag property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool SavePageNumberTag
Delphi Syntax | SavePageNumberTag : Boolean
Overview | Refer to Saving a Bitmap to a File.

Remarks

Indicates whether or not to update and save the PageNumber tag associated with the pages of a multi-page TIFF file. Possible values are:

Value | Meaning
TRUE | Update and save the PageNumber tag associated with each page of a TIFF file.
FALSE | Do not update and save the PageNumber tag associated with each page of a TIFF file.

By default, this property is true. Therefore, whenever TIFF files are saved, or pages are deleted from a TIFF file, the PageNumber tag for each page is updated and saved. For files having many pages, this may be time consuming.

Note:

This property must be set to true in order to save Class-F compatible TIFF files.

See Also

Topics: | Raster Images: Saving Files
 | Raster Images: Getting and Setting File Information


SaveResolutionCount property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal SaveResolutionCount
Delphi Syntax | SaveResolutionCount : Cardinal
Overview | Refer to Implementing JBIG Features

Remarks

Specifies the number of resolutions to write.

When you set this property, you should also fill the SaveResolutionWidth and SaveResolutionHeight array properties with the desired resolutions to save. The arrays should be filled from SaveResolutionWidth[0] to SaveResolutionWidth[SaveResolutionCount-1] and SaveResolutionHeight[0] to SaveResolutionHeight[SaveResolutionCount-1].

Currently, only the JBIG format uses these properties.

Note that for a JBIG save, only the first resolution is used. Each subsequent dimension up to SaveResolutionCount will actually be calculated as 1/2 the previous dimension.

Ex.

SaveResolutionCount = 3
SaveResolutionWidth(0) = 800
SaveResolutionWidth(0) = 400

If you then save an image that is 1600 x 800, the resolutions that are stored in the file would be:

800 x 400
400 x 200
200 x 100

By default, the control will save images using the default of the file format. For JBIG only one resolution which has the size of the bitmap being saved will be saved.

See Also

Elements:

Save method, SaveResolutionWidth property, SaveResolutionHeight property, LoadResolutionCount property, LoadResolutionHeight property, LoadResolutionWidth property, PCDRes property, SetLoadResolution method, GetLoadResolution method


SaveResolutionHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal SaveResolutionHeight[Cardinal uIndex]
Delphi Syntax | SaveResolutionHeight[Cardinal uIndex]: Cardinal
Overview | Refer to Implementing JBIG Features

Remarks

Specifies the height component of the resolution to write.

The range of uIndex is 0 to SaveResolutionCount-1.

Currently, only the JBIG format uses these properties.

Note that for a JBIG save, only the first resolution is used. Each subsequent dimension up to SaveResolutionCount will actually be calculated as 1/2 the previous dimension. You can set this to 0 to use the default or, you can set this to 0 and set a value for the height component, and the width component will be automatically calculated for you base on the aspect ratio of the image being saved.

Ex.

SaveResolutionCount = 3
SaveResolutionWidth(0) = 800
SaveResolutionWidth(0) = 400

If you then save an image that is 1600 x 800, the resolutions that are stored in the file would be:

800 x 400
400 x 200
200 x 100

By default, the control will save images using the default of the file format. For JBIG only one resolution which has the size of the bitmap being saved will be saved.

See Also

Elements:

Save method, SaveResolutionCount property, SaveResolutionWidth property, LoadResolutionCount property, LoadResolutionHeight property, LoadResolutionWidth property, PCDRes property, SetLoadResolution method, GetLoadResolution method


SaveResolutionWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal SaveResolutionWidth[Cardinal uIndex]
Delphi Syntax | SaveResolutionWidth[uIndex: Cardinal]: Cardinal
Overview | Refer to Implementing JBIG Features

Remarks

Specifies the width component of the resolution to write.

The range of uIndex is 0 to SaveResolutionCount-1.

Currently, only the JBIG format uses these properties.

Note that for a JBIG save, only the first resolution is used. Each subsequent dimension up to SaveResolutionCount will actually be calculated as 1/2 the previous dimension. You can set this to 0 to use the default or, you can set this to 0 and set a value for the height component, and the width component will be automatically calculated for you base on the aspect ratio of the image being saved.

Ex.

SaveResolutionCount = 3
SaveResolutionWidth(0) = 800
SaveResolutionWidth(0) = 400

If you then save an image that is 1600 x 800, the resolutions that are stored in the file would be:

800 x 400
400 x 200
200 x 100

By default, the control will save images using the default of the file format. For JBIG only one resolution which has the size of the bitmap being saved will be saved.

See Also

Elements:

Save method, SaveResolutionCount property, SaveResolutionHeight property, LoadResolutionCount property, LoadResolutionHeight property, LoadResolutionWidth property, PCDRes property, SetLoadResolution method, GetLoadResolution method


SaveTileHeight property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | unsigned SaveTileHeight
Delphi Syntax | SaveTileHeight: Cardinal
Overview | Refer to Saving a Bitmap to a File

Remarks

This property indicates the strip height or tile height to use when saving TIF files.

If this property is 0, the default height is used when saving TIF files.

The SaveTileWidth property determines whether the bitmap will be saved in strips or tiles.

See Also

Elements: | Save method, SaveTileWidth property
Topics: | Raster Images: Saving Files


ShadowColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ShadowColor
Delphi Syntax | ShadowColor: TColor
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the color of a drop shadow that is applied to a three-dimensional shape or text object.

To have no drop shadow, set the ShadowXDepth and ShadowYDepth properties to 0.

For text objects, drop shadows are available only for the following TextStyle values:

etsDropShadow
etsBlockShadow
etsOutLineBlock

For text objects, the shadow color is used for three-dimensional effects in the following TextStyle styles:

etsInsetHeavy
etsInsetExtraHeavy
etsRaisedHeavy
etsRaisedExtraHeavy

See Also

Elements: | DrawShape method, DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShadowXDepth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShadowXDepth
Delphi Syntax | ShadowXDepth: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the X offset of a drop shadow that is applied to a three-dimensional shape or text object.

To have no drop shadow, set the ShadowXDepth and ShadowYDepth properties to 0.

Whether you draw to the screen or to the bitmap, drawing objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

For text objects, drop shadows are available only for the following TextStyle values:

etsDropShadow
etsBlockShadow
etsOutLineBlock

See Also

Elements: | DrawShape method, DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShadowYDepth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShadowYDepth
Delphi Syntax | ShadowYDepth: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the X offset of a drop shadow that is applied to a three-dimensional shape or text object.

To have no drop shadow, set the ShadowXDepth and ShadowYDepth properties to 0.

Whether you draw to the screen or to the bitmap, drawing objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

For text objects, drop shadows are available only for the following TextStyle values:

etsDropShadow
etsBlockShadow
etsOutLineBlock

See Also

Elements: | DrawShape method, DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeBackgroundStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TShapeBackStyle ShapeBackgroundStyle
Delphi Syntax | ShapeBackgroundStyle: TShapeBackStyle
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the background style of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

For a list of possible values, refer to BackStyle.

For styles that require an image you must specify a LEAD bitmap in a parameter of the DrawShape method. To use a background image, the PatternStyle property must not be epsSolid.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeBorderColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ShapeBorderColor
Delphi Syntax | ShapeBorderColor: TColor
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the line (border) color of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeBorderStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TShapeBorderStyle ShapeBorderStyle
Delphi Syntax | ShapeBorderStyle: TShapeBorderStyle
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the line (border) style of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

For a list of possible values, refer to BorderStyles.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeBorderThickness property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal ShapeBorderThickness
Delphi Syntax | ShapeBorderThickness: Cardinal
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the line (border) thickness of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

The unit of measure is pixels. and it is relative to the Main Control's client area. If the target is the bitmap, LEADTOOLS scales the value if necessary. If the scaled value equates to less than half a pixel, it is rounded to 0.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShapeHeight
Delphi Syntax | ShapeHeight: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the height of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

Whether you draw to the screen or to the bitmap, shapes are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates. The unit of measure is pixels.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeInnerBandHiliteColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ShapeInnerBandHiliteColor
Delphi Syntax | ShapeInnerBandHiliteColor: TColor
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the inner-band highlight color of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeInnerBandShadowColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ShapeInnerBandShadowColor
Delphi Syntax | ShapeInnerBandShadowColor: TColor
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the inner-band shadow color of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeInnerBandStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TShapeInnerBandStyle ShapeInnerBandStyle
Delphi Syntax | ShapeInnerBandStyle: TShapeInnerBandStyle
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the inner-band style of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

For a list of possible values, refer to ShapeInnerStyles.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeInnerBandThickness property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal ShapeInnerBandThickness
Delphi Syntax | ShapeInnerBandThickness: Cardinal
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the inner-band thickness of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

The unit of measure is pixels. and it is relative to the Main Control's client area. If the target is the bitmap, LEADTOOLS scales the value if necessary. If the scaled value equates to less than half a pixel, it is rounded to 0.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShapeLeft
Delphi Syntax | ShapeLeft: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the X coordinate of the origin of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

Whether you draw to the screen or to the bitmap, shapes are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates. The unit of measure is pixels.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeOuterBandHiliteColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ShapeOuterBandHiliteColor
Delphi Syntax | ShapeOuterBandHiliteColor: TColor
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the outer-band highlight color of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeOuterBandShadowColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ShapeOuterBandShadowColor
Delphi Syntax | ShapeOuterBandShadowColor: TColor
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the outer-band shadow color of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeOuterBandStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TShapeOuterBandStyle ShapeOuterBandStyle
Delphi Syntax | ShapeOuterBandStyle: TShapeOuterBandStyle
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the outer-band style of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

For a list of possible values, refer to ShapeOuterStyle.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeOuterBandThickness property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal ShapeOuterBandThickness
Delphi Syntax | ShapeOuterBandThickness: Cardinal
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the outer-band thickness of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

The unit of measure is pixels. and it is relative to the Main Control's client area. If the target is the bitmap, LEADTOOLS scales the value if necessary. If the scaled value equates to less than half a pixel, it is rounded to 0.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShapeTop
Delphi Syntax | ShapeTop: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the Y coordinate of the origin of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

(Persistent property, available at design time) Whether you draw to the screen or to the bitmap, shapes are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates. The unit of measure is pixels.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


ShapeWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShapeWidth
Delphi Syntax | ShapeWidth: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the width of a three-dimensional shape that you draw with the DrawShape method. The size, position, and other aspects of the shape are determined by a number of properties, as explained in Drawing Three-Dimensional Shapes and Text.

Whether you draw to the screen or to the bitmap, shapes are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates. The unit of measure is pixels.

See Also

Elements: | DrawShape method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


SrcClipHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcClipHeight
Delphi Syntax | SrcClipHeight:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the height of the source clipping rectangle to use when painting.

The initial value is the height of the bitmap. You can set this property or use the SetSrcClipRect method to change the value.

The clipping rectangle specifies the portion of the source rectangle to paint. Generally, this rectangle is used for updating the display when part of the source bitmap has changed. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcClipLeft property, SrcClipTop property, SrcClipWidth property
Topics: | Raster Images: Displaying Images


SrcClipLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcClipLeft
Delphi Syntax | SrcClipLeft:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the X coordinate of the origin of the source clipping rectangle to use when painting.

The initial value is 0. You can set this property or use the SetSrcClipRect method to change the value.

The clipping rectangle specifies the portion of the source rectangle to paint. Generally, this rectangle is used for updating the display when part of the source bitmap has changed. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcClipHeight property, SrcClipTop property, SrcClipWidth property
Topics: | Raster Images: Displaying Images


SrcClipTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcClipTop
Delphi Syntax | SrcClipTop:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the Y coordinate of the origin of the source clipping rectangle to use when painting.

The initial value is 0. You can set this property or use the SetSrcClipRect method to change the value.

The clipping rectangle specifies the portion of the source rectangle to paint. Generally, this rectangle is used for updating the display when part of the source bitmap has changed. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcClipHeight property, SrcClipLeft property, SrcClipWidth property
Topics: | Raster Images: Displaying Images


SrcClipWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcClipWidth
Delphi Syntax | SrcClipWidth:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the width of the source clipping rectangle to use when painting.

The initial value is the width of the bitmap. You can set this property or use the SetSrcClipRect method to change the value.

The clipping rectangle specifies the portion of the source rectangle to paint. Generally, this rectangle is used for updating the display when part of the source bitmap has changed. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcClipHeight property, SrcClipLeft property, SrcClipTop property
Topics: | Raster Images: Displaying Images


SrcHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcHeight
Delphi Syntax | SrcHeight:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the height of the source rectangle to use when painting.

The initial value is the height of the bitmap. You can set this property or use the SetSrcRect method to change the value.

The source rectangle specifies the portion of the bitmap to paint. Generally, this rectangle is used with the destination rectangle to scale the display. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcLeft property, SrcTop property, SrcWidth property
Topics: | Raster Images: Displaying Images


SrcLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcLeft
Delphi Syntax | SrcLeft:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the X coordinate of the origin of the source rectangle to use when painting.

The initial value is 0. You can set this property or use the SetSrcRect method to change the value.

The source rectangle specifies the portion of the bitmap to paint. Generally, this rectangle is used with the destination rectangle to scale the display. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcHeight property, SrcTop property, SrcWidth property
Topics: | Raster Images: Displaying Images


SrcTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcTop
Delphi Syntax | SrcTop:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the Y coordinate of the origin of the source rectangle to use when painting.

The initial value is 0. You can set this property or use the SetSrcRect method to change the value.

The source rectangle specifies the portion of the bitmap to paint. Generally, this rectangle is used with the destination rectangle to scale the display. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcHeight property, SrcLeft property, SrcWidth property
Topics: | Raster Images: Displaying Images


SrcWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SrcWidth
Delphi Syntax | SrcWidth:Integer
Overview | Refer to Displaying an Image.

Remarks

Is the width of the source rectangle to use when painting.

The initial value is the width of the bitmap. You can set this property or use the SetSrcRect method to change the value.

The source rectangle specifies the portion of the bitmap to paint. Generally, this rectangle is used with the destination rectangle to scale the display. The unit of measure is pixels, and the position of the rectangle is relative to the origin of the bitmap.

See Also

Elements: | SrcHeight property, SrcLeft property, SrcTop property
Topics: | Raster Images: Displaying Images


STable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_UINT STable [L_UINT uIndex];
Delphi Syntax | STable [uIndex: L_UINT]: L_UINT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

If the bUseMaskTable and bUseSTable parameters are set to TRUE when the RemapHue method is called and the MaskTable [i] entry for a particular hue is not zero, then the saturation is changed to the saturation in STable [i]. If MaskTable [i] is 0 then STable [i] is ignored. For example, if RemapHue is called with both bUseMaskTable and bUseSTable set to TRUE, then if a pixel has a hue of 85 and the MaskTable [85] is not 0, the saturation of the pixel is changed to STable [85].

If the bUseMaskTable parameter is FALSE and the bUseSTable parameter is TRUE when the RemapHue method is called, then the Saturation for each color present in the image will be changed to STable [i]. For example, if a pixel has a saturation of 70, the saturation of the pixel is changed to STable [70]. If the next pixel has a saturation of 75, the saturation of that pixel is changed to STable [75].

Saturation entries range from 0 to RemapHueTablesSize-1 where

Saturation 0 contains the most white.

Saturation RemapHueTablesSize-1 contains no white.

See Also

Elements: | RemapHue method, MaskTable property, HTable property, RemapHueTablesSize property, VTable property, HSV_HfromRGB method, HSV_SfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Modifying Intensity Values


TextAlign property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TTextAlign TextAlign
Delphi Syntax | TextAlign: TTextAlign
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the alignment of a text object within a rectangle. You specify the rectangle and other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

For a list of possible values of the TextAlign property, refer to TextAlign Effects.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextAngle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TextAngle
Delphi Syntax | TextAngle: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the angle of rotation of a text object. The angle is in tenths of degrees. Only TrueType fonts can be rotated.

You specify other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextFont property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TFont* TextFont
Delphi Syntax | TextFont: TFont
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the Font object for any text that you draw using the DrawTextStr method.

You can set the Font object's properties at design time in the Object Inspector. At run time, you set these properties as in the following example:

Lead1.TextFont.Name := 'Arial'

For a list of Font object properties, refer to Delphi of C++ Builder documentation.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


TextHeight property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TextHeight
Delphi Syntax | TextHeight: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the height of the rectangle in which a text object is positioned. You specify the rectangle and other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

Whether you draw to the screen or to the bitmap, text objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextHiliteColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor TextHiliteColor
Delphi Syntax | TextHiliteColor: TColor
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the highlight color of a text object. You specify other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

The highlight color is used only for the following TextStyle values:

etsInsetLight | Inset light text
etsInsetExtraLight | Inset extra light text
etsInsetHeavy | Inset heavy text
etsInsetExtraHeavy | Inset extra heavy text
etsRaisedLight | Raised light text
etsRaisedExtraLight | Raised extra light text
etsRaisedHeavy | Raised heavy text
etsRaisedExtraHeavy | Raised extra heavy text
etsOutLineBlock | Outline block text

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextLeft property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TextLeft
Delphi Syntax | TextLeft: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the X coordinate of the origin of the rectangle in which a text object is positioned. You specify the rectangle and other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

Whether you draw to the screen or to the bitmap, text objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TTextStyle TextStyle
Delphi Syntax | TextStyle: TTextStyle
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the style of a text object. You specify other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

For a list of possible values of the TextStyle property, refer to TextStyle Effects.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextTop property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TextTop
Delphi Syntax | TextTop: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the Y coordinate of the origin of the rectangle in which a text object is positioned. You specify the rectangle and other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

Whether you draw to the screen or to the bitmap, text objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextWidth property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TextWidth
Delphi Syntax | TextWidth: Integer
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Specifies the width of the rectangle in which a text object is positioned. You specify the rectangle and other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

Whether you draw to the screen or to the bitmap, text objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TextWordWrap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool TextWordWrap
Delphi Syntax | TextWordWrap : Boolean
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

(Persistent property, available at design time) Determines whether words wrap within the rectangle in which a text object is positioned. You specify the rectangle and other aspects of the text object using related properties described in Drawing Three-Dimensional Shapes and Text.

The DrawTextStr method draws the text object in the control's client area or on the current bitmap.

See Also

Elements: | DrawTextStr method
Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


TransitionEffect property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TransitionEffect
Delphi Syntax | TransitionEffect: Integer
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Specifies the transitional effect to use when painting. For possible values, refer to the PaintEffect property.

A transition effect, if implemented, occurs before an image is painted. The transition can paint a solid color, a pattern, or a gradient color. The TransitionStyle property determines whether a transitional effect is used when painting.

LEADTOOLS provides over 2000 defined constant identifiers for effects.

See Also

Elements: | PaintEffect property
Topics: | Raster Images: Implementing Special Effects


TransitionStyle property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TTransitionStyle TransitionStyle
Delphi Syntax | TransitionStyle : TTransitionStyle
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Determines whether a transitional effect is used when painting, and determines whether the transition is based on pattern properties or gradient color properties.

A transition effect, if implemented, occurs before an image is painted. The transition can paint a solid color, a pattern, or a gradient color. The list of possible effects is the same as when painting an image. The TransitionEffect property specifies the effect to use.

Value | Meaning
etsNone | No transition effect.
etsGradient | Use the gradient color for the transition. Refer to Gradients and Patterns for related properties.
etsPattern | Use a solid color or pattern for the transition. Refer to Gradients and Patterns for related properties.

See Also

Elements: | TransitionEffect property
Topics: | Raster Images: Implementing Special Effects


Transparent property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool TransparentColor
Delphi Syntax | TransparentColor: Boolean
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Makes the background of the control transparent.

You can set this property to TRUE to take advantage of related transparency properties when one control is positioned on top of another one. Possible values are:

Value | Meaning
TRUE | The background is transparent.
FALSE | The background color paints.

See Also

Elements: | TransparentColor property , UseTransparentColor property , PaintRgnOnly property
Topics: | Working with the Control: General Behavior
 | Raster Images: Implementing Special Effects
 | Raster Images: Displaying Images
 | Raster Images: Creating and Using a Region
 | Implementing Transparency


TransparentColor property (Main Control)

THIS PROPERTY IS NOW OBSOLETE. IT HAS BEEN REPLACED WITH THE BitmapTransparentColor property.


UseLUT Property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool UseLUT;
Delphi Syntax | UseLUT: Boolean
Overview | Refer to Grayscale Images

Remarks

Gets or sets a value that indicates when the LUT is used. Possible values are:

Value | Meaning
TRUE | The LUT is used in all image processing methods, including save. (Default)
FALSE | The LUT is used only when painting. It is ignored when an image processing method is applied or when a file is saved.

This property is designed primarily for use with 12 or 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available in the Document/Medical toolkits.

See Also

Elements: | WindowLevel method, LevelLUT property, WindowLevelFillLUT method
Topics: | Raster Images: Palettes
 | Examining and Altering Bitmaps


UserLUTCurveSize property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | int UserLUTCurveSize
Delphi Syntax | UserLUTCurveSize: Integer
Overview | Refer to Using Histograms.

Remarks

Specifies the number of points in the User Lookup Table Curve. Assign to this value to allocate the array of points before setting X and Y-coordinates.

See Also

Elements: | GetUserLookupTable method, RemapIntensity method, RemapTable property, RemapTableSize property, UserLUTCurveX property, UserLUTCurveY property
Topics: | Changing Brightness and Contrast


UserLUTCurveX property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | int UserLUTCurveX[int iIndex]
Delphi Syntax | UserLUTCurveX[iIndex: Integer]: Integer
Overview | Refer to Using Histograms.

Remarks

Specifies the X coordinate of a point on the User Lookup Table curve.

For more details on using this property, see the GetUserLookupTable method.

See Also

Elements: | GetUserLookupTable method, RemapIntensity method, RemapTable property, RemapTableSize property, UserLUTCurveY property, UserLUTCurveSize property
Topics: | Changing Brightness and Contrast


UserLUTCurveY property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | int UserLUTCurveY [int iIndex]
Delphi Syntax | UserLUTCurveY [iIndex: Integer]: Integer
Overview | Refer to Using Histograms.

Remarks

Specifies the Y coordinate of a point on the User Lookup Table curve.

For more details on using this property, see the GetUserLookupTable method.

See Also

Elements: | GetUserLookupTable method, RemapIntensity method, RemapTable property, RemapTableSize property, UserLUTCurveX property, UserLUTCurveSize property
Topics: | Changing Brightness and Contrast


UserPalette property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int UserPalette (int iIndex);
Delphi Syntax | UserPalette [iIndex:Integer]:TColorRef
Overview | Refer to Managing Palettes.

Remarks

Sets a color in a palette that you define.

The user palette is an array of 256 elements. Each element is a long integer value containing the red, green and blue (RGB) components of the color. You can specify a color using the RGB function, and you can specify 256 or fewer colors.

To apply a palette to a bitmap, you must first use this property to set each of the colors in the array; then use the ColorRes method to implement the palette.

This property is also used when loading raw, uncompressed data that is 8 bits per pixel or less. To do this, assign a palette in the UserPalette property in the LoadInfo event. For more information, refer to Working with the RAW File Filter.

Palettes are used only for images that are 8 bits per pixel or less.

See Also

Topics: | Raster Images: Palettes
 | Raster Images: Doing Color Expansion or Reduction


UseTransparentColor property (Main Control)

THIS PROPERTY IS NOW OBSOLETE. IT HAS BEEN REPLACED WITH THE BitmapEnableTransparency property.


VersionDate property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString VersionDate
Delphi Syntax | VersionDate:String
Overview | Refer to Getting LEADTOOLS Toolkit Information.

Remarks

(Read only) Is the creation date of the current version of the LEADTOOLS VCL.

See Also

Topics:

Support: Version and License Information


VersionLevel property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int VersionLevel
Delphi Syntax | VersionLevel:Integer
Overview | Refer to Getting LEADTOOLS Toolkit Information.

Remarks

(Read only) Is the level (Document/Medical or Professional) of the current version of the LEADTOOLS VCL.

Setting | Description
TOOLKIT_LEVEL_EXP | Document/Medical
TOOLKIT_LEVEL_PRO | Professional
TOOLKIT_LEVEL_MEDICAL | Medical

See Also

Topics:

Support: Version and License Information


VersionMajor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int VersionMajor
Delphi Syntax | VersionMajor:Integer
Overview | Refer to Getting LEADTOOLS Toolkit Information.

Remarks

(Read only) Is the major version number of the current version of the LEADTOOLS VCL.

See Also

Topics:

Support: Version and License Information


VersionMinor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int VersionMinor
Delphi Syntax | VersionMinor:Integer
Overview | Refer to Getting LEADTOOLS Toolkit Information.

Remarks

(Read only) Is the minor version number of the current version of the LEADTOOLS VCL.

See Also

Topics:

Support: Version and License Information


VersionProduct property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString VersionProduct
Delphi Syntax | VersionProduct: String
Overview | Refer to Getting LEADTOOLS Toolkit Information.

Remarks

(Read only) Is the full product name of the current version of the LEADTOOLS VCL.

See Also

Topics:

Support: Version and License Information


VersionTime property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString VersionTime
Delphi Syntax | VersionTime:String
Overview | Refer to Getting LEADTOOLS Toolkit Information.

Remarks

(Read only) Is the creation time of the current version of the LEADTOOLS VCL.

See Also

Topics:

Support: Version and License Information


VScrollInfo property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TLEADScrollInfo * VScrollInfo;
Delphi Syntax | VScrollInfo: TLEADScrollInfo;
Overview | Refer to Scrolling an Image.

Remarks

(Runtime only) Contains the object that references the control's vertical scrollbar information.

The TLEADScrollInfo object has the following properties:

Property | Description
Min | (Read only) Integer value that is updated with the minimum scroll range value.
Max | (Read only) Integer value that is updated with the maximum scroll range value.
Page | UINT value that gets or sets the scroll page size, in pixels.
Line | Integer value that gets or sets the size of the scroll line, in pixels. This is the amount that will be scrolled by line up or line down. The line value must be <= the page value.
Pos | Integer value that gets or sets the thumb position (current position) of the scrollbar. This value can be set to scroll the display.
Visible | (Read only) Boolean flag that indicates whether the scrollbar is visible. If this is TRUE, the scrollbar is visible. If this value is FALSE, the scrollbar is not visible.
Width | (Read only) Integer value that is updated with the size of the of the scrollbar.

See Also

Elements: | AutoScroll property, HScrollInfo property, OnScroll event
Topics: | Raster Images: Displaying Images


VScrollStep property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int VScrollStep
Delphi Syntax | VScrollStep: Integer
Overview | Refer to Displaying an Image.

Remarks

(Persistent property, available at design time) Determines the approximate number of times the user clicks the vertical scroll bar arrow button before the thumb tab is moved all the way to the end.

See Also

Elements: | AutoScroll property, HScrollStepproperty
Topics: | Working with the Control: Client Area Usage


VTable property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_UINT VTable [L_UINT uIndex];
Delphi Syntax | VTable [uIndex: L_UINT]: L_UINT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Value lookup table. The Value indicates the amount of black present in a color. This is one of the four tables that the RemapHue method uses to change the bitmap's hue, saturation and value. This property is used only if the bUseVTable parameter is set to TRUE when the RemapHue method is called. Hue, Saturation, and Value levels range from 0 to RemapHueTablesSize-1. Therefore, the lookup tables each have RemapHueTablesSize -1 entries. The current hue, saturation and value of a pixel correspond to the table indexes.

If the bUseMaskTable and bUseVTable parameters are set to TRUE when the RemapHue method is called and the MaskTable [i] entry for a particular hue is not zero, then the value is changed to the value in VTable [i]. If MaskTable [i] is 0 then VTable [i] is ignored. For example, if RemapHue is called with both bUseMaskTable and bUseVTable set to TRUE, then if a pixel has a hue of 85 and the MaskTable [85] is not 0, the value of the pixel is changed to VTable [85].

If the bUseMaskTable parameter is FALSE and the bUseVTable parameter is TRUE when the RemapHue method is called, then the Value for each color present in the image will be changed to VTable [i]. For example, if a pixel has a value of 70, the Value of the pixel is changed to VTable [70]. If the next pixel has a value of 75, the Value of that pixel is changed to VTable [75].

Value entries range from 0 to RemapHueTablesSize-1 where

Value 0 contains the most black.

Value RemapHueTablesSize-1 contains no black.

See Also

Elements: | RemapHue method, MaskTable property, HTable property, STable property, RemapHueTablesSize property, HSV_HfromRGB method, HSV_SfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Modifying Intensity Values


WandColor property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor WandColor
Delphi Syntax | WandColor : TColor
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) The color of the wand when implementing a paint effect or transition effect.

The wand is a solid color bar that moves during an effect. Small grain sizes produce the best wand effects. Many of the effects listed in Effects can have a wand.

This property is used only if the WandSize property is greater than 0.

See Also

Elements: | PaintEffect property, TransitionEffect property
Topics: | Raster Images: Implementing Special Effects


WandSize property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Cardinal WandSize
Delphi Syntax | WandSize : Cardinal
Overview | Refer to Using Special Effects When Painting.

Remarks

(Persistent property, available at design time) Thickness of the wand (in pixels) when implementing a paint effect or transition effect.

The wand is a solid color bar that moves during an effect. Small grain sizes produce the best wand effects. Many of the effects listed in Effects can have a wand.

You can set this property to 0 to disable the wand.

See Also

Elements: | PaintEffect property, TransitionEffect property
Topics: | Raster Images: Implementing Special Effects


WindowLevelBitmap property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool WindowLevelBitmap
Delphi Syntax | WindowLevelBitmap : Boolean
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) Controls the behavior of the WindowLevel method.

If this proprety is TRUE, then the WindowLevel method will use the LevelLowBit property, LevelHighBit property, LevelLUT property and LevelLUTLength property to create an 8-bit or 24-bit bitmap from a 12 or 16-bit grayscale bitmap.

If this property is FALSE, then the WindowLevel method will use the LevelLowBit property, LevelHighBit property, LevelLUT property and LevelLUTLength property to apply window leveling to the bitmap, but the bitmap remains as a 12 or 16-bit grayscale bitmap. That is, the image data is not altered.

This property supports signed data images.

See Also

Elements: | LevelLowBit property, LevelHighBit property, LevelLUTLength property
 | LevelLUT property, GetMinMaxBits method, GetMinMaxVal method
Topics: | Raster Images: Palettes


WMFResolutionX property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int WMFResolutionX
Delphi Syntax | WMFResolutionX : L_INT
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets or sets the current horizontal resolution value that LEADTOOLS uses when loading images from WMF/EMF files. Possible values are:

Value | Meaning
0 | Load the file at the resolution present in the file.
Any positive value | Load the file at the corresponding DPI. For example, if this value is 150, load the image at 150 DPI.

WMF files can contain vectored graphics or raster images. LEADTOOLS can load either type, but can save only raster images. The issue of image resolution arises mainly when loading vectored graphics.

LEADTOOLS loads a WMF file by creating a temporary device context (DC), drawing the vectored graphics (or painting the raster image) in the device context, and converting the resulting device context to a bitmap. Loading an image at some DPI values may yield an image that is smaller, and less detailed, than the original, or, since bitmaps use more memory than vectored graphics, it may yield an image that is too large to handle efficiently.

You can use the InfoXRes, InfoYRes, WMFResolutionX, and WMFResolutionY properties along with GetFileInfo, to manage these image size issues. The following are examples of how you can use these methods:

To load an image at its saved resolution, you can do the following:

1. | Set WMFResolutionX and WMFResolutionY to 0.
2. | Call the Load method to load the file.

To load an image that will fit a predetermined width (such as the width of your application's client area), you can do the following:

1. | Set WMFResolutionX and WMFResolutionY to 0.
2. | Call GetFileInfo and check the InfoXRes property and the InfoWidth property, to determine the resolution and size of the image stored in the file.
3. | Calculate the necessary resolution to get the desired width. Where the necessary resolution is A, the value from the InfoXRes property is B, the desired width is C, and the value of the Width field is D, the calculation is as follows: A = B * C / D.
4. | Set WMFResolutionX and WMFResolutionY to the desired resolution.
5. | Call Load to load the file.

Some WMF files contain viewport information, which requires a device context of a particular size. LEADTOOLS always loads these files using the resolution specified in the file. In this case, the value specified by WMFResolutionX and WMFResolutionY has no effect.

Note:

When saving WMF files, LEADTOOLS saves the current resolution value in the file.

See Also

Elements: | GetFileInfo method, InfoXRes property, InfoYRes property, WMFResolutionY property
Topics: | Raster Images: Loading Files


WMFResolutionY property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int WMFResolutionY
Delphi Syntax | WMFResolutionY : L_INT
Overview | Refer to Loading a Bitmap from a File.

Remarks

Sets the vertical resolution value that LEADTOOLS is to use when loading images from WMF/EMF files. Possible values are:

Value | Meaning
0 | Load the file at the resolution present in the file.
Any positive value | Load the file at the corresponding DPI. For example, if this value is 150, load the image at 150 DPI.

For more information on WMF files and examples of loading WMF files using this property, refer to the WMFResolutionX property.

See Also

Elements: | GetFileInfo method, InfoXRes property, InfoYRes property, WMFResolutionX property
Topics: | Raster Images: Loading Files


WriteMarkerAction property (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int WriteMarkerAction
Delphi Syntax | WriteMarkerAction: Integer
Overview | Refer to Examining and Altering Bitmaps

Remarks

Indicates how to process the current marker passed to the OnTransformMarker event. This property should be accessed only from within the OnTransformMarker event. Possible values for this property are:

Value | Meaning
WRITEMARKER_DEFAULT | [0] The marker will be transformed using the default transformation, after which it will be written to the file.
WRITEMARKER_IGNORE | [1] The marker will not be written to the file.
WRITEMARKER_ABORT | [2] The transformation process is aborted and the TransformFile method will return ERROR_USER_ABORT.

The value of the WriteMarkerAction property will be reset for every marker to WRITEMARKER_DEFAULT.

See Also

Elements: | TransformFile method, OnTransformMarker event, WriteMarker method
Topics: | Raster Images: Doing Geometric Transformations


AboutBox method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void AboutBox (void);
Delphi Syntax | AboutBox: void;
Overview | Refer to Getting LEADTOOLS Toolkit Information.

Remarks

Displays information about the LEADTOOLS VCL.

See Also

Topics:

Support: Version and License Information


AdaptiveContrast method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AdaptiveContrast(unsigned uDim, unsigned uAmount, unsigned uFlags);
Delphi Syntax | Function AdaptiveContrast (uDim: L_UINT; uAmount: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

(Medical only.) Performs adaptive contrast enhancement (ACE) to regions that are originally low in contrast.

Adaptive contrast enhancement (ACE) adjusts bitmap contrast by giving more contrast to areas which are originally low in contrast. This is different from histogram-based techniques, which are based on all bitmap pixels (the histogram itself).

Local histogram equalization is another technique that can be used to reveal detail of areas, since it depends on area pixels only. Use LocalHistoEqualize to perform local histogram equalization.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | HistoEqualize method, Contrast method, Intensity method, GammaCorrect method, HistoContrast method, StretchIntensity method, Invert method, Hue method, Saturation method, Fill method, Pixel property, GetHistogram method, WindowLevel method, LocalHistoEqualize method, ChangeHueSatInt method.
Topics: | Raster Images: Modifying Intensity Values
 | Using Color Values in LEADTOOLS


AddBitmaps method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AddBitmaps(HBITMAPLIST hList, int uFlags);
Delphi Syntax | Function AddBitmaps hList: HBITMAPLIST; uFlags: L_INT ): L_INT;
Overview | Refer to Combining Images.

Remarks

Add or averages the bitmaps in the hList parameter.

This operation can be used to add several images of the same view to improve the lightness or brightness of the image. It can also eliminate the random noise contained in these images by doing an average of all bitmaps.

This method performs operations between data byte-by-byte. An image can be any color resolution. The resulting image of this operation will be stored in the first bitmap in the list. The operations are performed based on the smallest width and height of the input images.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | Underlay method, Combine method
Topics: | Raster Images: Modifying Intensity Values
 | Image Processing
 | Changing Brightness and Contrast
 | Removing Noise


AddBorder method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AddBorder (int nLeftThickness, int nTopThickness, int nRightThickness, int nBottomThickness, int nLocation, int nStyle, int nEffectStyle, TBitmapHandle TileBitmap, int nGradientStyle, unsigned crGradientStart, unsigned crGradientEnd, int nCurveIntensity, bool bSoftCurve, bool bShadow, int nShadowSize, int nShadowDirection, bool bBumpyShadow);
Delphi Syntax | Function AddBorder (nLeftThickness: Integer; nTopThickness: Integer; nRightThickness: Integer; nBottomThickness: Integer; nLocation: integer; nStyle: Integer; nEffectStyle: Integer; TileBitmap: TBITMAPHANDLE; nGradientStyle: integer; crGradientStart: TColorRef; crGradientEnd: TColorRef; nCurveIntensity: Integer; bSoftCurve: Boolean; bShadow: Boolean; nShadowSize: Integer; nShadowDirection: Integer; bBumpyShadow: Boolean): Integer;
Overview | Refer to Combining Images.

Remarks

(DigitalPaint only) Adds a border to the bitmap. The border is specified by the method's parameters.

This method supports grayscale images.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddFrame method
Topics: | Image Processing


AddFrame method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AddFrame (TBitmapHandle BitmapFrame, bool bKeepFrameState, bool bUseMask, unsigned crMask, int SmoothEdge, int nLocation, int nQuality);
Delphi Syntax | Function AddFrame (BitmapFrame: TBITMAPHANDLE; bKeepFrameState: Boolean; bUseMask: Boolean; crMask: TColorRef; SmoothEdge: Integer; nLocation: Integer; nQuality: Integer): Integer;
Overview | Refer to Combining Images.

Remarks

(DigitalPaint only) Adds a frame to the bitmap. The frame is specified by the method's parameters.

This method supports grayscale images.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddBorder method
Topics: | Image Processing


AddMessage method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AddMessage(AnsiString strMsg, AnsiString strPassword, AnsiString strFileName, const TPoint &ptStart);
Delphi Syntax | Function AddMessage (strMsg: String; strPassword: String; strFileName: String; ptStart: TPoint): L_INT;
Overview | Refer to Non-Image Data

Remarks

(Document/Medical only) Adds a message (text or file) to the bitmap currently loaded in the Main Control. (This bitmap is accessed through the Bitmap property (Main Control).)

The purpose of this method is for security since the message added will be embedded into the image without any visible changes and the resulting image has the same size as the original.

This method can add messages to any type of lossless image format such as bmp, tiff, lossless jpeg, and so forth. If used with lossy format types the message may be corrupted or lost.

This method supports 24- and 48-bit images, and 8- and 16-bit grayscale images.

To extract the embedded message use the ExtractMessage method.

This method supports signed data images.

See Also

Elements: | ExtractMessage method
Topics: | Raster Images: Getting and Setting File Information


AddNoise method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AddNoise (int iRange, int iChannel);
Delphi Syntax | AddNoise (iRange, iChannel: Integer): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Adds random pixels to the bitmap, letting you specify the percentage of coverage and the color plane.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Where the Region Preempts the Bitmap
 | Raster Images: Filtering Images


AddShadow method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AddShadow(unsigned uDirection, unsigned uThreshold, unsigned uFlags);
Delphi Syntax | Function AddShadow (uDirection: L_UINT; uThreshold: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Adds shadows to the bitmap.

This method applies a convolution matrix upon each color component and then combines the results in order to add shadows.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | LensFlare method, Light method, ChangeHueSatInt method, ColorReplace method, ColorThreshold method, MathFunction method, RevEffect method, Segment method, SubtractBackground method, UserFilter method.
Topics: | Raster Images: Artistic Effects


AddWeightedBitmaps method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AddWeightedBitmaps(HBITMAPLIST hList, L_PUINT puFactor, unsigned uFlags);
Delphi Syntax | Function AddWeightedBitmaps (hList: HBITMAPLIST; puFactor: L_PUINT; uFlags: L_UINT): L_INT;
Overview | Refer to Removing Noise.

Remarks

Adds or averages the bitmaps in the specified list according to their weight factors.

This method can be used to modify the brightness (with the add operations) or remove the noise (with the average operations). Typically, you would call this method for a series of images taken of the same object at short intervals.

If uFlag is BC_ADD, the method can be used to add several images of the same view to improve the lightness or brightness of the image. In this case, puFactor is ignored.

If uFlag is BC_AVG, the method can be used to average several images. In this case, puFactor is ignored.

If uFlag is BC_ADDWEIGHTED, the method can be used to obtain an image as the sum of several weighted images. Each bitmap in any position in the list has a corresponding weight factor in the same position in the puFactor array. The real values are the weight factors divided by 100. For example if a weight factor is 131 its real value is 1.31. If puFactor equals NULL, each bitmap has the same weight factor of 100 and the result is the same as for BC_ADD.

If uFlag is BC_AVGWEIGHTED, the method can eliminate random noise by performing a weighted average. Each bitmap in any position in the list has a corresponding weight factor in the puFactor array. The real values are the weight factors in the array divided by 100. The weighted sum will be divided by the sum of the weights. If puFactor equals NULL, each bitmap has the same weight factor of 100 and the result is the same as for BC_AVG.

This method performs operations between data byte-by-byte. An image can be any color resolution. The resulting image of this operation will be the active Bitmap in LEAD Main control. The operations are performed based on the smallest width and height of the input images.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | AddBitmaps method, Underlay method, Combine method
Topics: | Raster Images: Combining Images
 | Raster Images: Modifying Intensity Values
 | Changing Brightness and Contrast


Aging method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Aging(unsigned uHScratchCount, unsigned uVScratchCount, unsigned uMaxScratchLen, unsigned uDustDensity, unsigned uPitsDensity, unsigned uMaxPitSize, unsigned crScratch, unsigned crDust, unsigned crPits, unsigned uFlags);
Delphi Syntax | Function Aging (uHScratchCount: L_UINT; uVScratchCount: L_UINT; uMaxScratchLen: L_UINT; uDustDensity: L_UINT; uPitsDensity: L_UINT; uMaxPitSize: L_UINT; crScratch: COLORREF; crDust: COLORREF; crPits: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits.) Adds effects that simulate random color changes, scratches, dust and pits, making the bitmap currently loaded in the Main Control look like it was made from an old film. The bitmap loaded in the Main Control can be accessed through the Bitmap property (Main Control).

The width of the scratches is 1 pixel. The length of the scratches is random (between 2 and uMaxScratchLen). The size of dust particles is 1 pixel (1x1). The size and shape of pits is selected at random. The pit shapes are random and will be between 1x1 and uMaxPitSize x uMaxPitSize.

The method will also make random changes to the pixel’s intensities.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Sharpen method, Posterize method, Emboss method, AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, Mosaic method.
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


AlphaBlend method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall AlphaBlend(int iLeft, int iTop, int iWidth, int iHeight, LEADTyp::TBitmapHandle Bitmap, int iSrcLeft, int iSrcTop, int iOpacity);
Delphi Syntax | Function AlphaBlend(iLeft: integer; iTop: Integer; iWidth: Integer; iHeight: Integer; Bitmap: TBitmapHandle; iSrcLeft: Integer; iSrcTop: Integer; iOpacity: Integer): Integer;
Overview | Refer to Combining Images.

Remarks

Combines image data from two bitmaps, using the specified opacity value.

The opacity determines how much the destination bitmap will show through the source bitmap. For example, if the opacity is 255 (completely opaque) then the source image will appear and the destination image will not show through the source image at all. If the opacity is 128 (half opacity), then the pixels for that area will consist of 50 percent from the source image and 50 percent from the destination image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Underlay method, Combine method, FeatherAlphaBlend method, CreateFadedMask method
Topics: | Raster Images: Combining Images
 | Image Processing


AntiAlias method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall AntiAlias(int iThreshold, int iDim, int iFilter);
Delphi Syntax | Function AntiAlias(iThreshold: Integer; iDim: Integer; iFilter: Integer): Integer;
Overview | Refer to Correcting Colors.

Remarks

Document only) Applies an anti-aliasing filter to the bitmap.

The best results for anti-aliasing text can be obtained with the filter ANTIALIAS_2.

The value of the iDim parameter determines the extent of the anti-aliasing.

This method can process the whole image or a region of the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

The threshold range for 16, 48 and 64-bit bitmaps is from 0 to 65535 and for 12-bit bitmaps the threshold range is from 0 to 4095. Otherwise, it is from 0 to 255. The threshold is applied on channels separately.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics:

Raster Images: Filtering Images


ApplyLinearModalityLUT method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ApplyLinearModalityLUT(double dIntercept, double dSlope, unsigned uFlags);
Delphi Syntax | Function ApplyLinearModalityLUT (dIntercept: L_DOUBLE; dSlope: L_DOUBLE; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

(Medical only) Remaps the bitmap pixels by applying a linear transformation described by a rescale slope and an intercept. In the DICOM world, this is referred to as "applying a linear Modality LUT".

This method will remap the bitmap pixels by applying the linear transformation described by the equation:

Y = mX + b

m: slope of a straight line, this is also referred to as "Rescale Slope" in the DICOM world.

b: the y-intercept of a straight line, this is also referred to as "Rescale Intercept" in the DICOM world.

Y: the resulting pixel value.

X: the input or original pixel value.

This method is helpful in applying what is referred to as a "Linear Modality LUT" in the DICOM world. According to the DICOM standard a "Modality LUT" defines the transformation of manufacturer-dependent pixel values into pixel values, which are manufacturer independent (e.g. Hounsfield units for CT, Optical Density for film digitizers, etc.).

This method only works on grayscale bitmaps. Calling this method for non-grayscale bitmaps will return an error (ERROR_INV_PARAMETER).

It is recommended to always set the M_LUT_UPDATE_MIN_MAX flag.

This method could change the bitmap from signed to unsigned, or from unsigned to signed. This is determined by the values of the resulting image pixels after applying the linear transformation.

Only the useful bits in the bitmap are considered. The values are considered as if the bitmap pixel values are normalized, LowBit = 0.

For example, let’s say the bitmap is:

BitsPerPixel = 12

LowBit = 4

HighBit = 10

In this case, there are 10-4+1=7 valid bits. This means that there are 128 values to remap.

This method supports signed data images.

If M_LUT_ALLOW_RANGE_EXPANSION is set in uFlags, consider the following example:

If the dataset has the following attributes:

Bits per pixel | 16
High Bit | 11
Low Bit | 0
Pixel Range | 0 to +4095,

Unsigned

The number of bits stored inside the bitmap is 11-0+1 =12.

If the fIntercept is set to –1024 and fSlope is set to 0, then after applying the rescale slope and intercept:

Output minimum pixel value = (0 *1 +(-1024))= -1024

Output maximum pixel value = (4095 *1 +(-1024))= 3071

The new pixel value range (–1024 to 3071) can’t be represented with the current bits stored (12 bits), which can represent values in the range (–2048 to 2048). In this case the method will change the high bit inside the bitmap handle to be 12 instead of 11 (bits stored becomes 13), which can represent values in the range (–8192 to 8191).

Please note that the method won’t be able to update the high bit and/or low bit if the number of bits stored was already equal to the bitmap bits per pixel.

This method supports signed data images.

See Also

Elements: | RemapIntensity method, ApplyModalityLUT method, ApplyVOILUT method, ApplyLinearVOILUT method.
Topics: | Raster Images: Modifying Intensity Values


ApplyLinearVOILUT method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ApplyLinearVOILUT(double dCenter, double dWidth, unsigned uFlags);
Delphi Syntax | Function ApplyLinearVOILUT (dCenter: L_DOUBLE; dWidth: L_DOUBLE; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

(Medical only) Sets up the paint or paint and image processing methods' window leveling options for a specific bitmap through a linear transformation described by the window center and width. In the DICOM world, this is referred to as "applying a linear VOI LUT".

This method will remap the LUT used to display and process a bitmap by applying the linear transformation described by the window center and window width. In the DICOM world this is referred to as applying a "linear VOI LUT". The DICOM standard states:

"Window Center and Window Width specify a linear conversion from stored pixel values (after any Modality LUT or Rescale Slope and Intercept specified in the IOD have been applied) to values to be displayed. Window Center contains the input value that is the center of the window. Window Width contains the width of the window." Please see "VOI LUT Module Attributes" in the DICOM standard for more details.

This method does not change the image data; it only updates the entries inside the bitmap LUT.

It’s recommended to always set the VOI_LUT_UPDATE_MIN_MAX flag.

In the DICOM world you will need to set VOI_LUT_REVERSE_ORDER flag if the photometric interpretation of the image is "MONOCHROME1", where the minimum grayscale value is intended to be displayed as white after any VOI gray scale transformations have been performed.

This method supports signed data images.

See Also

Elements: | ApplyVOILUT method, RemapIntensity method, ApplyModalityLUT method, ApplyLinearModalityLUT method.
Topics: | Raster Images: Modifying Intensity Values


ApplyMathLogic method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ApplyMathLogic(int nFactor, unsigned uFlags);
Delphi Syntax | Function ApplyMathLogic (nFactor: L_INT; uFlags: L_UINT): L_INT;
Overview | Refer to Correcting Colors

Remarks

(Raster Pro and above toolkits.) Performs specific mathematical or logical operations on the colors of a bitmap.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | Combine method, Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Hue method, Saturation method, HistoEqualize method, Fill method, Pixel property, GetHistogram method, WindowLevel method.
Topics: | Raster Images: Modifying Intensity Values
 | Using Color Values in LEADTOOLS


ApplyModalityLUT method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ApplyModalityLUT(L_PUINT16 pLUT, unsigned uNumberOfEntries, int nFirstStoredPixelValueMapped, unsigned uEntryBits, unsigned uFlags);
Delphi Syntax | Function ApplyModalityLUT (pLUT: L_PUINT16; uNumberOfEntries: L_UINT; nFirstStoredPixelValueMapped: L_INT; uEntryBits: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

(Medical only) Remaps the bitmap pixels through a lookup-table (LUT). In the DICOM world, this is referred to as "applying a non-linear Modality LUT".

This method is similar to RemapIntensity because it remaps the bitmap pixel values through a LUT. The method differs from RemapIntensity as follows:

ApplyModalityLUT allows you to specify an incomplete LUT. Values less than the first mapped index will be mapped to the first entry in the palette. Values higher than "first mapped index" + "LUT length" will be mapped to the last entry in the LUT.

ApplyModalityLUT only works on grayscale bitmaps. Calling this method for non-grayscale bitmaps will return an error (ERROR_INV_PARAMETER).

ApplyModalityLUT can create signed bitmaps. The output bitmap will be signed, if M_LUT_SIGNED is set, or unsigned, if M_LUT_SIGNED is not set.

The values in the LUT will be masked such that only the useful bits in the bitmap are considered. The values are considered as if the bitmap pixel values are normalized, LowBit = 0.

For example, if the bitmap is:

BitsPerPixel = 12

LowBit = 4

HighBit = 10

In this case, there are 10-4+1=7 valid bits. This means that there are 128 values to remap. For every pixel, ApplyModalityLUT will do the following:

Take the pixel value, shift it to the right by 4 and mask out the high bits, producing a value (val = 0..127).

val is remapped according to the LUT (values smaller than nFirstStoredPixelValueMapped are mapped to first LUT entry, while values greater than nFirstStoredPixelValueMapped + uNumberOfEntries are mapped to the last LUT entry)

After remapping, val is shifted to the left by 4 and will replace bits 4 thru 10 from the original bitmap

If the bitmap is signed, the indices for the LUT are assumed to be signed and be between –32768 and +32767.

If the bitmap is unsigned, the indices are unsigned and are between 0..65535.

It is recommended to always set the M_LUT_UPDATE_MIN_MAX flag.

This method is helpful in applying what is referred to as a "Non-Linear Modality LUT" in the DICOM world. According to the DICOM standard a "Modality LUT" defines the transformation of manufacturer-dependent pixel values into pixel values, which are manufacturer independent (e.g. Hounsfield units for CT, Optical Density for film digitizers, etc.).

This method supports signed data images.

See Also

Elements: | RemapIntensity method, ApplyLinearModalityLUT method, ApplyVOILUT method, ApplyLinearVOILUT method.
Topics: | Raster Images: Modifying Intensity Values


ApplyTransformationParameters method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ApplyTransformationParameters(int nXTranslation, int nYTranslation, int nAngle, unsigned uXScale, unsigned uYScale, unsigned uFlags);
Delphi Syntax | Function ApplyTransformationParameters (nXTranslation: INT; nYTranslation: INT; nAngle: INT; uXScale: UINT; uYScale: UINT; uFlags: UINT): INT;
Overview | Refer to Detecting Registration Marks

Remarks

(Document/Medical only) Corrects the image by removing the translation, rotation, and scaling deformations that have been applied on the image.

This method corrects the image by removing the translation, rotation, and scaling deformations that have been applied to the image. These transformations make this bitmap match a reference bitmap.

This method is designed to work with the GetTransformationParameters method.

You can get the translation, rotation, and scaling information by calling the GetTransformationParameters method. The values obtained by the GetTransformationParameters method must be passed as they are to the ApplyTransformationParameters method.

The shift operation is performed first, followed by the rotation and resize operations.

If you simply want to automatically straighten a bitmap, use the Deskew method.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Combine method, Rotate method, Size method, Deskew method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method, GetMarksCenterMass method.
Topics: | Raster Images: Document Imaging


ApplyVOILUT method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ApplyVOILUT(L_PUINT16 pLUT, unsigned uNumberOfEntries, int nFirstStoredPixelValueMapped, unsigned uEntryBits, unsigned uFlags);
Delphi Syntax | Function ApplyVOILUT (pLUT: L_PUINT16; uNumberOfEntries: L_UINT; nFirstStoredPixelValueMapped: L_INT; uEntryBits: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

(Medical only) Sets up the paint or paint and image processing methods' window leveling options for a specific bitmap through a lookup-table (LUT). In the DICOM world, this is referred to as "applying a non-linear VOI LUT".

This method will remap the LUT used to display and process a bitmap by applying a user-defined lookup table. In the DICOM world this is referred to as applying a "non-linear VOI LUT". The DICOM standard states:

"A VOI LUT defines the transformation of the modality pixel values into pixel values that are meaningful for print, display, etc. This transformation is applied after any Modality LUT". Please see "VOI LUT Module Attributes" in the DICOM standard for more details.

This method does not change the image data; it only updates the entries inside the bitmap display LUT.

It is recommended to always set the VOI_LUT_UPDATE_MIN_MAX flag.

In the DICOM world you will need to set VOI_LUT_REVERSE_ORDER flag if the photometric interpretation of the image is "MONOCHROME1", where the minimum grayscale value is intended to be displayed as white after any VOI gray scale transformations have been performed.

This method supports signed data images.

See Also

Elements: | ApplyLinearVOILUT method, RemapIntensity method, ApplyModalityLUT method, ApplyLinearModalityLUT method.
Topics: | Raster Images: Modifying Intensity Values


AutoBinary method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AutoBinary (void);
Delphi Syntax | Function AutoBinary ( ): L_INT;
Overview | Refer to Removing Noise

Remarks

(Document/Medical only) Applies binary segmentation to the bitmap using an automatically calculated threshold based on a two-peak method of statistical analysis of the histogram.

The bitmap is transformed into a binary image using a threshold calculated automatically based on statistical features of the bitmap. Best results are obtained with grayscale bitmaps.

This method also supports 12 and 16 - bit grayscale bitmaps. If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16 - bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Sharpen method, Posterize method, Mosaic method, Emboss method, ShowAverageDlg method , Median method, AddNoise method, IntensityDetect method, SpatialFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, BinaryFilter method, ColorLevel method.
Topics: | Raster Images: Filtering Images


AutoColorLevel method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AutoColorLevel(LEVELCOLORINFO &Master, LEVELCOLORINFO &Red, LEVELCOLORINFO &Green, LEVELCOLORINFO &Blue, unsigned uBlackClip, unsigned uWhiteClip, unsigned uFlags);
Delphi Syntax | Function AutoColorLevel (var Master: LEVELCOLORINFO; var Red: LEVELCOLORINFO; var Green: LEVELCOLORINFO; var Blue: LEVELCOLORINFO; uBlackClip: L_UINT; uWhiteClip: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Correcting Colors

Remarks

(Raster Pro and above toolkits) Applies one of several types of automatic color leveling to an image.

This method makes the dark values darker and the light values lighter, which automatically enhances shadows and brightens the image. It also maximizes the tonal range of the image. It enhances the contrast and intensity using the image's histogram and a color distribution-based algorithm.

The fields in the records (structures) will be updated with the uMinInput, uMaxInput, uMinOutput, uMaxOutput and uGamma values used by the method for the appropriate channel(s), depending on the flag(s) set in uFlags.

If you set the AUTO_NOPROCESS flag in uFlags, the Master, Red, Green and Blue parameters will be updated with the color leveling information used by the AutoColorLevel method. If you then pass the updated Master, Red, Green and Blue records (structures) to the ColorLevel method, you will obtain the same result that you would have obtained if you had called the AutoColorLevel method with the leveling flag by itself.

If you set only AUTO_NOPROCESS in uFlags then the method will return an error code.

If the image is a grayscale image, then AUTO_LEVEL, AUTO_CONTRAST and AUTO_INTENSITY give identical results. The master, red, green and blue parameters will have the same values.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the bitmap has a region, the effect will be applied on the region only.

As an example, the following figure shows an image before any automatic color leveling has been performed:

The following figure shows what would happen if you start with the original image and apply the AutoColorLevel method using the AUTO_LEVEL flag.

The following figure shows what would happen if you start with the original image and apply the AutoColorLevel method using the AUTO_INTENSITY flag.

The following figure shows what would happen if you start with the original image and apply the AutoColorLevel method using the AUTO_CONTRAST flag.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | ColorLevel method, Sharpen method, Posterize method, Mosaic method, Emboss method, ShowAverageDlg method , Median method, AddNoise method, IntensityDetect method, SpatialFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, BinaryFilter method, ColorLevel method, SelectiveColor method.
Topics: | Raster Images: Modifying Intensity Values


AutoTrim method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int AutoTrim (Cardinal uThreshold);
Delphi Syntax | AutoTrim (uThreshold: Cardinal): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Trims the current bitmap, removing blank space (usually white space) around the edges.

The threshold is a delta value for detecting blank space. Starting at each edge of the bitmap and evaluating toward the center, any change in intensity that is less than or equal to uThreshold is considered blank space. Valid values are 0 to 255.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics:

Raster Images: Doing Geometric Transformations


Average method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Average (int iDim);
Delphi Syntax | Average (iDim: Integer): Integer;
Overview | Refer to Removing Noise.

Remarks

Changes the color of each pixel in the bitmap to the average color of pixels in its neighborhood. This results in a blur effect.

You control the amount of blur by specifying the size of the neighborhood that is used for averaging.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


BalanceColors method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BalanceColors(const COLORBALANCING &RedFact, const COLORBALANCING &GreenFact, const COLORBALANCING &BlueFact);
Delphi Syntax | Function BalanceColors ( RedFact: COLORBALANCING; GreenFact: COLORBALANCING; BlueFact: COLORBALANCING ): L_INT;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Redistributes the RGB values of the bitmap, using the values stored in the specified Records (structures).

For each pixel in the bitmap, the red value is modified using the values of RedFact. This generates an intermediate red value, an intermediate green value and an intermediate blue value.

For each pixel in the bitmap the green value is modified using the values of GreenFact. This generates an intermediate red value, an intermediate green value and an intermediate blue value.

For each pixel in the bitmap the blue value is modified using the values of BlueFact. This generates an intermediate red value, an intermediate green value and an intermediate blue value.

The intermediate red values are added to generate the new red value for the pixel. The intermediate green values are added to generate the new green value for the pixel and the intermediate blue values are added to generate the new blue value for the pixel. This triplet forms the new RGB value for the pixel.

The COLORBALANCING Record (structure) has three components of type double: toRed, toGreen and toBlue. The possible values of each member must be within the range: 0.0 – 1.0.

This method supports 48 and 64-bit color images. Support for 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | ConvertToColoredGray method, GrayScale method, GrayScaleExt method, IsGrayScale property
Topics: | Raster Images: Doing Color Expansion or Reduction


Bending method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Bending(int nValue, const TPoint &ptCenter, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Bending (nValue: L_INT; ptCenter: TPoint; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects.

Remarks

(Raster Pro and above toolkits only) Warps the image along a curved plane, centered on the specified point.

The method bends the image around the center point specified in ptCenter. The center point must be defined inside the bitmap or inside the region, if the bitmap has a region. If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, ShowBendingDlg method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


BinaryFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BinaryFilter (int iType);
Delphi Syntax | BinaryFilter (iType: Integer): Integer;
Overview | Refer to Removing Noise.

Remarks

(Document/Medical only) Imposes one of the predefined binary filters for erosion or dilation of black objects.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | MaxFilter method, MinFilter method
Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


BitmapToClient method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall BitmapToClient (float X, float Y);
Delphi Syntax | Function BitmapToClient (X: Single; Y: Single): Integer;
Overview | Refer to Displaying an Image.

Remarks

Converts the given bitmap coordinates to client coordinates.

Calling this method will update the ConvertX and ConvertY properties with the converted values.

SeeAlso

Elements: | ClientToBitmap method, BitmapWidth property, BitmapHeight property, ConvertX property, ConvertY property
Topics: | Working with the Control: Client Area Usage
 | Raster Images: Displaying Images


BorderRemove method (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | int BorderRemove(unsigned uProcessFlags, int uBorderToRemove, int nBorderPercent, int nWhiteNoiseLength, int nVariance);
Delphi Syntax: | function BorderRemove (uProcessFlags: L_UINT32; uBorderToRemove: L_UINT;nBorderPercent : L_INT32; nWhiteNoiseLength : L_INT32; nVariance: L_INT32): L_INT;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical) Removes borders from 1-bit images. To "fine-tune" the performance of this method, try modifying the values for nWhiteNoiseLength, nBorderPercent and nVariance.

This method triggers both the OnBorderRemove event and the OnStatus event.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | OnBorderRemove event
Topics: | Raster Images: Cleaning - up 1-Bit Images


BumpMap method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int BumpMap(TBitmapHandle BumpBitmap, int nAzimuth, unsigned uElevation, unsigned uDepth, int nXOffset, int nYOffset, int nXDst, int nYDst, bool bTile, int nBright, int nIntensity, L_PUINT pLut);
Delphi Syntax | Function BumpMap (BumpBitmap: TBitmapHandle; nAzimuth: L_INT; uElevation: L_UINT; uDepth: L_UINT; nXOffset: L_INT; nYOffset: L_INT; nXDst: L_INT; nYDst: L_INT; bTile: Boolean; nBright: L_INT; nIntensity: L_INT; pLut: L_PUINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Adds a three-dimensional texture pattern created by applying the bump image to the destination image.

If the bTile parameter is set to TRUE, the nXOffset and nYOffset parameters represent the offset in the bump image. If there is a region on the bump image, this region rectangle will represent the bump bitmap.

If the bTile parameter is set to FALSE, the nXOffset and nYOffset parameters represent the position in the bump image. If a region is defined for either the bump or destination bitmap, or both bitmaps, the effect applies only to the intersection of regions.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cubism method, DrawStar method, Dry method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Combining Images


CancelFloater method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CancelFloater (void);
Delphi Syntax | CancelFloater: Integer
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Causes cancellation of the region and deletion of the floater, if the floater is automatically created using the AutoFloater property. A floater can be created automatically from a region using the mouse if the AutoFloater property and the EnableFloater property are True. When a floater is active, clicking inside the Main Control's bitmap and outside the region causes the floater to be pasted and the region to be canceled. Calling this method removes the floater without pasting it.

See Also

Elements: | SetRgnEllipse method, EnableFloater property, SetRgnRect method, SetRgnColor method, PolygonSize property, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


Capture method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Capture (L_HDC hDevice, int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | Capture (hDevice: L_HDC; iLeft, iTop, iWidth, iHeight:Integer): Integer;
Overview | Refer to Capturing an Image from the Screen.

Remarks

Loads a bitmap from the specified rectangle within a device context.

Normally, this method is used for capturing images displayed on the screen. The resulting bitmap will have the same bits per pixel as the display device.

See Also

Topics:

Raster images: Capturing a screen image


ChangeHueSatInt method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ChangeHueSatInt(int nHue, int nSaturation, int nIntensity, LPHUESATINTDATA pHsiData, unsigned uHsiDataCount);
Delphi Syntax | Function ChangeHueSatInt (nHue: L_INT; nSaturation: L_INT; nIntensity: L_INT; pHsiData: LPHUESATINTDATA; uHsiDataCount: L_UINT): L_INT;
Overview | Refer to Correcting Colors

Remarks

Changes the hue, saturation and brightness of all or specified colors in the image.

This method combines the basic functionality found in the Hue, Saturation, and Intensity methods. In addition, special options can be specified in the HUESATINTDATA record (structure).

To change the overall hue, saturation and intensity all at one time, pass Nil (NULL) for pHsiData and 0 for uHsiDataCount. To adjust the parameters separately, or to make adjustments in successive passes, use the structures and pass 0 for the nHue, nSaturation, and nIntensity parameters.

For detailed information about using the ranges in the HUESATINTDATA structure, refer to HUESATINTDATA.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Invert method, Saturation method, HistoEqualize method, Fill method, Pixel property, GetHistogram method, WindowLevel method, Hue method, Average method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, AddShadow method, ColorReplace method, ColorThreshold method.
Topics: | Raster Images: Modifying Intensity Values
 | Using Color Values in LEADTOOLS


ChannelMix method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ChannelMix(int nRedFactorR, int nRedFactorG, int nRedFactorB, int nRedFactorConstant, int nGreenFactorR, int nGreenFactorG, int nGreenFactorB, int nGreenFactorConstant, int nBlueFactorR, int nBlueFactorG, int nBlueFactorB, int nBlueFactorConstant);
Delphi Syntax | Function ChannelMix (nRedFactorR: L_INT; nRedFactorG: L_INT; nRedFactorB: L_INT; nRedFactorConstant: L_INT; nGreenFactorR: L_INT; nGreenFactorG: L_INT; nGreenFactorB: L_INT; nGreenFactorConstant: L_INT; nBlueFactorR: L_INT; nBlueFactorG: L_INT; nBlueFactorB: L_INT; nBlueFactorConstant: L_INT ): L_INT;
Overview | Refer to Correcting Colors

Remarks

Redistributes the RGB values of the specified bitmap using the specified parameters.

This method is used to rebalance the colors in a bitmap. It can be used to make color adjustments and corrections.

This method supports 1, 2, 3, 4, 5, 6, 7, 8, 24 and 48 bit bitmaps and can support regions for 24 and 48 bit bitmaps. If the bitmap has a region, the effect will be applied on the region only.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

As an example, if the ChannelMix method is called with the following values:

nRedFactorR: 100.

nRedFactorG: -200.

nRedFactorB: 50.

nRedFactorConstant: 50

nGreenFactorR: 150

nGreenFactorG: 50

nGreenFactorB: 50.

nGreenFactorConstant: -50.

nBlueFactorR: 100

nBlueFactorG: 50

nBlueFactorB: -150

nBlueFactorConstant: 25.

A pixel with the RGB value (130, 200, 50) would be modified as follows:

New Red value = 130(100%) + 200(-200%) + 50(50%) + ( 50 X MaximumComponent i.e. 255 for an 8 bit component and 65536 for a 16 bit component) / 100 = 128

= 130 - 400 + 25 + 128

= -117 (negative values will be set to 0 in the final RGB value)

New Green value = 130(150%) + 200(50%) +50(50%) - ( 50 X MaximumComponent i.e. 255 for 8 bit component and 65536 for 16 bit component) / 100 = 128

195 + 100 + 25 - 128

= 192

New Blue value = 130(100%) + 200(50%) + 50(-150%) + ( 25 X MaximumComponent i.e. 255 for 8 bit component and 65536 for 16 bit component) / 100 = 64

= 130 + 100 - 75 + 64

= 219

Therefore the new RGB value for the pixel is: (0, 192, 219).

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | ConvertToColoredGray method, BalanceColors method, GrayScale method, GrayScaleExt method, IsGrayScale property
Topics: | Raster Images: Modifying Intensity Values


ClientToBitmap method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ClientToBitmap (float X, float Y);
Delphi Syntax | Function ClientToBitmap (X: Single; Y: Single): Integer;
Overview | Refer to Displaying an Image.

Remarks

Converts the given client coordinates to bitmap coordinates.

Calling this method will update the ConvertX and ConvertY properties with the converted values.

SeeAlso

Elements: | BitmapToClient method, BitmapWidth property, BitmapHeight property, ConvertX property, ConvertY property
Topics: | Working with the Control: Client Area Usage
 | Raster Images: Displaying Images


ColorIntensityBalance method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorIntensityBalance(int nShadowsRed, int nShadowsGreen, int nShadowsBlue, int nMidToneRed, int nMidToneGreen, int nMidToneBlue, int nHighLightRed, int nHighLightGreen, int nHighLightBlue, bool bLuminance);
Delphi Syntax | Function ColorIntensityBalance (nShadowsRed: L_INT; nShadowsGreen: L_INT; nShadowsBlue: L_INT; nMidToneRed: L_INT; nMidToneGreen: L_INT; nMidToneBlue: L_INT; nHighLightRed: L_INT; nHighLightGreen: L_INT; nHighLightBlue: L_INT; bLuminance: Boolean ): L_INT;
Overview | Refer to Correcting Colors

Remarks

(Raster Pro and above toolkits.) Changes the distribution of the red, green, or blue channels to make the colors in an image more accurate or more different.

Each color component is treated independently. The color range for each component is split into Shadows, Midtones and Highlights based on the intensity. Positive values from a component cause that particular component to become brighter, whereas negative values cause the component to become darker. A value of 0 leaves the component unchanged.

The preserve luminance option aims to minimize the luminance change in the image.

This method supports only RGB images. It does not support grayscale images.

Support for 48-bit and 64-bit colored images are available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | ConvertToColoredGray method, GrayScale method, GrayScaleExt method, IsGrayScale property, Sharpen method, Posterize method, Mosaic method, Emboss method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, AutoColorLevel method, ColorLevel method, SelectiveColor method.
Topics: | Raster Images: Modifying Intensity Values


ColorizeGray method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorizeGray(TBitmapHandle SrcBitmap, LPGRAYCOLOR pGrayColors, unsigned uGrayColorsCount);
Delphi Syntax | Function ColorizeGray (SrcBitmap: TBitmapHandle; pGrayColors: LPGRAYCOLOR; uGrayColorsCount: L_UINT): L_INT;
Overview | Refer to Grayscale Images

Remarks

(Raster Pro and above toolkits.) Colors an 8, 12 or 16-bit grayscale bitmap. The method changes the color bits/pixel of the bitmap from the specified formats into 24-bit RGB format.

The method can be used as a visualization aid. More precisely, this method can be used to show variations in a bitmap’s intensity values.

This method colors the grayscale bitmap by converting specified ranges of grayscale intensities into corresponding RGB values. Use the pGrayColors variable to set the intensity ranges and the RGB values.

Using this method you can show details that were never seen in the original bitmap. In 12 and 16-bit grayscale bitmaps, only the 8 most significant bits are displayed, whereas the rest are discarded. So by coloring these discarded bits you can make them visible instead.

The method will allocate and store a 24-bit bitmap. If you pass Nil (NULL) in the pGrayColors variable then the method colors the bitmap automatically using an algorithm that generates unique output colors. The output bitmap will contain 256 colors if the input bitmap is 8-bit, 4096 colors if the input bitmap is 12-bit and 65535 colors if the input bitmap is 16-bit. The uGrayColorsCount variable will be ignored if pGrayColors is Nil (NULL).

The sample below shows you how to color a 16-bit grayscale bitmap using pGrayColors.

In a 16-bit grayscale bitmap, the lowest pixel value is 0 and the highest pixel value is 65535.

The colors from the input images will be colored as follows:

Pixel intensities from 0 - 9999 will be colored as Red.

Pixel intensities from 10000 - 19999 will be colored as Green.

Pixel intensities from 20000 - 29999 will be colored as Blue.

Pixel intensities from 30000 - 39999 will be colored as Cyan.

Pixel intensities from 40000 - 49999 will be colored as Magenta.

Pixel intensities from 50000 - 65535 will be colored as Yellow. (Note: the Threshold value is ignored for the last entry in the pGrayColors array.)

For more information on filling the pGrayColors array to obtain this result, refer to the example.

This method supports 8, 12 and 16-bit grayscale bitmaps only. Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits. It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | WindowLevel method, GrayScaleToDuotone method, GrayScaleToMultitone method, ShiftData method, SelectData method.
Topics: | Raster Images: Doing Color Expansion or Reduction


ColorLevel method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorLevel(const LEVELCOLORINFO &Master, const LEVELCOLORINFO &Red, const LEVELCOLORINFO &Green, const LEVELCOLORINFO &Blue, unsigned uFlags);
Delphi Syntax | Function ColorLevel (Master: LEVELCOLORINFO; Red: LEVELCOLORINFO; Green: LEVELCOLORINFO; Blue: LEVELCOLORINFO; uFlags: L_UINT): L_INT;
Overview | Refer to Correcting Colors

Remarks

(Raster Pro and above toolkits) Applies color leveling to an image. It changes the image shadows, midtones and highlights.

The Master, Red, Green and Blue parameters tell the ColorLevel method what constitutes shadows, midtones, and highlights and how to remap the shadows, midtones and highlights.

Control the amount of image balance and leveling by controlling the values of the uMinInput, uMaxInput, uMinOutput, uMaxOutput, and uGamma members of the LEVELCOLORINFO record (structure).

The uMinInput member of an LEVELCOLORINFO record (structure) defines what the method interprets as shadows for that color channel. Any value less than or equal to uMinInput is considered a shadow.

The uMaxInput member of an LEVELCOLORINFO record (structure) defines what the method interprets as highlights for that color channel. Any value greater than or equal to uMaxInput is considered a highlight.

The value of the uMaxInput member must be greater than the value of the uMinInput member by at least 2.

Midtones are those values between uMinInput and uMaxInput.

The uMinOutput member is the value to which the shadows will be mapped.

The uMaxOutput member is the value to which the highlights will be mapped.

The uGamma member is used to modify the midtone values.

If only LEVEL_MASTER is set in uFlags then the rest of the channels will still be affected.

If the image is a grayscale image, then you must set LEVEL_MASTER in uFlags, otherwise the method will not have any effect.

If uMinOutput > uMaxOutput then the bitmap’s shadows and highlights will be inverted.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the image has a region, the effect will be applied on the region only.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Auto ColorLevel method, Sharpen method, Posterize method, Mosaic method, Emboss method, ShowAverageDlg method , Median method, AddNoise method, IntensityDetect method, SpatialFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, BinaryFilter method, ColorLevel method, SelectiveColor method.
Topics: | Raster Images: Modifying Intensity Values


ColorMerge method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorMerge (int iFlags);
Delphi Syntax | ColorMerge (iFlags: Integer): Integer;
Overview | Refer to Managing Color Separations.

Remarks

Creates a color bitmap by merging grayscale bitmaps that were created as color separations. You can use this to recombine the bitmaps that the ColorSeparate method creates.

The supported color-space models are RGB, CMYK, CMY, HSV, and HLS.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If all the bitmaps are 16 bits grayscale bitmaps then the resulting bitmap is 48 bits per pixel, otherwise the resulting bitmap is 24 bits per pixel.

You can use the ColorPlanes property to access the grayscale bitmaps.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Doing Color Space Conversions
 | Examining and Altering Bitmaps
 | Changing Brightness and Contrast


ColorReplace method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorReplace(int nHue, int nSaturation, int nBrightness, LPREPLACECOLOR pColorReplace, unsigned uColorCount);
Delphi Syntax | Function ColorReplace (nHue: L_INT; nSaturation: L_INT; nBrightness: L_INT; pColorReplace: LPREPLACECOLOR; uColorCount: L_UINT): L_INT;
Overview | Refer to Correcting Colors

Remarks

Replaces specified colors by adjusting values of hue, saturation and brightness.

The value of the uFuzziness member of the REPLACECOLOR record (structure) determines the range around each color where the pixels will be changed according to nHue, nSaturation and nBrightness.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Invert method, Saturation method, HistoEqualize method, Fill method, Pixel property, GetHistogram method, WindowLevel method, Hue method, Average method, Median method, AddNoise method, IntensityDetect method, ColorThreshold method, ChangeHueSatInt method
Topics: | Raster Images: Modifying Intensity Values
 | Using Color Values in LEADTOOLS


ColorRes method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorRes (int iBitsPerPixel, int iPalette, int iDither, int iColors);
Delphi Syntax | ColorRes (iBitsPerPixel, iPalette, iDither, iColors: Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Converts the bitmap from any bits-per-pixel to any bits-per-pixel, letting you specify the palette to use.

Also, when converting to 16-bits per pixel or higher, you can specify RGB or BGR color order.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | UserPalette property
Topics: | Raster Images: Doing Color Expansion or Reduction


ColorResList method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorResList (int iBitsPerPixel, Cardinal uPalette, Cardinal uDither, Cardinal uColors);
Delphi Syntax | ColorResList (iBitsPerPixel:Integer; uPalette:Cardinal; uDither: Cardinal; uColors: Cardinal): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Converts all bitmaps in a list from any bits-per-pixel to any bits-per-pixel.

This method also updates the palette that is referenced by the AnimationPalette property.

See Also

Elements: | ColorRes method, UserPalette property
Topics: | Raster Images: Doing Color Expansion or Reduction


ColorSeparate method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorSeparate (int iFlags):;
Delphi Syntax | ColorSeparate (iFlags: Longint): Integer;
Overview | Refer to Managing Color Separations.

Remarks

Separates the bitmap by color plane to produce one grayscale bitmap per plane. You can specify any of several color-space models.

The supported color-space models are RGB, CMYK, CMY, HSV, and HLS.

You can use the ColorPlanes property to access the grayscale bitmaps.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the bitmap is 48 or 64 bits bitmap then the created bitmaps are 16 bits grayscale bitmaps otherwise the created bitmaps are 8 bits grayscale bitmap.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Doing Color Space Conversions
 | Examining and Altering Bitmaps
 | Changing Brightness and Contrast


ColorThreshold method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ColorThreshold(unsigned uColorSpace, const COMPAREDATA * CompDataArray);
Delphi Syntax | Function ColorThreshold (uColorSpace: L_UINT; CompDataArray: TLEADComparedDataArray): L_INT;
Overview | Refer to Correcting Colors

Remarks

Resets those bitmap pixel component values that fall outside of a specified range, using any one of eight color spaces.

Please note that each color space component may have a different range.

Color Component | Range for 8-bit components | Range for 16-bit components
RGB |  |
R | 0 – 255 | 0 - 65535
G | 0 – 255 | 0 - 65535
B | 0 – 255 | 0 - 65535
HSV |  |
H | 0 - 360 | 0 - 36000
S | 0 - 100 | 0 - 10000
V | 0 - 255 | 0 - 65535
HLS |  |
H | 0 - 360 | 0 - 36000
L | 0 - 255 | 0 - 65535
S | 0 - 100 | 0 - 10000
XYZ |  |
X | 0 - 255 | 0 - 65535
Y | 0 - 255 | 0 - 65535
Z | 0 - 255 | 0 - 65535
YCrCb |  |
Y | 0 - 255 | 0 - 65535
Cr | -128 - 127 | -32768 - 32767
Cb | -128 - 127 | -32768 - 32767
YUV |  |
Y | 0 - 255 | 0 - 65535
U | -112 - 111 | -28567 - 28566
V | -138 - 137 | -35337 - 35336
LAB |  |
L | 0 - 100 | 0 - 10000
A | -128 - 127 | -32768 - 32767
B | -128 - 127 | -32768 - 32767
CMY |  |
C | 0 - 255 | 0 - 65535
M | 0 - 255 | 0 - 65535
Y | 0 - 255 | 0 - 65535

The method works as follows:

1. | The bitmap is converted to the required color space.
2. | For every pixel, the following operations are performed: Each component is compared with the nMinRange and nMaxRange ranges of the appropriate COMPAREDATA record (structure).
 | a. | If it is inside the range, the component is considered to have "passed" the test.
 | b. | If it is outside the range, the component has been rejected". The CLTH_TYP_BANDREJECT flag inverts this by making "rejected" components "passed" and vice-versa.
3. | If CLTH_MOD_CHANNEL is set, the components are modified independently. If CLTH_MOD_ALL has been set, the pixel is rejected by the test if any component is rejected. If the pixel/component is rejected, then:
 | a. | If CLTH_VALUE_MIN is passed, the rejected pixel/component is set to 0.
 | b. | If CLTH_VALUE_MAX is passed, the rejected pixel/component is set to 255.
 | c. | If CLTH_VALUE_CLAMP is passed, components less that nMin go to 0 and components greater than nMax go to 255. This would work only with the CLTH_MOD_CHANNEL and CLTH_TYP_BANDPASS flag.

This method works for 1, 2, 3, … 8, 16, 24, 32, 48 and 64-bit color bitmaps and can support regions for 24 and 48-bit bitmaps. If a 24 or 48-bit bitmap has a region the effect will be applied on the region only.

One record (structure) is used for each color component. The order is considered to be the same as in the CLTH_xxx_SPACE name. For example, for CLTH_RGB_SPACE:

pCompData[0] is used for the Red component

pCompData[1] is used for the Green component

pCompData[2] is used for the Blue component

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Invert method, Saturation method, HistoEqualize method, Fill method, Pixel property, GetHistogram method, WindowLevel method, Hue method, Average method, IntensityDetect method, ColorReplace method, ChangeHueSatInt method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Doing Color Space Conversions
 | Using Color Values in LEADTOOLS


Combine method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Combine (int nLeft, int nTop, int nWidth, int nHeight, LEADTyp::TBitmapHandle pBitmap, int nSrcLeft, int nSrcTop, int iFlags);
Delphi Syntax | Combine (nLeft, nTop, nWidth, nHeight: Integer, pBitmap: BitmapHandle, nSrcLeft, nSrcTop: Integer; iFlags: Longint): Integer;
Overview | Refer to Combining Images.

Remarks

Combines image data from two bitmaps, letting you specify the areas to be combined and the operations to be performed when combining the data.

For example, suppose you use the SpatialFilter method to apply an edge detection filter. You can then use this method to combine the resulting bitmap with the original one to produce an image with hard edges.

This method combines the data byte-by-byte. Both images must have the same color resolution. Images that are 24 bits per pixel are the easiest to combine. For other color resolutions, you must ensure that the pixel and byte boundaries are aligned on the rectangle borders. Both images must use the same palette, if a palette is required.

For a simple paste, use CB_OP_ADD and CB_DST_0 as the flags.

If a region is defined for the target bitmap, the combine applies only to the region. (Any region defined in the source bitmap is ignored.)

See Also

Elements: | ApplyTransformationParameters method, GetMarksCenterMass method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method
Topics: | Raster Images: Copying Images
 | Raster Images: Combining Images
 | Implementing Transparency
 | Examining and Altering Bitmaps
 | Removing Noise
 | Detecting and Enhancing Edges and Lines
 | Raster Image Functions: Document Imaging
 | Detecting Registration Marks


CombineExt method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CombineExt (int iLeft, int iTop, int iWidth, int iHeight, TBitmapHandle Bitmap, int iSrcLeft, int iSrcTop, unsigned iFlags);
Delphi Syntax | Function CombineExt (iLeft: Integer; iTop: Integer; iWidth: Integer; iHeight: Integer; Bitmap: TBitmapHandle; iSrcLeft: Integer; iSrcTop: Integer; iFlags: Cardinal): integer;
Overview | Refer to Combining Images.

Remarks

Combines image data from two bitmaps, letting you specify the areas to be combined and the operations to be performed when combining the data, and which color planes (R or G or B or R, G, and B) are used.

For example, suppose you use the SpatialFilter method to apply an edge detection filter. You can then use this method to combine the resulting bitmap with the original one to produce an image with hard edges.

This method combines the data pixel-by-pixel. The two images can be any color resolution. Images that are 24-bits per pixel are the easiest and fastest to combine. This method uses Windows-style coordinates (with a top-left origin) to specify the areas to be combined.

If the channel setting for one of the bitmaps is the master channel (CB_SRC_MASTER, CB_DST_MASTER, CB_RES_MASTER) the settings for all the bitmaps will be set to master.

For a simple paste, use CB_OP_ADD and CB_DST_0 as the flags.

If a region is defined for the either the source or destination bitmap, or both bitmaps, the combine applies only to the intersection of the regions.

For example, assume CB_SRC_RED is passed for the source bitmap, CB_DST_BLUE is passed for the destination bitmap and CB_RES_GREEN is passed for the resulting bitmap. In this case, the green channel of the resulting bitmap is calculated as the result of the operations applied to the red channel of the source bitmap and the blue channel of the destination bitmap. The other channels of the resulting bitmap are unchanged.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Underlay method, Combine method
Topics: | Raster Images: Copying Images
 | Raster Images: Combining Images
 | Implementing Transparency
 | Examining and Altering Bitmaps
 | Removing Noise
 | Detecting and Enhancing Edges and Lines


CombineWarp method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CombineWarp(const TPoint * ptDstArray, TBitmapHandle BitmapSrc, const TPoint &ptSrc, int nSrcWidth, int nSrcHeight, unsigned uFlags);
Delphi Syntax | Function CombineWarp (ptDstArray: TLEADCombineWarpDstPointsArray; BitmapSrc: TBitmapHandle; ptSrc: TPoint; nSrcWidth: L_INT; nSrcHeight: L_INT; uFlags: L_UINT ): L_INT;
Overview | Refer to Combining Images.

Remarks

Combines image data from the source bitmap (the slave) and the destination bitmap (the master bitmap, already loaded in the Main control), using a perspective warp.

You can warp the entire source bitmap, or a portion of the source bitmap. To warp a portion of the source bitmap, set ptSrc, nSrcWidth and nSrcHeight accordingly. To warp the entire source bitmap, set the following:

ptSrc.x = 0;
ptSrc.y = 0;
nSrcWidth =BitmapWidth of BitmapSrc;
nSrcHeight = BitmapHeight of BitmapSrc;

The warp area in the destination bitmap is specified in ptDstArray. The polygon specified in ptDstArray must:

be concave.

fit entirely on the destination bitmap.

If either of these conditions is FALSE, this function will return an error.

The ordering of the points in ptDstArray can affect the resulting warp. For example, if the source bitmap is the following:

then ordering the points in ptDstArray as shown below results in the following warp:

while ordering the points in ptDstArray as shown below, results in the following warp:

See Also

Element: | Combine method, Underlay metho
Topics: | Raster Images: Combining Images
 | Examining and Altering Bitmaps


ContourFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ContourFilter(int nThreshold, int nDeltaDir, int nMaximumError, int nOption);
Delphi Syntax | function ContourFilter (nThreshold: Integer; nDeltaDir: Integer; nMaximumError:Integer; nOption: Integer):Integer;

Remarks

(Medical only) Performs a contour segment filter on the current bitmap.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

Threshold property , DeltaDirection property , Error property , Option property , OptionFlags property , ShowHelpButton property , Intensity method, EnableMethodErrors property


Contrast method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Contrast (int iChange);
Delphi Syntax | Contrast (iChange: Integer): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Increases or decreases the contrast of the bitmap.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | Intensity method, GammaCorrect method, HistoContrast method, HistoEqualize method, StretchIntensity method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


ContrastBrightIntensity method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ContrastBrightIntensity (int nContrast, int nBrightness, int nIntensity);
Delphi Syntax | Function ContrastBrightIntensity (nContrast: L_INT; nBrightness: L_INT; nIntensity: L_INT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

(Raster Pro and above toolkits) Applies contrast, brightness and intensity adjustments to enhance the image tonal range.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits. It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

The transformations are applied in this order: Contrast, Brightness then Intensity. Were the three methods to be called separately, then after each method was applied, calculated values less than 0 and more than 255 (for 8 bits per component for example) would be changed to 0 and 255 respectively. Using this method, the values are accumulative and the final result would be clamped. In addition, this method is faster than calling each method separately.

See Also

Elements: | Contrast method, Intensity method, Saturation method, Sharpen method, Posterize method, Mosaic method, Emboss method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, ColorLevel method, AutoColorLevel method, SelectData method, ColorizeGray method
Topics: | Raster Images: Modifying Intensity Values


ConvertSignedToUnsigned method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ConvertSignedToUnsigned(unsigned uShift);
Delphi Syntax | Function ConvertSignedToUnsigned(uShift: Cardinal): Integer;
Overview | Refer to Examining and Altering Bitmaps

Remarks

Converts a signed bitmap to unsigned.

To determine whether a bitmap is signed, check the IsSigned property. LEADTOOLS loads signed files only if the LoadSigned property is TRUE. If the LoadSigned property is FALSE, the signed images are automatically converted to signed during loading, by setting all negative pixels to 0.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method supports signed data images.

See Also

Elements: | IsSigned property, LoadSigned property
Topics: | Raster Images: Doing Color Expansion or Reduction


ConvertToColoredGray method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ConvertToColoredGray (int RedFact, int GreenFact, int BlueFact, int RedGrayFact, int GreenGrayFact, int BlueGrayFact);
Delphi Syntax | Function ConvertToColoredGray (RedFact: Integer; GreenFact: Integer; BlueFact: Integer; RedGrayFact: Integer; GreenGrayFact: Integer; BlueGrayFact: Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Document only) Converts a bitmap to a grayscale bitmap, then enhances the color components based on the specified parameters.

This method is more general than the GrayScaleExt method. ConvertToColoredGray can be used to give images a "sepia" look by adding a blue or brown color.

RedFact + GreenFact + BlueFact must equal 1000. (Internally the values are divided by 1000).

For each pixel in the bitmap the red, green and blue values are modified by the RedFact, GreenFact and BlueFact parameters, respectively. This allows the user to give more weight to one color, essentially enhancing that color, before the pixel is converted to grayscale.

For example, if this method is called with the RedFact set to 500, the GreenFact set to 250 and the BlueFact set to 250, the red value of each pixel will get 50% of the weight when determining the grayscale value. The green value will get 25% of the weight and the blue value will get 25% of the weight when determining the grayscale value. This highlights or enhances the red in the bitmap, prior to conversion to grayscale. Upon conversion to grayscale, the red, green and blue components of the output pixel are the same. Call this value G. Therefore, the RGB values for the pixel would be (G, G, G).

Once the grayscale value for the pixel has been obtained, the red component of the output pixel can be further modified using the RedGrayFact value. The equation for this can be seen below:

Goutput-red = G + G * RedGrayFact / 1000

The green and blue components are found similarly, using the GreenGrayFact and the BlueGrayFact values, respectively.

Please note that the RedGrayFact, GreenGrayFact and BlueGrayFact values can be negative. A negative value results in a decrease in pixel intensity. A positive value results in an increase in pixel intensity.

If RedGrayFact = GreenGrayFact = BlueGrayFact = 0, then the output is the same as the output from the GrayScaleExt method.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | BalanceColors method, GrayScale method, GrayScaleExt method, IsGrayScale property
Topics: | Raster Images: Doing Color Expansion or Reduction


ConvertUnsignedToSigned method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ConvertUnsignedToSigned(unsigned uFlags);
Delphi Syntax | Function ConvertUnsignedToSigned (uFlags: L_UINT): L_INT;
Overview | Refer to Examining and Altering Bitmaps

Remarks

Converts an unsigned bitmap to signed.

This method updates Bitmap.MaxVal and Bitmap.MinVal with new values that consider the bitmap to contain signed data. After calling this method, the IsSigned property will be TRUE.

This method supports 12 and 16-bit grayscale images and 48 and 54-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | ConvertSignedToUnsigned method, IsSigned property, LoadSigned property
Topics: | Raster Images: Doing Color Expansion or Reduction


Copy method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Copy (int iFlags);
Delphi Syntax | Copy (iFlags: Integer): Integer;
Overview | Refer to Copying and Creating Bitmaps.

Remarks

Copies the bitmap to the clipboard.

See Also

Topics | Raster Images: Exchanging Imgages with Other Objects
 | Raster Images: Using the Clipboard
 | Using Rulers in Annotation Objects


Correlation method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Correlation(TBitmapHandle CorrelationBitmap, PPoint pPoints, unsigned uMaxPoints, unsigned &uNumOfPoints, unsigned uXStep, unsigned uYStep, unsigned uThreshold);
Delphi Syntax | Function Correlation (CorrelationBitmap: TBitmapHandle; pPoints: pPOINT; uMaxPoints: L_UINT; var uNumOfPoints: L_UINT; uXStep: L_UINT; uYStep: L_UINT; uThreshold: L_UINT): L_INT;
Overview | Refer to Bitmaps and Bitmap Lists

Remarks

(Medical only) This method compares the bitmap referenced by the CorrelationBitmap parameter (or part of CorrelationBitmap) with all the areas of the same dimensions in the bitmap currently loaded in the Main Control, (This bitmap can be accessed through the Bitmap property (Main Control).) and finds those portions that match according to the measure of correlation.

Correlation is a measure of association (resemblance) between two images. It varies from 0 (zero resemblance) to 100 (perfect resemblance). This method updates the pPoints parameter with the point of origin for those areas of the active bitmap where the resemblance with CorrelationBitmap (or part of CorrelationBitmap) is greater than the value of uThreshold. The CorrelationBitmap dimensions must be less than or equal to the active bitmap dimensions.

For example:

1. | Load a bitmap of the object for which you want to look in the control "LEADImage2"
 | For example:
2. | Load a bitmap that contains the object for which you are searching in the control LEADImage1
 | For example:
3. | Call LEADImage1.Correlation.
4. | The method will update the pPoints array parameter with the point of origin (top-left) for each area of the LEADImage1.Bitmap where the correlation with LEADImage2.Bitmap is greater than the correlation threshold. The height and width of the rectangles are the same as for LEADImage2.Bitmap.
5. | The result is:

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method.
Topics: | Raster Images: Comparing Images


CountLUTColors method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CountLUTColors(unsigned &nNumberOfEntries, int &nFirstIndex, unsigned uFlags);
Delphi Syntax | Function CountLUTColors (var nNumberOfEntries: L_UINT; var nFirstIndex: L_INT; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Gets the total number of entries between the start color and the end color, and the index of the last occurrence of the start color. The start and end colors are determined internally.

Suppose you have a LUT with 4096 colors, the first 200 colors are black and the last 30 are white, the rest of the colors between black and white are gray. This is what the method will provide:

uNumberOfEntries : | 3868.
nFirstIndex : | 199.

In more detail this is:

Total number of entries: 4096 (0 – 4095)

First index of the end color: 4095 – 30 + 1 (+1 to add the first index of the end color to the range)

Number of occurrences of the starting color: 200 (0 – 199)

The last index of the start color: 199

Total number of entries: (4095 – 30 + 1) – 199 + 1

This method supports signed data images.

See Also

Elements: | WindowLevel method, GetUserLookupTable method, RemapIntensity method, ApplyLinearVOILUT method.
Topics: | Raster Images: Modifying Intensity Values


CreateBitmap method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CreateBitmap (int nWidth, int nHeight, int iBitsPerPixel);
Delphi Syntax | CreateBitmap (nWidth, nHeight: Integer; iBitsPerPixel: Integer): Integer;
Overview | Refer to Copying and Creating Bitmaps.

Remarks

Initializes and allocates the bitmap, without loading any data.

If you specify 8 bits per pixel or less, the bitmap is created with LEAD's fixed palette. If you specify 0 bits per pixel, for grayscale, the bitmap is created as an 8-bit image with a grayscale palette. If you need to change the palette, refer to the ColorRes method.

The newly created bitmap is inserted at the beginning of the bitmap list.

See Also

Topics: | Raster Images: Creating and Deleting Images
 | Raster Images: Palettes


CreateFadedMask method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall CreateFadedMask(LEADTyp::TBitmapHandle Bitmap, int iLength, int iFadeRate, int iStepSize, int iInflate, int iFlag, int iMaxGray, unsigned crTransparent);
Delphi Syntax | Function CreateFadedMask(Bitmap: TBitmapHandle; iLength: Integer; iFadeRate: Integer; iStepSize: Integer; iInflate: Integer; iFlag: Integer; iMaxGray: Integer; crTransparent: TColorRef): Integer;
Overview | Refer to Combining Images.

Remarks

(DigitalPaint only) Creates a fade mask bitmap in which the color of each pixel is changed with respect to its position in the bitmap. This change depends on the fade rate. This method is only available in the DigitalPaint toolkits.

This method is concerned with the size and shape of the region, not the bitmap itself. Therefore, any bitmap with a region can be used to create a fade mask bitmap. The fade mask bitmap can be used by the FeatherAlphaBlend method to combine two bitmaps with feathering.

If the FADE_OUTER flag is not set, then the size of the fade mask bitmap is equal to the size of a region and the fade progresses toward the center of the region. If the FADE_OUTER flag is set, the size is equal to the size of region plus the iInflate value and the fade starts at the edge of the region and progresses toward the edge of the fade mask bitmap. (The iInflate parameter is used only with FADE_OUTER flag)

In order to use the fade mask bitmap in the FeatherAlphaBlend method the fade mask bitmap must contain three portions:

a) | A portion in which the output (from the blending function) will be the same as the destination bitmap. This is called the Transparency portion of the mask and it’s fill with black.
b) | A portion in which the output is a combination of the destination and source bitmap.
c) | A portion in which the output comes from the source bitmap. This is called the Dump portion of the mask and it’s fill with white.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Underlay method, Combine method, FeatherAlphaBlend method, AlphaBlend method
Topics: | Raster Images: Combining Images
 | Image Processing


CreateMaskFromBitmapRgn method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int CreateMaskFromBitmapRgn ();
Delphi Syntax | Function CreateMaskFromBitmapRgn (): L_INT;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Creates a 1-bit mask image from the region that is defined in the source bitmap, contained in the Bitmap property, and updates the MaskBitmap property with it.

A bitmap region is an area of interest within a bitmap. A bitmap can have only one region at a time, but the region can be complex, including, for example, multiple noncontiguous shapes.

See Also

Elements: | MaskBitmap property, SetRgnFromMask method, SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, PolygonSize property, OffsetRgn method, SetRgnColor method.
Topics: | Raster Images: Creating and Using a Region


Cubism method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Cubism(unsigned uSpace, unsigned uLength, int nBrightness, int nAngle, unsigned crBack, unsigned uFlags);
Delphi Syntax | Function Cubism uSpace: L_UINT; uLength: L_UINT; nBrightness: L_INT; nAngle: L_INT; crBack: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Remaps the bitmap into a collection of rotated rectangles (cubic faces) so that it appears to have been created in the Cubist art style.

This method remaps the bitmap into a collection of rotated rectangles (cubic faces), producing an image in a Cubist style. For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

uSpace = 5

uLength = 10

nBrightness = 0

nAngle = 0

crBack = RGB(0,0,0)

uFlags = CUB_BKG|CUB_RAND|CUB_RECT

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Dry method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


CurveToBezier method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall CurveToBezier (void);
Delphi Syntax | Function CurveToBezier (): Integer;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Converts a curve, defined by an array of points that the curve passes through, to an array of Bezier points. The resulting array can be used with the Windows API PolyBezier and PolyBezierTo procedures.

This method is used to convert a standard curve to an array of Bezier control points. A LEAD standard curve (CURVE_STANDARD) is defined by the array of points defined by the CurveX property, CurveY property and the CurveSize property. The standard curve passes through all of the points of the array, and is continuous at each point. This method can be used to draw this curve by converting it to an array of Bezier points.

At most, the resulting array holds (3n + 1) entries, where n is the number of points in the CURVE_STANDARD curve.

The curve to be converted is defined by the following properties:

CurveSize property

CurveX property

CurveY property

CurveType property

CurveTension property

CurveClose property

The resulting Bezier curve is defined by the following properties:

BezierSize property

BezierX property

BezierY property

Please note that the BezierSize, BezierX and BezierY properties are read only and are updated by calling the CurveToBezier method.

See Also

Elements: | CurveX property, CurveY property, SetRgnCurve method, CurveSize property, CurveType property, CurveClose property, CurveTension property, BezierSize property, BezierX property, BezierY property
Topics: | Raster Images: Creating and Using a Region


Cylindrical method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Cylindrical(int nValue, unsigned uType);
Delphi Syntax | Function Cylindrical (nValue: L_INT; uType: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Warps the bitmap around a cylinder.

If the bitmap has a region, the effect will be applied only to the region.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Bending method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, ShowCylindricalDlg method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects


Deinterlace method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Deinterlace(unsigned uFlags);
Delphi Syntax | Function Deinterlace (uFlags: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

Deinterlaces a video source image.

This method deinterlaces video source images by removing the black lines. It proceeds by merging lines in the image and/or blending them. Different options are available according to the value of uFlags.

This method does not work on regions.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | BinaryFilter method, Pixelate method, Sharpen method, Posterize method, Mosaic method, Emboss method, Average method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method
Topics: | Raster Images: Modifying Intensity Values


DeleteBitmapListItems method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DeleteBitmapListItems (Cardinal uIndex, Cardinal uCount);
Delphi Syntax | DeleteBitmapListItems (uIndex, uCount: Cardinal): Integer;
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

Deletes the specified bitmaps from a bitmap list, and frees the bitmaps from memory.

You cannot use this method to update a bitmap list while it is being used in an animation playback.

See Also

Topics: | Raster Images: Creating and Maintaining Lists of Images
 | Raster Images: Creating and Deleting Images


DeletePage method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DeletePage (System::AnsiString Name, int iPage);
Delphi Syntax | DeletePage (Name: String; iPage: Integer): Integer;
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

Deletes the specified page from a multipage file that supports delete operations.

The following file formats support delete operations:

TIFF (most TIFF formats, including JTIF, but excluding EXIF)

PCX

Winfax

See Also

Topics:

Raster Images: Creating and Deleting Images


DeleteRgnHandle method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool DeleteRgnHandle (L_HRGN hRegion);
Delphi Syntax | DeleteRgnHandle (hRegion: L_HRGN): Boolean;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Deletes a stored region and frees the memory that was required for it.

To store a region, use the GetRgnHandle method

Keep in mind that the region data contains only positioning information, not the bitmap's pixel values.

See Also

Elements: | GetRgnHandle method, FreeRgn method, SetRgnHandle method
Topics: | Raster Images: Creating and Using a Region


Desaturate method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Desaturate(void);
Delphi Syntax | Function Desaturate ( ): L_INT;
Overview | Refer to Grayscale Images

Remarks

Converts the image to a grayscale level by reducing the saturation of each color to zero. The conversion will not change the color resolution.

This method supports only RGB images. It does not support grayscale images.

Support for 48-bit and 64-bit colored images are available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | BalanceColors method, GrayScale method, GrayScaleExt method, IsGrayScale property
Topics: | Raster Images: Modifying Intensity Values


Deskew method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Deskew (unsigned crFill, unsigned uFlags, L_PINT pnAngle);
Delphi Syntax | Function Deskew (crFill: COLORREF; uFlags: L_UINT; pnAngle: L_PINT): L_INT;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Document/Medical) Rotates the bitmap to straighten it. This method typically is used to automatically straighten scanned images.

If uFlags contains DSKW_NOPROCESS, the method will update the nAngle parameter with the deskew angle, without rotating the image.

The calculated rotation is limited to 10 degrees in either direction. This method is intended for images, such as scanned documents, that are mainly horizontal lines of text. The results are unpredictable with other types of images.

The color specified by crFill will be used to fill the background.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Rotate method, ApplyTransformationParameters method, GetMarksCenterMass method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Image Functions: Document Imaging
 | Detecting Registration Marks
 | Using Color Values in LEADTOOLS


Despeckle method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Despeckle (void);
Delphi Syntax | Despeckle:Integer;
Overview | Refer to Removing Noise.

Remarks

(Document/Medical only) Removes speckles from the bitmap. Typically, this method is used to clean up scanned images (such as FAX images).

This method removes 1-pixel speckles, and shrinks some larger speckles. Therefore, in some cases, larger speckles can be completely removed by running it more than once.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


DiceEffect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DiceEffect(unsigned uXBlock, unsigned uYBlock, unsigned uRandomize, unsigned crBorder, unsigned uFlags);
Delphi Syntax | Function DiceEffect (uXBlock: L_UINT; uYBlock: L_UINT; uRandomize: L_UINT; crBorder: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Splits the image into square or rectangular blocks. If the blocks are square, it rotates each block by 0, 90, 180, or 270 degrees. If the blocks are rectangular, it flips the blocks around the X-axis or Y-axis.

This method can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

This method divides the image into a certain number of blocks according to the uFlags parameter. If this flag is set to DICE_SIZE then the image will be divided into blocks according to the width and height for each block, which you set with the uXBlock and uYBlock parameters.

If the uFlags flag is set to DICE_COUNT then the image is divided into blocks according to the number of blocks per row and number of blocks per column you set with the uXBlock and uYBlock parameters.

The uFlags parameter must contain DICE_COUNT or DICE_SIZE (but not both).

The uFlags parameter can be or-ed with the DICE_BORDER and BITMAP_RESIZE flags. If the DICE_BORDER flag is set, borders will be drawn around the dice blocks and it will be painted by the crBorder parameter. If the BITMAP_RESIZE flag is set then the image will be resized so that all blocks have the same size and so there is no remainder in the image, ensuring that all blocks in the image will be manipulated in the same way. If the BITMAP_RESIZE flag is not set then the edge blocks (which may be a different size than the inner blocks) will be treated differently than the inner blocks.

The Dice effect method works in the following manner:

It divides the image into a certain number of blocks.

If the BITMAP_RESIZE flag is set, the bitmap is resized to the closest size to have the edge blocks have the same size as the inner blocks.

If the BITMAP_RESIZE flag is not set, then the inner blocks might have a different size and shape than the edge blocks. Each block is transformed according to its shape.

For each block, a rotation angle is picked at random out of the following values: 0, 90, 180, and 270. The rotation angle is applied depending on the block shape (square or rectangular):

If the block is square, it is rotated by the rotation angle.

If the block is rectangular, it is transformed as follows:

If the rotation angle is 0, the block remains unchanged.

If the rotation angle is 90, the block is flipped around the x-axis.

If the angle is 180, the block is rotated by 180.

If the angle is 270, the block is flipped around the y-axis.

If the DICE_BORDER flag is set, the method draws borders around the blocks.

The starting point (that is, the "randomize value") for the random number generator is selected through the uRandomize parameter.

If uRandomize is set to zero then the method itself selects a random value between 1 and 500 for the randomize value.

If uRandomize is > 0, it is used for the randomize value.

Here are some tips related to the randomize point:

The sequence of generated random numbers is the same if you use the same randomize value > 0. In other words, if you call the method twice with the same randomize value, each block will be transformed the same way.

Calling the method 4 times with the same bitmap and the same randomize value > 0 will leave the bitmap blocks unchanged. So, if you call the method once, the blocks will be transformed. Call the method 3 more times and each block goes to its original transformation. Of course, if you elected to draw borders, there will be a grid drawn on the image.

If you pass 0 for uFlags, the method leaves the image unchanged.

This method supports all bits/pixel supported by LEADTOOLS.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | PuzzleEffect method, RingEffect method.
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


DigitalSubtract method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DigitalSubtract(TBitmapHandle MaskBitmap, unsigned uFlags);
Delphi Syntax | Function DigitalSubtract (MaskBitmap: TBitmapHandle; uFlags: L_UINT): L_INT;
Overview | Refer to Examining and Altering Bitmaps

Remarks

(Medical only) Subtracts the live (destination) bitmap from the mask (source) bitmap to show the differences between the two bitmaps. The destination bitmap is the bitmap currently loaded in the Main Control and accessed through the Bitmap property (Main Control).

Performs a digital subtraction between two images. The resulting image may be enhanced using the uFlags options. Digital subtraction is mainly used to show the differences or the changes between two images. For the process to be meaningful both images should be related to each other. Digital Subtraction Angiography (DSA) is a practical example of digital subtraction.

Digital Subtraction Angiography (DSA) and Quality Control (QC) are both major fields that use image subtraction. An example of DSA is explained below.

DSA is a technology used for the visualization of blood vessels in the human body. A mask image is obtained using X-ray film of the body part of interest. Then vessels of that part are injected with a contrast medium. A sequence of images is taken after the injection. These are called live images. After applying subtraction between the mask and live images the resulting images are images that show the passage of the contrast medium in the vessels.

Both the destination bitmap and the mask bitmap images should have the same bits per pixel, number of channels and image dimensions; otherwise the method will return an error code.

If DS_CONTRASTENH is set then the contrast of the subtracted image will be enhanced.

If DS_OPTIMIZERANGE is set then the tonal range of the subtracted image will be optimized. That is, the image intensity will be distributed among the full image intensity range.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits. It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | ShiftData method, SelectData method, ColorizeGray method, MultiScaleEnhancement method, Combine method.
Topics: | Raster Images: Modifying Intensity Values


DirectionEdgeStatistical method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DirectionEdgeStatistical(unsigned uDim, unsigned uThreshold, int nAngle, unsigned crEdge, unsigned crBack);
Delphi Syntax | Function DirectionEdgeStatistical (uDim: L_UINT; uThreshold: L_UINT; nAngle: L_INT; crEdge: COLORREF; crBack: COLORREF): L_INT;
Overview | Refer to Detecting and Enhancing Edges and Lines

Remarks

Detects the variation of colors in the specified direction using statistical indices. It is similar to EdgeDetectStatistical, but this method allows you to specify the direction angle.

The edges are detected by applying a statistical filter that analyzes the variations of colors in a specified direction around each pixel.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | SpatialFilter method, MathFunction method, EdgeDetector method
Topics: | Raster Images: Filtering Images
 | Using Color Values in LEADTOOLS


DiscreteFourierTransformation method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DiscreteFourierTransformation(int nMinHarmonicX, int nMinHarmonicY, int nMaxHarmonicX, int nMaxHarmonicY, unsigned uFlags);
Delphi Syntax | Function DiscreteFourierTransformation (nMinHarmonicX: L_INT; nMinHarmonicY: L_INT; nMaxHarmonicX: L_INT; nMaxHarmonicY: L_INT; uFlags: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Computes the Discrete Fourier transform of an image or the Inverse Discrete Fourier transform as specified in the uFlags parameter.

This method converts the image from the time domain to the frequency domain and vice versa using the Discrete Fourier Transform algorithm. Use the FastFourierTransformation method to use a Fast Fourier Transform algorithm on a bitmap. Please note however, that this method does not impose the size restrictions (the width and height having to be powers of 2) that the Fast Fourier Transform function, (FastFourierTransformation method), imposes upon bitmaps.

The nMinHarmonicX, nMaxHarmonicX, nMinHarmonicY and nMaxHarmonicY parameters specify the frequency range to be computed when DFT_DFT is set in uFlags. It specifies the frequency range that will be used in the image construction when DFT_IDFT is chosen.

Before using this method, you need to use the InitFourierTransformationData method. When you are finished, you should free the allocated array by calling the FreeFourierTransformationData method.

This method does not work on regions. If a bitmap has a region the method ignores it and processes the entire bitmap.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | InitFourierTransformationData method, FastFourierTransformation method, FreeFourierTransformationData method, FrequencyFilter method, FrequencyFilterMask method, DisplayFourierTransformation method
Topics: | Raster Images: Fourier Transforms


DisplayFourierTransformation method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DisplayFourierTransformation (unsigned uFlags);
Delphi Syntax | Function DisplayFourierTransformation (uFlags: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Displays the results of a Fast Fourier Transform or a Discrete Fourier analysis as a bitmap.

This method converts the storage array data computed by the DiscreteFourierTransformation method or FastFourierTransformation method into a bitmap. The resulting bitmap may be displayed such that it shows either the frequency harmonics amplitude data or phase data. The (0,0) frequency is located in the bitmap center, positive X harmonics in the right half and positive Y harmonics located in the lower half of the bitmap.

This method does not work on regions. If a bitmap has a region the method ignores it and processes the entire bitmap.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | InitFourierTransformationData method, FreeFourierTransformationData method, DiscreteFourierTransformation method, FastFourierTransformation method, FrequencyFilter method, FrequencyFilterMask method.
Topics: | Raster Images: Fourier Transforms.


DotRemove method (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | int DotRemove(unsigned uProcessFlags, int nMinDotWidth, int nMinDotHeight, int nMaxDotWidth, int nMaxDotHeight );
Delphi Syntax: | function DotRemove(uProcessFlags: L_UINT32; nMinDotWidth: L_INT32; nMinDotHeight: L_INT32; nMaxDotWidth: L_INT32; nMaxDotHeight: L_INT32):L_INT;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)This method finds and removes dots, specks, and blobs of various sizes in 1-bit documents. The dots, specks, and blobs may or may not be all black.

This method works only on 1-bit black and white images.

If a region is selected, only the selected region will be changed by this method. If no region is selected, the whole image will be processed.

The behavior of this method can be modified by using the OnDotRemove event.

This method triggers both the OnDotRemove event and the OnStatus event.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | OnDotRemove event
Topics: | Raster Images: Cleaning - up 1-Bit Images


DrawEllipse method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawEllipse (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | DrawEllipse (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Drawing Simple Objects.

Remarks

Draws an ellipse on the screen or on the bitmap. The DrawPersistence property determines whether the object is drawn on the screen or the bitmap.

Whether you draw to the screen or to the bitmap, drawing objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

If the DrawPersistence property is TRUE, all drawing is done on the bitmap, not the screen. In this case this method supports 1, 4, 8 palettized, 16 and 24-bit color images. Therefore, to call this method for an image of some other bits per pixel, or a 12 or 16-bit grayscale image, the ColorRes method must be called first to convert that image to a 1, 4, 8 palettized, 16 or 24-bit color image.

If the DrawPersistence property is FALSE, then all drawing is done to the screen. In this case images of all bits per pixel values can be used by this method.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawLine method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawLine (int iX1, int iY1, int iX2, int iY2);
Delphi Syntax | DrawLine (iX1, iY1, iX2, iY2:Integer): Integer;
Overview | Refer to Drawing Simple Objects.

Remarks

Draws a line on the screen or on the bitmap. The DrawPersistence property determines whether the object is drawn on the screen or the bitmap.

Whether you draw to the screen or to the bitmap, drawing objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

If the DrawPersistence property is TRUE, all drawing is done on the bitmap, not the screen. In this case this method supports 1, 4, 8 palettized, 16 and 24-bit color images. Therefore, to call this method for an image of some other bits per pixel, or a 12 or 16-bit grayscale image, the ColorRes method must be called first to convert that image to a 1, 4, 8 palettized, 16 or 24-bit color image.

If the DrawPersistence property is FALSE, then all drawing is done to the screen. In this case images of all bits per pixel values can be used by this method.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawRectangle method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawRectangle (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | DrawRectangle (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Drawing Simple Objects.

Remarks

Draws a rectangle on the screen or on the bitmap. The DrawPersistence property determines whether the object is drawn on the screen or the bitmap.

Whether you draw to the screen or to the bitmap, drawing objects are always positioned in the Main Control's client area. If the target is the bitmap, LEADTOOLS translates the values to bitmap coordinates.

If the DrawPersistence property is TRUE, all drawing is done on the bitmap, not the screen. In this case this method supports 1, 4, 8 palettized, 16 and 24-bit color images. Therefore, to call this method for an image of some other bits per pixel, or a 12 or 16-bit grayscale image, the ColorRes method must be called first to convert that image to a 1, 4, 8 palettized, 16 or 24-bit color image.

If the DrawPersistence property is FALSE, then all drawing is done to the screen. In this case images of all bits per pixel values can be used by this method.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawShape method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawShape (Cardinal uShape, LEADTyp::TBitmapHandle BackGroundImage);
Delphi Syntax | DrawShape (uShape: Cardinal; BackGroundImage: TBitmapHandle): Integer;
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

Draws the specified three-dimensional shape in the control's client area or on the current bitmap. The size, position, and other aspects of the shape are determined by related properties, as explained in Drawing Three-Dimensional Shapes and Text.

If the DrawPersistence property is TRUE, all drawing is done on the bitmap, not the screen. In this case this method supports 1, 4, 8 palettized, 16 and 24-bit color images. Therefore, to call this method for an image of some other bits per pixel, or a 12 or 16-bit grayscale image, the ColorRes method must be called first to convert that image to a 1, 4, 8 palettized, 16 or 24-bit color image.

If the DrawPersistence property is FALSE, then all drawing is done to the screen. In this case images of all bits per pixel values can be used by this method.

See Also

Topics: | Raster Images: Drawing on a Bitmap
 | Working with the Control: Client Area Usage


DrawStar method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawStar(const TPoint &ptCenter, unsigned uSpoke, unsigned uStarWidth, unsigned uStarHeight, unsigned uHoleSize, int nPhase, int nAngle, int nDistOpac, int nSpokeDiv, int nAngleOpac, int nBorderOpac, unsigned crFillLower, unsigned crFillUpper, unsigned uOpacity, unsigned uFlags);
Delphi Syntax | Function DrawStar (ptCenter: TPoint; uSpoke: L_UINT; uStarWidth: L_UINT; uStarHeight: L_UINT; uHoleSize: L_UINT; nPhase: L_INT; nAngle: L_INT; nDistOpac: L_INT; nSpokeDiv: L_INT; nAngleOpac: L_INT; nBorderOpac: L_INT; crFillLower: COLORREF; crFillUpper: COLORREF; uOpacity: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Draws a star on the bitmap.

If the bitmap has a region, the effect will be applied on the region only.

This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, Dry method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


DrawTextHeight method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawTextHeight (System::AnsiString sText);
Delphi Syntax | DrawTextHeight (sText: String): Integer;
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

Returns the height of the specified text string, using the current values of the TextFont property.

The scale is relative to the Main Control's client area. The unit of measure is pixels. You can use this method to position the text relative to another drawing object, such as a line or rectangle.

If the DrawPersistence property is TRUE, all drawing is done on the bitmap, not the screen. In this case this method supports 1, 4, 8 palettized, 16 and 24-bit color images. Therefore, to call this method for an image of some other bits per pixel, or a 12 or 16-bit grayscale image, the ColorRes method must be called first to convert that image to a 1, 4, 8 palettized, 16 or 24-bit color image.

If the DrawPersistence property is FALSE, then all drawing is done to the screen. In this case images of all bits per pixel values can be used by this method.

See Also

Elements: | DrawTextStr method
Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawTextStr method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawTextStr (System::AnsiString Str, LEADTyp::TBitmapHandle ForegroundImage);
Delphi Syntax | DrawTextStr (System::AnsiString Str, ForegroundImage: TBitmapHandle): Integer;
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

Draws a text object in the control's client area or on the current bitmap. Placement and other aspects of the text object are specified by related properties described in Drawing Three-Dimensional Shapes and Text.

You can create an image that consists of a pattern or gradient color to use as a foreground of the text. Refer to Gradients and Patterns for related properties.

The bitmap that you specify is positioned at the origin of the text object's rectangle, and it is not scaled. Therefore the bitmap that you use for this purpose should be sized accordingly. In most cases it should be the same size as the rectangle.

If the DrawPersistence property is TRUE, all drawing is done on the bitmap, not the screen. In this case this method supports 1, 4, 8 palettized, 16 and 24-bit color images. Therefore, to call this method for an image of some other bits per pixel, or a 12 or 16-bit grayscale image, the ColorRes method must be called first to convert that image to a 1, 4, 8 palettized, 16 or 24-bit color image.

If the DrawPersistence property is FALSE, then all drawing is done to the screen. In this case images of all bits per pixel values can be used by this method.

See Also

Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


DrawTextWidth method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DrawTextWidth (System::AnsiString sText);
Delphi Syntax | DrawTextWidth (sText: String): Integer;
Overview | Refer to Drawing Three-Dimensional Shapes and Text.

Remarks

Returns the width of the specified text string, using the current values of the TextFont property.

The scale is relative to the Main Control's client area. The unit of measure is pixels. You can use this method to position the text relative to another drawing object, such as a line or rectangle.

If the DrawPersistence property is TRUE, all drawing is done on the bitmap, not the screen. In this case this method supports 1, 4, 8 palettized, 16 and 24-bit color images. Therefore, to call this method for an image of some other bits per pixel, or a 12 or 16-bit grayscale image, the ColorRes method must be called first to convert that image to a 1, 4, 8 palettized, 16 or 24-bit color image.

If the DrawPersistence property is FALSE, then all drawing is done to the screen. In this case images of all bits per pixel values can be used by this method.

See Also

Elements: | DrawTextStr method
Topics: | Working with the Control: Client Area Usage
 | Raster Images: Drawing on a Bitmap


Dry method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Dry(unsigned uDim);
Delphi Syntax | Function Dry (uDim: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Simulates painting an image with the watercolor dry brush technique.

This method simulates what would happen if the image had just been painted with paints and the paints were allowed to dry. The colors become darker, with less brightness.

The effect can be controlled by specifying the size of the neighborhood that is used for calculating each pixel value.

If the bitmap has a region, the effect will be applied on the region only.

This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects


DynamicBinary method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int DynamicBinary(unsigned uDim, unsigned uLocalContrast);
Delphi Syntax | Function DynamicBinary (uDim: L_UINT; uLocalContrast: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Converts a bitmap into a black and white image without changing its bits per pixel by using a local threshold value for each pixel of the image.

Each pixel is compared to a dynamically-calculated threshold. If the intensity of the pixel is higher (that is, the pixel is brighter) than the dynamic threshold, the pixel will be set to white. If the intensity of the pixel is lower (that is, the pixel is darker) than the dynamic threshold, the pixel will be set to black.

Increasing uLocalContrast increases the number of pixels that use the global threshold. This tends to preserve the general aspect of the image and reduces the improvement in the areas with many details. Reducing uLocalContrast, increases the contrast in areas with many details.

Increasing uDim increases the area used for local contrast. This makes the color changes smoother.

This method is good as a prerequisite for converting scanned images to 1-bit, because it uses one threshold for background and another for text.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | IntensityDetect method, Median method, BinaryFilter method, MaxFilter method, MinFilter method, WindowLevel method, Despeckle method, Deskew method.
Topics: | Raster Images: Filtering Images


EdgeDetectEffect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int EdgeDetectEffect(unsigned uLevel, unsigned uThreshold, unsigned uFlags);
Delphi Syntax | Function EdgeDetectEffect(uLevel: L_UINT; uThreshold: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Detecting and Enhancing Edges and Lines

Remarks

Performs edge detection on the image. This method detects the edges in the bitmap currently loaded in the Main Control, and then replaces the values of the edge pixels with new values calculated according to the uFlags. The bitmap loaded in the Main Control can be accessed through the Bitmap property (Main Control).

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | EdgeDetector method, SpatialFilter method, EdgeDetectStatistical method, DirectionEdgeStatistical method.
Topics: | Raster Images: Filtering Images


EdgeDetector method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall EdgeDetector(int iThreshold, int iFilter);
Delphi Syntax | Function EdgeDetector(iThreshold: Integer; iFilter: integer): Integer;
Overview | Refer to Detecting and Enhancing Edges and Lines.

Remarks

(Document only) Applies the specified edge filter to the bitmap.

Filters such as Sobel filter, Prewitt filter, Laplacian filter, and Gradient filter are used to determine the pixels belonging to edges in the bitmap.

This method can process the whole image or a region of the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

The threshold range for the 16, 48, and 64-bit bitmaps is from 0 to 65535 and for 12-bit bitmaps from 0 to 4095. Otherwise, it is from 0 to 255. The threshold is applied on channels separately.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Combine method, IntensityDetect method, Sharpen method, SpatialFilter method
Topics: | Raster Images: Filtering Images


EdgeDetectStatistical method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int EdgeDetectStatistical(unsigned uDim, unsigned uThreshold, unsigned crEdge, unsigned crBack);
Delphi Syntax | Function EdgeDetectStatistical (uDim: L_UINT; uThreshold: L_UINT; crEdge: COLORREF; crBack: COLORREF): L_INT;
Overview | Refer to Detecting and Enhancing Edges and Lines

Remarks

Detects edges by examining the variation of colors in all directions using statistical indices.

The edges are detected by applying a statistical filter that analyzes the variations of colors in all directions around each pixel.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Combine method, IntensityDetect method, Sharpen method, SpatialFilter method, EdgeDetector method
Topics: | Raster Images: Filtering Images
 | Using Color Values in LEADTOOLS


Emboss method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Emboss (int iDirection, int iDepth);
Delphi Syntax | Emboss (iDirection, iDepth:Integer): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Applies an emboss effect to the bitmap, letting you specify the depth and direction of the effect.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


EnumTags method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int EnumTags(AnsiString strFileName, unsigned uFlags, int nPage);
Delphi Syntax | Function EnumTags(strFileName: String; uFlags: L_UINT; nPage: L_INT): L_INT;
Overview | Refer to Implementing TIFF Tags.

Remarks

Enumerates all the tags in a file. Currently, only TIFF and Exif files contain tags.

For multi-page TIFF files, you can enumerate the tags from a particular page. Specify the page number on which to enumerate the tags using the nPage parameter.

This method enumerates the standard TIFF tags and the user tags. Standard TIFF tags are less than 32767. User TIFF tags are usually between 32768 and 65535.

To read a tag value, call the ReadTag method.

Note that if the bContinue parameter of the OnEnumTags event is set to False, the EnumTags method will stop enumerating the tags and return the value ERROR_USER_ABORT error.

For general information about TIFF tags, refer to Implementing TIFF Tags.

See Also

Elements: | ReadTag method, WriteTag method, SetTag method, OnEnumTags event, ReadTagMemory method, GetTagData method, GetTagType method, GetTagCount method, InfoColorSpace property
Topics: | Raster Images: Getting and Setting File Information
 | Raster Images: Maintaining TIFF Tags


ExtractMessage method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ExtractMessage(AnsiString &strMsg, AnsiString &strPassword, AnsiString &strFileName, AnsiString strDirectory, TPoint &ptStart);
Delphi Syntax | Function ExtractMessage (var strMsg: String; var strPassword: String; var strFileName: String; var strDirectory: String; var ptStart: TPoint): L_INT;
Overview | Refer to Non-Image Data

Remarks

(Document/Medical only) Extracts a message (text or file) from the specified bitmap, if the bitmap has an embedded message.

This method is used to extract the message that was added to the bitmap by the AddMessage method.

This method can extract a message from any type of lossless image format such as bmp, tiff, lossless jpeg, and so forth. If used with lossy format types the message may be corrupted or lost.

This method supports 24- and 48-bit images, and 8- and 16-bit grayscale images.

Support for 16-bit grayscale and 48-bit color images is available only in the Document/Medical toolkits.

This method supports signed data images.

See Also

Elements: | AddMessage method.
Topics: | Raster Images: Getting and Setting File Information


FastFourierTransformation method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FastFourierTransformation (unsigned uFlags);
Delphi Syntax | Function FastFourierTransformation (uFlags: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Computes the Fast Fourier transform of an image or the Inverse Fast Fourier transform as specified in the uFlags.

This method converts the image from the time domain to the frequency domain and vice versa using a Fast Fourier Transform algorithm. Fast Fourier Transform algorithms are a simplification of a Discrete Fourier Transform and require that the image dimensions must be power of two (i.e. 2, 4, 8, 16, 32 …etc). The number of computations needed is reduced from 2N2 to 2N LgN. Use the DiscreteFourierTransformation to use a Discrete Fourier Transform algorithm on a bitmap. If you try to use this method with a bitmap with dimensions that are not a power of two, the method will return an ERROR_INV_PARAMETER error.

Before using this method, you must call the InitFourierTransformationData method. When you are finished, you should free the allocated data by calling the FreeFourierTransformationData method.

This method does not work on regions. If a bitmap has a region the method ignores it and processes the entire bitmap.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | InitFourierTransformationData method, DiscreteFourierTransformation method, DirectionEdgeStatistical method, FreeFourierTransformationData method, FrequencyFilter method, FrequencyFilterMask method, DisplayFourierTransformation method
Topics: | Raster Images: Fourier Transforms


FastRotate method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FastRotate (int nAngle);
Delphi Syntax | FastRotate (nAngle: Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Document/Medical only) Rotates the bitmap in 90-degree increments, in a faster way than is possible with the Rotate method.

Valid rotations are +-90, +-180, +-270, or +-360. Positive values are clockwise; negative values are counterclockwise.

Please note that this is only a viewport rotation. The "rotated" data is not saved.

See Also

Elements: | Rotate method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Methods That Transform the Region and the Bitmap


FeatherAlphaBlend method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall FeatherAlphaBlend(int iLeft, int iTop, int iWidth, int iHeight, LEADTyp::TBitmapHandle BitmapSrc, int iSrcLeft, int iSrcTop, LEADTyp::TBitmapHandle BitmapMask);
Delphi Syntax | Function FeatherAlphaBlend(iLeft: Integer; iTop: Integer; iWidth: Integer; iHeight: Integer; BitmapSrc: TBitmapHandle; iSrcLeft: Integer; iSrcTop: Integer; BitmapMask: TBitmapHandle): Integer;
Overview | Refer to Combining Images.

Remarks

(DigitalPaint only) Combines image data from two bitmaps with feathering, by combining the two bitmaps with a variable opacity that depends on a fade mask. This method is only available in the DigitalPaint products.

To combine two bitmaps with a fixed opacity, use the AlphaBlend method.

The FeatherAlphaBlend method achieves feathering between two bitmaps by using variable opacity values, obtained from the fade mask referenced by BitmapMask.

To create a bitmap that contains a fade mask, use the CreateFadedMask method.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Underlay method, Combine method, AlphaBlend method, CreateFadedMask method
Topics: | Raster Images: Combining Images
 | Image Processing


FeedLoad method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FeedLoad (void* vBuffer, int iSize);
Delphi Syntax | FeedLoad (vBuffer: pointer; iSize: Longint): Integer;
Overview | Refer to Loading a Bitmap from Your Own Buffer.

Remarks

Supplies image data to the file-load process from a buffer that you provide.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits

Use this method with the StartFeedLoad method and the StopFeedLoad method. For a description of how the methods relate to each other, refer to the StartFeedLoad method.

See Also

Topics:

Raster Images: Loading Files


Fill method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Fill (int crFill);
Delphi Syntax | Fill (crFill:TColorRef): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Fills the bitmap with the specified color.

The standard Windows values for COLORREF represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format $00BBGGRR represents the blue, green, and red color values for the specified pixel, where $BB is the blue value, $GG is the green value and $RR is the red value. If $01000000 is set in the COLORREF value ($010000ZZ), the lower 8 bits ($ZZ) represent an index into the bitmap's palette which holds the color value.You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes As Color Values.

In the Document/Medical toolkits, the COLORREF value may represent a 16 bit grayscale value if the bitmap is a 12 or 16-bit grayscale. So that the value is not confused with an RGB value, the COLORREF_GRAY16 mask ($04000000) is set. In this case ($0400YYYY), the lower 16 bits ($YYYY) of the COLORREF value represent the 16-bit grayscale value. ($0400FFFF is 16-bit white and $04000000is 16-bit black.) This is not a standard Windows value. Therefore, LEADTOOLS elements will recognize a COLORREF having this format, but Windows elements will not. For information on converting from a 16-bit value, refer to Converting 16-bit Grayscale Values.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Creating and Deleting Images
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


Flip method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Flip (void);
Delphi Syntax | Flip: Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Flips the bitmap from top to bottom.

See Also

Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Methods That Transform the Region and the Bitmap


ForceRepaint method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ForceRepaint (void);
Delphi Syntax | ForceRepaint: Integer;
Overview | Refer to Displaying an Image.

Remarks

Repaints the image on the screen.

See Also

Elements: | AutoRepaint property, PaintRgnOnly property, RepaintRect method
Topics: | Raster Images: Displaying Images


FreeFourierTransformationData method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FreeFourierTransformationData (void);
Delphi Syntax | Function FreeFourierTransformationData ( ): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Frees the storage that was allocated by the InitFourierTransformationData method.

This method should be called when your program no longer needs the array that is used to hold Fourier Transform coefficients. This method is used only when working with the Fourier Transform methods.

See Also

Elements: | InitFourierTransformationData method, DiscreteFourierTransformation method, FastFourierTransformation method, FrequencyFilter method, FrequencyFilterMask method, DisplayFourierTransformation method.
Topics: | Raster Images: Fourier Transforms.


FreeHandShear method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FreeHandShear(L_PINT pAmplitudes, unsigned uAmplitudesCount, unsigned uScale, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function FreeHandShear (pAmplitudes: L_PINT; uAmplitudesCount: L_UINT; uScale: L_UINT; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects.

Remarks

(Raster Pro and above toolkits only) Shears the bitmap by the wave drawn using pAmplitudes.

This method will shear the bitmap using the wave in the pAmplitudes parameter. The wave can be applied vertically or horizontally. The pAmplitudes data can be obtained from the GetCurvePoints method, or from the FreeHand Shear dialog.

If the bitmap has a region, the effect will be applied on the region only.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowShearDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


FreeHandWave method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FreeHandWave(L_PINT pAmplitudes, unsigned uAmplitudesCount, unsigned uScale, unsigned uWaveLen, int nAngle, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function FreeHandWave (pAmplitudes: L_PINT; uAmplitudesCount: L_UINT; uScale: L_UINT; uWaveLen: L_UINT; nAngle: L_INT; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects.

Remarks

(Raster Pro and above toolkits only) Distorts the bitmap by the wave specified in pAmplitudes and the rotation angle specified in nAngle.

The method applies the wave in the pAmplitudes array. You can repeat and rotate the wave in any direction. The pAmplitude data can be obtained from the GetCurvePoints method, or from the FreeHandWave Dialog.

If the bitmap has a region, the effect will be applied on the region only.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowFreeHandWaveDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


FreePlaneBend method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FreePlaneBend(L_PINT pnCurve, unsigned uCurveSize, unsigned uScale, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function FreePlaneBend (pnCurve: L_PINT; uCurveSize: L_UINT; uScale: L_UINT; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Wraps the bitmap onto a 3D plane shaped by pnCurve.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, the following figure shows a bitmap before the effect is applied.

The following figure shows the same bitmap after the effect has been applied.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, Dry method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


FreeRadBend method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FreeRadBend(L_PINT pnCurve, unsigned uCurveSize, unsigned uScale, const TPoint &ptCenter, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function FreeRadBend (pnCurve: L_PINT; uCurveSize: L_UINT; uScale: L_UINT; ptCenter: TPoint; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Wraps the bitmap along its radius on a 3D surface shaped by pnCurve.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, the following figure shows a bitmap before the effect is applied.

The following figure shows the same bitmap after the effect has been applied.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, Dry method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


FreeRgn method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FreeRgn (void);
Delphi Syntax | FreeRgn: Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Removing the region from the bitmap allows methods to act on the whole bitmap, rather than the region. For a list of affected methods, refer to Raster Images: Where the Region Preempts the Bitmap .

See Also

Elements: | GetFloaterHandle method, GetRgnHandle method, DeleteRgnHandle method, SetRgnHandle method
Topics: | Raster Images: Creating and Using a Region


FrequencyFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FrequencyFilter(int nMinHarmonicX, int nMinHarmonicY, int nMaxHarmonicX, int nMaxHarmonicY, unsigned uFlags);
Delphi Syntax | Function FrequencyFilter (nMinHarmonicX: L_INT; nMinHarmonicY: L_INT; nMaxHarmonicX: L_INT; nMaxHarmonicY: L_INT; uFlags: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Filters the frequency harmonics data produced by a Fourier Transform function using a range rectangle.

This method is used only when working with Fourier Transform methods.

The nMinHarmonicX, nMaxHarmonicX, nMinHarmonicY and nMaxHarmonicY parameters specify the filter dimension that will be applied. They represent the frequency range to be kept or removed.

Before using this method, you must call the InitFourierTransformationData method. When you are finished, you should free the allocated array by calling the FreeFourierTransformationData method.

See Also

Elements: | InitFourierTransformationData method, FreeFourierTransformationData method, DiscreteFourierTransformation method, FastFourierTransformation method, DisplayFourierTransformation method, FrequencyFilterMask method.
Topics: | Raster Images: Fourier Transforms


FrequencyFilterMask method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FrequencyFilterMask (bool bOnOff);
Delphi Syntax | Function FrequencyFilterMask (bOnOff: Boolean): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Creates a mask filter to remove specific frequency components from a bitmap.

This method is used only when working with Fourier Transform methods.

The mask bitmap will be treated as a grayscale bitmap. The (0,0) frequency is located in the mask bitmap center; with positive X harmonics located in the right half of the mask bitmap and positive Y harmonics located in the lower half of the mask bitmap.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | FrequencyFilter method, InitFourierTransformationData method, FastFourierTransformation method, DisplayFourierTransformation method, FreeFourierTransformationData method, DiscreteFourierTransformation method.
Topics: | Raster Images: Fourier Transforms


FunctionalLight method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int FunctionalLight(unsigned uFreq, unsigned uRAmp, unsigned uGAmp, unsigned uBAmp, int nAngle, unsigned uXOrigin, unsigned uYOrigin, int nPhase, L_PINT pBuff, unsigned uBuffCount, unsigned uFlags);
Delphi Syntax | Function FunctionalLight (uFreq: L_UINT; uRAmp: L_UINT; uGAmp: L_UINT; uBAmp: L_UINT; nAngle: L_INT; uXOrigin: L_UINT; uYOrigin: L_UINT; nPhase: L_INT; Buff: L_PINT; uBuffCount: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Adds light to the bitmap currently loaded in the Main Control according to a function-based distribution. This light will be generated by one of the following methods: linear, quadratic, sine, cosine, or using freehand points. The bitmap loaded in the Main Control can be accessed through the Bitmap property (Main Control).

Controls the brightness of the bitmap according to the method selected for generating the light.

This method supports all bits/pixel supported by LEADTOOLS.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, Dry method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, DiceEffect method, RingEffect method.
Topics: | Raster Images: Artistic Effects


GammaCorrect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GammaCorrect (Cardinal uGamma);
Delphi Syntax | GammaCorrect (uGamma: Cardinal): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Adjusts the intensity of colors in the bitmap by changing the gamma constant that is used to map the intensity values.

Intensity values ideally follow a logarithmic progression, because the eye perceives changes in intensity as being equal when the ratio of change is equal. For example, we would see a change from 0.1 to 0.2 as being equal to a change from 0.2 to 0.4.

Gamma is a standard constant that is used to calculate the progression. For most CRTs the gamma constant is in the range of 2.2 to 2.5.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | Intensity method, Contrast method, HistoContrast method, HistoEqualize method, StretchIntensity method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


GaussianFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall GaussianFilter (int nRadius);
Delphi Syntax | Function GaussianFilter (nRadius: Integer): Integer;
Overview | Refer to Removing Noise.

Remarks

Smooth or blurs an image by applying a Gaussian filter to the specified bitmap.

Each pixel in the bitmap is blurred based on neighborhood pixels. The parameter nRadius determines the size of the neighborhood to consider when blurring a pixel. The result is a blurred version of the original image.

The amount of blur is controlled by specifying the size of the neighborhood used for blurring or smoothing. The value of the nRadius parameter determines the size and values of the mask.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Sharpen method, Posterize method, Mosaic method, Emboss method, Median metohd AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, Solarize method, WindowLevel method, UnsharpMask method
Topics: | Raster Images: Filtering Images


GetBitmapClipSegments method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetBitmapClipSegments(int nRow, void * pSegmentBuffer, pCardinal puSegmentCount);
Delphi Syntax | Function GetBitmapClipSegments(nRow: Integer; pSegmentBuffer: Pointer; puSegmentCount: pCardinal ): Integer;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Gets the segments contained in the region for a particular row.

Call this method only for those rows that are within the region. That is, only those rows from RgnTop to RgnTop + RgnHeight. For the rows not contained in the region, their clip segments will include the whole row.

The segments are returned as an array of pairs of horizontal offsets. The first point in the pair is the beginning of the segment (it is contained in the region). The last point in the pair is the end of the segment. To follow the Windows rules, the end of the segment is the first point NOT CONTAINED in the region.

In most regions, there will be one segment per row. However, some regions can have 0, 1, 2 or more segments.

For example, assume that for a particular row there are two segments. The VARIANT will be filled with 4 values. Let’s call them x0, x1, x2, x3. In this case:

portion from 0 to x0 – 1 is OUTSIDE the region

portion from x0 to x1 - 1 is INSIDE the region

portion from x1 to x2 – 1 is OUTSIDE the region

portion from x2 to x3 – 1 is INSIDE the region

portion from x3 to pBitmap->Width – 1 is OUTSIDE the region

It is recommended that you allocate a buffer large enough to hold all the possible segments. To get the maximum number of segments, call GetBitmapClipSegmentsMax method. Allocate an array of unsigned values that can contain the largest number of segments

See Also

Elements: | RgnTop property, RgnHeight property, GetBitmapClipSegmentsMax method
Topics: | Raster Images: Creating and Using a Region


GetBitmapClipSegmentsMax method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetBitmapClipSegmentsMax(pCardinal puMaxSegments);
Delphi Syntax | Function GetBitmapClipSegmentsMax (puMaxSegments: pCardinal ): Integer;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Gets the number of elements required to hold the clip segments for any row in the bitmap. Use this method in conjunction with GetBitmapClipSegments method.

See Also

Elements: | GetBitmapClipSegments method.
Topics: | Raster Images: Creating and Using a Region


GetBitmapDC method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_HDC GetBitmapDC (void);
Delphi Syntax | GetBitmapDC: L_HDC;
Overview | Refer to Using the Windows API.

Remarks

Provides a powerful set of graphics features by creating a Microsoft Windows device context, using the bitmap as the display surface. If you call this method, you must call the ReleaseBitmapDC method before using other properties or methods that affect the bitmap.

This gives you many drawing capabilities such as paint, erase, color erase and brush, pen, spray gun, flood fill, color tube, text overlay, curve, line, rectangle, polygon, ellipse, freehand shapes, cut and paste, and more.

All Windows GDI functions can be used to draw to the bitmap using the returned HDC. You should use the ReleaseBitmapDC method when the bitmap no longer needs to be available for drawing functions.

If a region is defined for the bitmap, GDI functions act only on the region, not on the entire bitmap.

Note:

The LEAD DIB driver (LTVDD14W.DRV) supports the GetBitmapDC method. It allows any of the Windows GDI functions to draw to the bitmap regardless of the video resolution of the display being used. This allows drawing to a 24-bit bitmap with a 4- or 8-bit video driver.

See Also

Topics: | Raster Images: Creating and Deleting Images
 | Raster Images: Drawing on a Bitmap
 | Examining and Altering Bitmaps


GetBitmapPalette method (Main Control)

Visual C++ 4.0 example

Delphi 2.0 example

Builder Syntax | HPALETTE GetBitmapPalette (HDC hDevice);
Delphi Syntax | GetBitmapPalette (hDevice: HDC): HPALETTE;
Overview | Refer to Managing Palettes.

Remarks

Returns the handle of the palette used by the specified device context. Use this method with the SetDDB method to specify the DDB's palette.

See Also

Topics:

Raster Images: Palettes


GetBitmapRow method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall GetBitmapRow(void * pBuffer, int nRow, unsigned uBytes);
Delphi Syntax | function GetBitmapRow ( pBuffer : pointer; nRow : integer; uBytes : Cardinal ) : Integer ;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

This method copies image data from the bitmap to a buffer that you specify. The data is copied exactly as it is stored in the image.

Use the BitmapBytesPerLine Property to determine the byte count of each line. Color order is determined by the BitmapOrder Property. This value can be either ORDER_RGB, ORDER_BGR or ORDER_GRAY. ORDER_GRAY is only valid for 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is only available in the Document/Medical toolkits .

See Also

Elements: | PutBitmapRow method, GetBitmapRowCol method, PutBitmapRowCol method, BitmapBytesPerLine Property, BitmapOrder Property .
Topics: | Raster Images: Getting / Setting Rows from Bitmaps


GetBitmapRowCol method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall GetBitmapRowCol(void * pBuffer, int nRow ,int nCol, unsigned uBytes);
Delphi Syntax | function GetBitmapRowCol( pBuffer : pointer; nRow : integer; nCol : integer; uBytes : Cardinal ) : Integer ;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

This method copies image data from the bitmap to a buffer that you specify. The data is copied exactly as it is stored in the image.

Use the BitmapBytesPerLine Property to determine the byte count of each line. Color order is determined by the BitmapOrder Property. This value can be either ORDER_RGB, ORDER_BGR or ORDER_GRAY. ORDER_GRAY is only valid for 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is only available in the Document/Medical toolkits.

See Also

Elements: | PutBitmapRow method, GetBitmapRowCol method, PutBitmapRowCol method, BitmapBytesPerLine Property, BitmapOrder Property .
Topics: | Raster Images: Getting / Setting Rows from Bitmaps


GetClientDC method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_HDC GetClientDC (void);
Delphi Syntax | GetClientDC: L_HDC;
Overview | Refer to Using the Windows API.

Remarks

Returns the device context of the Main Control's client area on the screen. You can use the device context with Windows API functions, such as GDI drawing functions.

You should use the ReleaseClientDC method when the device context is no longer needed.

See Also

Elements: | ReleaseClientDC method
Topics: | Working with the Control: Client Area Usage


GetCurvePoints method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetCurvePoints(PPoint apUserPoint, unsigned uUserPointCount, L_PINT pnCurve, L_PUINT puPointCount, unsigned uFlags);
Delphi Syntax | Function GetCurvePoints (apUserPoint: pPOINT; uUserPointCount: L_UINT; pnCurve: L_PINT; puPointCount: L_PUINT; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects.

Remarks

Updates the pnCurve array based on a curve or lines that pass through the specified points.

This method will update pnCurve using either the best curve or lines that pass through the points specified in the apUserPoint parameter. The points in the array may be sorted or not. In most cases, this method is used with the FreeHandShear, or FreeHandWave methods.

To compute the size of the pnCurve array:

Size = Maximum (apUserPoint.x) + 1;

The values stored in pnCurve represent the y coordinates of the calculated curve based on the points in the apUserPoint array. In the pnCurve array there can be only one y value for each x coordinate. Therefore, circles, ellipses, and spirals cannot be represented by pnCurve.

The x coordinates for the user points are sorted internally automatically.

See Also

Elements: | FreeHandShear method, FreeHandWave method
Topics: | Raster Images: Doing Geometric Transformations


GetDDB method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | HBITMAP GetDDB (L_HDC hDevice);
Delphi Syntax | GetDDB (hDevice: L_HDC): HBitmap;
Overview | Refer to Copying and Creating Bitmaps.

Remarks

Converts a LEAD Technologies bitmap into a Windows device dependent bitmap (DDB). When this method is completed, there are two copies of the bitmap in memory: the DDB and the original LEAD bitmap. Freeing one will not affect the other.

Ordinarily, you would need a DDB only if you are using Windows API functions. Nevertheless, for simplicity, the examples in this documentation get and set a DDB without using the API.

See Also

Elements: | GetDIB method, SetDIB method, SetDDB method
Topics: | Raster Images: Exchanging Imgages with Other Objects


GetDIB method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_HANDLE GetDIB(unsigned uType);
Delphi Syntax | Function GetDIB (uType: L_UINT): L_HANDLE;
Overview | Refer to Copying and Creating Bitmaps.

Remarks

Converts a LEAD Technologies bitmap into a Windows device independent bitmap (DIB). When this method is completed, there are two copies of the bitmap in memory: the DIB and the original LEAD bitmap. Freeing one will not affect the other.

This method is similar to GetDIB(), but it allows you to specify the type of DIB.

A DIB consists of one of the following:

BITMAPFILEHEADER,

BITMAPV4HEADER (Introduced in Windows 95 and Windows NT 4.0), or

BITMAPV5HEADER (Introduced in Windows 2000 and Windows 98)

followed by a color table and then the bitmap data. The resulting DIB type is determined by the value of the uType flag.

Ordinarily, you would need a DIB only if you are using Windows API functions. Nevertheless, for simplicity, the examples in this documentation get and set a DIB without using the API.

See Also

Elements: | SetDIB method, GetDDB method, SetDDB method
Topics: | Raster Images: Exchanging Images with Other Objects


GetFeretsDiameter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetFeretsDiameter(PPoint pPoints, unsigned uPointsCount, unsigned &uFeretsDiameter, unsigned &uFirstIndex, unsigned &uSecondIndex);
Delphi Syntax | Function GetFeretsDiameter (pPoints: pPOINT; uPointsCount: L_UINT; var uFeretsDiameter: L_UINT; var uFirstIndex: L_UINT; var uSecondIndex: L_UINT): L_INT;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

(Raster Pro and above toolkits) Computes the Feret’s diameter (caliper length) of an object, which is the maximum distance between any two points of the perimeter of a region, and finds the end points.

This diameter is equivalent to the minimum diameter of a tube through which this object/region can pass.

See Also

Elements: | GetRgnContourPoints method, GetRgnPerimeterLength method, Segment method
Topics: | Raster Images: Creating and Using a Region


GetFileInfo method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetFileInfo (System::AnsiString fName, int iPage);
Delphi Syntax | GetFileInfo (fName: String; iPage: Integer): Integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Gets information about the specified file.

This method updates the following properties:

GetFileInfo method
InfoAnimation property
InfoAnimationHeight property
InfoBits property
InfoColorSpace property
InfoCompress property
InfoFormat property
InfoHasAlpha property
InfoHeight property
InfoLayers property
InfoPage property
InfoPCDRes property
InfoSizeDisk property
InfoSizeMem property
InfoTotalPages property
InfoViewPerspective property
InfoWidth property
InfoXres property
InfoYres property

See Also

Elements | InfoColorSpace property, GetMemoryInfo method
Topics | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information
 | Raster Images: Playing Animated Images


GetFloaterHandle method (Main Control)

C++ 4.0 example

Delphi example

Builder Syntax | L_HRGN GetFloaterHandle(void)
Delphi Syntax | GetFloaterHandle: L_HRGN
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Stores a copy of the floater bitmap's region and returns a Windows region handle that you can use to retrieve or delete the stored region.

Keep in mind that the region data contains only positioning information relative to the floater bitmap, not the bitmap's pixel values.

To retrieve the stored region and add it to the bitmap, use the SetRgnHandle method. To delete the stored region, use the DeleteRgnHandle method.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | GetRgnHandle method, DeleteRgnHandle method, FreeRgn method, SetRgnHandle method
Topics: | Raster Images: Creating and Using a Region


GetFunctionalLookupTable method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetFunctionalLookupTable(int nStart, int nEnd, int nFactor, int nFlag);
Delphi Syntax | Function GetFunctionalLookupTable (nStart: Integer; nEnd: Integer; nFactor: Integer; nFlag: Integer): Integer;
Overview | Refer to Using Histograms.

Remarks

Updates a range of entries in the HistogramTable property array, based on the specified mathematical method.

The nFactor parameter is used for log and exp functions only.

If uFlag is FLT_EXP the value of nFactor modifies the lookup table values according to the following equations:

where :

nFirstValue = exp(nFactor * nStart/nEnd).

nLastValue = exp(nFactor)

x = the intensity value of the selected point

If uFlag is FLT_LN the value of nFactor modifies the lookup table values according to the following equations:

where:

nFirstValue = ln(1+ (nFactor * nStart/nEnd)).

nLastValue = ln(1 + nFactor)

x = the intensity value of the selected point

In the case of linear function, nFactor has no effect. The method performs a linear interpolation between the two points nStart and nEnd and stores the results in the lookup table. The user determines the two points nStart and nEnd and their new values, nFirstValue and nLastValue. The value nFirstValue should be stored in the lookup table at the nStart position and nLastValue at the nEnd position of the lookup table before calling this method.

As an example, suppose a user wants to select a point, change the intensity value of that point (x), and then perform two linear interpolations:

from 0 to the intensity value x

from intensity value x to the end of the range

To accomplish this, the user would proceed by doing the following:

Select the point and get its intensity value (x)

Change the intensity value of the selected point to some new value (newCol).

Store the new intensity value in the Lookup table by assignment:

RemapTable(x) = newCol

Call GetFunctionalLookupTable with nStart set to 0, nEnd set to x, and uFlag set to FLT_LINEAR.

Call GetFunctionalLookupTable with nStart set to x, nEnd set to 255, and uFlag set to FLT_LINEAR. (For the example, assume the image is 8-bits per pixel.)

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | GetUserLookUpTable method, RemapIntensity method, RemapTable property, RemapTableSize property
Topics: | Changing Brightness and Contrast


GetHistogram method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetHistogram (int iChannel);
Delphi Syntax | GetHistogram (iChannel:Integer): Integer;
Overview | Refer to Using Histograms.

Remarks

Updates the array that charts how many times each intensity level occurs in the bitmap. This method can chart red, green, and blue separately or together.

You can access the array values using the HistogramTable property. Intensity levels range from 0 to the value of HistogramTableSize property – 1. The resulting array items are indexed by intensity value. The value of each item is the number of occurrences of the intensity level.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method supports signed data images.

See Also

Elements: | HistogramTable property, HistogramTableSize property, GetHistogramGray method
Topics: | Raster Images: Using Histograms
 | Raster Images: Where the Region Preempts the Bitmap
 | Changing Brightness and Contrast


GetHistogramGray method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall GetHistogramGray (void);
Delphi Syntax | Function GetHistogramGray: Integer;
Overview | Refer to Using Histograms.

Remarks

(Medical only) This method works only on 12-bit and 16-bit grayscale images. For all other images, use the GetHistogram method.

Intensity levels in a grayscale bitmap can range from 0 to( 216 – 1), depending on whether the image is 12-bit or 16-bit grayscale, and the LowBit and HighBit of the image. The LowBit and HighBit identify which bits in a 12-bit or 16-bit entry are used. The LowBit and HighBit can be obtained by calling the GetMinMaxBits method and then looking at the MinBit and MaxBit properties.

Specifically, a histogram table for a 12-bit or 16-bit grayscale image will have 2(HighBit – LowBit + 1) entries.

After calling GetHistogramGray(), the HistogramGrayTable property is automatically sized and filled in with grayscale intensities.

For example, suppose you have a 16-bit grayscale image with LowBit = 2 and HighBit = 7. There are 2(7-2+1) = 64 possible grayscale intensities. The histogram table will therefore hold 64 entries. The number of entries in the HistogramGrayTable property can be found by examining the HistogramGrayTableSize property. The HistogramGrayTableSize property and the HistogramGrayTable property both can change after each call to the GetHistogramGray method. The number of grayscale values with bits 2 – 7 set to 0 can be found in HistogramGrayTable [0]. The number of grayscale values with bit 2 set to 1 and bits 3 – 7 set to 0 can be found in HistogramGrayTable [1], and so on up to HistogramGrayTable [63]. Since the low bit is 2 and the high bit is 7, bits 0, 1, and bits 8 – 15 must all be 0. Therefore, the values set in bits 2 – 7 determine the intensities present in the image. In the table below, the gray columns represent those bits that are always 0 for the image. The columns bit 7 through bit 2 represent possible settings for those bits. The last column gives the location within the HistogramGrayTable property of the number of grayscale values having the corresponding settings. For example, HistogramGrayTable [0] contains the number of grayscale values of intensity 0 (all bits set to 0). HistogramGrayTable [1] contains all the grayscale values with intensity 4 (the 2 bit position set to 1). HistogramGrayTable [2] contains all the grayscale values with intensity 8 (the 3 bit set to 1 and the remaining bits set to 0) and so on.

bits 8 – 15 | bit 7 | bit 6 | bit 5 | bit 4 | bit 3 | bit 2 | bit 1 | bit 0 | count location in HistogramGrayTable
all 0s | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | HistogramGrayTable(0)
all 0s | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | HistogramGrayTable(1)
all 0s | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | HistogramGrayTable(2)
all 0s | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | HistogramGrayTable(3)
all 0s | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | HistogramGrayTable(4)
… |  |  |  |  |  |  | … | … | and so on
all 0s | 1 | 1 | 1 | 1 | 1 | 1 | 0 | 0 | HistogramGrayTable(63)

As another example, suppose you have a 16-bit grayscale image with LowBit = 0 and HighBit = 15. The number of entries in the table will be 216 = 65,536.

See Also

Elements: | HistogramGrayTable property, HistogramGrayTableSize property, GetHistogram method, HistogramTable property
Topics: | Raster Images: Using Histograms
 | Raster Images: Where the Region Preempts the Bitmap
 | Changing Brightness and Contrast


GetLinearVOILUT method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetLinearVOILUT(double &dCenter, double &dWidth, unsigned uFlags);
Delphi Syntax | Function GetLinearVOILUT (var dCenter: L_DOUBLE; var dWidth: L_DOUBLE; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Gets the window center and the window width, if the LUT stored inside the loaded bitmap is linear. If the LUT stored inside the Bitmap is not linear, the method will fail.

You have to pay attention to your signed images LUT. The upper half should contain negative values and lower half contains positive values.

This method supports signed data images.

See Also

Elements: | WindowLevel method, GetUserLookupTable method, RemapIntensity method, ApplyLinearVOILUT method.
Topics: | Raster Images: Modifying Intensity Values


GetLoadResolution method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetLoadResolution (int nFormat);
Delphi Syntax | GetLoadResolution (nFormat: Integer): Integer;
Overview | Refer to Implementing PhotoCD and FlashPix Features.

Remarks

Gets the last values set by the SetLoadResolution method. These values determine the physical resolution of the PhotoCD, FlashPix, or JBIG file to be loaded.

This method sets the LoadResolutionCount property to 1 and updates the following properties with the current values:

LoadResolutionHeight property

LoadResolutionWidth property

See Also

Elements: | ReadLoadResolutions method, LoadResolutionCount property, LoadResolutionHeight property, LoadResolutionWidth property, PCDRes property, SetLoadResolution method, SaveResolutionHeight property, SaveResolutionWidth property
Topics: | Raster Images: Loading Files


GetMarksCenterMass method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetMarksCenterMass(PPoint pMarkPoints, PPoint pMarkCMPoints, unsigned uMarksCount);
Delphi Syntax | Function GetMarksCenterMass (pMarkPoints: pPOINT; pMarkCMPoints: pPOINT; uMarksCount: L_UINT): L_INT;
Overview | Refer to Detecting Registration Marks

Remarks

(Document/Medical only) Gets the center of mass for each of the registration marks specified in the pMarkPoints parameter.

This method is used to determine the center of mass for each supplied registration mark, to be used in detecting image rotation, scaling and translation.

The point values used to update the pMarkCMPoints parameter are multiplied by 100 in order to obtain more precision (00.00). To get the actual results, divide by 100.

This method can be used in the following manner:

Use SearchRegMarks to find the registration marks.

Pass data from pMarkDetectedPoints to this method to determine the points representing the center of mass for each registration mark.

Pass these points to GetTransformationParameters to detect the image rotation, scaling and translation.

If you simply want to automatically straighten a bitmap, use the Deskew method.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Deskew method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method, ApplyTransformationParameters method.
Topics: | Raster Images: Document Imaging


GetMemoryInfo method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetMemoryInfo (int hMem, int iPage, int iSize);
Delphi Syntax | GetMemoryInfo (hMem:L_HANDLE; iPage:Integer; iSize:Longint): Integer;
Overview | Refer to Using Memory-Resident Image Files.

Remarks

Gets information about a file that is stored in memory.

This method updates the following properties:

InfoBits property
InfoCompress property
InfoFormat property
InfoHeight property
InfoPage property
InfoSizeDisk property
InfoSizeMem property
InfoWidth property

To save an image to a file in memory, refer to the SaveMemory method. To load an image from a file in memory, refer to the LoadMemory method.

Note:

You cannot save a multipage file using the SaveMemory method, but if you get a multipage file into memory in some other way, you can specify a page when using the GetMemoryInfo method or the LoadMemory method.

See Also

Elements: | GetFileInfo method
Topics: | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


GetMemoryThresholds method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void GetMemoryThresholds(L_PINT pnTiledThreshold, L_PINT pnMaxConvSize, L_PINT pnTileSize, L_PINT pnConvTiles, L_PINT pnConvBuffers);
Delphi Syntax | Procedure GetMemoryThresholds (pnTiledThreshold: L_PINT; pnMaxConvSize: L_PINT; pnTileSize: L_PINT; pnConvTiles: L_PINT; pnConvBuffers: L_PINT );
Overview | Refer to Memory Storage Types for Bitmaps

Remarks

Gets the current memory restrictions set using the SetMemoryThresholds method. For more information on the various thresholds, refer to SetMemoryThresholds.

Pass Nil (NULL) for any parameter you are not interested in retrieving.

See Also

Elements: | SetMemoryThresholds method, GetMemoryInfo method
Topic: | Raster Images: Creating and Deleting Images


GetMinMaxBits method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetMinMaxBits(void)
Delphi Syntax | GetMinMaxBits: Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) Gets the minimum and maximum bits of the pixels in a bitmap. These values are not affected by LevelLowBit property or LevelHighBit property.

There are two properties associated with this method. The MinBit property and MaxBit property are updated with the minimum and maximum values retrieved by this method.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This property supports signed data images.

See Also

Elements: | MinBit property, MaxBit property, WindowLevel method, GetMinMaxVal method
Topics: | Raster Images: Palettes


GetMinMaxVal method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetMinMaxVal(void);
Delphi Syntax | GetMinMaxVal: Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) Gets the minimum and maximum intensity values of the pixels in a bitmap. There are two properties associated with this method. The MinVal property and MaxVal property are updated with the minimum and maximum values retrieved by this method.

The minimum and maximum intensity values of the pixels in the bitmap are not affected by LevelLowBit property or LevelHighBit property.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This property supports signed data images.

See Also

Elements: | MinVal property, MaxVal property, WindowLevel method, GetMinMaxBits method
Topics: | Raster Images: Palettes


GetObjectInfo method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetObjectInfo(bool bWeighted, unsigned &uX, unsigned &uY, int &nAngle, unsigned &uRoundness);
Delphi Syntax | Function GetObjectInfo (bWeighted: Boolean; var uX: L_UINT; var uY: L_UINT; var nAngle: L_INT; var uRoundness: L_UINT): L_INT;
Overview | Refer to Bitmaps and Bitmap Lists

Remarks

(Raster Pro and above toolkits) Gets the position, orientation and roundness of areas in the image.

All the objects(areas) in the image are considered to be a single object. This method determines various attributes of the object in the image to identify the objects and to determine their position and orientation. The results uX, uY and nAngle obtained by this method are multiplied by 100 in order to obtain more precision. To get the actual results, divide by 100.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | GetStatisticsInfo method, GetRgnContourPoints method, GetRgnPerimeterLength method, GetFeretsDiameter method
Topics: | Raster Images: Analysis Image Object or Region Analysis


GetPixelData method (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | int GetPixelData (void * pData, int nRow, int nCol, int nSize);
Delphi Syntax | Function GetPixelData (pData: Pointer; nRow: Integer; nCol: Integer; nSize: Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps

Remarks

This method should be called only for 8, 16, 24, 32, 48 and 64-bit bitmaps. Here is how it works:

For 8-bit bitmaps, this method will retrieve the palette index for the specified pixel.

For 16-bit bitmaps, the method will retrieve the 2-byte value that forms the pixel.

For grayscale 16-bit bitmaps, the data will contain the gray value.

For color 16-bit bitmaps, the data contains packed 5-bit R, G and B values. The high bit contains the alpha information. The BitmapOrder Property member in determines whether the data is RGB or BGR.

For 24-bit bitmaps, the method will retrieve the 3 bytes containing the pixel color. BitmapOrder Property determines whether the data is RGB or BGR.

For 32-bit bitmaps, the method will retrieve the 4 bytes containing the pixel color and alpha information. The first 3 bytes contain the pixel color. The BitmapOrder Property determines whether the data in the first 3 bytes is RGB or BGR. The 4th byte is the alpha channel information.

For 48-bit bitmaps, the method will retrieve the 6 bytes containing the pixel color. BitmapOrder Property determines whether the data is RGB or BGR. Each color component is stored as a 16-bit value, where 0 corresponds to black and $FFFF corresponds to full white.

For 64-bit bitmaps, the method will retrieve the 8 bytes containing the pixel color and alpha information. BitmapOrder Property determines whether the data in the first 6 bytes is RGB or BGR. Each color component is stored as a 16-bit value, where 0 corresponds to black and $FFFF corresponds to full white. The last two bytes contain the alpha information (also stored as a short value).

This method will return an error if nBytes is smaller than it should be. The minimum value for nSize is indicated in a formula above.

See Also

Elements: | PutPixelData method, Pixel property
Topics: | Raster Images: Getting Current Information
 | Using Color Values in LEADTOOLS


GetRgnArea method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetRgnArea(void);
Delphi Syntax | GetRgnArea: Longint;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Returns the number of pixels in the bitmap region.

See Also

Elements: | HasRgn property, IsPtInRgn method, RgnHeight property, RgnLeft property, RgnTop property, RgnWidth property
Topics: | Raster Images: Creating and Using a Region


GetRgnBounds method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetRgnBounds (Windows::TRect &RgnRect);
Delphi Syntax | GetRgnBounds (var RgnRect: TRect): integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Gets the bounding rectangle of the bitmap region.

The size is unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | HasRgn property, IsPtInRgn method, GetRgnArea method, RgnLeft property, RgnTop property, RgnWidth property
Topics: | Raster Images: Creating and Using a Region


GetRgnContourPoints method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetRgnContourPoints(PPoint &pPoints, unsigned &uPointsCount);
Delphi Syntax | Function GetRgnContourPoints (var pPoints: pPOINT; var uPointsCount: L_UINT): L_INT;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Gets the contour coordinates of a region.

This method works only on bitmaps having a region. If a bitmap does not have a region the method returns the error: Not Initialized.

This method supports signed data images.

See Also

Elements: | GetStatisticsInfo method, GetObjectInfo method, GetRgnPerimeterLength method, GetFeretsDiameter method, MathFunction method
Topics: | Raster Images: Creating and Using a Region


GetRgnHandle method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_HRGN GetRgnHandle (void);
Delphi Syntax | GetRgnHandle : L_HRGN
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Stores a copy of the bitmap's region and returns a Windows region handle that you can use to retrieve or delete the stored region.

Keep in mind that the region data contains only positioning information relative to the LEAD bitmap in memory, not the bitmap's pixel values.

To retrieve the stored region and add it to the bitmap, use the SetRgnHandle method. To delete the stored region, use the DeleteRgnHandle method.

See Also

Elements: | DeleteRgnHandle method, FreeRgn method, SetRgnHandle method
Topics: | Raster Images: Creating and Using a Region


GetRgnPerimeterLength method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetRgnPerimeterLength(unsigned &uLength);
Delphi Syntax | Function GetRgnPerimeterLength (var uLength: L_UINT): L_INT;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Computes the length of the perimeter of a region.

This method works only on bitmaps having a region. If a bitmap does not have a region the method returns the error: Not Initialized.

This method supports signed data images.

See Also

Elements: | GetStatisticsInfo method, GetObjectInfo method, Segment method, GetFeretsDiameter method, GetRgnContourPoints method
Topics: | Raster Images: Creating and Using a Region


GetStatisticsInfo method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetStatisticsInfo(unsigned uChannel, unsigned uStart, unsigned uEnd, unsigned &uStdDev, unsigned &uMean, unsigned &uMedian, unsigned &uMax, unsigned &uMin, unsigned &uPixelCnt, unsigned &uTotalPixelCnt, unsigned &uPercent);
Delphi Syntax | Function GetStatisticsInfo (uChannel: L_UINT; uStart: L_UINT; uEnd: L_UINT; var uStdDev: L_UINT; var uMean: L_UINT; var uMedian: L_UINT; var uMax: L_UINT; var uMin: L_UINT; var uPixelCnt: L_UINT; var uTotalPixelCnt: L_UINT; var uPercent: L_UINT): L_INT;
Overview | Refer to Image Analysis

Remarks

(Raster Pro and above toolkits) Calculates statistical information about the current bitmap and updates certain parameters with this information.

The uStart and uEnd parameters designate the range of colors that will be taken in consideration for producing the results. Only the values between uStart and uEnd are used for the calculation of the results. The range of each one depends on the bits per pixel of the bitmap: in the case of 8 bits per component (RGB), the range is between 0 and 255; for 16 bits, the range is 0 through 65535; and for 12 bits, the range is 0 through 4095.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | GetObjectInfo method
Topics: | Raster Images: Getting and Setting File Information


GetTagCount method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned __fastcall GetTagCount(Word uTagGetTagCountuTag);
Delphi Syntax | GetTagCount(uTag : word) : Cardinal;
Overview | Refer to Implementing TIFF Tags

Remarks

Returns the number of data values associated with the specified tag.

For more information on setting tags, refer to the SetTag method.

See Also

Elements: | EnumTags method, OnEnumTags event, GetTagType method, GetTagData method, ReadTag method, SetTag method, WriteTag method, Save method, Comment property
Topics: | Raster Images: Getting and Setting File Information


GetTagData method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Variant __fastcall GetTagData(Word uTag);
Delphi Syntax | GetTagData (uTag : word): Variant;
Overview | Refer to Implementing TIFF Tags

Remarks

Returns the data associated with the specified tag.

The number of values in the array can be retrieved using GetTagCount method. The type of values can be retrieved using GetTagType method. Note that if the type is TAG_RATIONAL, then each element is represented with two LONG values: the numerator and denominator. So for a Rational tag, you have twice as many entries in the array: the even index elements in the array contain the numerators and the odd indexes contain the denominators.

For more information on setting tags, refer to the SetTag method.

See Also

Elements: | EnumTags method, OnEnumTags event, GetTagCount method, GetTagType method, ReadTag method, SetTag method, WriteTag method, Comment property, Save method
Topics: | Raster Images: Getting and Setting File Information


GetTagType method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Word __fastcall GetTagType(Word uTag);
Delphi Syntax | GetTagType (uTag : word): word;
Overview | Refer to Implementing TIFF Tags

Remarks

Returns the data type of the specified tag.

If the tag type is rational, then each element is represented by two longs. Otherwise, the size of each element is indicated by its type. (An element of type TAG_LONG is type long. An element of type TAG_SHORT is type short. etc.)

For more information on setting tags, refer to the SetTag method.

See Also

Elements: | EnumTags method, OnEnumTags event, GetTagCount method, GetTagData method, ReadTag method, SetTag method, WriteTag method, Comment property, Save method
Topics: | Raster Images: Getting and Setting File Information


GetTransformationParameters method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GetTransformationParameters(PPoint pRefPoints, PPoint pTrnsPoints, int &nXTranslation, int &nYTranslation, int &nAngle, unsigned &uXScale, unsigned &uYScale);
Delphi Syntax | Function GetTransformationParameters (pRefPoints: pPOINT; pTrnsPoints: pPOINT; var nXTranslation: L_INT; var nYTranslation: L_INT; var nAngle: L_INT; var uXScale: L_UINT; var uYScale: L_UINT): L_INT;
Overview | Refer to Detecting Registration Marks

Remarks

(Document/Medical) Computes the rotation angle, XY scaling, and XY translation of the transformed bitmap with comparison to the reference bitmap. These are the transformations that would have to be performed to the reference bitmap to have it match the current bitmap.

This method detects transformation parameters of the transformed bitmap by comparing it with the reference bitmap. The number of reference and detected points must be three.

Use GetMarksCenterMass to fill the pRefPoints array with the points representing the center of masses for each of the reference marks from the reference bitmap.

Fill the pTrnsPoints array by performing the following steps:

Use SearchRegMarks to find the new positions for the reference marks

Use GetMarksCenterMass to fill the pTrnsPoint array with points representing the center of masses for each of the transformed reference marks.

The values used to update pnXTranslation, pnYTranslation, pnAngle, puXScale and puYScale are internally divided by 100. For example, if the variable pointed to by pnAngle is 500, the actual angle of rotation is 5 degrees clockwise.

The values obtained by this method must be sent, without any modification, to the ApplyTransformationParameters method in order to correct the image.

If you want to correct the image yourself, you have to perform the inverse operations in this order:

Shift the image by (-*pXTranslation / 100, -*pYTranslation / 100) using Combine or CombineExt

Rotate without resizing by -(*pnAngle)

Resize using scaling factors of (100 / *puXScale, 100 / *puYScale) using Size or Resize

If you simply want to automatically straighten a bitmap, use the Deskew method.

See Also

Elements: | Combine method, Rotate method, Size method, IsRegMark method, SearchRegMarks method, GetMarksCenterMass method, ApplyTransformationParameters method
Topics: | Raster Images: Document Imaging


GetUserLookupTable method (Main Control)

C++ Builder exampleGetUserLookupTableExCB

Delphi exampleGetUserLookupTableExD4

Builder Syntax | Int GetUserLookupTable(Windows::PLongint nPointCount);
Delphi Syntax | Function GetUserLookupTable(nPointCount: pLongInt): Integer;
Overview | Refer to Using Histograms.

Remarks

Updates the HistogramTable property array, based on a curve that passes through points defined by the UserLUTCurveX and UserLUTCurveY properties.

This method will update the lookup table array using the best curve that passes through the points specified in the Lookup Table Curve.

Before using this method, you must allocate a Lookup Table Curve Array using the UserLUTCurveSize property, then fill the coordinates of its points with the UserLUTCurveX and UserLUTCurveY properties.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | RemapIntensity method, RemapTable property, RemapTableSize property, UserLUTCurveX property, UserLUTCurveY property, UserLUTCurveSize property
Topics: | Changing Brightness and Contrast


GlassEffect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GlassEffect(unsigned uCellWidth, unsigned uCellHeight, unsigned uFlags);
Delphi Syntax | Function GlassEffect (uCellWidth: L_UINT; uCellHeight: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Divides the bitmap into rectangular cells and makes it look as if it is being viewed through glass blocks.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, Dry method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects


GlowFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GlowFilter(unsigned uDim, unsigned uBright, unsigned uThreshold);
Delphi Syntax | Function GlowFilter (uDim: L_UINT; uBright: L_UINT; uThreshold: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Makes the colored edges shine with a neon glow.

This method detects the edge pixels by comparing the values of the pixel with surrounding pixels and if the edge value (the difference between the surrounding pixels and the pixel being evaluated) is greater than the Threshold value, the pixel is an edge pixel. The method then multiplies the values for the edge pixels by the uBright Brightness factor.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

uDim = 15;

uBright = 5;

uThreshold = 0;

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, Dry method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Filtering Images
 | Raster Images: Artistic Effects


Grayscale method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Grayscale (int nValue);
Delphi Syntax | Grayscale (nValue:Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Converts a 1-, 4-, 8-, 16-, 24-, or 32-bit bitmap to an 8, 12, or 16-bit grayscale bitmap. Support for !2 and 16-bit grayscale images is only available in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics:

Raster Images: Doing Color Expansion or Reduction


GrayScaleExt method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall GrayScaleExt (int RedFact, int GreenFact, int BlueFact);
Delphi Syntax | Function GrayScaleExt (RedFact: Integer; GreenFact: Integer; BlueFact: Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps

Remarks

Converts any bitmap to a grayscale bitmap without changing its resolution.

RedFact + GreenFact + BlueFact must equal 1000. (Internally the values are divided by 1000).

For each pixel in the bitmap the red, green and blue values are modified by the RedFact, GreenFact and BlueFact parameters, respectively. This allows the user to give more weight to one color, essentially enhancing that color, before the pixel is converted to grayscale.

For example, if this method is called with the RedFact set to 500, the GreenFact set to 250 and the BlueFact set to 250, the red value of each pixel will get 50% of the weight when determining the grayscale value. The green value will get 25% of the weight and the blue value will get 25% of the weight when determining the grayscale value. This highlights or enhances the red in the bitmap, prior to conversion to grayscale.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | GrayScale method, IsGrayScale property, ConvertToColoredGray method, BalanceColors method, SwapColors method
Topics: | Raster Images: Doing Color Expansion or Reduction


GrayScaleToDuotone method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GrayScaleToDuotone(L_PRGBQUAD pNewColor, unsigned crColor, unsigned uFlags);
Delphi Syntax | Function GrayScaleToDuotone (pNewColor: L_PRGBQUAD; crColor: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Grayscale Images

Remarks

(Raster Pro and above toolkits) Converts the grayscale bitmap into a colored one by mixing or replacing the original values of the pixels with new colors.

This method was designed for use with grayscale bitmaps. If the bitmap being used is not grayscale, this method only affects those pixels or areas of the bitmap where Red=Green=Blue.

This method transforms the 8-bit grayscale bitmaps into colored 8-bit bitmaps (Palette), meanwhile the 12-bit and 16-bit grayscale bitmaps are transformed into a 48-bit colored bitmap.

Monotone conversion is possible by setting uFlags to DT_REPLACE, which clears the palette.

This method gives you the option of having the toolkit generate the array of colors to use or creating the array of colors to use yourself.

To have the toolkit generate the array of colors:

Pass the color to use for generating the array of gradient colors in the crColor parameter.

(a) | If the bitmap is binary, the IsGrayScale property is checked by the GrayScaleToDuotone method to determine the kind of grayscale palette being used. If the IsGrayScale property is GRAY_ORDEREDINVERSE or GRAY_NOTORDERED, then the color passed in the crColor parameter to GrayScaleToDuotone will become the first color in the array generated by the toolkit, pNewColor[0], and the toolkit will create the second color in the array pNewColor[1].
 | If the IsGrayScale property contains a value other than GRAY_ORDEREDINVERSE or GRAY_NOTORDERED, then the color passed in the crColor parameter to GrayScaleToDuotone will become the second color in the array generated by the toolkit, pNewColor[1], and the toolkit will create the first color in the array pNewColor[0].
(b) | If the bitmap is grayscale (not binary) the GrayScaleToDuotone will take the color passed to it in the crColor parameter and generate a 256 color gradient in pNewColor.
(c) | If the bitmap is not grayscale (it is color) then the GrayScaleToDuotone method will use the color passed to it in the crColor parameter and generate a 256 color gradient in pNewColor. These colors will be used to change only those pixels in the color image for which Red = Green = Blue.

To use a user-defined array of colors:

(a) | If the bitmap is binary, call GrayScaleToDuotone with the two colors you wish to use in the pNewColor parameter.
(b) | If the bitmap is grayscale (not binary) call GrayScaleToDuotone with the 256 colors you wish to use in the pNewColor parameter.
(c) | If the bitmap is not grayscale (it is color) call GrayScaleToDuotone with the 256 colors you wish to use in the pNewColor parameter. These colors will be used to change only those pixels in the color image for which Red = Green = Blue.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | GrayScale method, IsGrayScale property, GrayScaleToMultitone method.
Topics: | Raster Images: Doing Color Expansion or Reduction
 | Using Color Values in LEADTOOLS


GrayScaleToMultitone method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int GrayScaleToMultitone(unsigned uToneType, pCOLORREF pcrColor, unsigned uDistType, L_PRGBQUAD pGradient, unsigned uFlags);
Delphi Syntax | Function GrayScaleToMultitone (uToneType: L_UINT; pcrColor: pCOLORREF; uDistType: L_UINT; pGradient: L_PRGBQUAD; uFlags: L_UINT): L_INT;
Overview | Refer to Grayscale Images

Remarks

(Raster Pro and above toolkits.) Converts a grayscale bitmap into a colored one by mixing or replacing the original values of the pixels with one or more new colors.

This method was designed for use with grayscale bitmaps. If the bitmap being used is not grayscale, this method only affects those pixels or areas of the bitmap where Red=Green=Blue.

Monotone conversion is possible by setting uFlags to DT_REPLACE, which clears the palette.

This method gives you the option of having the toolkit generate the array of colors to use or creating the array of colors to use yourself.

To have the toolkit generate the array of colors:

(a) | If the bitmap is binary, call GrayScaleToMultitone with uToneType set to DT_MONOTONE, uDistType set to DT_LINEAR and the color you wish to use set in pColor. The IsGrayScale property will be checked by GrayScaleToDuotone to determine the kind of grayscale palette being used. If IsGrayScale is GRAY_ORDEREDINVERSE or GRAY_NOTORDERED, then the color passed in the pColor parameter to GrayScaleToMultitone will become the first color in the array generated by the toolkit, and the toolkit will create the second color in the array. The pColor array will be updated with these two colors.
 | If the IsGrayScale property was a value other than GRAY_ORDEREDINVERSE or GRAY_NOTORDERED, then the color passed in the pColor parameter to GrayScaleToMultitone will become the second color in the array generated by the toolkit, and the toolkit will create the first color in the array. The pColor parameter will be updated with these two colors.
(b) | If the bitmap is grayscale (not binary) call GrayScaleToMultitone with uDistType set to DT_LINEAR. The GrayScaleToMultitone method will take the color(s) passed to it in the pColor parameter and generate a 256 color gradient for each color.
 | (i) | If the uToneType is set to DT_DUOTONE, set two colors in the pColor parameter. The toolkit will create a 256 color array for each color. The pColor array will be updated with all 512 colors.
 | (ii) | If the uToneType is set to DT_TRITONE, set three colors in the pColor parameter. The toolkit will create a 256 color array for each color. The pColor array will be updated with all 768 colors.
 | (iii) | If the uToneType is set to DT_QUADTONE, set four colors in the pColor parameter. The toolkit will create a 256 color array for each color. The pColor array will be updated with all 1024 colors.
(c) | If the bitmap is not grayscale (it is color) call GrayScaleToMultitone with uDistType set to DT_LINEAR. The GrayScaleToMultitone method will take the color(s) passed to it in the pColor parameter and generate a 256 color gradient for each color. (See the expanded explanation in i, ii and iii of (b) above.) These colors will be used to change only those pixels in the color image for which Red = Green = Blue.

To use a user-defined array of colors:

(a) | If the bitmap is binary, call GrayScaleToMultitone with uToneType set to DT_MONOTONE, uDistType set to DT_USERDEFINE and the two colors you wish to use in the pGradient parameter.
(b) | If the bitmap is grayscale (not binary) call GrayScaleToMultitone with uDistType set to DT_USERDEFINE.
 | (i) | If the uToneType is set to DT_DUOTONE, set 512 colors (256 for each basic color) in the pGradient parameter.
 | (ii) | If the uToneType is set to DT_TRITONE, set 768 colors (256 for each basic color) in the pGradient parameter.
 | (iii) | If the uToneType is set to DT_QUADTONE, set 1024 colors (256 for each basic color) in the pGradient parameter.
(c) | If the bitmap is not grayscale (it is color) call GrayScaleToMultitone with uDistType set to DT_USERDEFINE. (See the expanded explanation in i, ii and iii of (b) above.) These colors will be used to change only those pixels in the color image for which Red = Green = Blue.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | GrayScale method, IsGrayScale property, GrayScaleToDuotone method.
Topics: | Raster Images: Doing Color Expansion or Reduction
 | Using Color Values in LEADTOOLS


Halftone method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Halftone (unsigned uType, int nAngle, unsigned uDim, HBITMAPLIST hList);
Delphi Syntax | Function Halftone (uType: Cardinal; nAngle: L_INT32; uDim: Cardinal; hList: HBITMAPLIST): L_INT;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Converts a 1-, 4-, 8-, 16-, 24-, or 32-bit bitmap to a half-toned bitmap, with a specified pattern rotation. A half-toned bitmap is a 1-bit bitmap that has been dithered for black and white printing or display.

For the HT_USERDEF option, the number of bitmaps in the list must be at least equal to (uDim * uDim + 1). Bitmaps with higher indexes correspond to higher intensity values.

This method can process the whole image or a region of the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the bitmap is originally 1-bit but is not black and white, this method changes it to black and white.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics:

Raster Images: Doing Color Expansion or Reduction


HistoContrast method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int HistoContrast (int iChange);
Delphi Syntax | HistoContrast (iChange:Integer): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Increases or decreases the contrast of the image in a bitmap, using a histogram to determine the median brightness.

This method finds the median brightness of the image; then brightens the pixels with values above the median and darkens the pixels with values below the median. This is more sophisticated (but slower) than the Contrast method, which uses the middle possible value (128) rather than finding the actual median.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoEqualize method, StretchIntensity method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Using Histograms
 | Raster Images: Where the Region Preempts the Bitmap


HistoEqualize method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall HistoEqualize (int nFlags);
Delphi Syntax | function HistoEqualize (nFlags: Integer):Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Linearizes the number of pixels, in a bitmap, based on the specified color space. This can be used to bring out the detail in dark areas of an image.

Previously this method only equalized the number of pixels per gray level, using a gray level representation of the image. This method is now obtained by passing GRAY_SPACE for nFlags.

For the best results, set nFlags to YUV_SPACE.

This method can process the whole image or a region of the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Using Histograms
 | Raster Images: Where the Region Preempts the Bitmap


HolePunchRemove method (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | int HolePunchRemove(unsigned uProcessFlags, int nMinHoleCount, int nMaxHoleCount, int nMinHoleWidth, int nMinHoleHeight, int nMaxHoleWidth, int nMaxHoleHeight, int nLocation);
Delphi Syntax: | Function HolePunchRemove(uProcessFlags: L_UINT32; nMinHoleCount:L_INT32; nMaxHoleCount :L_INT32; nMinHoleWidth:L_INT32; nMinHoleHeight :L_INT32; nMaxHoleWidth :L_INT32; nMaxHoleHeight :L_INT32; nLocation :L_INT32): L_INT;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)This method detects and removes hole punches, common in scanned documents.

This method works only on 1-bit black and white images.

Hole punch configurations may consist of 2 or more holes.

If a region is selected, only the selected region will be changed by this method. If no region is selected, the whole image will be processed.

The behavior of this method can be modified using the OnHolePunchRemove event.

This method triggers both the OnHolePunchRemove event and the OnStatus event.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | OnHolePunchRemove event
Topics: | Raster Images: Cleaning - up 1-Bit Images


HolesRemovalRgn method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int HolesRemovalRgn(void);
Delphi Syntax | Function HolesRemovalRgn ( ): L_INT;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

(Document/Medical only) Removes all the holes in a region.

This method is designed to work on bitmaps that have a region. It removes the holes from the bitmap’s region. If this method is used with a bitmap that does not have a region, the "Invalid Parameter" error is returned.

This method supports signed data images.

See Also

Elements: | Smooth method, BorderRemove method, InvertedText method, DotRemove method, HolePunchRemove method, LineRemove method
Topics: | Raster Images: Creating and Using a Region


HSV_HfromRGB method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall HSV_HfromRGB (unsigned cr);
Delphi Syntax | Function HSV_HfromRGB (cr: TColorRef): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Returns the corresponding Hue of a standard Windows COLORREF (cr).

Traditionally, hue ranges from 0 to 359. For HSV_HfromRGB, the range of 0 to 359 is remapped to a range of 0..255. For example,

Color | Hue (0..359) | Hue (0..255)
Red | 0 | 0
Green | 120 | 85
Blue | 240 | 170

The standard Windows values for COLORREF (cr) represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format $00BBGGRR represents the blue, green, and red color values for the specified pixel, where $BB is the blue value, $GG is the green value and $RR is the red value. If $01000000 is set in the COLORREF value ($010000ZZ), the lower 8 bits ($ZZ) represent an index into the bitmap's palette, which holds the color value. You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes as Color Values. Please note that just because an image has a palette, does not mean the value returned by this property is a palette index.

See Also

Elements: | HSV_SfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Doing Color Space Conversions
 | Creating and Using a Bitmap Region
 | Using Color Values in LEADTOOLS


HSV_SfromRGB method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall HSV_SfromRGB (unsigned cr);
Delphi Syntax | Function HSV_SfromRGB (cr: TColorRef): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Returns the corresponding Saturation (S) of a standard Windows COLORREF (cr).

Saturation is the amount of "white" in a color. A saturation of 0 contains the most white and a saturation of 255 contains no white.

The standard Windows values for COLORREF (cr) represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format $00BBGGRR represents the blue, green, and red color values for the specified pixel, where $BB is the blue value, $GG is the green value and $RR is the red value. If $01000000 is set in the COLORREF value ($010000ZZ), the lower 8 bits ($ZZ) represent an index into the bitmap's palette, which holds the color value. You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes as Color Values. Please note that just because an image has a palette, does not mean the value returned by this property is a palette index.

See Also

Elements: | HSV_HfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Doing Color Space Conversions
 | Creating and Using a Bitmap Region
 | Using Color Values in LEADTOOLS


HSV_VfromRGB method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall HSV_VfromRGB (unsigned cr);
Delphi Syntax | Function HSV_VfromRGB (cr: TColorRef): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Returns the corresponding Value (V) of a standard Windows COLORREF (cr).

Value is the amount of "black" in a color. A Value of 0 contains the most black and a Value of 255 contains the least black.

The standard Windows values for COLORREF (cr) represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format $00BBGGRR represents the blue, green, and red color values for the specified pixel, where $BB is the blue value, $GG is the green value and $RR is the red value. If $01000000 is set in the COLORREF value ($010000ZZ), the lower 8 bits ($ZZ) represent an index into the bitmap's palette, which holds the color value. You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes as Color Values. Please note that just because an image has a palette, does not mean the value returned by this property is a palette index.

See Also

Elements: | HSV_HfromRGB method, HSV_SfromRGB method, RGBfromHSV method
Topics: | Raster Images: Doing Color Space Conversions
 | Creating and Using a Bitmap Region
 | Using Color Values in LEADTOOLS


Hue method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Hue (int iAngle);
Delphi Syntax | Hue (iAngle:Integer): Integer;
Overview | Refer to Correcting Colors.

Remarks

Changes the hue of colors in the bitmap by rotating the color wheel.

This method can rotate the color wheel in either direction. A 180-degree rotation in either direction changes each color to its complement. Positive rotation takes red toward green, green toward blue, and blue toward red. Negative rotation has the opposite effect.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Saturation method, Invert method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


IgnoreFilters method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int IgnoreFilters (System::AnsiString Filters);
Delphi Syntax | IgnoreFilters (String Filters): Integer;
Overview | Refer to Loading Filters

Remarks

Specifies which file filters LEADTOOLS should NEVER load, even if present. Use this method if you never want to load a particular file filter(s). This is useful for instance if you never load AVI files and you want to ignore the AVI filter since this filter on its own loads all the DLLs required for Video for Windows (there are about 10 of them).

The files specified in PreLoadFilters take priority over the files specified in IgnoreFilters. This means that if the filter is present in Filters for both methods, then the filter will be loaded and will not be ignored.

Note that IgnoreFilters has effect only if called prior to loading, saving or getting information about a file. Calling this method after that will have no effect.

See Also

Elements: | PreLoadFilters method, PDFInitDir property
Topics: | Working with the Control: General Behavior, Files To Be Included With Your Application


Impressionist method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Impressionist(unsigned uHorzDim, unsigned uVertDim);
Delphi Syntax | Function Impressionist (uHorzDim: L_UINT; uVertDim: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Makes a bitmap look like it was painted by an impressionist painter.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowImpressionistDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects


InitFourierTransformationData method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InitFourierTransformationData (void);
Delphi Syntax | Function InitFourierTransformationData ( ): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Initializes the Fourier Transform coefficients for the specified object.

This method is used only when you are dealing with Fourier Transform methods.

When you are finished, you should free the allocated data by calling the FreeFourierTransformationData method.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | DiscreteFourierTransformation method, FastFourierTransformation method, FreeFourierTransformationData method, FrequencyFilter method, FrequencyFilterMask method, DisplayFourierTransformation method
Topics: | Raster Images: Fourier Transforms


InsertBitmapListItem method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int InsertBitmapListItem (Cardinal uIndex, TBitmapHandle newBitmap);
Delphi Syntax | InsertBitmapListItem (uIndex: Cardinal; newBitmap: TBitmapHandle): Integer;
Overview | Refer to Bitmaps and Bitmap Lists.

Remarks

Inserts a bitmap into the control's bitmap list. You can get a bitmap to insert by referencing the Bitmap property of another Main Control.

If you insert a bitmap into the middle of a list, the indexes of other items in the list are adjusted.

See Also

Topics:

Raster Images: Creating and Maintaining Lists of Images


Intensity method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Intensity (int iChange);
Delphi Syntax | Intensity (iChange:Integer): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Changes the intensity (brightness) of the bitmap.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | GammaCorrect method, Contrast method, HistoContrast method, HistoEqualize method, StretchIntensity method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


IntensityDetect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int IntensityDetect (unsigned uLow, unsigned uHigh, COLORREF crInColor, COLORREF crOutColor, unsigned uChannel);
Delphi Syntax | Function IntensityDetect (uLow: L_UINT, uHigh: L_UINT; crInColor: COLORREF; crOutColor: COLORREF; uChannel: L_UINT): L_INT;
Overview | Refer to Detecting and Enhancing Edges and Lines.

Remarks

Applies binary segmentation to a bitmap by filtering the specified bitmap to detect colors in a specified intensity range, in the specified color channel(s).

The image is divided into two parts inner and outer according to the values of uLow and uHigh.

The method can process 2 or more channels at a time by OR-ing two or more flags.

The method can obtain the same result of the old IntensityDetect (uLow, uHigh) of version 13 and before by passing the following parameters:

IntensityDetect(, uLow, uHigh, RGB(0, 0, 0), RGB(255, 255, 255), CHANNEL_RED | CHANNEL_GREEN | CHANNEL_BLUE);

This method also supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


Invert method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Invert (void);
Delphi Syntax | Invert :Integer;
Overview | Refer to Correcting Colors.

Remarks

Inverts the colors in the bitmap, making it like a photographic negative.

This method can also be used to invert the color of a 1-bit bitmap, making the black white and the white black.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | Hue method, Saturation method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


InvertedText method (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | int InvertedText(unsigned uProcessFlags, int nMinInvertWidth, int nMinInvertHeight, int nMinBlackPercent, int nMaxBlackPercent);
Delphi Syntax: | Function InvertedText(uProcessFlags: L_UINT32; nMinInvertWidth: L_INT32; nMinInvertHeight: L_INT32; nMinBlackPercent: L_INT32; nMaxBlackPercent: L_INT32): L_INT;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)Finds and inverts areas of inverted text in a 1-bit black and white image.

Inverted text is commonly found in scanned text documents.

Below is an example of inverted text often found in scanned images:

Inverting the area of inverted text yields:

This method works only on 1-bit black and white images.

If a region is selected, only the selected region will be changed by this method. If no region is selected, the whole image will be processed.

The behavior of this method can be modified by using the OnInvertedText event.

This method triggers both the OnInvertedText event and the OnStatus event.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | OnInvertedText event
Topics: | Raster Images: Cleaning - up 1-Bit Images


IsPtInFloater method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool IsPtInFloater (int x, int y);
Delphi Syntax | IsPtInFloater (x, y: Integer): Boolean;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Lets you see whether a point in the Main Control's client area is in the floater.

This method is commonly used when the AutoFloater property is False, to test whether the mouse click selects the floater in the OnMouseDown event. The coordinates of the point are relative to the Main Control's client area. The unit of measure is pixels.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | Floater property, FloaterVisible property
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


IsPtInRgn method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool IsPtInRgn (int nRow, int nCol);
Delphi Syntax | IsPtInRgn (nRow, nCol: Integer): Boolean ;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Determines whether the specified point is in the bitmap's region.

The coordinates of the point are relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | HasRgn property, GetRgnArea method, RgnHeight property, RgnLeft property, RgnTop property, RgnWidth property
Topics: | Raster Images: Creating and Using a Region


IsRegMark method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int IsRegMark(unsigned uType, unsigned uMinScale, unsigned uMaxScale, unsigned uWidth, unsigned uHeight);
Delphi Syntax | Function IsRegMark (uType: L_UINT; uMinScale: L_UINT; uMaxScale: L_UINT; uWidth: L_UINT; uHeight: L_UINT): L_INT;
Overview | Refer to Detecting Registration Marks

Remarks

(Document/Medical only) Determines whether the object inside the bitmap is a registration mark.

This method verifies whether the object inside the bitmap is a registration mark. The object must be white and the background black. Objects that are not white will not be detected. The bitmap must have only one object inside it in order to work properly.

Currently, there is only one uType defined, a T-shaped figure as shown in the following figure. This type is a "T" rotated by 90 degrees counter clockwise. The P4 point must be on the center point of Line P1P2 (that is, the distance from P1 to P4 equals the distance from P2 to P4). The line width should be greater than 2 pixels (preferably 3 pixels). There is no condition on line lengths since you provide the values for uWidth, uHeight, uMaxScale, and uMinScale.

Do not use this method to search for registration marks inside a bitmap. Use the SearchRegMarks method instead.

If you simply want to automatically straighten a bitmap, use the Deskew method.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Combine method, Rotate method, Size method, GetTransformationParameters method, SearchRegMarks method, GetMarksCenterMass method, ApplyTransformationParameters method
Topics: | Raster Images: Document Imaging


IsSupportLocked method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | bool IsSupportLocked (int iType);
Delphi Syntax | IsSupportLocked (iType: Integer): Boolean
Overview | Refer to Miscellaneous Methods and Properties.

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

Topics:

Support: Version and License Information


J2KSetDefaults method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void J2KSetDefaults (void);
Delphi Syntax | Procedure J2KSetDefaults( );
Overview | Refer to Implementing JPEG 2000 Plug In Features

Remarks

Updates the J2K properties with the default values used when saving a JPEG 2000 file. To change the values used when saving a JPEG 2000 file, set the following properties:

J2KCBS_ErrorResilienceSymbol property

J2KCBS_PredictableTermination property

J2KCBS_ResetContextOnBoundaries property

J2KCBS_SelectiveACBypass property

J2KCBS_TerminationOnEachPass property

J2KCBS_VerticallyCausalContext property

J2KCodBlockHeight property

J2KCodBlockWidth property

J2KCompressionControl property

J2KCompressionRatio property

J2KDecompLevel property

J2KDerivedBaseExponent property

J2KDerivedBaseMantissa property

J2KDerivedQuantization property

J2KGuardBits property

J2KProgressOrder property

J2KSetDefaults method

J2KTargetFileSize property

J2KUseColorTransform property

J2KUseEPHMarker property

J2KUseSOPMarker property

J2KXOsiz property

J2KXTOsiz property

J2KXTsiz property

J2KYOsiz property

J2KYTOsiz property

J2KYTsiz property

See Also

Elements: | J2KCBS_ErrorResilienceSymbol property, J2KCBS_PredictableTermination property, J2KCBS_ResetContextOnBoundaries property, J2KCBS_SelectiveACBypass property, J2KCBS_TerminationOnEachPass property, J2KCBS_VerticallyCausalContext property, J2KCodBlockHeight property, J2KCodBlockWidth property, J2KCompressionControl property, J2KCompressionRatio property, J2KDecompLevel property, J2KDerivedBaseExponent property, J2KDerivedBaseMantissa property, J2KDerivedQuantization property, J2KGuardBits property, J2KProgressOrder property, J2KTargetFileSize property, J2KUseColorTransform property, J2KUseEPHMarker property, J2KUseSOPMarker property, J2KXOsiz property, J2KXTOsiz property, J2KXTsiz property, J2KYOsiz property, J2KYTOsiz property, J2KYTsiz property
Topics: | Raster Images: Saving Files


LensFlare method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LensFlare(const TPoint &ptCenter, unsigned uBright, unsigned uFlags, unsigned crFlare);
Delphi Syntax | Function LensFlare (ptCenter: TPoint; uBright: L_UINT; uFlags: L_UINT; crFlare: COLORREF): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Simulates the secondary reflections caused when bright lights are facing the camera lens. The lens flare is refracted into a series of lightened circles that surround the flare.

Secondary reflections are caused when bright lights are facing the camera lens. These reflections can show up as spots or banding. The method adds this effect to the bitmap by controlling their number, position, brightness and size of the spots or banding. Each lens type has its own spot distribution and ray thickness.

This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

ptCenter = (150, 162);

uBright = 100;

uFlag = LNS_TYPE_1;

crFlare = RGB(255,128,0);

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, Dry method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


Light method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Light(const TPoint &ptLightCenter, unsigned uLightWidth, unsigned uLightHeight, int nLightAngle, unsigned uLightBright, unsigned uLightEdge, unsigned crLightFill, unsigned uLightOpacity, unsigned uLightFlags, unsigned uLightNo, unsigned uImageBright, unsigned uImageAmbient, unsigned crImageAmbient);
Delphi Syntax | Function Light (ptLightCenter: TPoint; uLightWidth: L_UINT; uLightHeight: L_UINT; nLightAngle: L_INT; uLightBright: L_UINT; uLightEdge: L_UINT; crLightFill: COLORREF; uLightOpacity: L_UINT; uLightFlags: L_UINT; uLightNo: L_UINT; uImageBright: L_UINT; uImageAmbient: L_UINT; crImageAmbient: COLORREF): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Adds many spots of directed light sources to the bitmap.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

ptLightCenter = (Bitmap->Width/2, Bitmap->Height/2);

uLightWidth = Bitmap->Width;

uLightHeight = Bitmap->Width * 4/3;

nLightAngle = 13500;

uLightBright = 100;

uLightEdge = 75;

crLightFill = RGB(0,0,255);

uLightOpacity = 100;

uLightFlags = LGT_SPOTLIGHT;

uLightNo = 1;

uImageBright = 100;

uImageAmbient = 100;

crImageAmbient = RGB(255,255,0);

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Dry method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


LightControl method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LightControl(L_PUINT puLowerAvr, L_PUINT puAverage, L_PUINT puUpperAvr, unsigned uFlags);
Delphi Syntax | Function LightControl (puLowerAvr: L_PUINT; puAverage: L_PUINT; puUpperAvr: L_PUINT; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

Lightens or darkens all or part of a bitmap by remapping the pixel values.

This method remaps the pixel values of the bitmap across the full range of available pixel values, in order to achieve the values passed in puLowerAvr, puAverage and puUpperAvr.

For example, call this method for a grayscale bitmap, with puAverage containing 150, puLowerAvr containing 100 and puUpperAvr containing 190. The pixels of the bitmap will be remapped so that the new average pixel value for the entire bitmap will be 150, the new average value for those pixels with a value between 0 and the average value for the entire bitmap will be 100, and the new average value for those pixels with a value between the average value for the entire bitmap and the maximum pixel value in the bitmap will be 190.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

uLowerAvr = 100

uAverage = 255

uUpperAvr = 255

uFlag = YUV_SPACE

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Sharpen method, Posterize method, Emboss method, Average method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, Mosaic method, Pixelate method
Topics: | Raster Images: Modifying Intensity Values


LineProfile method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LineProfile(const TPoint & FirstPoint, const TPoint &SecondPoint, L_PINT &pRed, L_PINT &pGreen, L_PINT &pBlue);
Delphi Syntax | Function LineProfile (FirstPoint: TPoint; SecondPoint: TPoint; var pRed: L_PINT; var pGreen: L_PINT; var pBlue: L_PINT): L_INT;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Allocates three arrays and updates them with the R, G and B profile for each pixel in the specified line.

This method allocates memory buffers for the three arrays using the GlobalAllocPtr macro. When the buffers are no longer needed, they should be freed by calling the GlobalFreePtr macro.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | GetBitmapRow method, PutBitmapRow method, GetBitmapRowCol method, PutBitmapRowCol method, Pixel Property
Topics: | Raster Images: Getting Current Information
 | Using Color Values in LEADTOOLS


LineRemove method (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | int LineRemove(unsigned uProcessFlags, int nMinLineLength, int nMaxLineWidth, int nWall, int nMaxWallPercent, int nGapLength, int nVariance, unsigned uRemoveFlags);
Delphi Syntax: | Function LineRemove(uProcessFlags:L_UINT32; nMinLineLength :L_UINT32; nMaxLineWidth:L_UINT32; nWall :L_UINT32; nMaxWallPercent :L_UINT32; nGapLength :L_UINT32; nVariance :L_UINT32;uRemoveFlags :L_UINT32): L_INT;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)Removes horizontal and vertical lines in a 1-bit black and white image.

This method removes horizontal and vertical lines from scanned text documents. If the lines pass through text, the parameters can be set to remove or preserve the text.

This method works only on 1-bit black and white images.

If a region is selected, only the selected region will be changed by this method. If no region is selected, the whole image will be processed.

The behavior of this method can be further modified by using the OnLineRemove event.

To "fine-tune" the performance of this method, try modifying the values for nWall, nGapLength and nVariance.

This method triggers both the OnLineRemove event and the OnStatus event.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | OnLineRemove event
Topics: | Raster Images: Cleaning - up 1-Bit Images


Load method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Load (System::AnsiString sFileName, int iBitsPerPixel, int iPage, int iPages);
Delphi Syntax | Load (sFileName: String; iBitsPerPixel, iPage, iPages: Integer): Integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Loads one or more images from a file into the Main Control. The file can be in any supported image file format and bits per pixel, whether compressed or uncompressed.

When loading an image from a file, LEADTOOLS normally determines the file format from the header. If the format is unrecognized, or there is no header, an error is returned. Raw Fax files do not have headers, therefore a OnLoadInfo event must be sent when loading raw Fax files.

For supported formats, refer to Summary of All Supported Image File Formats.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

Support for writing AVI files is only available in the Multimedia toolkits.

See Also

Elements: | LoadStamp method, LoadMemory method, StartFeedLoad method, OnLoadInfo event, EnableProgressEvent property
Topics: | Raster Images: Loading Files
 | Raster Images: Creating and Maintaining Lists of Images


LoadFileTile method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadFileTile (AnsiString szFileName, int iBitsPerPixel, int iPage, int iPages, int nLeft, int nTop, int nWidth, int nHeight);
Delphi Syntax | Function LoadFileTile (szFileName: String; iBitsPerPixel: Integer; iPage: Integer; iPages: Integer; nLeft, nTop, nWidth, nHeight: Integer): Integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Loads a section of an image from a file into the Main Control. The file can be in any supported image file format and bits per pixel, whether compressed or uncompressed.

When loading an image section from a file, LEADTOOLS normally determines the file format from the header. If the format is unrecognized, or there is no header, an error is returned. Raw Fax files do not have headers, therefore OnLoadInfo event must be sent when loading raw Fax files.

For supported formats, refer to Summary of All Supported Image File Formats.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

For a list of available products, refer to Summary of LEADTOOLS Products.

See Also

Elements: | Load method, LoadStamp method , BitmapDataPath property , LoadMemory method , StartFeedLoad method, OnLoadInfo event , EnableProgressEvent property , SetLoadResolution method , PCDRes property, WMFResolutionX property, WMFResolutionY property
Topics: | Raster Images: Loading Files
 | Raster Images: Creating and Maintaining Lists of Images


LoadLayer method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadLayer (AnsiString szName, int iBitsPerPixel, int iLayer);
Delphi Syntax | Function LoadLayer (szName: String; iBitsPerPixel: Integer; iLayer: Integer): Integer;
Overview | Refer to Layers in Files

Remarks

Loads a layer from a file that contains layers. To determine whether a file contains layers, check the InfoLayers property.

Currently, only PSD files support layers, but not all PSD files contain layers.

The layers are numbered starting with 0. The first layer is 0; the second layer is 1, etc. Call the GetFileInfo method to update the InfoLayers property. The last layer in the file is InfoLayers - 1.

After a layer is loaded, the LayerLeft [0] and LayerTop [0] properties can be examined for positioning information on this layer.

See Also

Elements: | LayerLeft property, LayerTop property, Save method, SaveLayers property, GetFileInfo method, InfoLayers property
Topics: | Raster Images: Loading Files


LoadMemory method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadMemory (int hMem, int iBitsPerPixel, int iPage, int iBufSize);
Delphi Syntax | LoadMemory (hMem:L_HANDLE; iBitsPerPixel, iPage:Integer; iBufSize: LongInt): integer;
Overview | Refer to Using Memory-Resident Image Files.

Remarks

Loads an image from a file that is stored in memory. The file can be in any supported image file format and bits per pixel, whether compressed or uncompressed.

For supported formats, refer to Summary of All Supported Image File Formats.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

To get information about a file stored in memory, refer to the GetMemoryInfo method. To save an image to a file in memory, refer to the SaveMemory method.

See Also

Elements: | Load method, LoadStamp method, StartFeedLoad method, OnLoadInfo event, EnableProgressEvent property
Topics: | Raster Images: Loading Files


LoadMemoryTile method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadMemoryTile (L_HANDLE hMem, int iBitsPerPixel, int iPage, int iPages, int iBufSize, int nLeft, int nTop, int nWidth, int nHeight);
Delphi Syntax | Function LoadMemoryTile (hMem: L_HANDLE; iBitsPerPixel: Integer; iPage: Integer; iPages: Integer; iBufSize: Longint; nLeft: Integer; nTop: Integer; nWidth: Integer; nHeight: Integer): Integer;
Overview | Refer to Using Memory-Resident Image Files.

Remarks

Loads a section an image from a file that is stored in memory. The file can be in any supported image file format and bits per pixel, whether compressed or uncompressed.

For supported formats, refer to Summary of All Supported Image File Formats.

Support for 12 and 16-bit gray-scale images is available only in the Document/Medical toolkits.

For a list of available products, refer to Summary of LEADTOOLS Products.

See Also

Elements: | LoadMemory method , Load method , LoadStamp method , BitmapDataPath property , StartFeedLoad method , OnLoadInfo event , EnableProgressEvent property , SetLoadResolution method , PCDRes property , WMFResolutionX property, WMFResolutionY property
Topics: | Raster Images: Loading Files


LoadResize method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall LoadResize (System::AnsiString szFileName, int nWidth, int nHeight, int iFlags, int iBitsPerPixel);
Delphi Syntax | Function LoadResize (szFileName: string; nWidth: Integer; nHeight: Integer; iFlags: Integer; iBitsPerPixel: Integer): Integer;
Overview | Refer to Loading a Bitmap from a File

Remarks

Loads an image file into the LEAD control, resizing the bitmap as it loads, to the desired width, height, and bits per pixel. The file can be in any supported image file format and bits per pixel, whether compressed or uncompressed.

This method resizes a file as it loads, to the desired width, height, and bits per pixel. Note that the original file is not completely loaded into memory. This method is ideal for sampling large images (i.e. generating a thumbnail) without the memory overhead of loading the large file itself.

See Also

Elements: | Load method
Topics: | Raster Images: Loading Files


LoadStamp method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadStamp (System::AnsiString fName);
Delphi Syntax | LoadStamp (fName: String): Integer;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Loads a thumbnail image stored in a JFIF or LEAD CMP compressed file.

Note that not all CMP or JFIF compressed files contain thumbnail images.

See Also

Elements: | SaveWithStamp method, EnableProgressEvent property
Topics: | Raster Images: Loading Files
 | Raster Images: Loading and Saving Stamp Images


LocalHistoEqualize method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int LocalHistoEqualize(int nWidth, int nHeight, int nxExt, int nyExt, unsigned uType, unsigned uSmooth);
Delphi Syntax | Function LocalHistoEqualize (nWidth: L_INT; nHeight: L_INT; nxExt: L_INT; nyExt: L_INT; uType: L_UINT; uSmooth: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

(Medical only) Linearizes the number of pixels locally in a bitmap, based on the specified color space. This can be used to bring out the detail in dark areas of an image, and smooth the edges between blocks.

This method applies the histogram equalizer locally on the image. The image is divided into local rectangles of dimension (nWidth, nHeight). The number of pixels inside each local rectangle are linearized according the histogram calculated for an extended rectangle around each local rectangle. The extended rectangles are of dimension

((nWidth+2 * nxExt) , ( nHeight + 2 * nyExt)).

For an example, see the following drawing:

A rectangle and its associated extension, where the histogram is calculated.

Use this method to bring out details in an image that has portions that are too dark or too bright. An example of this is a picture taken with a flashlight in a dark room. In such a picture, the subject receives good light while the background is very dark. The application of the local histogram brings out details, but creates a blocky artifact. Use uSmooth to reduce the blockiness of the result.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Invert method, Hue method, Saturation method, Fill method, GetHistogram method, ShowLocalHistoEqualizeDlg method .
Topics: | Raster Images: Modifying Intensity Values


MathFunction method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MathFunction(unsigned uMType, unsigned uFactor);
Delphi Syntax | Function MathFunction (uMType: L_UINT; uFactor: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

Re-maps the image colors according to a mathematical function such as: square, log, square root, sine and cosine.

This method uses the RGB color space.

This method makes it possible to apply one of five mathematical functions to a bitmap’s pixel values: square, square root, log, sine and cosine.

Select the mathematical operation to be performed on each pixel’s values with the uMType parameter. The resulting values are multiplied by the factor uFactor. The uFactor parameter can be any value greater than 0. It is divided internally by different amounts, according to the type of the method being used.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddBitmaps method, Combine method, AddShadow method, ChangeHueSatInt method, ColorReplace method, DirectionEdgeStatistical method, GetStatisticsInfo method, GetObjectInfo method, RevEffect method, Segment method, SubtractBackground method, UserFilter method.
Topics: | Raster Images: Modifying Intensity Values


MaxFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MaxFilter (Cardinal uDim);
Delphi Syntax | MaxFilter (uDim: Cardinal): Integer;
Overview | Refer to Removing Noise.

Remarks

Remarks

Erodes dark objects by the specified amount.

This method can process the whole image or a region of the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

The effect can be controlled by specifying the size of the neighborhood that is used for calculating each pixel value. For example, for 8x8, pass 8 in the uDim parameter. Each pixel is replaced with the maximum value of its neighborhood.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | MinFilter method, BinaryFilter method
Topics: | Raster Images: Filtering Images


Median method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Median (Cardinal uDim);
Delphi Syntax | Median (uDim: Cardinal): Integer;
Overview | Refer to Removing Noise.

Remarks

Changes the color of each pixel in the bitmap to the median color of pixels in its neighborhood. This is similar to the Average method, but it is used for noise reduction, rather than a blur effect.

You control the effect by specifying the size of the neighborhood that is used for calculating the median value. For 8x8, pass 8 in the uDim parameter.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the bitmap has a region, this method works only on the region. If the bitmap does not have a region, this method works on the entire bitmap.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | ShowMedianDlg method
Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


MinFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MinFilter (Cardinal uDim);
Delphi Syntax | MinFilter (uDim: Cardinal): Integer;
Overview | Refer to Removing Noise.

Remarks

(Document/Medical only) Dilates dark objects by the amount that you specify.

This method can process the whole image or a region of the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

The effect can be controlled by specifying the size of the neighborhood that is used for calculating each pixel value. For example, for 8x8, pass 8 in the uDim parameter. Each pixel is replaced with the minimum value of its neighborhood.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | MaxFilter method, BinaryFilter method
Topics: | Raster Images: Filtering Images


Mosaic method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Mosaic (Cardinal uDim);
Delphi Syntax | Mosaic (uDim: Cardinal): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Imposes a mosaic effect on the bitmap by dividing the bitmap into tiles of a specified size and changing the color of all pixels in each tile to the average color of pixels within the tile.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


MotionBlur method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall MotionBlur (int iDim, int lAngle, bool bUnidirectional);
Delphi Syntax | Function MotionBlur (iDim: Integer; lAngle: longint; bUnidirectional: Boolean): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Applies a filter, which creates the illusion of movement in an image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Sharpen method, Posterize method, Mosaic method, Emboss method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method
Topics: | Raster Images: Filtering Images


Multiply method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Multiply(unsigned uFactor);
Delphi Syntax | Function Multiply (uFactor: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

Increases or decreases the brightness in the bitmap by multiplying the colors in the specified bitmap by a value equal to the uFactor value divided by 100.

This method is used to increase or decrease the brightness in the bitmap by multiplying the colors in the active bitmap by a value equal to the uFactor value divided by 100. For example, if uFactor is 131, the colors in the specified bitmap will be multiplied by 1.31.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Hue method, Saturation method, HistoEqualize method, Fill method, GetHistogram method, AddWeightedBitmaps method, ShowMultiplyDlg method
Topics: | Raster Images: Modifying Intensity Values


MultiScaleEnhancement method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int MultiScaleEnhancement(unsigned uContrast, unsigned uEdgeLevels, int nEdgeCoeff, unsigned uLatitudeLevels, unsigned uLatitudeCoeff, unsigned uFlags);
Delphi Syntax | Function MultiScaleEnhancement (uContrast: L_UINT; uEdgeLevels: L_UINT; nEdgeCoeff: L_INT; uLatitudeLevels: L_UINT; uLatitudeCoeff: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

(Medical only) Enhances an image’s contrast, edges, and density range for use in Computed Radiography (CR), in a way that all relevant image features are rendered with an appropriate level of visibility.

The method wraps techniques of image enhancements, such as contrast enhancement, edge enhancement and latitude reduction, for Computed Radiography (CR).

In multi scale enhancement, the image is decomposed into components or levels. Those components or levels that contain details will be enhanced separately from other components or levels.

This will improve the visualization for the subtle image features without the risk of losing information of other features.

To find the number of levels in any image use this equation:

uMaxLevels = ceil( log( max(BitmapWidth, BitmapHeight)) / log(2));

The method will consider values larger than 10000 for uContrast as if they were 10000. If the user passed 0 then image contrast will not be improved.

Best results are obtained if uContrast is in the range of 15% ~ 30%. The larger the value the stronger the enhancement will be. Any stronger enhancement than 30% will reveal noise and no new enhancement will be noticed.

The user can further enhance the image with:

edge enhancements (use MSE_EDGEENH) and/or

latitude reduction (use MSE_LATRED)

The uEdgeLevels, nEdgeCoeff, uLatitudeLevels and uLatitudeCoeff parameters are available for advanced users. Setting MSE_DEFAULT in uFlags gives the maximum enhancements. MSE_DEFAULT is defined as (L_UINT)-1

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits. It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, StretchIntensity method, RemapIntensity method, Invert method, Hue method, Saturation method, HistoEqualize method, Fill method, Pixel property, GetHistogram method, WindowLevel method, HistoContrast method, Multiply method, SelectiveColor method.
Topics: | Raster Images: Modifying Intensity Values
 | Using Color Values in LEADTOOLS


Ocean method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Ocean(unsigned uAmplitude, unsigned uFrequency, bool bLowerTrnsp);
Delphi Syntax | Function Ocean (uAmplitude: L_UINT; uFrequency: L_UINT; bLowerTrnsp: Boolean): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits.) Reflects the bitmap on an ocean surface.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

uAmplitude=15

uFrequency=20

bLowerTrnsp=TRUE

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Dry method, PlaneBend method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects


OffsetRgn method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int OffsetRgn (int nDx, int nDy);
Delphi Syntax | OffsetRgn (nDx, nDy: Integer): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Moves the bitmap region a specified distance. The move does not affect the pixels in the region.

The distances are relative to the LEAD bitmap in memory, not to the Main Control's client area. The unit of measure is pixels.

See Also

Elements: | SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, SetRgnColor method, PolygonSize property , RgnLeft property, RgnTop property
Topics: | Raster Images: Creating and Using a Region


Oilify method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Oilify (Cardinal uDim);
Delphi Syntax | Oilify (uDim: Cardinal): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Applies an oil-painting effect to the bitmap.

You control the effect by specifying the size of the neighborhood that is used for calculating the pixel value. For example, for 8x8, pass 8 in the uDim parameter. You increase the size of the neighborhood in order to decrease the amount of detail in the resulting image.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics:

Raster Images: Filtering Images


Paste method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Paste (int iFlags);
Delphi Syntax | Paste (iFlags:Integer): Integer;
Overview | Refer to Copying and Creating Bitmaps.

Remarks

Pastes image data from the clipboard to a specified bitmap. The image on the clipboard must be a DIB or DDB raster image.

Before attempting to paste the data, you can test to see if the clipboard contains valid image data by calling this method with the iFlags parameter set to PASTE_ISREADY. If the method does not return 0, the data is valid. You can then paste the image data into the Main Control by calling this method with the iFlags parameter set to 0.

The bitmap will contain the same width, height, and bits per pixel as the image on the clipboard.

See Also

Topics | Raster Images: Exchanging Imgages with Other Objects
 | Raster Images: Using the Clipboard
 | Using Rulers in Annotation Objects


Picturize method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Picturize (System::AnsiString sDirectory, int iFlags, int nCellWidth, int nCellHeight);
Delphi Syntax | Picturize (sDirectory : String ; iFlags, nCellWidth, nCellHeight : Integer): Integer;
Overview | Refer to Combining Images.

Remarks

Replaces the current image with an image created from images contained in the specified directory. The image, or selected region, is broken down into rectangles of size nCellWidth x nCellHeight. For each rectangle, the image in the directory that is best suited to replace that rectangle is inserted into the original image.

The quality of the result is controlled by three factors:

1. the number of images present in the directory (the more images, the better).

2. the size of the rectangles. Smaller rectangles create an image that more closely resembles the original.

3. the type of image being replaced. If you are replacing a small image with lots of detail, then you will need lots of images in the directory in order to create an image that closely resembles the original.

PICTURIZE_ONCE and PICTURIZE_EQUALUSAGE flags cannot be combined in the iFlags parameter.

If PICTURIZE_BESTFIT is set, then nCellWidth and nCellHeight are used as a starting point for the actual cell size. The cell sizes are modified so that the size of the last rectangle in a row or column differs from the other rectangles by one. Note that the cell width and height are chosen to be smaller than nCellWidth and nCellHeight. For example, if the bitmap is 101x131 and you pass 32 for the cell width and height and set PICTURIZE_BESTFIT, then the actual cell size will be 25x32. The widths of the cells will be 26, 25, 25, 25 (for a total of 101). The heights of the rows will be 33, 33, 33, 32 (for a total of 131). This option should be used if the bitmap width and height are not multiples of nCellWidth and nCellHeight.

If the bitmap width and height are not multiples of nCellWidth and nCellHeight and PICTURIZE_BESTFIT is not passed, then the last rectangle in a row or column might be very small. Using the example given above, if PICTURIZE_BESTFIT is not set, the widths of the cells would be 32, 32, 32, 5 and the heights would be 32, 32, 32, 32, 3.

PICTURIZE_EQUALUSAGE and PICTURIZE_ONCE will reduce the number of times a bitmap is used by this method.

When PICTURIZE_ONCE is set, the method will try not to use the same bitmap twice. Note that if there aren’t enough images, the method will return the ERROR_NOT_ENOUGH_IMAGES code if this flag is set.

When PICTURIZE_EQUALUSAGE is set, the method will use the same image more than once only if it is necessary to successfully complete the picturize process. If PICTURIZE_EQUALUSAGE is set, then for any bitmap, the number of times it is used differs from the number of times another bitmap is used by at most one. Therefore, most bitmaps will be used ‘n’ times, but some bitmaps will be used ‘n+1’ times.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Combining Images
 | Examining and Altering Bitmaps


PicturizeBitmapList method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall PicturizeBitmapList(int iCellWidth, int iCellHeight, int iLightnessFact, LEADTyp::HBITMAPLIST hList);
Delphi Syntax | Function PicturizeBitmapList(iCellWidth: Integer; iCellHeight: Integer; iLightnessFact: Integer; hList: HBITMAPLIST): Integer;
Overview | Refer to Combining Images.

Remarks

Picturizes the bitmap using thumbnail images created from the specified bitmap list.

The image, or selected region, is broken down into rectangles of size iCellWidth x iCellHeight. For each rectangle, the image in the list that best approximates that rectangle is inserted in the original image. The thumbnail image may be corrected, to approximate a rectangle.

The iLightnessFact parameter can be used to change the lightness of the big image by changing the lightness of each rectangle.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Picturize method, PicturizeSingle method
Topics: | Raster Images: Combining Images
 | Examining and Altering Bitmaps


PicturizeSingle method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall PicturizeSingle(LEADTyp::TBitmapHandle Bitmap, int iCellWidth, int iCellHeight, int iLightnessFact);
Delphi Syntax | Function PicturizeSingle(Bitmap: TBitmapHandle; iCellWidth: Integer; iCellHeight: Integer; iLightnessFact: Integer): Integer;
Overview | Refer to Combining Images.

Remarks

Picturizes the bitmap using the specified thumbnail image.

The image, or selected region, is broken down into rectangles of size iCellWidth x iCellHeight. For each rectangle, the thumbnail image is corrected to approximate that rectangle, and inserted in the original image. Note that every rectangle is replaced by the same image.

The iLightnessFact parameter can be used to change the lightness of the big image by changing the lightness of each rectangle.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Picturize method, PicturizeBitmapList method
Topics: | Raster Images: Combining Images
 | Examining and Altering Bitmaps


Pixelate method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Pixelate(unsigned uCellWidth, unsigned uCellHeight, unsigned uOpacity, const TPoint &ptCenter, unsigned uFlags);
Delphi Syntax | Function Pixelate (uCellWidth: L_UINT; uCellHeight: L_UINT; uOpacity: L_UINT; ptCenter: TPoint; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Divides the bitmap into rectangular or circular cells and then recreates the image by filling those cells with the minimum, maximum, or average pixel value, depending upon the effect that was selected.

This method will divide the image into rectangular or circular cells.

The uFlags parameter indicates whether to use rectangular or circular cells and indicates the type of information in the other parameters.

If the image is divided into circular cells by setting PIX_RAD in the uFlags parameter, the cells will be centered around the specified ptCenter. This center point must be defined inside the bitmap or inside the region, if the bitmap has a region. If the bitmap has a region, the effect will be applied on the region only.

If uFlags contains: | then, uCellWidth contains: | and the range of possible values for uCellWidth is:
PIX_RAD | PIX_WFRQ | the number of cells around the ptCenter. That is, the circle around the ptCenter is divided into uCellWidth equal parts, as shown below: | 1 to 360. The circle can be divided into anywhere from 1 to 360 equal parts.
PIX_RAD | PIX_WPER | the size, in degrees of the cells around the ptCenter. That is, the circle around the ptCenter is divided into cells of uCellWidth degrees, as shown below: | 1 to 360. The circle can be divided into cells of 1 degree to 360 degrees.
PIX_RECT | PIX_WFRQ | the number of cells present across the width of the bitmap | 1 to the image width, if there is no region. If there is a region, then the range of values is just the region width.
PIX_RECT | PIX_WPER | the width of each rectangular cell, in pixels | 1 to the image width, if there is no region. If there is a region, then the range of values is just the region width.

If uFlags contains: | then, uCellHeight contains: | and the range of possible values for uCellHeight is:
PIX_RAD | PIX_HFRQ | the number of cells present along the radius of the circular cell. | 1 to the diagonal of the image, if there is no region. If there is a region, then the range of values is just the diagonal of the region rectangle.
PIX_RAD | PIX_HPER | the radial length of each circular cell, in pixels | 1 to the diagonal of the image, if there is no region. If there is a region, then the range of values is just the diagonal of the region rectangle.
PIX_RECT | PIX_HFRQ | the number of cells present across the height of the bitmap | 1 to the image height, if there is no region. If there is a region, then the range of values is just the region height.
PIX_RECT | PIX_HPER | the height of each rectangular cell, in pixels | 1 to the image height, if there is no region. If there is a region, then the range of values is just the region height.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

An example of circular cell division can be seen below:

This is the original image:

The image below is the result of the following settings:

uFlags = PIX_RAD Or PIX_WPER Or PIX_HPER Or PIX_AVR

uCellWidth = 90, uCellHeight = 40

This indicates the circular cells are divided into 90 degree cell divisions and each cell has a radial length of 40 pixels. Each cell division is filled with the average value for that cell division.

The image below is the result of the following settings:

PIX_RAD Or PIX_WFRQ Or PIX_HFRQ Or PIX_AVR

uCellWidth = 90, uCellHeight = 40

This indicates the circular cells are divided into 90 separate cell divisions around the center point and there are 40 cell divisions along the radius. Each cell division is filled with the average value for that cell division.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowPixelateDlg method .
Topics: | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap


Plane method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Plane(const TPoint &ptCenter, unsigned uZValue, int nDistance, unsigned uPlaneOffset, int nRepeat, int nPydAngle, unsigned uStretch, unsigned uStartBright, unsigned uEndBright, unsigned uBrightLength, unsigned crBright, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Plane (ptCenter: TPoint; uZValue: L_UINT; nDistance: L_INT; uPlaneOffset: L_UINT; nRepeat: L_INT; nPydAngle: L_INT; uStretch: L_UINT; uStartBright: L_UINT; uEndBright: L_UINT; uBrightLength: L_UINT; crBright: COLORREF; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Places the bitmap on parallel planes along the Z-axis.

This method shows the effect of placing bitmaps on planes along the Z-axis. These bitmaps may be placed above, below, to the left or to the right of the Z-axis. An external light source of the specified color and brightness may be shined on the bitmaps. The brightness may vary along the z-axis according to the uBrightLength value.

By changing ptCenterPoint and the viewing screen Z-offset, you can simulate moving along the axis.

If the bitmap has a region, the effect will be applied on the region dimensions only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

ptCenter(x,y)= (320,256)

uZValue = 0

nDistance= 256

uPlaneOffset= 256

nRepeat= -1

nPydAngle= 0

uStretch= 100

uStartBright= 0

uEndBright= 0

uBrightLength= 50

crBright= RGB(255,255,255)

crFill= RGB(0,0,0)

uFlags= PLANE_FILL_CLR|PLANE_DOWN

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Dry method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artisitic Effects
 | Using Color Values in LEADTOOLS


PlaneBend method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PlaneBend(const TPoint &ptCenter, unsigned uZValue, int nDistance, unsigned uPlaneOffset, int nRepeat, int nPydAngle, unsigned uStretch, unsigned uBendFactor, unsigned uStartBright, unsigned uEndBright, unsigned uBrightLength, unsigned crBright, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function PlaneBend (ptCenter: TPoint; uZValue: L_UINT; nDistance: L_INT; uPlaneOffset: L_UINT; nRepeat: L_INT; nPydAngle: L_INT; uStretch: L_UINT; uBendFactor: L_UINT; uStartBright: L_UINT; uEndBright: L_UINT; uBrightLength: L_UINT; crBright: COLORREF; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Places the bitmap on parallel planes along the Z-axis, and bends the planes toward the center point.

This method shows the effect of placing bitmaps on planes along the Z-axis and bending them toward a specific point. These bitmaps may be placed above, below, to the left or to the right of the Z-axis. An external light source of the specified color and brightness may be shined on the bitmaps. The brightness may vary along the z-axis according to the uBrightLength value. The line of bitmaps may be bent toward a specified point by setting a bending value in the uBendFactor parameter.

By changing ptCenter and the viewing screen Z-offset, you can simulate moving along the axis.

If the bitmap has a region, the effect will be applied on the region dimensions only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

CenterPoint(x,y)= (640,256)

uZValue = 0

nDistance= 256

uPlaneOffset= 256

nRepeat= -1

nPydAngle= 0

uStretch= 100

uBendFactor= 500

uStartBright= 0

uEndBright= 0

uBrightLength= 50

crBright= RGB(255,255,255)

crFill= RGB(0,0,0)

uFlags= PLANE_FILL_CLR|PLANE_DOWN

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, Dry method, Plane method, SampleTarget method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artisitic Effects
 | Using Color Values in LEADTOOLS


Polar method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Polar(unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Polar (crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Converts the bitmap from rectangular to polar coordinates and vice versa.

Rectangular coordinates use the form (x, y) where ‘x’ and ‘y’ are the horizontal and vertical distances from the origin, respectively. Polar coordinates are in the form (r, È) where ‘r’ is the distance from the origin to the point and ‘È’ is the angle of the line the point makes with the positive x-axis. Polar coordinates use a grid made of concentric circles around the origin, along with lines that are rays radiating outward from the origin.

This method considers the positions of the image’s pixels as values in a polar coordinate system. Then it converts all the pixels in a line of the image into a circle around the center of the bitmap.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowPolarDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


Posterize method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Posterize (Cardinal uLevels);
Delphi Syntax | Posterize (uLevels: Cardinal): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Imposes a poster effect on the bitmap by quantizing the bitmap's colors to a specified number of color levels per plane. For example, two levels means two of red, two of green, and two of blue.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


PreLoadFilters method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PreLoadFilters (int iFixedFilters, int iCachedFilters, System::AnsiString Filters);
Delphi Syntax | PreLoadFilters (iFixedFilters, iCachedFilters: Integer; Filters: string): Integer;
Overview | Refer to Loading Filters

Remarks

Specifies the file format filters to be loaded. Some operating systems (like Windows 95) have a limit for the number of DLLs that can be loaded at a time and that limit can be quickly reached, especially if there are several different controls on the same page/form or if the programming environments themselves load many DLLs. You can use this method to restrict the number of DLLs that LEADTOOLS VCL will load. Note that the fewer file import/export DLLs the VCL loads, the slower the loading/saving of files will be, since there will be more loading/unloading of DLLs.

Filters is in the form xyz, yuv... where XYZ are the 3 letters describing the file filter as in LFxyz14N.DLL. For instance, if Filters is 'PCX, TIF, CMP' then LFPCX14N.DLL will be loaded then LFTIF14N.DLL and then LFCMP14N.DLL, in that order. The first iFixedFilters will stay in memory at all times, then the next iCachedFilters will be loaded. However, if other filters will be needed, the cached filters might be unloaded to make room for the new DLLs. It is recommended that the most commonly used DLLs be loaded as fixed to minimize the time required to load/unload file filters. Also, some DLLs may require additional DLLs (like the LFAVI14N.DLL or LFFPX14N.DLL) so the exact number of DLLs loaded is not necessarily iFixedFilters+iCachedFilters. For more information on available DLLs, refer to Files To Be Included With Your Application.

Note that PreLoadFilters has effect only if called before the first time you try to load, save or get information about a file. Calling this method after that will have no effect.

See Also

Elements: | IgnoreFilters method, PDFInitDir property
Topics: | Working with the Control: General Behavior


Punch method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Punch(int nValue, unsigned uStress, const TPoint &ptCenter, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Punch (nValue: L_INT; uStress: L_UINT; ptCenter: TPoint; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Warps the bitmap by pinching it toward the center or expanding the bitmap away from its center.

This method will punch or pinch the bitmap around the specified ptCenter. The center point must be defined inside the bitmap or inside the region, if the bitmap has a region.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowPunchDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


PutBitmapRow method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PutBitmapRow __fastcall PutBitmapRow(void * pBuffer,int nRow, unsigned uBytes);
Delphi Syntax | function PutBitmapRow ( pBuffer: pointer; nRow : integer; uBytes: Cardinal ) : Integer;
Overview | Examining and Altering Bitmaps.

Remarks

You can use the BitmapBits Property to determine the number of bytes to set the uBytes parameter. If the image is 8-bit then each byte is an index to the palette. If the image is a 24-bit image, then each three bytes represents one pixel element. Color order is determined by the BitmapOrder Property. This value can be either ORDER_RGB or ORDER_BGR.

See Also

Elements: | GetBitmapRow method, GetBitmapRowCol method, PutBitmapRowCol method,BitmapBytesPerLine Property, BitmapOrder Property.
Topics: | Raster Images: Getting / Setting Rows from Bitmaps


PutBitmapRowCol method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall PutBitmapRowCol(void * pBuffer, int nRow, int nCol, unsigned uBytes);
Delphi Syntax | function PutBitmapRowCol ( pBuffer: pointer; nRow: integer; nCol: integer; uBytes: Cardinal ) : Integer ;
Overview | Examining and Altering Bitmaps.

Remarks

By using this low-level method to update any part of a row, you can write a procedure that updates a single pixel or a rectangular area within the bitmap.

This method accepts an offset parameter (nCol) in pixels and a length (uBytes) in bytes. Therefore, you must consider the bits per pixel of the bitmap when specifying these parameters. The following table describes the rules:

Bits Per

Pixel | Column Offset (in Pixels) | Bytes to Update
1 | Must be a multiple of 8 (such as 0, 8, or 16). | Should not go past the end of the row. Consider that there are 8 pixels per byte.
4 | Must be an even number (such as 0, 2, or 4). | Should not go past the end of the row. Consider that there are 2 pixels per byte
8 | Can be any column within the bitmap | Should not go past the end of the row. Consider that there is 1 pixel per byte.
16 | Can be any column within the bitmap | Must be a multiple of 2 (such as 2, 4, or 6), because there are 2 bytes per pixel. Also, it should not go past the end of the row.
24 | Can be any column within the bitmap. | Must be a multiple of 3 (such as 3, 6, or 9), because there are 3 bytes per pixel. Also, it should not go past the end of the row.
32 | Can be any column within the bitmap | Must be a multiple of 4 (such as 4, 8, or 12), because there are 4 bytes per pixel. Also, it should not go past the end of the row

The BitmapOrder Property determines color order of the target bitmap. This value can be either ORDER_RGB or ORDER_BGR.

See Also

Elements: | GetBitmapRow method, PutBitmapRow method, GetBitmapRowCol method, BitmapBytesPerLine Property, BitmapOrder Property.
Topics: | Raster Images: Getting / Setting Rows from Bitmaps


PutPixelData method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PutPixelData (void * pData, int nRow, int nCol, int nBytes);
Delphi Syntax | Function PutPixelData (pData: Pointer; nRow: Integer; nCol: Integer; nBytes: Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps

Remarks

This method should be called only for 8, 16, 24, 32, 48 and 64-bit bitmaps. For more information, refer to GetPixelData method

See Also

Elements: | GetPixelData method, Pixel property
Topics: | Raster Images: Getting Current Information
 | Using Color Values in LEADTOOLS


PuzzleEffect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int PuzzleEffect(unsigned uXBlock, unsigned uYBlock, unsigned uRandomize, unsigned crBorder, unsigned uFlags);
Delphi Syntax | Function PuzzleEffect (uXBlock: L_UINT; uYBlock: L_UINT; uRandomize: L_UINT; crBorder: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Splits the image into square blocks and randomizes these blocks inside the image.

This method can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

Splits the image into a certain number of blocks according to the flags passed to it. If the PUZZLE_SIZE flag is set, then the image will be divided into blocks using the uXBlock and uYBlock parameters for the dimensions of the blocks. If the PUZZLE_COUNT flag is set, then the image will be divided into blocks using the uXBlock and uYBlock parameters for the number of blocks per row and number of blocks per column.

If the BITMAP_RESIZE flag is not set, the edge blocks might have a different size than the inner blocks. This means the edge blocks will be manipulated differently than the inner blocks. The inner blocks that have the same dimensions will be shuffled around. The right edge blocks will be shuffled together and the bottom edge blocks will be shuffled together.

If the BITMAP_RESIZE flag is set, the image will be resized to be sure that all blocks have the same dimensions. In this case, the edge blocks will not be treated differently than the inner blocks.

If the PUZZLE_BORDER flag is set, borders will be drawn with the color passed by the crBorder parameter. If this flag is not set, no borders will be drawn.

If the PUZZLE_SHUFFLE flag is not set, the blocks will appear in their original positions. If this flag is set then the blocks will appear randomized. The randomization process will be controlled by the uRandomize parameter as follows:

If lRandomize is set to 0, the method will select the starting point for the randomize process. You will get a different result every time you call the method with uRandomize = 0.

If you set uRandomize to > 0, the method will use this value as a starting point for the randomization process. You will get the same result every time you call the method with the same value of uRandomize > 0.

Edge blocks that have the same size as inner blocks might move into the middle of the resulting image. Edge blocks with a different size than inner blocks will remain on the edge.

You must set PUZZLE_SIZE or PUZZLE_COUNT (but not both) for the method to affect the image. If you pass 0 for uFlags, the method leaves the image unchanged.

This method supports all bits/pixel supported by LEADTOOLS.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Mosaic method, Picturize method, Pixelate method, Cubism method, DiceEffect method, RingEffect method.
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


RadialBlur method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RadialBlur(unsigned uDim, unsigned uStress, const TPoint &ptCenter);
Delphi Syntax | Function RadialBlur (uDim: L_UINT; uStress: L_UINT; ptCenter: TPoint ): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Blurs the image by rotating the pixels around the specified center point.

The method will blur the image in a radial form around the specified ptCenter. The center point must be defined inside the bitmap or inside the region, if the bitmap has a region.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowRadialBlurDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap


RadWave method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RadWave(unsigned uAmplitude, unsigned uWaveLen, int nPhase, const TPoint &ptCenter, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function RadWave (uAmplitude: L_UINT; uWaveLen: L_UINT; nPhase: L_INT; ptCenter: TPoint; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Distorts a bitmap using a wave radiating from the specified center.

The method applies a sinusoidal wave radiating from the specified center. The center point must be defined inside the bitmap or inside the region, if the bitmap has a region.

If the bitmap has a region, the effect will be applied on the region only.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowRadialWaveDlgmethod method method.
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


ReadComment method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | System::Variant ReadComment (System::AnsiString sFile, int iPage, Cardinal nIndex);
Delphi Syntax | ReadComment (sFile : String ; iPage: Integer; nIndex: Cardinal): Variant;
Overview | Refer to Maintaining File Comments.

Remarks

Returns the value of the specified comment in an image file.

Some file formats can contain comments, and some cannot, and each file format has its own set of comment types. With the ReadComment method, you can get the value of any comment in the file. The index into the array of comments determines the type of comment, as described in Types of File Comments.

The Comment property specifies the comments to be saved when you save an image in a file. If you want to preserve existing comments in the file when you save the image, you must use the ReadComment method to update the Comment property array.

See Also

Elements: | Comment property, WriteComment method
Topics: | Raster Images: Getting and Setting File Information


ReadLoadResolutions method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ReadLoadResolutions (System::AnsiString sFile);
Delphi Syntax | ReadLoadResolutions (sFile:String): Integer;
Overview | Refer to Implementing PhotoCD and FlashPix Features.

Remarks

Examines a FlashPix, PhotoCD, or JBIG file to determine which resolutions it contains.

A FlashPix, PhotoCD, or JBIG file can contain more than one copy of the same image, each at a different physical resolution (width and height in pixels). For PhotoCD files, the resolutions are fixed sizes, and you can use an older property (the InfoPCDRes property) to examine them. For FlashPix and JBIG files, which can contain images of various sizes, you must use this method to examine them.

This method updates an array of the available dimensions, which you can examine with the following properties:

LoadResolutionCount property

LoadResolutionHeight property

LoadResolutionWidth property

To specify which physical resolution to load, use the SetLoadResolution method.

See Also

Elements: | LoadResolutionCount property, LoadResolutionHeight property, LoadResolutionWidth property, PCDRes property, SetLoadResolution method, GetLoadResolution method, SaveResolutionHeight property, SaveResolutionWidth property
Topics: | Raster Images: Loading Files
 | Raster Images: Getting and Setting File Information


ReadTag method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ReadTag(char * pszFile, int lPage, Word uTag);
Delphi Syntax | ReadTag (pszFile: PCHAR; lPage: LongInt; uTag: word): Integer;
Overview | Refer to Implementing TIFF Tags

Remarks

Reads the specified tag from the specified file. The tag will be set as tag 0 in the control’s internal tag list. Once read, the type, number of data values and actual data values can be retrieved using the GetTagType method, the GetTagCount method and the GetTagData method.

For more information on setting tags, refer to the SetTag method.

See Also

Elements: | EnumTags method, OnEnumTags event, SetTag method, GetTagType method, GetTagCount method, GetTagData method, WriteTag method, Save method, Comment property
Topics: | Raster Images: Getting and Setting File Information


ReadTagMemory method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ReadTagMemory(L_HANDLE hMem, unsigned uBufSize, int nPage, unsigned uTag);
Delphi Syntax | Function ReadTagMemory (hMem: L_HANDLE; uBufSize: L_UINT32; nPage: L_INT; uTag: L_UINT): L_INT;
Overview | Refer to Implementing TIFF Tags

Remarks

Reads the specified tag from the specified file in memory. The tag will be set as tag 0 in the control’s internal tag list. Once read, the type, number of data values and actual data values can be retrieved using the GetTagType method, the GetTagCount method and the GetTagData method.

If you use the SaveMemory method to create the file in memory, the SaveMemory method updates its hBuf and iBufSize parameters with the handle and file size information for the file saved in memory. This information can be passed to this ReadTagMemory method in order to read the tag. If SaveMemory is not used to create the file in memory, the user is responsible for obtaining the correct handle and file size information to be passed to this ReadTagMemory method.

For more information on setting tags, refer to the SetTag method.

See Also

Elements: | EnumTags method, OnEnumTags event, ReadTag method, SetTag method, GetTagType method, GetTagCount method, GetTagData method, WriteTag method, Save method, Comment property.
Topics: | Raster Images: Getting and Setting File Information


ReleaseBitmapDC method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ReleaseBitmapDC (void);
Delphi Syntax | ReleaseBitmapDC: Integer;
Overview | Refer to Using the Windows API.

Remarks

Reverses the action of the GetBitmapDC method.

You should use this method when the bitmap no longer needs to be available for drawing functions.

See Also

Elements: | GetBitmapDC method, ReleaseClientDC method, GetClientDC method
Topics: | Raster Images: Creating and Deleting Images
 | Raster Images: Drawing on a Bitmap


ReleaseClientDC method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ReleaseClientDC (void);
Delphi Syntax | ReleaseClientDC: Integer;
Overview | Refer to Using the Windows API.

Remarks

Reverses the action of the GetClientDC method.

You should use this method when the Main Control's client area no longer needs to be available for Windows API functions.

See Also

Elements: | GetClientDC method, ReleaseBitmapDC method, GetBitmapDC method
Topics: | Working with the Control: Client Area Usage


RemapHue method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RemapHue (bool bUseMaskTable, bool bUseHTable, bool bUseSTable, bool bUseVTable);
Delphi Syntax | Function RemapHue (bUseMaskTable: Boolean; bUseHTable: Boolean; bUseSTable: Boolean; bUseVTable: Boolean): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Uses a lookup table to change a bitmap's hue values. The saturation and value tables change S and V values only if a particular hue value is marked as non-zero in the MaskTable property.

This method can be used to change a range of colors to another range of colors. For example, it could be used to change all red pixels to any color, where a red pixel can have any brightness (V) and any amount of white (saturation). A red pixel in this case would be

RGB (x,y,y) where:

0<=x<( RemapHueTablesSize –1) and

0<=y<x

or in the HSV color space

HSV (0,x,x) where:

0<=x<= (RemapHueTablesSize -1)

The MaskTable [i] lookup table identifies which values in the HTable [i] are valid. If a MaskTable [i] value is 0, then the corresponding value in the HTable [i] is ignored. If a MaskTable [i] value is non-zero, then the corresponding value in the HTable [i] is used. For example, if a pixel has a hue value of 240 and MaskTable [240] is nonzero, then the hue value of 240 is replaced with HTable [240]. Traditionally, hue ranges from 0 to 359. For the lookup table, the range of 0 to 359 is remapped to a range of 0..255. For example,

Color | Hue (0..359) | Hue (0..255)
Red | 0 | 0
Green | 120 | 85
Blue | 240 | 170

Use HSV_HfromRGB, HSV_SfromRGB, HSV_VfromRGB, and RGBfromHSV methods to convert between RGB and HSV color space.

Calling this method with bUseMaskTable set to FALSE and bUseSTable set to TRUE will let you change the Saturation of each color. Similarly, calling this method with bUseMaskTable set to FALSE and bUseVTable set to TRUE will let you change the Value of each color.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if you are working on signed data image.

See Also

Elements: | MaskTable property, HTable property, STable property, VTable property, RemapHueTablesSize property, HSV_HfromRGB method, HSV_SfromRGB method, HSV_VfromRGB method, RGBfromHSV method
Topics: | Raster Images: Modifying Intensity Values
 | Using Color Values in LEADTOOLS


RemapIntensity method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RemapIntensity (int iChannel);
Delphi Syntax | RemapIntensity (iChannel:Integer): Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Uses a lookup table to change the bitmap's intensity values. You can apply the change to red, green, blue, or all color channels.

Use the RemapTable and RemapTableSize properties to maintain the lookup table. Intensity levels range from 0 to the value of RemapTableSize property - 1. The current intensity values correspond to the table indexes. The values of the entries are the new values to be applied.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | RemapTable property, RemapTableSize property
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


RemoveRedeye method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall RemoveRedeye (unsigned rcNewColor, int iThreshold, int iLightness);
Delphi Syntax | Function RemoveRedeye (rcNewColor: TColorRef; iThreshold: Integer; iLightness: Integer): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Removes the "red eye" effect in color images by converting the red color in the eye to the new specified color.

This method has no effect on grayscale images, since there is no "red eye" problem in grayscale images.

To use this method the user should select a small region around the eye. Otherwise, the method will change all the red color in the image. This method also allows the user to replace the red color with a new color for the eyes that is nearest to the original color.

This method supports 48 and 64-bit color images. Support for 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Correcting Colors
 | Raster Images: Modifying Intensity Values
 | Raster Images: Modifying Individual Pixels


Render method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Render (L_HDC hDevice, int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | Render (hDevice: L_HDC; iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Printing an Image.

Remarks

Prints an image or displays the image in any device context.

You must specify the device context, and the position and dimensions of the printed image. The measurements use the scale mode of the device context.

The source rectangle, normally used for displaying an image, can also be used to limit which part of the bitmap is printed. For an illustration of how the source rectangle works, refer to Specifying Both the Source and Destination Rectangles. To specify the source rectangle, you can use the SetSrcRect method. (You can also use the source clipping rectangle, but that is usually unnecessary, and the code is more complex.)

See Also

Topics:

Raster Images: Printing Images


RepaintRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RepaintRect (int iLeft, int iTop, int iWidth, int iHeight, bool bErase);
Delphi Syntax | RepaintRect (iLeft, iTop, iWidth, iHeight: Integer; bErase: Boolean): Integer;
Overview | Refer to Displaying an Image.

Remarks

Repaints the specified rectangular area in the Main Control's client area.

See Also

Elements: | AutoRepaint property, ForceRepaint method, PaintRgnOnly property
Topics: | Raster Images: Displaying Images
 | Raster Images: Creating and Using a Region


ResizeRgn method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall ResizeRgn(int iDim, int iFlag, bool bAsFrame);
Delphi Syntax | Function ResizeRgn(iDim: Integer; iFlag: Integer; bAsFrame: Boolean): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Resizes the bitmap region by the specified number of pixels.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method supports signed data images.

See Also

Elements: | Size method
Topics: | Raster Images: Creating and Using a Region


RevEffect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RevEffect(unsigned uLineSpace, unsigned uMaximumHeight);
Delphi Syntax | Function RevEffect (uLineSpace: L_UINT; uMaximumHeight: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Adds a pseudo-3D wave effect to the bitmap by drawing lines across the bitmap, basing the line’s height at each point on its brightness at that point.

This method is similar to the Rutt-Etra Video Synthesizer. The Rutt-Etra video synthesizer was a processor that modulated the deflection lines of a television image so that they appeared to adopt the contours of objects. It was invented by Steve Rutt and Bill Etra in the 1970s.

With this method, you set the maximum height to be used for the pixels with the maximum brightness value. The other pixel heights are calculated by linear interpolation. Each line is 1 pixel in width. Control the spacing between the lines that are drawn across the image with the uLineSpace parameter.

You can get a more stable wave by performing either of the following:

Apply any type of blur like the GaussianFilter method, with a large nRadius value.

Apply the RevEffect and pass a small value to uMaximumHeight.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Emboss method, AddShadow method, ChangeHueSatInt method, ColorReplace method, ColorThreshold method, DiscreteFourierTransformation method, DirectionEdgeStatistical method, GetStatisticsInfo method, GetFeretsDiameter method, GetObjectInfo method, GetRgnContourPoints method, GetRgnPerimeterLength method, RevEffect method, Segment method, SubtractBackground method, UserFilter method.
Topics: | Raster Images: Artistic Effects


Reverse method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Reverse (void);
Delphi Syntax | Reverse: Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Reverses the bitmap (left to right) to produce a mirror image.

See Also

Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Methods That Transform the Region and the Bitmap


RGBfromHSV method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | unsigned __fastcall RGBfromHSV (short nH, short nS, short nV);
Delphi Syntax | Function RGBfromHSV (nH: short; nS: short; nV: short): TColorRef;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Returns a COLORREF that is equivalent to the color represented by the HSV values. Each HSV value ranges from 0..255. Traditionally, hue ranges from 0 to 359. For HSV_HfromRGB, the range of 0 to 359 is remapped to a range of 0..255. For example,

Color | Hue (0..359) | Hue (0..255)
Red | 0 | 0
Green | 120 | 85
Blue | 240 | 170

Saturation entries range from 0 to 255 where

0: | Contains the "most" white
255 | Contains no white

Value entries range from 0 to 255 where

0: | Contains the "most" black
255 | Contains the least black

The standard Windows values for COLORREF represent either red, green, and blue color values, or an index into the bitmap's palette. A COLORREF value with the format $00BBGGRR represents the blue, green, and red color values for the specified pixel, where $BB is the blue value, $GG is the green value and $RR is the red value. If $01000000 is set in the COLORREF value ($010000ZZ), the lower 8 bits ($ZZ) represent an index into the bitmap's palette, which holds the color value. You can specify a COLORREF value (the return value of the RGB function), or you can specify a palette index as explained in Using Palette Indexes As Color Values. Please note that just because an image has a palette that does not mean the value returned by this property is a palette index.

See Also

Elements: | HSV_HfromRGB method, HSV_SfromRGB method, HSV_VfromRGB method
Topics: | Raster Images: Doing Color Space Conversions
 | Creating and Using a Bitmap Region
 | Using Color Values in LEADTOOLS


RingEffect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int RingEffect(int nXOrigin, int nYOrigin, unsigned uRadius, unsigned uRingCount, unsigned uRandomize, unsigned crFill, int nAngle, unsigned uFlags);
Delphi Syntax | Function RingEffect (nXOrigin: L_INT; nYOrigin: L_INT; uRadius: L_UINT; uRingCount: L_UINT; uRandomize: L_UINT; crFill: COLORREF; nAngle: L_INT; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Divides the image into the specified number of rings. Each ring is rotated according to a rotation angle. The rotation angle for each ring will be chosen randomly by the function or can be passed to the function.

This method can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

Divides the image into a certain number of rings. Each ring is rotated compared to its inner ring according to a shift angle. The method will pick the shift angle at random if RING_FIXEDANGLE flag is not set in uFlags, or will use the angle specified by nAngle if RING_FIXEDANGLE is set in uFlags.

If RING_FIXEDANGLE flag is not set in uFlags then the method will pick the rotation angle randomly. The starting point (that is, the "randomization value") for the random number generator is selected through the uRandomize parameter, as follows:

If uRandomize is set to zero then the method will select a random value between 1 and 500 for the randomization value.

If uRandomize is > 0, it will be used for the randomization value. Note that uRandomize should be between 1 and 500 in this case.

Although the numbers generated are random, if you start with the same randomization value you will always get the same sequence of random numbers. This means that if you call the method twice with the same value for uRandomize, you will get the same result.

The center of the rings is determined by the nXOrigin and nYOrigin parameters. The method calculates the width of each ring by dividing the maximum radius (uRadius when uFlags is set to RING_MAXRADIUS) by the number of rings (uRingCount + 1).

The minimum width of each circle is 2. If the result of the division is less than 2, the method will draw uRadius / 2 rings, each ring having a width of 2.

Rings with a large radius might not be completely inside the bitmap. We will refer to these as "incomplete rings". We will refer to a portion of the ring that is outside the bitmap as "undetermined portion". When you rotate an incomplete ring, an undetermined portion of the ring might come into view. The method has 3 ways of specifying the output of the pixels where undetermined portions come into view:

Leave original bitmap pixels unchanged (RING_NOCHANGE is set) or

Repeat edge pixels (RING_REPEAT is set) or

Fill the undefined area with color crFill (RING_COLOR is set).

The determined portion of the ring will always displace the original bitmap pixels.

The image is split into an innermost circle and a number of rings. The innermost circle will not be rotated. Each ring is rotated compared to the inner ring. The rotation angle is as follows:

If RING_FIXEDANGLE is set, each ring will be rotated against its inner ring by nAngle. In other words, each index will be rotated against the original position by nAngle * <ring index>. (The index is 0-based. The innermost circle is considered to have an index of 0 and will not be rotated).

If RING_FIXEDANGLE is not set, the method will pick random rotation angles for each ring.

The width of the ring is determined as follows:

If RING_RADIUS is set, uRadius is the width of each ring

If RING_MAXRADIUS is set, uRadius will be the maximum ring radius. In this case, the width of each ring will be uRadius / uRingCount + 1.

This method supports all bits/pixel supported by LEADTOOLS.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Mosaic method, Picturize method, Pixelate method, Cubism method, DiceEffect method, PuzzleEffect method.
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


Ripple method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Ripple(unsigned uAmplitude, unsigned uFrequency, int nPhase, unsigned uAttenuation, const TPoint &ptCenter, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Ripple (uAmplitude: L_UINT; uFrequency: L_UINT; nPhase: L_INT; uAttenuation: L_UINT; ptCenter: Tpoint; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Warps the image in concentric rings.

This method will warp the image as a series of rings radiating out from the ptCenter. The center point must be defined inside the bitmap or inside the region, if the bitmap has a region.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowRippleDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


Rotate method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Rotate (int iAngle, int iFlags, int crFill);
Delphi Syntax | Rotate (iAngle:LongInt; iFlags:Integer; crFill:TColorRef): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Rotates the bitmap by the hundredths of degrees specified, and lets you specify the background color to be uncovered.

This method has the following features:

It uses the center of the bitmap as the center of rotation.

It can rotate the bitmap clockwise or counterclockwise up to 360 degrees in hundredth-of-a-degree increments.

It can resize the bitmap to accommodate the rotated height and width, or it can retain the original height and width, cropping the bitmap as necessary.

It lets you specify the background color to fill any new area created by the rotation.

See Also

Elements: | FastRotate method, ApplyTransformationParameters method, GetMarksCenterMass method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Methods That Transform the Region and the Bitmap
 | Raster Image Functions: Document Imaging
 | Detecting Registration Marks


SampleTarget method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SampleTarget(unsigned crSample, unsigned crTarget, unsigned uFlags);
Delphi Syntax | Function SampleTarget (crSample: COLORREF; crTarget: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Corrects color values by shifting the sample colors to the target colors.

For example, suppose you are working with a color image. In crSample you set the red value portion of the COLORREF structure to 125, the green portion to 165 and the blue portion to 100. In crTarget you set the red value portion to 170, the green to 120 and the blue to 200. If you set SAMP_BLUE in uFlags, then for every pixel in the bitmap that has a blue value of 100, that blue value will be changed to 200, thus shifting the colors in the bitmap. Depending on whether you set SAMP_LOW, SAMP_MID, or SAMP_HIGH, either the shadow values in the blue channel will be remapped, or the midtone values in the blue channel will be remapped, or the highlight values in the blue channel will be remapped.

This method supports 16-bit and 12-bit gray scale bitmaps. For gray scale bitmaps the gray value of the crSample and crTarget are used, and the different channel flags have the same effect since it works on the same channel (gray channel).

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, Dry method, Tunnel method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artisitic Effects
 | Using Color Values in LEADTOOLS


Saturation method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Saturation (int iChange);
Delphi Syntax | Saturation (iChange:Integer): Integer;
Overview | Refer to Correcting Colors.

Remarks

Increases or decreases the saturation of colors in the bitmap.

Negative values decrease the saturation of colors. Positive values increase the saturation. The saturation level is increased or decreased by a percentage of its present saturation level. For example, an increase of 20% of the current saturation level "L" will raise the new saturation level "L1" to a value of L + 0.20 * L. Likewise, increasing the saturation level 100% doubles the saturation level (L1 = L + 1.0 * L). Decreasing the saturation level 100% will set the new saturation level to 0. This process is carried out for every pixel.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Hue method, Invert method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


Save method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Save (System::AnsiString fileName, int iFormat, int iBitsPerPixel, int iQuality, int iModify);
Delphi Syntax | Save (fileName:String; iFormat, iBitsPerPixel, iQuality, iModify: Integer): Integer;
Overview | Refer to Saving a Bitmap to a File.

Remarks

Saves the bitmap to a file in any of the supported compressed or uncompressed formats.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits .

If the bitmap is 8 bits per pixel or greater, use the LEAD CMP format or one of the JPEG (JTIF or JFIF) formats to save disk space. You can set the ProgressivePasses property if you want to save a CMP or JFIF file as a progressive file.

If the bitmap is 1-bit per pixel, use the LEAD 1-bit format or a CCITT Group 3 or 4 format to save disk space.

For CCITT Group 3 and 4 formats, the first RGBQUAD structure in the bitmap's palette determines the white component of the image. If the rgbRed field is 0, then all 0 bits in the image are assumed to be black. Otherwise, all zero (0) bits in the image are assumed white.

If you save an animated GIF file, all bitmaps in the bitmap list are saved. Also, the following properties update global fields in the file:

AnimationPalette property

AnimationBackColor property

AnimationHeight property

AnimationWidth property

AnimationLoop property

This function supports signed data images, but only DICOM and TIFF formats support signed data. This function will return an error code if you attempt to save a signed image to a format other than DICOM or TIFF.

If the bitmap has a region, the region stored in the bitmap will be saved, if the image is saved as one of the TIFF file formats.

See Also

Elements: | SaveWithStamp method, SaveMemory method
Topics: | Raster Images: Saving Files
 | Raster Images: Creating and Maintaining Lists of Images


SaveBuffer method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SaveBuffer (void *pBuffer, unsigned iBufferSize, int iFormat, int iBitsPerPixel, int iQuality, LEADTyp::pCardinal piSize);
Delphi Syntax | SaveBuffer (pBuffer: Pointer; iBufferSize: Cardinal; iFormat, iBitsPerPixel, iQuality: Integer; piSize: pCardinal): Integer;
Overview | Refer to Using Memory-Resident Image Files.

Remarks

Saves a bitmap to a file in a memory buffer that the user must allocate. The buffer can be output in any of the supported compressed or uncompressed file formats.

This method is similar to the SaveMemory method, except that the user is responsible for allocating/reallocating the buffers. If the user wants to allocate a buffer that is large enough to hold the file in memory, an upper bound on the file size can be estimated by the following formula:

RequiredBytes = (Image Width) * (Image Height) * (BitsPerPixel) / 8

Note that this is an estimate. This does not include the size of the file header, and it does not take into account any compression.

This function supports signed data images, but only DICOM and TIFF formats support signed data. This function will return an error code if you attempt to save a signed image to a format other than DICOM or TIFF.

If the bitmap has a region, the region stored in the bitmap will be saved, if the image is saved as one of the TIFF file formats.

See Also

Elements: | Save method, SaveWithStamp method, SaveMemory method
Topics: | Raster Images: Saving Files


SaveMemory method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SaveMemory (int &hBuf, int iFormat, int iBitsPerPixel, int iQuality, int &iBufSize);
Delphi Syntax | SaveMemory (var hBuf: L_HANDLE; iFormat, iBitsPerPixel, iQuality: Integer; var iBufSize: Longint): Integer;
Overview | Refer to Using Memory-Resident Image Files.

Remarks

Saves a bitmap to a file in memory. The output can be in any of the supported compressed or uncompressed file formats.

To use this method, do the following:

1. | Declare a variable of the appropriate data type to reference the file in memory. You can then pass the variable by reference in this method, which will allocate the memory, save the bitmap, and unlock the memory.
2. | Declare an integer variable for the file-size. You can then pass its address in this method, which will update its value with the size of the file.
3. | Call this method to save the bitmap in the specified memory handle.

To see the correct data types, refer to the code example for your development system.

To get information about a file stored in memory, refer to the GetMemoryInfo method. To load an image from a file in memory, refer to the LoadMemory method.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits .

Support for writing AVI files is only available in the Multimedia toolkits.

Note:

You cannot save a multipage file using the SaveMemory method, but if you get a multipage file into memory in some other way, you can use the LoadMemory method to load a specific page from the file.

This method does not support signed data images, but only DICOM images are supported as signed data. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image, other than a DICOM image, is passed to this method.

See Also

Elements: | Save method, SaveWithStamp method
Topics: | Raster Images: Saving Files


SaveOffset method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SaveOffset(AnsiString pszName, int nOffsetBegin, int nFormat, int nBitsPerPixel, int nQuality, int nModify);
Delphi Syntax | Function SaveOffset (pszName: String; nOffsetBegin: Integer; nFormat: Integer; nBitsPerPixel: Integer; nQuality: Integer; nModify: Integer): Integer;
Overview | Refer to Saving a Bitmap to a File

Remarks

Saves a bitmap to a file, in any supported format, starting at the specified offset. This enables you to embed an image file in another file.

This method is similar to the Save method, with the following differences:

the file can be saved starting at any file offset.

when saving an animated GIF, only the first bitmap in the list is saved.

the FileSizeWritten property is updated with the total file size, in bytes.

Support for 12 and 16-bit gray-scale images is available only in the Document/Medical toolkits.

For a list of available products, refer to Topic Selection.

This function supports signed data images, but only DICOM and TIFF formats support signed data. This function will return an error code if you attempt to save a signed image to a format other than DICOM or TIFF.

If the bitmap has a region, the region stored in the bitmap will be saved, if the image is saved as one of the TIFF file formats.

See Also

Elements: | SaveWithStamp method, SaveMemory method, ShowSaveDlg method , SaveTileHeight property, SaveTileWidth property
Topics: | Raster Images: Saving Files, Raster Images: Creating and Maintaining Lists of Images


SaveTileWidth property (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | unsigned SaveTileWidth
Delphi Syntax | SaveTileWidth: Cardinal
Overview | Refer to Saving a Bitmap to a File

Remarks

This property influences the way TIF files are saved, based on the following:

If SaveTileWidth is 0, TIF files will be saved in strips (default). This is recommended, since not all programs read tiled files.

If SaveTileWidth is greater than the bitmap width, the file will be saved as strips.

If SaveTileWidth is less than the bitmap width, the file will be saved as tiles. Please note that files saved in this way may not be read by all software packages. However, LEADTOOLS will still read these files.

If TIF files are saved as tiles, the tile size might be rounded to the closest available size. The following restrictions apply when saving TIF files as tiles:

1, 2, 3, 5, 6, and 7-bit images must have a tile width that is a multiple of 8.

4-bit and 12-bit images must have a tile width that is a multiple of 2.

Other bits per pixel have no restrictions.

See Also

Elements: | Save method, SaveTileHeight property
Topics: | Raster Images: Saving Files


SaveWithStamp method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SaveWithStamp (System::AnsiString fName, int iFormat, int iBitsPerPixel, int iQuality, int iStampWidth, int iStampHeight, int iStampBits);
Delphi Syntax | SaveWithStamp (fName:String; iFormat, iBitsPerPixel, iQuality, iStampWidth, iStampHeight, iStampBits: Integer): Integer;
Overview | Refer to Saving a Bitmap to a File.

Remarks

Saves the specified bitmap to create a JPEG or LEAD CMP output file that includes a thumbnail (stamp) image.

Neither the width nor the height of the stamp can exceed 255 pixels. In addition, the following overall size limitations apply:

If you save an 8-bit stamp, the following calculation cannot exceed 65,535: (width * height) + 778.

If you save a 24-bit stamp, the following calculation cannot exceed 65,535: (width * height * 3) + 10.

The method will return an error (ERROR_INV_RANGE) if you exceed any of these size limitations.

If you are working with compressed (JPEG) Exif files, the stamp size has been restricted to 160x120x24. When you call SaveWithStamp method and specify that you want to save a compressed Exif file, the StampWidth, StampHeight and StampBits parameters are ignored. They are assumed to be 160 (StampWidth), 120 (StampHeight) and 24 (StampBits). That limitation has been imposed in order to conform with the ExifR98 interoperability rules imposed by japanese digital camera manufacturers.

If you are working with uncompressed (TIFF) Exif files, the stamp size is (width x height x 24 bpp), with no limitations on width and height.

The stamp image can be retrieved by calling the LoadStamp method.

See Also

Elements: | LoadStamp method
Topics: | Raster Images: Saving Files
 | Raster Images: Loading and Saving Stamp Images


SearchRegMarks method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SearchRegMarks(LPREGMARKS pRegMarks, unsigned uMarksCount);
Delphi Syntax | Function SearchRegMarks (pRegMarks: LPREGMARKS; uMarksCount: L_UINT): L_INT;
Overview | Refer to Detecting Registration Marks

Remarks

(Document/Medical only) Searches the bitmap for the registration marks according to the information in pRegMarks.

This method searches the bitmap for registration marks. The pRegMarks array contains the information about the registration marks. Declare the array before calling the method. You should specify the following:

uType

uWidth

uHeight

uMinScale

uMaxScale

rcRect

uMarkSearchCount

pMarkDetectedCount

The method will update each member of the pRegMarks array with information about the detected registration marks:

The uMarkDetectedCount member will be updated with number of detected marks in that area.

The pMarkDetectedPoints member will be updated with the position of the detected marks.

You can call GetTransformationParameters to get the transformation parameters, which can be applied to this bitmap to make it match the reference image.

If you simply want to automatically straighten a bitmap, use the Deskew method.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Combine method, Rotate method, Size method, IsRegMark method, GetTransformationParameters method, GetMarksCenterMass method, ApplyTransformationParameters method
Topics: | Raster Images: Document Imaging


Segment method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Segment(unsigned uThreshold, unsigned uFlags);
Delphi Syntax | Function Segment (uThreshold: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Divides the bitmap into segments where each segment’s pixels have approximately the same color (homogenous color).

This method divides the image into segments according to its pixel values. The segment shapes will be arbitrary. Adjacent pixels with approximately the same values are put together into homogenous segments. The method may be performed on the RGB and YUV color spaces.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, StretchIntensity method, RemapIntensity method, Invert method, Change Hue method, Saturation method, Fill method, GetHistogram method, Sharpen method, Mosaic method, Emboss method, Average method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, Posterize method.
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Artistic Effects


SelectData method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SelectData(TBitmapHandle ScrBitmap, unsigned crVariance, unsigned uSrcLowBit, unsigned uSrcHighBit, unsigned uThreshold, bool bCombine);
Delphi Syntax | Function SelectData (ScrBitmap: TBitmapHandle; crVariance: COLORREF; uSrcLowBit: L_UINT; uSrcHighBit: L_UINT; uThreshold: L_UINT; bCombine: Boolean): L_INT;
Overview | Refer to Grayscale Images

Remarks

(Medical only) Selects a specified number of bits of an 8, 12 or 16-bit grayscale bitmap and puts them into a mask, then colors the bitmap depending on the mask. This can show bitmap variances depending on user-defined conditions.

This method is used as a visualization aid. You can select certain bits of the supported type bitmap and show the variances of that bitmap under conditions that you define.

When the method returns successfully the Bitmap property will be updated with a 24-bit RGB bitmap.

For 8, 12 and 16-bit grayscale bitmap, the uSrcLowBit can range from 0 to 7, 11, and 15 respectively. However if this value exceeds the range then the method will not return an error, and the Bitmap property will contain a pure black bitmap.

For 8, 12 and 16-bit grayscale bitmap, the uSrcHighBit can range from uSrcLowBit to 7, 11, and 15 respectively. No error will be returned if uSrcHighBit is greater than 7, 11 or 15. The method will return an invalid parameter error if uSrcHighBit < uSrcLowBit.

The method will first construct a mask from bits uSrcLowBit through uSrcHighBit. For each pixel, the pixel value will be combined with the mask using a bitwise ‘and’ operation. The result will be shifted to the right by uSrcLowBit. This result will be compared with the threshold: if the value is greater than or equal to the threshold, the output pixel’s color is changed using crVariance. If the result is less than the threshold, the output is set to 0.

The following example shows you how to treat a 16-bit grayscale bitmap:

In a16-bit grayscale bitmap, the bits are ordered as b15 b14 b13 ... b2 b1 b0.

For uSrcLowBit = 3, uSrcHighBit = 8, uThreshold = 16 and crVariance = RGB(0, 255, 0):

In Source bitmap (SrcBitmap)

-------------------

b15 b14 b13 b12 b11 b10 b9 |b8 b7 b6 b5 b4 b3| b2 b1 b0

-------------------

0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1

In our case, the mask is 010011 in base 2 (19 in decimal). Since 19 >= 16, the destination pixel will be colored using crVariance. The output pixel will be:

if bCombine = FALSE: crVariance = RGB(0,255,0)

if bCombine = TRUE: we take the high byte of the source pixel, which is 01101110 in base 2 ($6E), and then the value is AND-ed with each component of the crVariance. So the output pixel will be RGB($00 & $6E, $FF & $6E, $00 & $6E) which is RGB($00, $6E, $00).

Let us consider another case: the source pixel is 0110111000011101 the mask value is 000011 in base 2(3 in decimal). Since 3 < 16, the destination pixel will be:

if bCombine = FALSE: RGB(0,0,0)

if bCombine = TRUE: The high byte of source pixel will bet set for the RGB, that is RGB($6E, $6E, $6E).

This method supports 8, 12 and 16-bit grayscale bitmaps only. Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits. It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | WindowLevel method, GrayScaleToDuotone method, GrayScaleToMultitone method, ShiftData method, ColorizeGray method, SelectiveColor method.
Topics: | Raster Images: Doing Color Expansion or Reduction
 | Using Color Values in LEADTOOLS


SelectiveColor method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SelectiveColor(const SELECTIVECOLORINFO * SelClrs);
Delphi Syntax | Function SelectiveColor (SelClrs: TLEADSelClrInfoArr): L_INT;
Overview | Refer to Correcting Colors

Remarks

(Raster Pro and above toolkits) Changes the color of a bitmap by altering the definitions of one or more colors used by the bitmap.

Selected colors are the additive colors (Red, Green and Blue), the subtractive colors (Cyan, Magenta and Yellow), the highlights (White), the midtones (Neutral) and the shadows (Black). Each of those "Selected Colors" has information about the percentages of cyan, magenta, yellow and black that constructs that selective color. Each unique pixel’s color can be defined as using some certain percentage of CMYK values. By changing the percentage of CMYK values for a "selected color", all colors related to that "selected color" would change also. For example, you can decrease the Magenta percentage from the "Blue selected color" to change a blue color to a color that is more similar to Cyan. Also you can increase the Yellow percentage from the "Magenta selected color" to change magenta color to a color that is more similar to Red.

You control the percentage of CMYK for each of the selected colors using the SelClrs array members. The SELECTIVECOLORINFO record (structure) used in SelClrs has four members, cCyan, cMagenta, cYellow and cBlack. Each takes a value from –100 to 100. Negative values for any of these members decreases the percentage of that color, whereas positive values increases the percentage of that color. If cCyan = -100 it means no cyan will be used, whereas if cCyan = 100 it means the full percentage of cyan will be used. If a value is out of range, a negative value goes to -100 and a positive value goes to 100.

Pixel colors are changed based on HSV color space. For example, if you alter the values for SelClrs[SELCLR_RED], then if a pixel value is within the RED range of the Hue scale, it is considered red and is changed using the settings in SelClrs [SELCLR_RED].

This method supports 48 and 64-bit color images. It does not support grayscale images. Support for 48 and 64-bit color images is available only in the Document/Medical toolkits.

If the bitmap has a region, the effect will be applied on the region only.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | ColorLevel method, AutoColorLevel method
Topics: | Raster Images: Modifying Intensity Values


SetDDB method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetDDB (L_HDC hDevice, HBITMAP hBit, HPALETTE hPal);
Delphi Syntax | SetDDB (hDevice: L_HDC; hBit: HBitmap; hPal: HPalette): Integer;
Overview | Refer to Copying and Creating Bitmaps.

Remarks

Makes a copy of a device-dependent bitmap (DDB) and assigns the copy to the Main Control.

For the hPal parameter, you can use the GetBitmapPalette method to get the palette handle.

Ordinarily, you would need a DDB only if you are using Windows API functions. Nevertheless, for simplicity, the examples in this documentation get and set a DDB without using the API.

See Also

Elements: | GetDIB method, SetDIB method, GetDDB method
Topics: | Raster Images: Exchanging Imgages with Other Objects


SetDIB method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetDIB (L_HGLOBAL hDIBData);
Delphi Syntax | SetDIB (hDIBData: L_HGLOBAL): Integer;
Overview | Refer to Copying and Creating Bitmaps.

Remarks

Makes a copy of a device independent bitmap (DIB) and assigns the copy to the Main Control.

Ordinarily, you would need a DIB only if you are using Windows API functions. Nevertheless, for simplicity, the examples in this documentation get and set a DIB without using the API.

See Also

Elements: | GetDIB method, GetDDB method, SetDDB method
Topics: | Raster Images: Exchanging Images with Other Objects


SetDstClipRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetDstClipRect (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | SetDstClipRect (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Displaying an Image.

Remarks

Sets the destination clipping rectangle that is used when painting an image.

The clipping rectangle specifies the portion of the display rectangle to paint. Generally, this is used for updating changes in the display surface, such as when a user moves another window, uncovering a part of the image that had been covered up.

See Also

Elements: | SetDstRect method, SetSrcClipRect method, SetSrcRect method
Topics: | Raster Images: Displaying Images


SetDstRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetDstRect (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | SetDstRect (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Displaying an Image.

Remarks

Sets the destination rectangle that is used when painting an image.

The destination rectangle determines how the source rectangle is scaled and how the image is positioned in the device context.

Because of a Windows limitation, destination rectangle measurements, in pixels, cannot exceed the maximum value of an integer. On WIN32 systems, this is rarely a problem. An alternative for scaling large images is to make the source rectangle smaller, using the SetSrcRect method.

The AutoScroll property must be FALSE before setting DstLeft or DstTop.

See Also

Elements: | SetDstClipRect method, SetSrcClipRect method, SetSrcRect method
Topics: | Raster Images: Displaying Images


SetFloaterDstClipRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetFloaterDstClipRect (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | SetFloaterDstClipRect (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Sets the destination clipping rectangle that is used when painting a floater.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

If the AutoSetRects property is set to True, the clipping rectangle defaults to the full client area of the Main Control. Therefore, you do not have to set this rectangle unless you want to display only part of the floater.

To position and scale the floater, refer to the SetFloaterDstRect method.

See Also

Elements: | SetFloaterDstRect method
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


SetFloaterDstRect method (Main Control)

C++ Builder example

Delphi 2.0 example

Builder Syntax | int SetFloaterDstRect (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | SetFloaterDstRect (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Positions and sizes the display of the floater by setting destination rectangle.

This method is commonly used when the AutoFloater property is False to reposition the floater in the client area using the OnMouseMove event.

If the floater is visible, its region is automatically repainted when you set the destination rectangle. If the AutoSetRects property is set to True, the destination rectangle defaults to the size of the floater bitmap. Therefore, you must use this method to set the destination rectangle to the desired position.

A floater is an additional bitmap that is associated with the Main Control. Its common application is to implement the interactive visual aspects of an outline-drag-and-paste operation. You use it to get a copy of the image in the current bitmap region, which the user can drag to another position in the Main Control's client area.

See Also

Elements: | SetFloaterDstClipRect method
Topics: | Raster Images: Copying Images
 | Raster Images: Creating and Using a Region


SetLoadResolution method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetLoadResolution (int nFormat, Cardinal uWidth, Cardinal uHeight);
Delphi Syntax | SetLoadResolution (nFormat: Integer; uWidth, uHeight: Cardinal): Integer;
Overview | Refer to Implementing PhotoCD and FlashPix Features.

Remarks

Specifies the physical resolution (width and height) of the FlashPix, PhotoCD or JBIG file to load.

For PhotoCD files, you can do either of the following:

Specify one of the exact sets of dimensions in the file. You can determine the available dimensions using the ReadLoadResolutions method.

Specify 0 for both dimensions to load the default resolution.

For FlashPix files, you can do any of the following:

Specify one of the exact sets of dimensions in the file. You can determine the available dimensions using the ReadLoadResolutions method.

Specify either the desired width or desired height to load, and use 0 to get the default for the other dimension. The default preserves the aspect ratio. The load procedure resizes the bitmap while loading it if necessary.

Specify 0 for both dimensions to load the default resolution.

For JBIG files, you can do any of the following:

Specify 0 for both dimensions to load the default resolution, which is the highest resolution layer, which corresponds to the image with its FULL DIMENSIONS.
e.g.: If the file contains the image at the following dimensions: 800X600, 400X 300 and 200X150, then in the default case the filter will load the image at 800X600.

Specify either the desired width or desired height to load, and use 0 to get the default for the other dimension. The load procedure will determine the closest resolution layer, which best fits the user's request.
e.g.: If the file contains the image at the following dimensions: 800X600, 400X 300 and 200X150 and the user requests an image with width equal to 780 for example, then LEADTOOLS will automatically know that the proper width is 800 and load the image at the (800X600) resolution.

Specify one of the exact sets of dimensions in the file. You can determine the available dimensions using the ReadLoadResolutions method.

See Also

Elements: | ReadLoadResolutions method, LoadResolutionCount property, LoadResolutionHeight property, LoadResolutionWidth property, PCDRes property, GetLoadResolution method, SaveResolutionCount property, SaveResolutionHeight property, SaveResolutionWidth property
Topics: | Raster Images: Loading Files


SetMagGlassPos method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetMagGlassPos(int nXPos, int nYPos);
Delphi Syntax | Function SetMagGlassPos(nXPos: L_INT; nYPos: L_INT): L_INT;
Overview | Refer to Using the Magnifying Glass

Remarks

Moves the Magnifying Glass to the (nXPos, nYPos) position on the screen.

This method is used to move the Magnifying Glass to the specified position on the screen when the user is manually updating the Magnifying Glass. It is used in conjunction with the ShowMagGlass method. To manually update the Magnifying Glass, MAGGLASS_MANUAL_UPDATE must be set in the MagGlassFlags property.

If the Magnifying Glass is displayed, then this method will move the Magnifying Glass to the specified (nXPos, nYPos) position and it will be displayed there. If the Magnifying Glass is hidden, then this method will move the Magnifying Glass to the specified position, but will not display it.

This method can be called in the Main Control’s MouseMove event to control the position of the Magnifying Glass.

Note:

This method can be used only if the MAGGLASS_MANUAL_UPDATE flag was set in the MagGlassFlags property.

See Also

Elements: | MagGlassFlags property, OnMagGlassCursor event, StartMagGlass method, StopMagGlass method, ShowMagGlass method, UpdateMagGlassFromHandle method.
Topics: | Raster Images: Displaying Images.


SetMemoryThresholds method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetMemoryThresholds(int nTiledThreshold, int nMaxConvSize, int nTileSize, int nConvTiles, int nConvBuffers, unsigned uFlags);
Delphi Syntax | Function SetMemoryThresholds(nTiledThreshold: L_INT; nMaxConvSize: L_INT; nTileSize: L_INT; nConvTiles: L_INT; nConvBuffers: L_INT; uFlags: L_UINT ): L_INT;
Overview | Refer to Memory Storage Types for Bitmaps

Remarks

Sets the memory restrictions for allocating bitmaps.

These are global settings and apply to the current thread. They will apply to bitmaps created in this thread after this method is called.

As an example, suppose an image needs 150 tiles and

nConvTiles = -30
nConvBuffers = -50

In this case, there are 30% conventional memory tiles (30% of 150 = 45) and 70% disk tiles (70% of 150 = 105).

For the 105 disk tiles, there are enough cache buffers for 50% of them.

50% of 105 = 52

Therefore, 52 memory buffers will be used to cache the 105 disk tiles.

See Also

Elements: | GetMemoryThresholds method, GetMemoryInfo method
Topic: | Raster Images: Creating and Deleting Images


SetRgnBorder method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | L_INT SetRgnBorder (L_INT x, L_INT y, COLORREF crBorderColor, COLORREF crLowerTolerance, COLORREF crUpperTolerance, L_UINT uCombineMode);
Delphi Syntax | Function SetRgnBorder (x: L_INT; y: L_INT; crBorderColor: COLORREF; crLowerTolerance: COLORREF; crUpperTolerance: COLORREF; uCombineMode: L_UINT ): L_INT;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Creates a region of pixels with values that fall within a range defined by the value of a specific pixel and a lower and upper tolerance value but are not equal to crBorderColor.

For color bitmaps:

If the value of the pixel at (x, y) is (125, 125, 125) and crLowerTolerance is (20,30,15), then the lower stopping point is (105, 95, 110). If crUpperTolerance is (20,30,15), then the upper stopping point is (145,155,140). In this case, the pixels with values between (105,95,110) and (145,155,140) are non-border pixels and will be included in the region. Any pixel with a value outside this range or equal to crBorderColor is considered a border pixel.

For gray scale bitmaps:

The minimum channel tolerance value of crLowerTolerance will be used to set the lower stopping point, and the minimum channel tolerance value of crUpperTolerance will be used to set the upper stopping point. For example, if the value of the pixel at (x, y) is (125, 125, 125) and crLowerTolerance is (20,30,15), the smallest value of the triplet (15) will be used to create the lower stopping point of (110,110,110). If crUpperTolerance is (10,25,20), the smallest value of that triplet (10) will be used to create the upper stopping point of (135,135,135). In this case, the pixels with values between (110, 110, 110) and (135,135,135) are non-border pixels and will be included in the region. Any pixel with a value outside this range or equal to crBorderColor is considered a border pixel.

To update an existing region, you specify how the new region is to be combined with the

existing one. For possible values, refer to Flags for Setting a Region.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | SetRgnColor method, SetRgnMagicWand method.
Topics: | Raster Images: Creating and Using a Region
 | Using Color Values in LEADTOOLS


SetRgnColor method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetRgnColor (int crColor, Cardinal uCombineMode);
Delphi Syntax | SetRgnColor (crColor:TColorRef; uCombineMode:Cardinal): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Adds a region that consists of all pixels of a specified color.

You specify the color using a COLORREF value, which is a Windows-defined data type. You can also specify a palette index as explained in Using Palette Indexes As Color Values.

With this method, you can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For possible values, specified in the uCombineMode parameter, refer to Flags for Setting a Region.

You can use this method to simulate the use of a transparent color as follows:

Call this method, with the transparent color in the crColor parameter and L_RGN_SETNOT in the uCombineMode parameter.

Use the EnableFloater property to display and manipulate the region, which consists of every part of the bitmap, except the area with the specified color.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, PolygonSize property, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region
 | Using Color Values in LEADTOOLS


SetRgnColorHSVRange method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall SetRgnColorHSVRange (int nH0, int nS0, int nV0, int nH1, int nS1, int nV1, int iCombineMode);
Delphi Syntax | Function SetRgnColorHSVRange (nH0: Integer; nS0: Integer; nV0: Integer; nH1: Integer; nS1: Integer; nV1: Integer; iCombineMode: Integer): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Creates or updates the bitmap region by adding a region that consists of all the pixels that fall in the range (nH0, nS0, nV0) ... (nH1, nS1, nV1), inclusively.

This method uses the HSV color model to set a region based on a color range.

nH0, nS0, and nV0 define a minimum (inclusive) H,S, and V. nH1, nS1, nV1 define a maximum (inclusive) H,S, and V. A pixel must have H,S, and V all greater than or equal to nH0, nS0, nV0 and less than or equal to nH1, nS1, nV1 to be included in the region.

It is useful for identifying all shades of a certain color. For example, SetRgnColorHSVRange could be used to set a region of all green colors including:

RGB(0,1,0) |  |  |
RGB(0,2,0) | RGB(1,2,1) |  |
RGB(0,3,0) | RGB(1,3,1) | RGB(2,3,2) |
... | ... | ... | ...
RGB(0,255,0) | RGB(1,255,1) | RGB(2,255,2) | ...

The diagram below shows how S and V affect the color green (H = 85)

As an example, you could set a region for all red (and colors near red) by specifying arguments as follows:

nH0 = 250 | nH1 = 5
nS0 = 1 | nS1 = 255
nV0 = 1 | nV1 = 255

Note that nH0 is 250 and nH1 is 5. For a hue to fall in this range, it must be either 250, 251, 252, 253, 254, 255, 1, 2, 3, 4, or 5. Also, note that the hue values wrap from 255 back around to 1.

To update an existing region, you specify how the new region is to be combined with the existing one. For possible values, specified in the iCombineMode parameter, refer to Flags for Setting a Region

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | SetRgnColorRGBRange method, SetRgnColor method
Topics: | Raster Images: Creating and Using a Region


SetRgnColorRGBRange method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall SetRgnColorRGBRange (unsigned crLower, unsigned crUpper, int iCombineMode);
Delphi Syntax | Function SetRgnColorRGBRange (crLower: TColorRef; crUpper: TColorRef; iCombineMode: Integer): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Creates or updates the bitmap region by adding a region that consists of all the pixels that fall in the range crLower ... crUpper, inclusively.

This method uses the RGB color model to set a region based on a color range.

To be added to the region a color must fall in the range crLower..crUpper. To set a region for all pure red, specify crLower and crUpper as follows:

crLower RGB(1,0,0)

crUpper(255,0,0)

Note that this would fail to include many colors that look red to the eye (like RGB(255,4,4)). To include ALL shades of red, you can use the SetRgnColorHSVRange method.

To update an existing region, you specify how the new region is to be combined with the existing one. For possible values, specified in the iCombineMode parameter, refer to Flags for Setting a Region

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | SetRgnColorHSVRange method, SetRgnColor method
Topics: | Raster Images: Creating and Using a Region


SetRgnCurve method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall SetRgnCurve (int iFillMode, int iCombineMode);
Delphi Syntax | Function SetRgnCurve (iFillMode: Integer; iCombineMode: Integer): Integer;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Creates or updates the bitmap region by adding a curved region.

This method can draw two types of curves: a smooth curve that goes through all of the points, or a series of Bezier curves that use the points as control points. The type of curve drawn is determined by the CurveType property. The points are contained int the CurveX property and the CurveY property.

To create a curve region, first build an ordered array of points for the curve. Then create the region based on the array. The CurveSize property specifies the size of the array. Either specify a large array to start with, or increase the size of the array as needed, without losing existing points. For each point, update the following indexed properties:

CurveX property

CurveY property

and define the characteristics of the curve by setting the following properties:

CurveType property

CurveTension property

CurveClose property

Then call the SetRgnCurve method to add the region to the bitmap.

See Also

Elements: | CurveX property, CurveY property, CurveSize property, CurveToBezier method, CurveTension property, CurveClose property, CurveType property, SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, SetRgnColor method, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


SetRgnEllipse method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetRgnEllipse (int nLeft, int nTop, int nWidth, int nHeight, Cardinal uCombineMode);
Delphi Syntax | SetRgnEllipse(nLeft, nTop, nWidth, nHeight: Integer; uCombineMode: Cardinal): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Adds an elliptical region to the bitmap.

With this method, you can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For possible values, specified in the uCombineMode parameter, refer to Flags for Setting a Region.

Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | SetRgnRect method, SetRgnRoundRect method, SetRgnColor method, PolygonSize property, PolygonPoint property, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


SetRgnFromMask method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetRgnFromMask(unsigned uCombineMode);
Delphi Syntax | Function SetRgnFromMask(uCombineMode: L_UINT): L_INT;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Creates or updates the bitmap region in the Bitmap property by adding the region specified by the white pixels in the MaskBitmap property.

The MaskBitmap property must contain a 1-bit image before calling this method. The MaskBitmap property can be set manually, by the user, or it may be updated by calling the CreateMaskFromBitmapRgn method.

See Also

Elements: | MaskBitmap property, CreateMaskFromBitmapRgn method, SetRgnEllipse method, SetRgnRect method, SetRgnRoundRect method, PolygonSize property, OffsetRgn method, SetRgnColor method.
Topics: | Raster Images: Creating and Using a Region.


SetRgnHandle method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetRgnHandle (L_HRGN hRgn, int nOffsetX, int nOffsetY, Cardinal uCombineMode);
Delphi Syntax | SetRgnHandle (hRgn: L_HRGN; nOffsetX, nOffsetY: Integer; uCombineMode: Cardinal): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Adds a stored region to the current bitmap region.

You can store a region using the GetRgnHandle method or the DeleteRgnHandle method. Keep in mind that the region data contains only positioning information, not the bitmap's pixel values.

With this method, you can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For possible values, specified in the uCombineMode parameter, refer to Flags for Setting a Region.

See Also

Elements: | GetRgnHandle method, DeleteRgnHandle method, FreeRgn method
Topics: | Raster Images: Creating and Using a Region


SetRgnMagicWand method (Main Control)

C++ Builder example

Delphi example

Builder syntax | L_INT SetRgnMagicWand(L_INT x, L_INT y, COLORREF crLowerTolerance, COLORREF crUpperTolerance, L_UINT uCombineMode);
Delphi syntax | Function SetRgnMagicWand (x: L_INT; y: L_INT; crLowerTolerance: COLORREF; crUpperTolerance: COLORREF; uCombineMode: L_UINT ): L_INT;
Overview | Refer to Creating and Using a Bitmap Region

Remarks

Sets a region based on the color found at point x, y in the region.

With this method, you can either replace the current region or create a complex region by setting a flag that determines how the added region interacts with the existing region. For possible values, specified in the iCombineMode parameter, refer to Flags for Setting a Region .

For color bitmaps:

If the value at pixel (x, y) is (125, 125, 125) and crLowerTolerance is (20, 30, 15) the lower stopping point is (105, 95, 110). If crUpperTolerance is (10, 25, 20), then the upper stopping point is (135, 150, 145). Pixels with values of (105, 95, 110) up to (135, 150, 145) will be included in the region.

For gray scale bitmaps:

The minimum channel tolerance value of crLowerTolerance will be used to set the lower stopping point, and the value of crUpperTolerance will be used to set the upper stopping point. For example, if the value of the pixel at (x, y) is (125, 125, 125) and crLowerTolerance is (20,30,15), the smallest value of the triplet (15) will be used to create the lower stopping point of (110,110,110). If crUpperTolerance is (10,25,20), the smallest value of that triplet (10) will be used to create the upper stopping point of (135,135,135).

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | SetRgnColor method, SetRgnBorder method
Topics: | Raster Images: Creating and Using a Region
 | Using Color Values in LEADTOOLS


SetRgnPolygon method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetRgnPolygon (Cardinal uFillMode, Cardinal uCombineMode);
Delphi Syntax | SetRgnPolygon (uFillMode, uCombineMode: Cardinal): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Adds a polygonal region to the bitmap.

With this method, you can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For possible values, specified in the uCombineMode parameter, refer to Flags for Setting a Region.

To create a polygonal region, you must first build an ordered array of points for the vertices of the polygon; then create the region based on the array. The PolygonSize property specifies the size of the array. You can either specify a large array to start with, or you can increase the size of the array when necessary (without losing the existing points). For each vertex, you update the array by setting the following indexed PolygonPoint property.

You can then call the SetRgnPolygon method.

See Also

Elements: | SetRgnRoundRect method, SetRgnEllipse method, SetRgnRect method, SetRgnColor method, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


SetRgnRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetRgnRect (int nLeft, int nTop, int nWidth, int nHeight, Cardinal uCombineMode);
Delphi Syntax | SetRgnRect (nLeft, nTop, nWidth, nHeight: Integer; uCombineMode: Cardinal): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Adds a rectangular region to the bitmap.

With this method, you can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For possible values, specified in the uCombineMode parameter, refer to Flags for Setting a Region.

Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

See Also

Elements: | SetRgnEllipse method, SetRgnRoundRect method, SetRgnColor method, PolygonSize property, PolygonPoint property, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


SetRgnRoundRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetRgnRoundRect (int nLeft, int nTop, int nWidth, int nHeight, int nWidthEllipse, int nHeightEllipse, Cardinal uCombineMode);
Delphi Syntax | SetRgnRoundRect (nLeft, nTop, nWidth, nHeight, nWidthEllipse, nHeightEllipse: Integer; uCombineMode: Cardinal): Integer;
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Adds a rounded rectangular region to the bitmap.

With this method, you can either replace the current region or create a complex region by setting a Boolean flag that determines how the added region interacts with the existing region. For possible values, specified in the uCombineMode parameter, refer to Flags for Setting a Region.

Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.

The following illustration shows how the you describe the rounded corners by specifying the width and height of an ellipse:

See Also

Elements: | SetRgnEllipse method, SetRgnRect method, SetRgnColor method, PolygonSize property, PolygonPoint property, OffsetRgn method
Topics: | Raster Images: Creating and Using a Region


SetRubberBandRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void SetRubberBandRect (int nLeft, int nTop, int nWidth, int nHeight);
Delphi Syntax | SetRubberBandRect (nLeft, nTop, nWidth, nHeight:Integer);
Overview | Refer to Marking a Selection with a Rubberband

Remarks

Sets the position and size of a rubberband, which is a one-pixel outline of a rectangle on the display surface.

Typically, you would use this method to outline an area that the user selects with a mouse. The unit of measure is pixels. This method works with the following properties:

The RubberbandVisible property lets you set the rubberband to be visible or invisible (effectively, turning it on or off).

The RubberbandHeight property is the current height.

The RubberbandLeft property is the current X coordinate of the origin of the rubberband.

The RubberbandTop property is the current Y coordinate of the origin of the rubberband..

The RubberbandWidth property is the current width.

See Also

Topics:

Working with the Control: Client Area Usage


SetSrcClipRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetSrcClipRect (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | SetSrcClipRect (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Displaying an Image.

Remarks

Sets the source clipping rectangle that is used when painting an image.

The clipping rectangle specifies the portion of the source rectangle to paint. This is used for updating the display when part of the source bitmap has changed.

See Also

Elements: | SetDstClipRect method, SetDstRect method, SetSrcRect method
Topics: | Raster Images: Displaying Images


SetSrcRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SetSrcRect (int iLeft, int iTop, int iWidth, int iHeight);
Delphi Syntax | SetSrcRect (iLeft, iTop, iWidth, iHeight: Integer): Integer;
Overview | Refer to Displaying an Image.

Remarks

Sets the source rectangle that is used when painting an image.

The source rectangle specifies the part of the bitmap to use as the display source.

See Also

Elements: | SetDstClipRect method, SetDstRect method, SetSrcClipRect method
Topics: | Raster Images: Displaying Images


SetTag method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall SetTag(Shortint uTag, Shortint uType, unsigned uCount, const Variant &vData);
Delphi Syntax | SetTag (uTag : word; uType : word; uCount: LongWord; vData : Variant): Integer int;
Overview | Refer to Implementing TIFF Tags

Remarks

Sets tags to be written to a file. The set tags will actually be written when the WriteTag method or one of the SaveXXX methods is called. This process is similar to the process of writing comments to files using the Comment property and the WriteComment method or Save method.

Only TIFF files support tags. The TIFF specification reserved tags 1 to 32767 for general use (restricted tags) and recommends that tags 32768 to 65535 should be used for application use (user-defined tags). To avoid two applications using the same user-defined tag, it is also recommended that the user-defined tags should be registered with the TIFF administrator (Adobe).

The contact address for the TIFF administrator, as of Nov 5, 1999 is:

Adobe Developers Association

1585 Charleston Road

P.O. Box 7900

Mountain View, CA 94039

E-mail: gapdevsup@adobe.com

The control will maintain a list of tags that have been set. To remove a tag from the list, call SetTag(lTag, 0, 0, NULL).

To remove all tags from the list, call SetTag(0,0,0,NULL). Note that ReadTag method uses tag 0, so you cannot set it by calling SetTag.

See Also

Elements: | WriteTag method, ReadTag method, GetTagData method, GetTagCount method, GetTagType method, Comment property, Save method
Topics: | Raster Images: Getting and Setting File Information


Sharpen method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Sharpen (int iChange);
Delphi Syntax | Sharpen (iChange:Integer): Integer;
Overview | Refer to Detecting and Enhancing Edges and Lines.

Remarks

Increases or decreases the sharpness of the image in the bitmap.

Negative values decrease the sharpness of the image. Specify -1000 for minimum sharpness. Positive values increase the sharpness. Specify +1000 for maximum sharpness.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


Shear method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Shear (int iAngle, bool bHorizontal, int crFill);
Delphi Syntax | Shear (iAngle:Integer; bHorizontal:Boolean; crFill:TColorRef): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Moves the corners of the bitmap in the fashion of a parallelogram.

You specify an angle of slant, horizontal or vertical shear, and the fill color for the created space. The angle is expressed in hundredths of degrees, with a limit of 4500 (45 degrees).

The following are horizontal and vertical examples:

See Also

Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Methods That Transform the Region and the Bitmap


ShiftData method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShiftData(TBitmapHandle SrcBitmap, unsigned uSrcLowBit, unsigned uSrcHighBit, unsigned uDstLowBit, unsigned uDstBitsPerPixel);
Delphi Syntax | Function ShiftData (SrcBitmap: TBitmapHandle; uSrcLowBit: L_UINT; uSrcHighBit: L_UINT; uDstLowBit: L_UINT; uDstBitsPerPixel: L_UINT): L_INT;
Overview | Refer to Grayscale Images

Remarks

(Medical only) Selects a specified number of bits from an 8, 12 or 16-bit grayscale bitmap, creates a mask using these bits, and places the mask in a new 8, 12 or 16-bit grayscale bitmap.

The method is used mainly as a visualization aid. You can select certain bits of the bitmap and display them in another bitmap.

You can use this method for other purposes than visualization. For example, let’s say you loaded a 16-bit file that has the pixels in Motorola format (where the high and low bytes are swapped). You can swap the high and low 8 bits for each pixel by calling this method twice and OR-ing the results.

When the method returns successfully the destination bitmap (the bitmap currently loaded in the Main Control and accessed through the Bitmap property (Main Control)) will be an 8, 12 or 16-bit grayscale.

For 8, 12 and 16-bit grayscale bitmaps, the uSrcLowBit can range from 0 to 7, 0 to 11, and 0 to 15 respectively. However if this value exceeded the range then the method will not return an error, and the Bitmap property (Main Control) will contain a pure black bitmap.

The uSrcHighBit parameter must be greater than or equal to the uSrcLowBit parameter. The method will return an invalid parameter error if uSrcHighBit < uSrcLowBit.

The uDstLowBit parameter can range from 0 to uDstBitsPerPixel -1. If you pass greater values for uDstLowBit, the method will not return an error, but the destination bitmap (the bitmap currently loaded in the Main Control and accessed through the Bitmap property (Main Control)) will become a pure black bitmap.

The following example shows you how to treat a 16-bit grayscale bitmap:

In a16-bit grayscale bitmap, the bits are ordered as b15 b14 b13 ... b2 b1 b0. You can choose the bit from where to start moving the bits.

For example, if the mask starts at the fourth bit (b3), with a length equal to 6 bits, the destination starting position is 4 and we want to create an 8-bit destination bitmap:

uSrcLowBit = 3

uSrcHighBit = 8

uDstLowBit = 4

uDstBitsPerPixel = 8

Source bitmap (SrcBitmap):

-------------------

b15 b14 b13 b12 b11 b10 b9 |b8 b7 b6 b5 b4 b3| b2 b1 b0

-------------------

0 1 1 0 1 1 1 0 1 0 0 1 1 1 0 1

Destination bitmap (Loaded bitmap):

-------------

|b7 b6 b5 b4| b3 b2 b1 b0

-------------

0 0 1 1 0 0 0 0

Notice that b7 and b8 of SrcBitmap are truncated in the destination bitmap since there is no space for them.

This method supports 8, 12 and 16-bit grayscale bitmaps only. Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits. It also can process the whole image or a region of the image. If a bitmap has a region, the effect is applied only to the region.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | SelectData method, ColorizeGray method.
Topics: | Raster Images: Doing Color Expansion or Reduction


ShowMagGlass method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShowMagGlass(bool bShowMagGlass);
Delphi Syntax | Function ShowMagGlass(bShowMagGlass: Boolean): L_INT;
Overview | Refer to Using the Magnifying Glass

Remarks

Shows or hides the Magnifying Glass on the screen.

This method is used to control the display of the Magnifying Glass on the screen when the user is manually updating the Magnifying Glass. It is used in conjunction with the SetMagGlassPos method. To manually update the Magnifying Glass, MAGGLASS_MANUAL_UPDATE must be set in the MagGlassFlags property.

This method can be called with bShowMagGlass set to TRUE, when the left mouse button is pressed, to show the Magnifying Glass. It can be called with bShowMagGlass set to FALSE when the left mouse button is released to hide the Magnifying Glass.

Note:

This method can be used only if the MAGGLASS_MANUAL_UPDATE flag was set in the MagGlassFlags property.

See Also

Elements: | MagGlassFlags property, OnMagGlassCursor event, StartMagGlass method, StopMagGlass method, SetMagGlassPos method, UpdateMagGlassFromHandle method
Topics: | Raster Images: Displaying Images


ShowPanWin method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ShowPanWin (bool bShow);
Delphi Syntax | ShowPanWin (bShow:Boolean): Integer;
Overview | Refer to Using a PanWindow.

Remarks

Shows or hides the PanWindow. Can only be used if the main control currently has a bitmap loaded.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, OnPanWin event
Topics: | Raster Images: Displaying and Printing


Size method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Size (int iWidth, int iHeight, int iFlags);
Delphi Syntax | Size (iWidth, iHeight, iFlags:Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Resizes the bitmap to a new width and height.

This changes the storage requirements of the bitmap, and it is not the same as scaling the display (zooming out or zooming in).

See Also

Elements: | ApplyTransformationParameters method, GetMarksCenterMass method, GetTransformationParameters method, IsRegMark method, SearchRegMarks method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Methods That Transform the Region and the Bitmap
 | Raster Image Functions: Document Imaging
 | Detecting Registration Marks


Skeleton method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Skeleton(unsigned uThreshold);
Delphi Syntax | Function Skeleton (uThreshold: L_UINT): L_INT;
Overview | Refer to Detecting and Enhancing Edges and Lines

Remarks

(Medical only) Finds the skeleton of objects or regions in a bitmap.

This method finds the skeleton of regions or objects in a binary bitmap. The white color represents the objects and the black color represents the background. If the bitmap is not a 1-bit image, the threshold will be used to transform the bitmap into a binary image before finding the skeleton.

If the bitmap has a region, this method works only on the region.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Combine, IntensityDetect, Sharpen, SpatialFilter, EdgeDetector, GlowFilter, Correlation
Topics: | Raster Images: Filtering Images


Smooth method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Smooth (unsigned uProcessFlags, int nLength);
Delphi Syntax | Function Smooth (uProcessFlags: L_UINT32; nLength: L_INT32):L_INT;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)Smoothes the bumps and fills in the nicks of a 1-bit black and white image.

This method smoothes the text in scanned text documents.

The behavior of this method can be modified by using the OnSmooth event.

This method works only on 1-bit black and white images.

If a region is selected, only the selected region will be changed by this method. If no region is selected, the whole image will be processed.

This method triggers both the OnSmooth event and the OnStatus event.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | OnSmooth event
Topics: | Raster Images: Cleaning - up 1-Bit Images


SmoothEdges method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SmoothEdges(unsigned uAmount, unsigned uThreshold);
Delphi Syntax | Function SmoothEdges (uAmount: L_UINT; uThreshold: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

Smoothes the rough edges in the image.

This method performs edge detection, then smoothes those edges that are found. The other points of the image are unchanged.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Sharpen method, Mosaic method, Emboss method, Median method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Solarize method.
Topics: | Raster Images: Filtering Images


Solarize method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Solarize (Cardinal uThreshold);
Delphi Syntax | Solarize (uThreshold: Cardinal): Integer;
Overview | Refer to Applying Artistic Effects.

Remarks

Applies an effect that mimics the accidental exposure of photographic film to light. It does so by inverting all color data with an intensity value greater than or equal to the threshold that you specify.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Topics:

Raster Images: Filtering Images


SpatialFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SpatialFilter (int iType);
Delphi Syntax | SpatialFilter (iType:Integer): Integer;
Overview | Refer to Detecting and Enhancing Edges and Lines.

Remarks

Imposes a spatial filter on the bitmap. Spatial filters are used for operations such as sharpening an image or detecting edges within the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method works best with 24-bit, 16-bit, or grayscale bitmaps. If a bitmap uses a color palette, this method matches the new brightness value of each pixel to the nearest color in the existing palette.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Topics: | Raster Images: Filtering Images
 | Raster Images: Where the Region Preempts the Bitmap


Spherize method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Spherize(int nValue, const TPoint &ptCenter, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Spherize (nValue: L_INT; ptCenter: TPoint; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Warps the image around a 3D spherical shape.

This method will warp the image as a 3D spherical shape around the specified ptCenter. The center point must be defined inside the bitmap or inside the region, if the bitmap has a region.

If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowSpherizeDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


StartFeedLoad method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int StartFeedLoad (int iBitsPerPixel, int iPage, int iPages);
Delphi Syntax | StartFeedLoad (iBitsPerPixel, iPage, iPages: Integer): Integer;
Overview | Refer to Loading a Bitmap from Your Own Buffer.

Remarks

Initializes a file-load process in which you control the input stream. You must call the FeedLoad method to supply buffered data, and you must call StopFeedLoad method when the loading is complete.

This file-load process is useful when receiving transmitted images, such as those on the Internet. It works the same way as the Load method , except that your code supplies the image data. The file-load process works as follows:

1. | You call the StartFeedLoad method to initialize the file-load process.
2. | You create a buffer, and each time you fill it with information, you call the FeedLoad method, which sends the data to the file-load process just as if the data were being read from a file on disk.
3. | Whenever it has enough data to do so, the file-load process behaves the same as in the Load method. It allocates and begins loading the bitmap. It generates a OnStatus event whenever it has enough data in its input buffer.

The file-load process does not update information in the bitmap handle until it has received enough information to do so. (Usually, the information, such as the bitmap height and width, is in the file header.) The file-load process will generate the first OnStatus event whenever this information is available.

4.

To end the file-load process, you call the StopFeedLoad method, which cleans up the process. If you call this method before supplying the complete file, it will successfully clean up the process, but will return a file-read error. You should trap the error if the load is canceled purposely.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Elements: | Load method, LoadStamp method, LoadMemory method
Topics: | Raster Images: Loading Files


StartMagGlass method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall StartMagGlass(int nWidth, int nHeight, int nZoom, Graphics::TColor clrPen, Graphics::TColor,clrBack, bool bEllipse, int nBorderSize, bool b3D, int nCrosshair, bool bIgnoreRgn, bool bCenter);
Delphi Syntax | function StartMagGlass (nWidth :Integer; nHeight:Integer; nZoom :Integer; clrPen : TCOLOR; clrBack : TCOLOR; bEllipse:Boolean; nBorderSize : Integer; b3D : Boolean; nCrosshair: Integer; bIgnoreRgn: Boolean; bCenter : Boolean):Integer;
Overview | Refer to Using the Magnifying Glass

Remarks

Starts the Magnify Glass procedure.

The appearance of the magnifying glass depends on the values of bEllipse, clrPen, b3D and nBorderSize. This can be seen in the table below:

bEllipse | b3D | nBorderSize | clrPen | Result
TRUE | Ignored | Valid | Valid | An elliptical magnifying glass of border size nBorderSize and border color clrPen.
FALSE | FALSE | Valid | Valid | A rectangular magnifying glass with a flat border of width nBorderSize and border color clrPen.
FALSE | TRUE | Ignored | Ignored | A rectangular magnifying glass with a 3D border having a set width and color.

The following properties can be used to control the painting options for the magnifying glass:

MagGlassPaintPalette property

MagGlassBitonalScaling property

MagGlassPaintDither property

MagGlassPaintScaling property

The cursor for the magnifying glass can have one of the following default shapes:

When bEllipse = TRUE, the default cursor will be:

When bEllipse = FALSE, the default cursor will be:

A custom shape can be used by setting the following property:

MagGlassPointer

For an example that shows how to set a custom cursor, refer to:

MagGlassPointer Delphi example

MagGlassPointer C++ Builder example

See Also

Elements: | StopMagGlass method, MagGlassPaintPalette property, MagGlassBitonalScaling property, MagGlassPaintDither property, MagGlassPaintScaling property, MagGlassMaskCount property, MagGlassMask property
Topics: | Raster Images: Displaying Images


StopFeedLoad method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int StopFeedLoad (void);
Delphi Syntax | StopFeedLoad: Integer;
Overview | Refer to Loading a Bitmap from Your Own Buffer.

Remarks

Ends a file-load process in which you control the input stream. This cleans up all the variables and buffers allocated by the StartFeedLoad method and the FeedLoad method, and resets all internal variables to their default settings.

You must call this method to complete a file load that was started with the StartFeedLoad method. If you call this method before supplying the complete file, it will successfully clean up the process, but will return a file-read error. You should trap the error if the load is canceled purposely.

For a description of how the methods relate to each other, refer to the StartFeedLoad method.

See Also

Topics:

Raster Images: Loading Files


StopMagGlass method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall StopMagGlass(void);
Delphi Syntax | function StopMagGlass:Integer;
Overview | Refer to Using the Magnifying Glass

Remarks

Stops the Magnify Glass procedure.

See Also

Elements: | StartMagGlass method, MagGlassPaintPalette property, MagGlassBitonalScaling property, MagGlassPaintDither property, MagGlassPaintScaling property, MagGlassMaskCount property, MagGlassMask property, MagGlassPointer property.
Topics: | Raster Images: Displaying Images


StretchIntensity method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int StretchIntensity (void);
Delphi Syntax | StretchIntensity: Integer;
Overview | Refer to Changing Brightness and Contrast.

Remarks

Increases the contrast in a bitmap by centering, maximizing, and proportioning the range of intensity values.

Unlike the Contrast method, this method always retains the original number of different intensity values. (Ordinary contrast adjustments can lose values at the high and low ends of the scale.)

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements: | Intensity method, GammaCorrect method, Contrast method, HistoContrast method, HistoEqualize method
Topics: | Raster Images: Modifying Intensity Values
 | Raster Images: Where the Region Preempts the Bitmap


SubtractBackground method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int SubtractBackground(unsigned uRollingBall, unsigned uShrinkSize, unsigned uBrightnessFactor, unsigned uFlags);
Delphi Syntax | Function SubtractBackground (uRollingBall: L_UINT; uShrinkSize: L_UINT; uBrightnessFactor: L_UINT; uFlags: L_UINT): L_INT;
Overview | Refer to Changing Brightness and Contrast

Remarks

(Raster Pro and above toolkits) Removes the background from the image.

This method is useful, especially with medical images and grayscale bitmaps in correcting non-uniform brightness.

The rolling ball algorithm works as follows:

1. | Consider the bitmap to be a 3-D surface and the z-axis to be the intensity of the image (the component V from the HSV color space).
2. | Roll a 3-D ball beneath the surface so all the points of the ball are under the surface with one or more points of the ball tangent to the surface.
3. | The tangent points to the rolling ball are considered to be the background.

Subtract the background from the original image.

The Rolling Ball Radius should be at least as large as the radius of the largest object in the image that is not part of the background to ensure the separation of the background from any objects.

A small radius allows the detection of small objects, whereas a larger radius will detect both small and large objects.

When subtracting the background, sometimes the result is dim. In such a case you can enhance the brightness after subtracting the background by using the uBrightness factor with methods similar to Multiply. Passing 100 for uBrightness leaves the brightness unchanged.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddShadow method, ChangeHueSatInt method, ColorReplace method, ColorThreshold method, MathFunction method, Segment method, UserFilter method.
Topics: | Raster Images: Modifying Intensity Values


SwapColors method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall SwapColors (int nFlags);
Delphi Syntax | Function SwapColors (nFlags: Integer): Integer;
Overview | Refer to Correcting Colors.

Remarks

Swaps the specified color channels.

This method changes the bitmap data.

This method can process the whole image or a region of the image.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method supports signed data images.

See Also

Elements: | ConvertToColoredGray method, BalanceColors method, GrayScale method, GrayScaleExt method, IsGrayScale property
Topics: | Raster Images: Modifying Intensity Values


Swirl method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Swirl(int nAngle, const TPoint &ptCenter);
Delphi Syntax | Function Swirl (nAngle: L_INT; ptCenter: TPoint ): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Spins the image according to the rotation angle to produce a swirl pattern.

The method swirls the image around the specified ptCenter. The center point must be defined inside the bitmap, or inside the region, if the bitmap has a region. If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Wave method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowSwirlDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap


TextureAlphaBlend method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TextureAlphaBlend(int nXDst, int nYDst, int nWidth, int nHeight, TBitmapHandle SrcBitmap, int nXSrc, int nYSrc, TBitmapHandle MaskBitmap, int nOpacity, TBitmapHandle UnderlayBitmap, PPoint pOffset);
Delphi Syntax | Function TextureAlphaBlend (nXDst: L_INT; nYDst: L_INT; nWidth: L_INT; nHeight: L_INT; SrcBitmap: TBitmapHandle; nXSrc: L_INT; nYSrc: L_INT; MaskBitmap: TBitmapHandle; nOpacity: L_INT; UnderlayBitmap: TBitmapHandle; pOffset: pPOINT): L_INT;
Overview | Refer to Combining Images

Remarks

(Raster Pro and above toolkits) Combines image data from MaskBitmap and UnderlayBitmap with an underlay effect. The result is used as a fade mask that will be used to combine SrcBitmap and the destination bitmap (the bitmap currently loaded in the Main Control and accessed through the Bitmap property (Main Control)) with variable opacity. The result is combined again with the destination bitmap using a constant opacity specified in iOpacity.

To use this method, the user must unlock the Raster Pro features by calling UnlockSupport method using the L_SUPPORT_LTPRO option type.

To combine two bitmaps with a fixed opacity, use the AlphaBlend method.

To combine two bitmaps with feathering, use the FeatherAlphaBlend method.

To create a bitmap that contains a fade mask, use the CreateFadedMask method.

This method also supports 12 and 16-bit grayscale bitmaps. Support for 12 and 16 - bit grayscale images is available only in the Document/Medical toolkits.

The following is an example using this method with the following characteristics:

The source bitmap is a red image.

The destination bitmap is a white image.

The opacity is set to 255.

The right image is the result of applying the method without texture bitmap.

The left image is the result of applying the method with texture bitmap.

.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Underlay method, Combine method, AlphaBlend method, FeatherAlphaBlend method, CreateFadedMask method.
Topics: | Raster Images: Combining Images


TransformFile method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int TransformFile(AnsiString szNameSrc, AnsiString szNameDst, int iTransform, int nPage);
Delphi Syntax | Function TransformFile(szNameSrc: String; szNameDst: String; iTransform: Integer; nPage: Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps

Remarks

Performs a lossless transformation for certain formats. Currently, only JPEG, CMP and JPEG TIFF formats are supported.

The flip and reverse flags can be combined with the rotate flags. More than one rotate flags cannot be combined.

Be careful when combining flags, because unexpected results are possible. For example, combining flip, reverse and 180 degree rotation produces a no-transform. Flip and reverse produce a 180 degree rotation which, when combined with another 180 degree rotation produces a 0 degree rotation (a no-transform).

The rotation transformations are performed before the flip/reverse operations.

See Also

Elements: | OnTransformMarker event, WriteMarker method, WriteMarkerAction property
Topics: | Raster Images: Doing Geometric Transformations


Trim method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Trim (int nLeft, int nTop, int nWidth, int nHeight);
Delphi Syntax | Trim (nLeft, nTop, nWidth, nHeight:Integer): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

Trims the bitmap, resulting in a bitmap that is the size of the specified rectangle.
If a region is defined for the bitmap, the region is also trimmed if necessary.

See Also

Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Methods That Transform the Region and the Bitmap


Tunnel method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Tunnel(const TPoint &ptCenter, unsigned uZValue, int nDistance, unsigned uRad, int nRepeat, int nRotationOffset, unsigned uStretch, unsigned uStartBright, unsigned uEndBright, unsigned uBrightLength, unsigned crBright, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Tunnel (ptCenter: TPoint; uZValue: L_UINT; nDistance: L_INT; uRad: L_UINT; nRepeat: L_INT; nRotationOffset: L_INT; uStretch: L_UINT; uStartBright: L_UINT; uEndBright: L_UINT; uBrightLength: L_UINT; crBright: COLORREF; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits) Places the bitmap inside a tunnel along the Z-axis.

This method shows the effect of placing a bitmap inside a tunnel along the Z-axis. An external light source of the specified color and brightness may be shined on the bitmaps. The brightness may vary along the z-axis according to the uBrightLength value.

Changing the camera center point, the rotation angle and the viewing screen Z-offset will simulate moving along the axis.

If the bitmap has a region, the effect will be applied on the region dimensions only.

Support for 12 and 16-bit grayscale images are available only in the Document/Medical toolkits.

For an example, see the following figure:

The following figure shows the same bitmap, after the effect has been applied:

To obtain this effect, the following settings were used with the method:

ptCenter(x,y) = (200,200)

uZValue= 0

nDistance= 200

uRad= 200

nRepeat= -1

nRotationOffset= 75

uStretch= 25

uStartBright= 0

uEndBright= 100

uBrightLength= 45

crBright= RGB(255,255,255)

crFill= RGB(255,255,255)

uFlags= PLANE_FILL_CLR|TUN_AXIS_WIDTH

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, BumpMap method, Cubism method, DrawStar method, FreePlaneBend method, FreeRadBend method, GlassEffect method, GlowFilter method, LensFlare method, Light method, Ocean method, PlaneBend method, Plane method, SampleTarget method, Dry method, Bending method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar Method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, ZoomWave method
Topics: | Raster Images: Artistic Effects
 | Using Color Values in LEADTOOLS


Underlay method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Underlay (TBitmapHandle Bitmap, unsigned uFlags);
Delphi Syntax | Function Underlay (Bitmap:TBitmapHandle; uFlags: L_UINT): L_INT;
Overview | Refer to Combining Images.

Remarks

Combines two bitmaps so that one appears to be an underlying texture for the other. This is most effective when the underlying image is a filtered one, such as an embossed image.

This method changes the colors of the underlay to grayscale as it combines the images. It updates the current bitmap, leaving the second bitmap (Bitmap) unchanged. The underlying image can either be stretched or tiled to fill the target image, as shown in the following illustration:

If a region is defined for the target bitmap, the underlay is applied to the region, not to the whole bitmap. (Any region defined for the underlay bitmap is ignored.)

See Also

Topics: | Raster Images: Combining Images
 | Examining and Altering Bitmaps
 | Applying Artistic Effects


UnlockSupport method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void UnlockSupport (int iType, System::AnsiString sPass);
Delphi Syntax | UnlockSupport (iType:Integer; sPass:String);
Overview | Refer to Miscellaneous Methods and Properties.

Remarks

Unlocks support for an optional feature, such as LEADTOOLS Document/Medical capabilities.

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

Note:

Unlocking the Document/Medical capabilities is necessary only if you upgrade another product to a Document/Medical product. If your current LEADTOOLS package is labeled Document/Medical, the Document/Medical capabilities are enabled automatically; your application does not have to unlock them.

See Also

Topics:

Support: Version and License Information


UnsharpMask method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall UnsharpMask (int nAmount, int nRadius, int nThreshold,unsigned uColorType);
Delphi Syntax | Function UnsharpMask (nAmount: Integer; nRadius: Integer; nThreshold: Integer; uColorType: Cardinal): Integer;
Overview | Refer to Detecting and Enhancing Edges and Lines.

Remarks

This method is actually considered a sharpening method. It is used to sharpen the image with a minimum of noise by applying the unsharp mask. To reduce the noise, it starts by blurring a copy of the original image. The amount of blur depends on iRadius. The method then determines the difference between each pixel's value of the original image and the corresponding pixel's value in the blurred image. If the difference is greater than the iThreshold value, then the difference between the pixel values is multiplied by the value in the iAmount parameter and added to the original pixel value.

To get the same results with your images, you can use the following settings:

iAmount = 500 // (or more)
iRadius = 1
iThreshold = 0

To increase the thickness of the sharpened edges, increase the value of iRadius.

To increase the amount of sharpness, increase the value of iAmount.

To reduce the noise and eliminate the small edges or individual pixels that will produce noise in image, increase the value of iThreshold.

Using the YUV color space decreases the processing time.

This method supports 12 and 16-bit grayscale images and 48 and 64-bit color images. Support for 12 and 16-bit grayscale images and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | Sharpen method, Posterize method, Mosaic method, Emboss method, Median method, AddNoise method, IntensityDetect method, SpatialFilter method, BinaryFilter method, MaxFilter method, MinFilter method, Oilify method, Solarize method, WindowLevel method, GaussianFilter method
Topics: | Raster Images: Filtering Images


UpdateMagGlassFromHandle method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int UpdateMagGlassFromHandle(TBitmapHandle Bitmap, bool bUpdateBitmap);
Delphi Syntax | Function UpdateMagGlassFromHandle (Bitmap: TBitmapHandle; bUpdateBitmap: Boolean ): L_INT;
Overview | Refer to Using the Magnifying Glass

Remarks

Updates the bitmap that Magnify Glass uses to paint the zoomed area.

The idea is to provide a new bitmap that the Magnifying Glass can use to display the zoomed area from. The dimensions of this passed bitmap should be equal to the dimensions of the Magnifying Glass bitmap.

A TRUE value of bUpdateBitmap flag means that update the Main Control’s bitmap with the parts of the passed bitmap as the Magnifying Glass moves over the Main Control’s bitmap.

Note:

This method can be used only if the MAGGLASS_MANUAL_UPDATE flag was set in the MagGlassFlags property.

See Also

Elements: | MagGlassFlags property, OnMagGlassCursor event, StartMagGlass method, StopMagGlass method, ShowMagGlass method, SetMagGlassPos method.
Topics: | Raster Images: Displaying Images


UpdateMagGlassShape method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int UpdateMagGlassShape (int nMagGlassShape, L_HANDLE hMagGlassRgn);
Delphi Syntax | function UpdateMagGlassShape(nMagGlassShape: L_INT; hMagGlassRgn: L_HANDLE): L_INT;
Overview | Refer to Using the Magnifying Glass

Remarks

Remarks

Updates the magnifying glass shape.

The width and height of the magnifying glass will be changed according to the width and height of the passed hMagGlassRgn parameter if the uMagGlassShape parameter was set to MAGGLASS_SHAPE_HRGN.

See Also

Elements: | StartMagGlass method, StopMagGlass method
Topics: | Raster Images: Displaying Images


UserFilter method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int UserFilter(unsigned ufltWidth, unsigned ufltHeight, const TPoint &ufltCenter, unsigned ufltDivisor, int nfltOffset, L_PINT ufltMatrix, unsigned ufltFlags);
Delphi Syntax | Function UserFilter (ufltWidth: L_UINT; ufltHeight: L_UINT; ufltCenter: TPoint; ufltDivisor: L_UINT; nfltOffset: L_INT; ufltMatrix: L_PINT; ufltFlags: L_UINT): L_INT;
Overview | Refer to Removing Noise

Remarks

(Raster Pro and above toolkits) Filters the bitmap based on a user-defined filter / mask. This method is similar to the spatial and binary filter functions.

With this method you can create a user-defined filter and apply it to the image. The selected filter is passed as a parameter to this method. The filter has a rectangular form (matrix) where the values are user-defined. It allows the creation of simple customized filters, where each value found in matrix is multiplied by the corresponding pixel, and then the specified operation is performed on the results.

Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

When the filter is applied to pixels from the edge and you choose the sum operation, the edge rows and columns are duplicated. For example, if the pixel (-1, 5) is needed, the pixel (0, 5) is used instead.

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Sharpen method, Average method, Median method, SpatialFilter method, BinaryFilter method
Topics: | Raster Images: Filtering Images


Wave method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Wave(unsigned uAmplitude, unsigned uWaveLen, int nAngle, unsigned uHorzFact, unsigned uVertFact, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function Wave (uAmplitude: L_UINT; uWaveLen: L_UINT; nAngle: L_INT; uHorzFact: L_UINT; uVertFact: L_UINT; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Distorts the bitmap with two perpendicular waves at the specified angle and with the specified wave type.

The method applies two perpendicular waves. The uHorzFact and uVertFact parameters control the size of these waves.

If the bitmap has a region, the effect will be applied on the region only.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wind method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowWaveDlg method
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


Wind method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int Wind(unsigned uDim, int nAngle, unsigned uOpacity);
Delphi Syntax | Function Wind (uDim: L_UINT; nAngle: L_INT; uOpacity: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Creates thin lines, directed along the specified angle, on the specified bitmap.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, ZoomBlur method, ZoomWave method, AddWeightedBitmaps method, ShowWindDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects


WindowLevel method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int WindowLevel (void);
Delphi Syntax | WindowLevel: Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical only) Converts a 12 or 16-bit grayscale image to an 8-bit grayscale or a 24-bit color bitmap, if the WindowLevelBitmap property has been set to TRUE.

There are four properties associated with this method: LevelLowBit property, LevelHighBit property, LevelLUT property and LevelLUTLength property. They are all reset to their default values within this method.

This method applies window leveling to the bitmap, changing the image data to match the display image.

This method supports 12 and 16-bit grayscale images. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Elements: | LevelLowBit property, LevelHighBit property, LevelLUTLength property
 | LevelLUT property, GetMinMaxBits method, GetMinMaxVal method
Topics: | Raster Images: Palettes


WindowLevelFillLUT method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall WindowLevelFillLUT (unsigned crStart, unsigned crEnd, int nLow, int nHigh, int nLowBit, int nHighBit, int nMinValue, int nMaxValue, bool bInside);
Delphi Syntax | Function WindowLevelFillLUT (crStart: TColorRef; crEnd: TColorRef; nLow: Longint; nHigh: Longint; nLowBit: Integer; nHighBit: Integer; nMinValue: Longint; nMaxValue: Longint; bInside: Boolean): Integer;
Overview | Refer to Examining and Altering Bitmaps.

Remarks

(Medical Imaging only) Maps grayscale intensities to a specified color range, and fill the LevelLUT property with these values.

Note:

This method only works for 12 or 16 bit grayscale images. Trying to use this method with other images will result in an error.

For example, suppose you are working with a 12-bit grayscale image. There are 4096 intensity levels in a 12-bit image (2 raised to the 12th power). Normally, the interval between 0 and 4095 would be mapped to colors between (0, 0, 0) and (255, 255, 255). With this method, any value that falls between nLow and nHigh will be mapped to colors between the start color and the end color. If you do not want a color gradient, set the start color equal to the end color.

If you only want to map the values between 1972 and 3273 (in a 12-bit image), then set nLow to 1972, set nHigh to 3273, and set bInside to TRUE. To map the values less than 1972 and greater than 3273, set bInside to FALSE.

See Also

Elements:

WindowLevel method, GetWindowLevel method, LevelLUT property


WriteComment method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall WriteComment(char * pszFile, int lPage);
Delphi Syntax | Function WriteComment (pszFile : PCHAR ; lPage:LongInt): Integer;
Overview | Refer to Maintaining File Comments.

Remarks

Writes comments to an existing file.

This method writes all the comments set in the Comment property to the specified file, just like the Save method. However, the WriteComment method only writes the comments to the file. It does not overwrite the image stored in the file with the control’s bitmap. Any comments already in the file will be overwritten.

For more information on setting comments, refer to the Comment property. For more information on saving files, refer to the Save method. For information on reading comments, refer to the ReadComment method.

See Also

Elements: | Comment property, Save method, ReadComment method
Topics: | Raster Images: Getting and Setting File Information


WriteMarker method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int WriteMarker (int iMarker, int lSize, void * pData);
Delphi Syntax | Function WriteMarker (iMarker: Integer; lSize: Longint; pData: Pointer): Integer;
Overview | Refer to Examining and Altering Bitmaps

Remarks

Writes the transformed marker to the file.

This method can only be called from inside the OnTransformMarker event.

After calling this method, it is best to set the WriteMarkerAction property to WRITEMARKER_SKIP. Otherwise, this marker can occur twice in the file.

See Also

Elements: | WriteMarkerAction property, OnTransformMarker event
Topics: | Raster Images: Doing Geometric Transformations


WriteMetaData method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int WriteMetaData (AnsiString strFileName, unsigned uFlags);
Delphi Syntax | Function WriteMetaData (strFileName:String; uFlags: Cardinal): Integer;
Overview | Refer to Implementing Markers.

Remarks

Writes metadata of the specified type to the specified file.

This method can be used to update an existing file (strFileName) with comments, tags and/or markers.

The comments are set by setting the Comment property and then calling either the Save method, the SaveMemory method or the WriteComment method.

The tags are set by calling the SetTag method, prior to calling this method.

The markers are set by calling the SetMarkers method, prior to calling this method.

See Also

Elements: | CreateMarkers method, WriteMetadata method, TransformFile method, EnumMarkers method, InsertMarker method, GetMarker method, Count property, CopyMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, OnEnumerateMarkers event, SetMarkers method, Save method, SaveBuffer method, SaveMemory method, SaveOffset method, TransformFile method, MarkerType property, GetMarkers method, SetTag method
Topics | Raster Images: Markers


WriteTag method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall WriteTag(char * pszFile, int lPage);
Delphi Syntax | Function WriteTag (pszFile: PCHAR; lPage: LongInt): Integer;
Overview | Refer to Implementing TIFF Tags

Remarks

Writes the tag(s) to the specified file.

For more information on setting tags, refer to the SetTag method.

See Also

Elements: | EnumTags method, OnEnumTags event, SetTag method, ReadTag method, GetTagType method, GetTagCount method, GetTagData method, Save method, Comment property
Topics: | Raster Images: Getting and Setting File Information


ZoomBlur method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ZoomBlur(unsigned uDim, unsigned uStress, const TPoint &ptCenter);
Delphi Syntax | Function ZoomBlur (uDim: L_UINT; uStress: L_UINT; ptCenter: TPoint): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Blurs the image along radial lines starting from the specified center point.

The method will blur and zoom the image around the specified ptCenter. The center point must be defined inside the bitmap, or inside the region if the bitmap has a region. If the bitmap has a region, the effect will be applied on the region only.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomWave method, AddWeightedBitmaps method, ShowZoomBlurDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap


ZoomIn method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ZoomIn (void);
Delphi Syntax | ZoomIn Integer;
Overview | Refer to Capturing an Image from the Screen.

Remarks

Changes the mouse pointer to a magnifying glass in the center of a rectangle and begins a "ZoomIn" screen capture. When the user moves the mouse pointer, the area inside the "ZoomIn" rectangle is captured to the Main Control and zoomed by the amount specified in the PaintZoomFactor property.

The initial size of the zoom rectangle is based on the size of the control and the existing PaintZoomFactor property at the time ZoomIn is called. During the capture, pressing the +,- or PageUp, PageDown keys will adjust the ZoomIn rectangle and zoom factor. Once the left mouse button is clicked, the capture is completed, the image is stored in the Main Control's Bitmap, and the OnZoomInDone event is generated.

There is one property associated with this method. The EnableZoomInRect property determines whether or not to show the ZoomIn rectangle.

See Also

Elements: | OnZoomInDone event, Capture method, EnableZoomInRect property
Topics: | Raster images: Capturing a screen image


ZoomToRect method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ZoomToRect (int nLeft, int nTop, int nWidth, int nHeight);
Delphi Syntax | ZoomToRect (nLeft, nTop, nWidth, nHeight: Integer): Integer;
Overview | Refer to Displaying an Image

Remarks

Adjusts the destination display rectangle to zoom in on the part of the image that you specify.

You specify a rectangle in the Main Control's client area. This method increases the dimensions of the destination display rectangle so that your rectangle is enlarged and centered to fit the client area. If scroll bars are turned on, they are adjusted to the new size and position.

Because of a Windows limitation, destination rectangle measurements(in pixels), cannot exceed the maximum value of an integer. On WIN32 systems, however, this is rarely a problem.

See Also

Topics:

Raster Images: Displaying Images


ZoomWave method (Main Control)

C++ Builder example

Delphi example

Builder Syntax | int ZoomWave(unsigned uAmplitude, unsigned uFrequency, int nPhase, unsigned uZoomFact, const TPoint &ptCenter, unsigned crFill, unsigned uFlags);
Delphi Syntax | Function ZoomWave (uAmplitude: L_UINT; uFrequency: L_UINT; nPhase: L_INT; uZoomFact: L_UINT; ptCenter: TPoint; crFill: COLORREF; uFlags: L_UINT): L_INT;
Overview | Refer to Applying Artistic Effects

Remarks

(Raster Pro and above toolkits only) Distorts the bitmap with a wave zoomed from the specified center.

The method applies a sinusoidal wave zoomed from the specified center. The center point must be defined inside the bitmap, or inside the region, if the bitmap has a region. If the bitmap has a region, the effect will be applied on the region only.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

This method does not support signed data images. It Returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements: | AddNoise method, Bending method, Emboss method, Mosaic method, MotionBlur method, Oilify method, Posterize method, RemoveRedeye method, Solarize method, Underlay method, Cylindrical method, FreeHandShear method, FreeHandWave method, Impressionist method, Pixelate method, Polar method, Punch method, RadialBlur method, RadWave method, Ripple method, Spherize method, Swirl method, Wave method, Wind method, ZoomBlur method, AddWeightedBitmaps method, ShowZoomWaveDlg method .
Topics: | Raster Images: Doing Geometric Transformations
 | Raster Images: Artistic Effects
 | Raster Images: Where the Region Preempts the Bitmap
 | Using Color Values in LEADTOOLS


OnAnimate event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TAnimationEvent OnAnimate (bool bEnable);
Delphi Syntax | OnAnimate (bEnable: Boolean): TAnimationEvent
Overview | Refer to Playing an Animation.

Remarks

Occurs when an animation playback is started or stopped.

See Also

Elements: | AutoAnimate property, AutoAnimationLoop property, AnimationLoop property, AnimationEnable property
Topics: | Raster Images: Playing Animated Images


OnBitmapDataPathClosed event (Main Control)

C++ Builder Example

Delphi Example

Builder Syntax | TBitmapDataPathClosedEvent OnBitmapDataPathClosed (void);
Delphi Syntax | OnBitmapDataPathClosed(): TBitmapDataPathClosedEvent;
Overview | Refer to Implementing Internet Features

Remarks

Occurs when the bitmap has finished downloading from the Internet, or if the bitmap could not download from this path for any reason.

See Also

Elements: | BitmapDataPath property, ReadyState property
Topics: | Raster Images: Loading Files


OnBorderRemove event (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | void __fastcall OnBorderRemove (System::TObject* Sender, HRGN hBorderRgn, int uBorderToRemove, int nBoundingRectLeft, int nBoundingRectTop, int nBoundingRectWidth, int nBoundingRectHeight
Delphi Syntax: | procedure OnBorderRemove (Sender: TObject; hBorderRgn : HRGN; uBorderToRemove, nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth, nBoundingRectHeight: LongInt) of Object;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical) This event is triggered once for each border found by the BorderRemove method. It is triggered a maximum of four times for each call to the BorderRemove method. Set the DocCleanSuccess property to SUCCESS_REMOVE to have the border removed. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the border unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the BorderRemove method is set to BORDER_IMAGE_UNCHANGED and BORDER_SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region that contains all the changes.

Note:

hBorderRgn is only valid during this event. To use the hBorderRgn after the event has terminated, make a copy of it using the SetRgnHandle method.

See Also

Elements: | BorderRemove method, DocCleanSuccess property
Topics: | Raster Images: Cleaning - up 1-Bit Images


OnChange event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Classes::TNotifyEvent OnChange
Delphi Syntax | OnChange: TNotifyEvent
Overview | Refer to Detecting Events.

Remarks

Occurs when any change occurs in the Main Control's bitmap.

See Also

Elements: | OnFilePage event
Topics: | Raster Images: Loading Files


OnDotRemove event (Main Control)

C++ Builder example

Delphi example

Builder Syntax: | void __fastcall OnDotRemve(System::TObject* Sender, HRGN hDotRgn, int nBoundingRectLeft, int nBoundingRectTop, int nBoundingRectWidth, int nBoundingRectHeight, int iWhiteCount, int iBlackCount);
Delphi Syntax: | procedure OnDotRemove (Sender: TObject;hDotRgn : HRGN; nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth, nBoundingRectHeight, iWhiteCount, iBlackCount : longInt) of Object;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)This event is triggered once for each dot, speck, or blob that is detected. Set the DocCleanSuccess property to SUCCESS_REMOVE to have the dot removed. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the dot unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the DotRemove method is set to DOT_IMAGE_UNCHANGED | DOT_SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region that contains all the changes.

Note:

hDotRgn is only valid during this event. To use the hRgn after the event has terminated, make a copy of it using the SetRgnHandle method.

See Also

Elements: | DotRemove method
Topics: | Raster Images: Cleaning - up 1-Bit Images


OnDropFile event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TDropFileEvent OnDropFile (System::AnsiString fName);
Delphi Syntax | OnDropFile (fName:String): TDropFileEvent;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Occurs when a file is dropped on any part of the main control. For this event to be triggered, the DropFilesAllowed property should be set to TRUE.

After returning from the event, the Main control examines the DropAutoLoad. If it is TRUE, the file is loaded. If it is FALSE, no further action is taken.

See Also

Elements: | DropAutoLoad, DropFilesAllowed
Topics: | Working with the Control: General Behavior
 | Raster Images: Loading Files


OnEnumTags Event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TEnumTagsEvent OnEnumTags (Word uTag, Word uType, unsigned uCount, bool &bContinue);
Delphi Syntax | OnEnumTags (uTag: L_UINT16; uType: L_UINT16; uCount: L_UINT32; var bContinue: Boolean): TenumTagsEvent
Overview | Refer to Implementing TIFF Tags.

Remarks

The EnumTags method will call this event for each tag present on the page.

For more information, refer to the EnumTags method.

See Also

Elements: | EnumTags method, ReadTag method, ReadTagMemory method, GetTagData method, GetTagType method, GetTagCount method, InfoColorSpace property
Topics: | Raster Images: Getting and Setting File Information
 | Raster Images: Maintaining TIFF Tags


OnFilePage event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Classes::TNotifyEvent OnFilePage
Delphi Syntax | OnFilePage : TNotifyEvent
Overview | Refer to Detecting Events.

Remarks

Occurs before loading each page of a file. For example, if you load all pages of a multipage file that contains three images, this event occurs three times.

See Also

Elements: | OnChange event
Topics: | Raster Images: Loading Files


OnHolePunchRemove event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall OnHolePunchRemove (System::TObject* Sender, HRGN hHoleRgn, int nBoundingRectLeft, int nBoundingRectTop, int nBoundingRectWidth, int nBoundingRectHeight, int iHoleIndex, int iHoleTotalCount, int iWhiteCount, int iBlackCount);
Delphi Syntax | procedure OnHolePunchRemove (Sender : TObject;hHoleRgn : HRGN; nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth, nBoundingRectHeight, iHoleIndex, iHoleTotalCount, iWhiteCount, iBlackCount: LongInt) ;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical) This event is triggered once for each occurring hole in the hole-punch configuration. For example, if there are three holes, the event gets triggered three times. Set the DocCleanSuccess property to SUCCESS_REMOVE to have a particular hole removed. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the hole unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the HolePunchRemove method is set to HOLEPUNCH_IMAGE_UNCHANGED and HOLEPUNCH_SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region that contains all the changes.

Note:

hHoleRgn is only valid during this event. To use the hHoleRgn after the event has terminated, make a copy of it using the SetRgnHandle method.

See Also

Elements: | HolePunchRemove method
Topics: | Raster Images: Cleaning - up 1-Bit Images


OnInvertedText event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall OnInvertedText (System::TObject* Sender, HRGN hTextRgn , int nBoundingRectLeft, int nBoundingRectTop, int nBoundingRectWidth, int nBoundingRectHeight, int nWhiteCount, int nBlackCount);
Delphi Syntax | procedure OnInvertedText (Sender :TObject;hTextRgn: HRGN;nBoundingRectLeft, nBoundingRectTop, nBoundingRectWidth, nBoundingRectHeight, iWhiteCount, iBlackCount : longint);
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)This event is triggered once for each area of inverted text that is detected. Set the DocCleanSuccess property to SUCCESS_REMOVE to have the area inverted. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the area unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the InvertedText methodis set to INVERTEDTEXT_IMAGE_UNCHANGED | INVERTEDTEXT _SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region that contains all the changes.

Note:

hTextRgn is only valid during this event. To use the hTextRgn after the event has terminated, make a copy of it using the SetRgnHandle method.

See Also

Elements: | InvertedText method
Topics: | Raster Images: Cleaning - up 1-Bit Images


OnLineRemove event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall OnLineRemove (System::TObject* Sender, int nStartRow, int nStartCol, int nLength, HRGN hRgnLine);
Delphi Syntax | procedure OnLineRemove (Sender : TObject;nStartRow, nStartCol, nLength: longint;hRgnLine : HRGN);
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)This event is triggered for each line found by the LineRemove method. Set the DocCleanSuccess property to SUCCESS_REMOVE to have the line removed. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the line unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the LineRemove method is set to LINE_IMAGE_UNCHANGED | LINE_SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region that contains all changes.

Note:

hRgnLine is only valid during this event. To use the hRgnLine after the event has terminated, make a copy of it using the SetRgnHandle method.

See Also

Elements: | LineRemove method
Topics: | Raster Images: Cleaning - up 1-Bit Images


OnLoadInfo event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Classes::TNotifyEvent OnLoadInfo;
Delphi Syntax | OnLoadInfo: TNotifyEvent;
Overview | Refer to Loading a Bitmap from a File.

Remarks

Occurs if LEADTOOLS attempts to load an image file, but does not find valid format information in the file header. You can use this event for loading input data (such as raw fax) that LEADTOOLS cannot recognize.

LEADTOOLS will only attempt to recognize fax files if you respond to this event and have filled the LoadInfoXXX properties listed below. If you want LEADTOOLS to automatically recognize any fax file, set the LoadInfoWidth and LoadInfoHeight properties to -1 once, at the beginning of the program. If you recognize the file and know the width and height of the file, set LoadInfoWidth and LoadInfoHeight to a positive value.

This event occurs before an error message is generated. You can set the following properties in this event to supply the missing header information:

LoadInfoBits property

LoadInfoFlags property

LoadInfoFormat property

LoadInfoHeight property

LoadInfoOffset property

LoadInfoWidth property

LoadInfoXRes property

LoadInfoYRes property

UserPalette property

You can also set these properties elsewhere in your program. For example, you could set them at the time you identify the file that is to be loaded. But LEADTOOLS does not check the property values until after it has failed to find the header information and the OnLoadInfo event has occurred.

See Also

Topics

Raster Images: Loading Files


OnMagGlassCursor event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TNotifyEvent OnMagGlassCursor
Delphi Syntax | OnMagGlassCursor: TNotifyEvent
Overview | Refer to Using the Magnifying Glass

Remarks

Occurs when the Magnifying Glass is manually updated and the left mouse button is not pressed. It is used to let the user set a Magnifying Glass cursor for the ILEADRasterView Control's window.

To manually update the Magnifying Glass, MAGGLASS_MANUAL_UPDATE must be set in the MagGlassFlags property.

See Also

Elements: | MagGlassFlags property, StartMagGlass method, StopMagGlass method, ShowMagGlass method, SetMagGlassPos method.
Topics: | Raster Images: Displaying Images.


OnOLECompleteDrag event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TOLECompleteDragEvent OnOLECompleteDrag (TmouseButton Button, TShiftState Shift, int X, int Y);
Delphi Syntax | OnOLECompleteDrag (Button: TMouseButton; Shift: TShiftState; X, Y: Integer): TOLECompleteDragEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs when the dragging operation is complete and the image is dropped.

Please note that only the Left mouse button is used in the drag and drop process.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLEStartDrag event, OnOLEDragOver event, OnOLEGiveFeedback event
Topics: | Raster Images: Displaying Images


OnOLEDragOver event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TOLEDragOverEvent OnOLEDragOver (TmouseButton Button, TShiftState Shift, int X, int Y);
Delphi Syntax | OnOLEDragOver (Button: TMouseButton; Shift: TShiftState; X, Y: Integer): TOLEDragOverEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs while dragging an image over the Main control. It also provides the Main control with feedback pertaining to the cursor position and the buttons used in the drag and drop process.

Please note that only the Left mouse button is used in the drag and drop process.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEGiveFeedback event
Topics: | Raster Images: Displaying Images


OnOLEGiveFeedback event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TOLEGiveFeedbackEvent OnOLEGiveFeedback (bool &bUseDefaultCursor);
Delphi Syntax | OnOLEGiveFeedback (var bUseDefaultCursor: Boolean): TOLEGiveFeedbackEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs while an image is being dragged over the Main control to determine the visual feedback for the drag-and-drop operation.

Note:

To use a custom cursor during the drag and drop process, set the OLEDragCursor property to the custom cursor and set the bUseDefaultCursor parameter to FALSE within the OnOLEGiveFeedback event.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLEStartDrag event, OnOLECompleteDrag event, OnOLEDragOver event
Topics: | Raster Images: Displaying Images


OnOLEStartDrag event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TOLEStartDragEvent OnOLEStartDrag (TmouseButton Button, TShiftState Shift, int X, int Y);
Delphi Syntax | OnOLEStartDrag (Button: TMouseButton; Shift: TShiftState; X, Y: Integer): TOLEStartDragEvent;
Overview | Refer to Drag and Drop

Remarks

Occurs when the drag-and-drop operation starts, and indicates whether a drop can be accepted.

To start the drag-and-drop operation:

1. | Set the EnableOLEDragMethod property to TRUE.
2. | Press the left mouse button down on the Main control that contains the image you want to drag. The OnOLEStartDrag event will occur.

Please note that only the Left mouse button is used in the drag and drop process.

See Also

Elements: | EnableOLEDragMethod property, OLEDragCursor property, OnOLECompleteDrag event, OnOLEDragOver event, OnOLEGiveFeedback event
Topics: | Raster Images: Displaying Images


OnPaint event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Classes::TNotifyEvent OnPaint
Delphi Syntax | OnPaint: TNotifyEvent
Overview | Refer to Detecting Events.

Remarks

Occurs when part or all of the Main Control is exposed after it has been moved or enlarged, or after a window that was covering the control has been moved.

If the AutoRepaint property is set to TRUE, you do not have to write code for this event.

See Also

Elements: | OnScroll event
Topics: | Working with the Control: Client Area Usage


OnPaintNotify event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPaintNotificationEvent OnPaintNotify(Cardinal uPass, Cardinal uType);
Delphi Syntax | OnPaintNotify(Cardinal uPass, Cardinal uType): TPaintNotificationEvent;
Overview | Refer to Using Special Effects When Painting.

Remarks

Occurs before painting and after each pass when implementing a paint effect or transition effect.

This event lets you change the behavior of the effect before it finishes. The uType parameter lets you know whether a transition or an image is being painted. The uPass parameter works as follows:

Value | Meaning
0 | No passes have painted. The first pass is next.
1 | One pass has painted. The second pass is next.
2 | The second pass has painted. The third pass is next.

And so forth....

The PaintMaxPasses property specifies the number of passes to complete the image or transition. You can set the PaintPass property in this event if you want to skip or repeat a pass (for example, if you want to end with a blend of old and new images).

See Also

Elements: | PaintEffect property, TransitionEffect property, PaintPass property, PaintMaxPasses property, PaintNotificationDelay property
Topics: | Raster Images: Implementing Special Effects


OnPanWin event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TPanWinEvent OnPanWin (THandle hPanWin, int iFlag);
Delphi Syntax | OnPanWin (hPanWin:THandle; iFlag:Integer) : TPanWinEvent;
Overview | Refer to Using a PanWindow.

Remarks

This event is generated when the PanWindow is created, updated, destroyed, or moved.

See Also

Elements: | PanWinBitonalScaling property, PanWinHeight property, PanWinIcon property, PanWinPaintDither property, PanWinPaintPalette property, PanWinPointer property, PanWinRectColor property, PanWinSysMenu property, PanWinTitle property, PanWinWidth property, PanWinX property, PanWinY property, ShowPanWin method
Topics: | Raster Images: Displaying and Printing


OnReadyStateChanged event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TReadyStateEvent ReadyStateChange (TReadyState ReadyState);
Delphi Syntax | ReadyStateChange (ReadyState: TReadyState) TReadyStateEvent;
Overview | Refer to Implementing Internet Features.

Remarks

Occurs when there is a change in the ReadyState property.

The ready state is the state of an image that is loaded asynchronously using the BitmapDataPath property.

See Also

Elements: | BitmapDataPath property, ReadyState property
Topics: | Raster Images: Loading Files


OnRgnChange event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Classes::TNotifyEvent OnRgnChange;
Delphi Syntax | OnRgnChange: TNotifyEvent
Overview | Refer to Creating and Using a Bitmap Region.

Remarks

Occurs each time the bitmap region is created or updated.

This event is especially useful with the RgnMarkingMode property, which automates the creation of regions.

See Also

Elements: | RgnMarkingMode property, RgnFrameType property
Topics: | Raster Images: Creating and Using a Region


OnRubberBand event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Classes::TNotifyEvent OnRubberBand
Delphi Syntax | OnRubberBand: TNotifyEvent
Overview | Refer to Marking a Selection with a Rubberband.

Remarks

Occurs before the MouseUp event, when the AutoRubberBand property is set to TRUE.

See Also

Topics:

Working with the Control: Client Area Usage


OnScroll event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | Classes::TNotifyEvent OnScroll ;
Delphi Syntax | OnScroll: TNotifyEvent ;
Overview | Refer to Detecting Events.

Remarks

Occurs when a user drags the box on a Main Control's scrollbar.

This event occurs only if the AutoScroll property is set to TRUE.

See Also

Elements: | OnPaint event
Topics: | Working with the Control: Client Area Usage


OnSmooth event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall OnSmooth (System::TObject* Sender, int nBumpOrNick, int nStartRow, int nStartCol, int nLength, int uHorV);
Delphi Syntax | procedure OnSmooth(Sender: TObject; nBumpOrNick, nStartRow, nStartCol, nLength, uHorV: longint) of object;
Overview | Refer to Cleaning Up 1-Bit Images

Remarks

(Document/Medical)This event is triggered for each bump and nick found by the Smooth method. Set the DocCleanSuccess property to SUCCESS_REMOVE to have the bump removed or the nick filled. Set the DocCleanSuccess property to SUCCESS_NOREMOVE to leave the bump or nick unchanged. Set the DocCleanSuccess property to 0 to abort. If the uFlags parameter of the Smooth method is set to SMOOTH_IMAGE_UNCHANGED | SMOOTH_SINGLE_REGION, then the value of the DocCleanSuccess property affects only the internal single region.

See Also

Elements: | Smooth method
Topics: | Raster Images: Cleaning - up 1-Bit Images


OnStatus event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TStatusEvent OnStatus (int Percent);
Delphi Syntax | OnStatus (Percent: Integer): TStatusEvent;
Overview | Refer to Detecting Events.

Remarks

Occurs repeatedly as LEADTOOLS processes data, so that you can update a status bar or detect a user interrupt.

This event is generated only if the EnableProgressEvent property is set to TRUE.

To interrupt a process, set the EnableProgressEvent property to FALSE.

The following methods generate OnStatus events:

AddNoise method
Average method
BinaryFilter method
ColorMerge method
ColorRes method
ColorSeparate method
Combine method
Contrast method
Deskew method
Despeckle method
Emboss method
Fill method
Flip method
GammaCorrect method
GetHistogram method
Grayscale method
Halftone method
HistoContrast method
HistoEqualize method
Hue method
Intensity method
IntensityDetect method
Invert method
Load method
Median method
Mosaic method
Oilify method
Picturize method
Posterize method
RemapIntensity method
Reverse method
Rotate method
Saturation method
Save method
Sharpen method
Shear method
Size method
SpatialFilter method
StretchIntensity method
Underlay method

See Also

Topics:

Working with the Control: General Behavior


OnTransformMarker event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | TTransformMarkerEvent OnTransformMarker (int iMarker, int lSize, void * pData, int iTransform);
Delphi Syntax | OnTransformMarker (iMarker: Integer; lSize: Longint; pData: Pointer; iTransform: Integer): TtransformMarkerEvent
Overview | Refer to Examining and Altering Bitmaps

Remarks

This event is fired for every JPEG marker present in the file transformed by the TransformFile method.

Processing this event is not required. It is recommended that you have a good knowledge of JPEG files before processing this event. Incorrect handling of the markers can create corrupted files.

Typically, this event could be used to process user-defined markers (APP0 – APP14). These markers may contain extra information like stamps, file resolution information, etc.

This can also be used to prevent certain markers from being written if the file. For more information, refer to the WriteMarkerAction property.

Upon returning from this event, LEADTOOLS will examine the value of the WriteMarkerAction property to see if the default processing should be performed for this marker. If the WriteMarkerAction property is:

WRITEMARKER_DEFAULT, then LEADTOOLS will perform the default action and write it to the file.

WRITEMARKER_IGNORE, then LEADTOOLS will not write this marker to the file.

WRITEMARKER_ABORT, then the file transformation process is aborted and the TransformFile method will return ERROR_USER_ABORT.

When transforming the marker data, call the WriteMarker method with the WriteMarkerAction property set to WRITEMARKER_IGNORE. That way the marker will not occur twice in the file.

See Also

Elements: | TransformFile method, WriteMarker method, WriteMarkerAction property
Topics: | Raster Images: Doing Geometric Transformations


OnZoomInDone event (Main Control)

C++ Builder example

Delphi example

Builder Syntax | void ZoomInDone (int x, int y);
Delphi Syntax | ZoomInDone (x, y:Longint);
Overview | Refer to Capturing an Image from the Screen.

Remarks

Occurs when the user clicks the left mouse button after a screen capture has been started by calling ZoomIn.

See Also

Elements: | ZoomIn method, Capture method, EnableZoomInRect property
Topics: | Raster images: Capturing a screen image


Count property(Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int Count
Delphi Syntax | Count: Integer;
Overview | Refer to Implementing Markers.

Remarks

(Read only) Gets an integer that represents the number of markers contained in the collection.

See Also

Elements: | EnumMarkers method, GetMarker method, GetMarkers method, CreateMarkers method, Element property, ElementCount property, MarkerType property, LoadMarkers method
Topics | Raster Images: Markers


Element property(Marker Control)

C++ Builder example

Delphi example

Builder Syntax | Byte Element[int nIndex]
Delphi Syntax | Element[nIndex: Integer]: Byte;
Overview | Refer to Implementing Markers.

Remarks

Gets or sets the array of elements in the current marker.

When the GetMarker method is called, this property is updated with the actual elements in the retrieved marker.

When inserting a marker, set this property along with the ElementCount property and the MarkerType property, before calling the InsertMarker method.

See Also

Elements: | Count property, CopyMarkers method, CreateMarkers method, DeleteMarker method, DeleteMarkerAt method, ElementCount property, OnEnumerateMarkers event, EnumMarkers method, GetMarker method, GetMarkers method, InsertMarker method, Load method, SetMarkers method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


ElementCount property(Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int ElementCount
Delphi Syntax | ElementCount: Integer;
Overview | Refer to Implementing Markers.

Remarks

Value that indicates the number of elements in the current marker.

When the GetMarker method is called, this property is updated with the number of elements in the retrieved marker.

When inserting a marker, set this property along with the Element property and the Type property, before calling the InsertMarker method.

See Also

Elements: | Count property, CopyMarkers method, CreateMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, OnEnumerateMarkers event, EnumMarkers method, GetMarker method, GetMarkers method, InsertMarker method, Load method, SetMarkers method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


Error property (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int Error
Delphi Syntax | Error: Integer
Overview | Refer to Implementing Markers.

Remarks

Gives the error code resulting from the last method called or property set. If the last operation performed was successful, the value is SUCCESS.

For a list of error codes, refer to Error Codes.

See Also

Elements: | MethodErrrorsEnabled property
Topics | Raster Images: Markers


MarkerType property(Marker Control)

C++ Builder example

Delphi example

Builder Syntax | Byte MarkerType
Delphi Syntax | MarkerType: Byte;
Overview | Refer to Implementing Markers.

Remarks

Gets or sets an integer that represents the ID of the current marker. Recommended values are between 0xE0 and 0xFE. Other values are possible, but before using other values, study the JPEG specs to determine which marker types are allowed.

See Also

Elements: | Count property, CopyMarkers method, CreateMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, OnEnumerateMarkers event, EnumMarkers method, GetMarker method, GetMarkers method, InsertMarker method, Load method, SetMarkers method, WriteMetaData method
Topics | Raster Images: Markers


MethodErrorsEnabled property (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | bool MethodErrorsEnabled
Delphi Syntax | MethodErrorsEnabled: Boolean
Overview | Refer to Implementing Markers.

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

Topics

Raster Images: Markers


CopyMarkers method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int CopyMarkers (TLEADMarker* Dst, TLEADMarker* Src);
Delphi Syntax | Function CopyMarkers (Dst: TLEADMarker; Src: TLEADMarker): Integer;
Overview | Refer to Implementing Markers.

Remarks

Copies the specified source collection of metadata markers to the specified destination TLEADMarker object.

If Src is NULL, then the method will return ERROR_INVALID_BUFFER.

See Also

Elements: | CreateMarkers method, LoadMarkers method, WriteMetadata method, TransformFile method, EnumMarkers method, InsertMarker method, GetMarker method, Count property, CopyMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, OnEnumerateMarkers event, GetMarkers method, Save method, SaveBuffer method, SaveMemory method, SaveOffset method, TransformFile method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


CreateMarkers method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int CreateMarkers ();
Delphi Syntax | Function CreateMarkers (void): Integer;
Overview | Refer to Implementing Markers.

Remarks

Creates an empty marker collection. Markers can be added to this collection with InsertMarker.

See Also

Elements: | EnumMarkers method, GetMarker method, GetMarkers method, Count property, Element property, ElementCount property, MarkerType property, LoadMarkers method
Topics | Raster Images: Markers


DeleteMarker method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int DeleteMarker (int lType, int nCount);
Delphi Syntax | Function DeleteMarker (lType:LongInt; nCount: Integer): Integer;
Overview | Refer to Implementing Markers.

Remarks

Deletes the specified number of markers of the specified type from the marker collection. You can delete all the occurrences of lType, or the first few occurrences.

See Also

Elements: | DeleteMarkerAt method, CreateMarkers method, InsertMarker method
Topics | Raster Images: Markers


DeleteMarkerAt method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int DeleteMarkerAt (int nIndex);
Delphi Syntax | Function DeleteMarkerAt (nIndex:Integer): Integer;
Overview | Refer to Implementing Markers.

Remarks

Deletes the marker at the specified index from the marker collection.

See Also

Elements: | Count property, CopyMarkers method, CreateMarkers method, DeleteMarker method, Element property, ElementCount property, OnEnumerateMarkers event, EnumMarkers method, GetMarker method, GetMarkers method, InsertMarker method, Load method, SetMarkers method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


EnumMarkers method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int EnumMarkers ();
Delphi Syntax | Function EnumMarkers (): Integer;
Overview | Refer to Implementing Markers.

Remarks

Enumerates the markers in the marker collection.

This method actually updates this object's marker collection as changes (deletions, insertions, etc.) take place. Therefore, when this method returns, the contents of this object's marker collection may be different from the contents of the marker collection before calling this method.

This method can also be used to selectively delete markers from the marker collection.

The OnEnumerateMarkers event is triggered for each marker enumerated by this method. You can delete, insert, or replace markers using the event.

See Also

Elements: | Count property, CopyMarkers method, CreateMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, OnEnumerateMarkers event, GetMarker method, GetMarkers method, InsertMarker method, Load method, SetMarkers method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


GetMarker method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int GetMarker (LongInt lIndex);
Delphi Syntax | Function GetMarker (lIndex: Integer): Integer;
Overview | Refer to Implementing Markers.

Remarks

Gets information about the specified marker in the collection. This method lets you get access to each individual marker without the use of an event.

The lIndex should be less than the value of the Count property.

See Also

Elements: | Count property, CopyMarkers method, CreateMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, OnEnumerateMarkers event, EnumMarkers method, GetMarkers method, InsertMarker method, Load method, SetMarkers method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


GetMarkers method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int GetMarkers (unsigned uFlags);
Delphi Syntax | Function GetMarkers (uFlags: Cardinal): Integer;
Overview | Refer to Implementing Markers.

Remarks

Gets a copy of the last markers set with SetMarkers.

Since you have a copy, anything you do with the object will not modify the markers, which will be saved if you call a SaveXXX method. If you want to modify the markers being saved, call SetMarkers.

See Also

Elements: | CreateMarkers method, WriteMetadata method, TransformFile method, EnumMarkers method, InsertMarker method, GetMarker method, Count property, CopyMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, OnEnumerateMarkers event, SetMarkers method, Save method, SaveBuffer method, SaveMemory method, SaveOffset method, TransformFile method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


InsertMarker method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int InsertMarker (int nIndex);
Delphi Syntax | Function InsertMarker (nIndex: Integer): Integer;
Overview | Refer to Implementing Markers.

Remarks

Inserts a marker specified by the ElementCount property, the Element property, and the MarkerType property into a marker collection.

See Also

Elements: | DeleteMarker method, DeleteMarkerAt method, CreateMarkers method, LoadMarkers method
Topics | Raster Images: Markers


LoadMarkers method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int LoadMarkers (AnsiString strFileName, unsigned uFlags);
Delphi Syntax | Function LoadMarkers (strFileName:String; uFlags: Cardinal): Integer;
Overview | Refer to Implementing Markers.

Remarks

Loads metadata markers (COM and APPn) stored in the specified file.

To save the collection of metadata markers to a file, call SetMarkers method.

See Also

Elements: | SetMarkers method, WriteMetadata method, TransformFile method, EnumMarkers method, InsertMarker method, GetMarker, Count property
Topics | Raster Images: Markers


SetMarkers method (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | int SetMarkers (TLEADMarker* Marker, int uFlags);
Delphi Syntax | Function SetMarkers (Marker: TLEADMarker; uFlags: LongInt): Integer;
Overview | Refer to Implementing Markers.

Remarks

Sets the metadata markers to be used in the current thread.

All save operations performed in this thread will use these markers until SetMarkers is called again.

A copy of these markers will be used. Pass NULL for the Marker parameter to clear any markers previously set by SetMarkers.

Comments set by setting the Comment property and calling the Save method, the SaveMemory method or the WriteComment method will override comments contained in the markers.

Tags set with SetTag will overwrite any user-defined tags contained in the markers.

If the Save method is instructed to save a stamp, the stamp will be regenerated from the bitmap and will override whatever Exif stamp is present in the markers.

See Also

Elements: | CreateMarkers method, WriteMetadata method, TransformFile method, EnumMarkers method, InsertMarker method, GetMarker method, Count property, CopyMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, OnEnumerateMarkers event, GetMarkers method, Save method, SaveBuffer method, SaveMemory method, SaveOffset method, TransformFile method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


OnEnumerateMarkers event (Marker Control)

C++ Builder example

Delphi example

Builder Syntax | TEnumerateMarkersEvent OnEnumerateMarkers (unsigned uType, unsigned uElementCount);
Delphi Syntax | OnEnumerateMarkers (uType: Cardinal; uElementCount: Cardinal): TEnumerateMarkersEvent;
Overview | Refer to Implementing Markers.

Remarks

This event is fired for each marker in the marker collection enumerated by the EnumMarkers method.

Using this event, you can delete, insert, or replace markers.

See Also

Elements: | Count property, CopyMarkers method, CreateMarkers method, DeleteMarker method, DeleteMarkerAt method, Element property, ElementCount property, EnumMarkers method, GetMarker method, GetMarkers method, InsertMarker method, Load method, SetMarkers method, MarkerType property, WriteMetaData method
Topics | Raster Images: Markers


ClearDecryptorKey property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | bool ClearDecryptorKey
Delphi Syntax | ClearDecryptorKey: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates what happens to encrypt keys after calling AnnEncryptApply.

Setting | Description
TRUE | All encrypt objects whose state has become ‘decryptor’ have the key set to 0.
FALSE | All encrypt objects whose state has become ‘decryptor’ have the key unchanged.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


ClearEncryptorKey property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | bool ClearEncryptorKey
Delphi Syntax | ClearEncryptorKey: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates what happens to encrypt keys after calling AnnEncryptApply. Possible values are:

Setting | Description
TRUE | All encrypt objects whose state has become ‘encryptor’ have the key set to 0.
FALSE | All encrypt objects whose state has become ‘encryptor’ have the key unchanged.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


EncryptBitmap property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | TBitmapHandle EncryptBitmap
Delphi Syntax | EncryptBitmap: TBitmapHandle
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the TBitmapHandle object that references the bitmap that is being encrypted or decrypted.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


Encryptor property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | bool Encryptor
Delphi Syntax | Encryptor: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the object is an encryptor or decryptor. Possible values are:

Setting | Description
TRUE | The object is an encryptor.
FALSE | The object is a decryptor.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


Flags property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | unsigned Flags
Delphi Syntax | Flags: L_UINT32
Overview | Refer to Implementing Annotations.

Remarks

Flags that indicate which properties contain valid data. Possible values are one or more of the following constants "or"ed together:

Value | Meaning
ANNENCRYPT_TYPE | [$001] The Encryptor Property contains valid data.
ANNENCRYPT_KEY | [$002] The Key property contains valid data.
ANNENCRYPT_RESERVED1 | [$004] Reserved for future use.
ANNENCRYPT_NEVER_ENCRYPTED | [$008] The NeverEncrypted property contains valid data.
ANNENCRYPT_ENCRYPT_BITMAP | [$010] The EncryptBitmap property contains valid data.
ANNENCRYPT_ALL | [$01F] All properties contain valid data.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


Key property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | unsigned Key
Delphi Syntax | Key: L_UINT32
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a Key that is used for the encryption/decryption. This has a minimum value of 0 and a maximum value of 4294967295 ($ffffffff). When used in automation using the Encrypt dialog (right-clicking an encryptor), the maximum value is 999999999. When decrypting, use the same key that was used when the encryptor was applied.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


NeverEncrypted property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | bool NeverEncrypted
Delphi Syntax | NeverEncrypted: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Flag that indicates whether you can change the key and location of the decryptor.

This property is only relevant for decryptors (Encryptor is FALSE). Possible values are:

Setting | Description
TRUE | The decryptor has never been encrypted. This means that in automation, the key and location of the decryptor can be changed.
FALSE | The decryptor was originally an encryptor that was applied. You cannot change the key or location of this kind of decryptor.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), SaveDecryptorKey property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


SaveDecryptorKey property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | bool SaveDecryptorKey
Delphi Syntax | SaveDecryptorKey: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates if decryptor keys are saved. Possible values are:

Setting | Description
TRUE | Decryptor keys are saved with the AnnSave, AnnSaveMemory, or AnnSaveTag methods.
FALSE | Decryptor keys are saved with a value of 0 with the AnnSave, AnnSaveMemory, or AnnSaveTag methods.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), SaveEncryptorKey property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


SaveEncryptorKey property (TAnnEncryptOptions)

C++ Builder example

Delphi example

Builder Syntax | bool SaveEncryptorKey
Delphi Syntax | SaveEncryptorKey: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates if encryptor keys are saved. Possible values are:

Setting | Description
TRUE | Encryptor keys are saved with the AnnSave, AnnSaveMemory, or AnnSaveTag methods.
FALSE | Encryptor keys are saved with a value of 0 with the AnnSave, AnnSaveMemory, or AnnSaveTag methods.

See Also

Elements: | AnnEncryptOptions property, AnnGetEncryptOptions method, AnnSetEncryptOptions method, Encryptor property (TAnnEncryptOptions), Flags property (TAnnEncryptOptions), Key property (TAnnEncryptOptions), NeverEncrypted property (TAnnEncryptOptions), ClearDecryptorKey property (TAnnEncryptOptions), ClearEncryptorKey property (TAnnEncryptOptions), EncryptBitmap property (TAnnEncryptOptions), AnnEncryptApply method
Topics: | Annotations: Object Manipulation


ClientX property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | int ClientX
Delphi Syntax | ClientX: L_INT32
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the X coordinate of the location of the handle in client coordinates. Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientY property (TAnnHandle), Visible property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


ClientY property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | int ClientY
Delphi Syntax | ClientY: L_INT32
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the Y coordinate of the location of the handle in client coordinates. Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), Visible property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


ContainerX property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | double ContainerX
Delphi Syntax | ContainerX: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the X coordinate of the location of the handle in container coordinates. Container coordinates are typically the same dimensions as the underlying bitmap, and are independent of zooming and scrolling.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), Visible property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


ContainerY property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | double ContainerY
Delphi Syntax | ContainerY: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the Y coordinate of the location of the handle in container coordinates. Container coordinates are typically the same dimensions as the underlying bitmap, and are independent of zooming and scrolling.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), Visible property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


Cursor property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | L_HCURSOR Cursor
Delphi Syntax | Cursor: L_HCURSOR
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the handle to a cursor.

This is the cursor that appears when the mouse hovers over the user handle.

Set this field to zero to use the default cursor.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Visible property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


FillColor property (TAnnHandle)

C++ Builder example

Delphi example

C++ Builder Syntax | TColor FillColor
Delphi Syntax | FillColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the color used to fill the user handle. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), PenColor property (TAnnHandle), Visible property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation
 | Using Color Values in LEADTOOLS


Flags property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | unsigned Flags
Delphi Syntax | Flags: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates which properties of the TAnnHandle object are valid. If the corresponding flag for a property is not set, the default values for that property will be used. Possible values may be one or more, combined using bitwise OR, of the following:

Value | Meaning
ANNHANDLE_ID | [$0001] The ID property contains valid data and should be used.
ANNHANDLE_LOCATION | [$0002] Either the ContainerX property and the ContainerY property contain valid data and should be used, or, the ClientX property and the ClientY property contain valid data and should be used.
ANNHANDLE_CONTAINER_COORDINATES | [$0004] The ContainerX property and the ContainerY property contain valid data and should be used. This flag must be set with ANNHANDLE_LOCATION.
ANNHANDLE_VISIBLE | [$0008] The Visible property contains valid data and should be used.
ANNHANDLE_PEN_COLOR | [$0010] The PenColor property contains valid data and should be used.
ANNHANDLE_FILL_COLOR | [$0020] The FillColor property contains valid data and should be used.
ANNHANDLE_SHAPE | [$0040] The Shape property contains valid data and should be used.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Visible property (TAnnHandle), Cursor property (TAnnHandle)
Topics: | Annotations: Object Manipulation


ID property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | int ID
Delphi Syntax | ID: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a unique ID associated with a user handle.

When adding more than one user handle to an annotation object, give each user handle a different ID. The ID is used to uniquely identify the annotation user handle in a hit test().

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), Visible property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


PenColor property (TAnnHandle)

C++ Builder example

Delphi example

C++ Builder Syntax | TColor PenColor
Delphi Syntax | PenColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the color of the pen used to draw the user handle (the outline of the handle).

VCL uses the TColor enumerated data type that covers the values that can be returned by the Windows RGB macro. To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), Visible property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation
 | Using Color Values in LEADTOOLS


Shape property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | int Shape
Delphi Syntax | Shape: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates the shape of the user handle. Possible values are:

Value | Meaning
ANNHANDLE_SHAPE_SQUARE | The user handle is square
ANNHANDLE_SHAPE_CIRCLE | The user handle is circular.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Visible property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


Visible property (TAnnHandle)

C++ Builder example

Delphi example

Builder Syntax | bool Visible
Delphi Syntax | Visible: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the annotation handle is visible. Possible values are:

Setting | Description
TRUE | The handle is visible.
FALSE | The handle is not visible.

See Also

Elements: | AnnHandle property, AnnGetUserHandle method, AnnAddUserHandle method, ID property (TAnnHandle), ContainerX property (TAnnHandle), ContainerY property (TAnnHandle), ClientX property (TAnnHandle), ClientY property (TAnnHandle), PenColor property (TAnnHandle), FillColor property (TAnnHandle), Shape property (TAnnHandle), Cursor property (TAnnHandle), Flags property (TAnnHandle)
Topics: | Annotations: Object Manipulation


ClientX property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | int ClientX
Delphi Syntax | ClientX: L_INT32
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the X coordinate of the location of the handle in client coordinates. Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


ClientY property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | int ClientY
Delphi Syntax | ClientY: L_INT32
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the Y coordinate of the location of the handle in client coordinates. Client coordinates factor in the current zoom factor, and the horizontal and vertical scrolling.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo) , ClientX property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


ContainerX property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | double ContainerX
Delphi Syntax | ContainerX: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

(Read only) Gets the X coordinate of the location of the handle in container coordinates. Container coordinates are typically the same dimensions as the underlying bitmap, and are independent of zooming and scrolling.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandlesEvent event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo) , ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


ContainerY property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | double ContainerY
Delphi Syntax | ContainerY: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the Y coordinate of the location of the handle in container coordinates. Container coordinates are typically the same dimensions as the underlying bitmap, and are independent of zooming and scrolling.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


Cursor property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | L_HCURSOR Cursor
Delphi Syntax | Cursor: L_HCURSOR
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the handle to a cursor.

This is the cursor that appears when the mouse hovers over the user handle.

Set this field to zero to use the default cursor.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandlesEvent event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


FillColor property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | TColor FillColor
Delphi Syntax | FillColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the color used to fill the user handle.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandlesEvent event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation
 | Using Color Values in LEADTOOLS


ID property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | int ID
Delphi Syntax | ID: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets unique identifier of the user handle.

When adding more than one user handle to an annotation object, give each user handle a different ID.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


Index property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | unsigned Index
Delphi Syntax | Index: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the index of a user handle in a privately maintained array of user handles. This property is only valid if the AnnType property of the handle is ANNHANDLETYPE_DEFAULT_HANDLE.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo) , ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


PenColor property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | TColor PenColor
Delphi Syntax | PenColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the color of the pen used to draw the user handle (the outline of the handle).

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandlesEvent event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation
 | Using Color Values in LEADTOOLS


Shape property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | int Shape
Delphi Syntax | Shape: L_INT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates the shape of the user handle. Possible values are:

Value | Meaning
ANNHANDLE_SHAPE_SQUARE | The user handle is square
ANNHANDLE_SHAPE_CIRCLE | The user handle is circular.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


TotalHandles property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | unsigned TotalHandles
Delphi Syntax | TotalHandles: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

(Read Only) Gets the total number of annotation handles, both default handles and user-defined handles.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), Visible property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


Visible property (TAnnHandleInfo)

C++ Builder example

Delphi example

Builder Syntax | bool Visible
Delphi Syntax | Visible: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the handle is visible. Possible values are:

Setting | Description
TRUE | The handle is visible.
FALSE | The handle is not visible.

See Also

Elements: | AnnEnumerateHandles method, OnAnnEnumerateHandles event, AnnType property (TAnnHandleInfo), ID property (TAnnHandleInfo), Index property (TAnnHandleInfo), ContainerX property (TAnnHandleInfo), ContainerY property (TAnnHandleInfo), ClientX property (TAnnHandleInfo), ClientY property (TAnnHandleInfo), PenColor property (TAnnHandleInfo), FillColor property (TAnnHandleInfo), Shape property (TAnnHandleInfo), Cursor property (TAnnHandleInfo), Totalhandles property (TAnnHandleInfo)
Topics: | Annotations: Object Manipulation


Count property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int Count
Delphi Syntax | Count: integer
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only Read only) Gets the number of menu items in the menu object.

This property is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, ItemString property, ItemID property, ItemType property, ItemChecked property, ItemEnabled property, DeleteItem method, AddItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


ItemChecked property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | bool ItemChecked [int iIndex]
Delphi Syntax | ItemChecked [iIndex: Integer]: Boolean
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Gets or sets the checked state of the specified menu item. Possible values are:

Value | Meaning
True | The menu item is checked.
False | The menu item is not checked.

This property is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, Count property, ItemString property, ItemType property, ItemID property, ItemEnabled property, DeleteItem method, AddItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


ItemEnabled property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | bool ItemEnabled [int iIndex]
Delphi Syntax | ItemEnabled [iIndex: Integer]: Boolean
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Gets or sets the enabled state of the specified menu item. Possible values are:

Value | Meaning
True | The menu item is enabled.
False | The menu item is not enabled.

This property is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, Count property, ItemString property, ItemType property, ItemID property, ItemChecked property, DeleteItem method, AddItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


ItemID property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ItemID [int iIndex]
Delphi Syntax | ItemID [iIndex: Integer]: longint
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Gets or sets the command ID value for the specified menu item.

The ID value set must be in the range LTANNEVENT_MENUFIRST [$0100] to LTANNEVENT_MENULAST [$01FF].

This property is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, Count property, ItemString property, ItemType property, ItemChecked property, ItemEnabled property, DeleteItem method, AddItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


ItemString property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | AnsiString ItemString [int iIndex]
Delphi Syntax | ItemString [iIndex: integer]: string
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Gets or sets the text to be displayed for the specified menu item.

This property is associated with the AnnMenu object that is passed to the OnAnnMenu event

See Also

Elements | OnAnnMenu event, Count property, ItemID property, ItemType property, ItemChecked property, ItemEnabled property, DeleteItem method, AddItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


ItemType property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ItemType [int iIndex]
Delphi Syntax | ItemType [iIndex: Integer]: Integer
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only Read only) Gets the specified menu item’s type. Possible values are:

Value | Meaning
ANNMENUITEMTYPE_NORMAL | [0] Normal menu item.
ANNMENUITEMTYPE_SEPARATOR | [1] Menu item is a separator.
ANNMENUITEMTYPE_SUBMENU | [2] Menu item is a popup menu.

This property is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, Count property, ItemString property, ItemID property, ItemChecked property, ItemEnabled property, DeleteItem method, AddItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


AddItem method (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int AddItem (AnsiString szString, int iType, int nID, int iIndexBefore);
Delphi Syntax | Function AddItem (szString: String; iType: Integer; nID: longint; iIndexBefore: integer): integer;
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Adds a menu item with the specified string, type and id, before the item specified in iIndexBefore.

When the user selects an item added using this method, the OnAnnUserMenu event will be fired. The nID value passed to the OnAnnUserMenu event is the same nID passed to this method.

This method is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, Count property, ItemString property, ItemType property, ItemID property, ItemEnabled property, ItemChecked property, DeleteItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


DeleteItem method (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int DeleteItem (int iIndex);
Delphi Syntax | Function DeleteItem (iIndex: Integer): Integer;
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Deletes the specified menu item

This method is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, Count property, ItemString property, ItemType property, ItemID property, ItemEnabled property, ItemChecked property, AddItem method, GetSubMenu Method
Topics | Annotations (Document/Medical only): Automation


GetSubMenu method (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | TAnnMenu * GetSubMenu (int iIndex);
Delphi Syntax | Function GetSubMenu (iIndex: integer): TAnnMenu;
Overview | Refer to Annotation Menu

Remarks

(Document/Medical only) Gets the object that references the specified submenu.

This method will only work for menu items of type ANNMENUITEMTYPE_SUBMENU.

This method is associated with the AnnMenu object that is passed to the OnAnnMenu event.

See Also

Elements | OnAnnMenu event, Count property, ItemString property, ItemType property, ItemID property, ItemEnabled property, ItemChecked property, DeleteItem method, AddItem Method
Topics | Annotations (Document/Medical only): Automation


AnnotationName property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | AnsiString AnnotationName
Delphi Syntax | AnnotationName: String
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a character string that contains the name of the annotation object.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptionsproperty
Topics: | Annotations:Object Manipulation


BackNameColor property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | TColor BackNameColor
Delphi Syntax | BackNameColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or set the background color of the annotation name text.

The text of the annotation name can be set or obtained in the AnnotationName property. To get or set the foreground color for the name text, use the FaceNameColor property.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation
 | Using Color Values in LEADTOOLS


FaceNameColor property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | TColor FaceNameColor
Delphi Syntax | FaceNameColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or set the foreground color of the annotation name text.

The text of the annotation name can be set or obtained with the AnnotationName property. To get or set the background color for the name text, use the BackNameColor property.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation
 | Using Color Values in LEADTOOLS


Flags property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | unsigned Flags
Delphi Syntax | Flags: L_UINT32
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates which TAnnNameOptions properties are valid. Possible values are one or more of the following constants "or"ed together:

Value | Meaning
ANNNAME_SHOW_NAME | [$0001] ShowName property is valid
ANNNAME_NAME | [$0002] AnnotationName property is valid
ANNNAME_OFFSET | [$0008] NameOffsetX and NameOffsetY properties are valid
ANNNAME_RESTRICT | [$0010] NameRestrict property is valid
ANNNAME_FORECOLOR | [$0020] FaceNameColor property is valid
ANNNAME_BACKCOLOR | [$0040] BackNameColor property is valid
ANNNAME_BACK_TRANSPARENT | [$0080] NameBackTransparent property is valid
ANNNAME_FONT_BOLD | [$0100] FontBold property is valid
ANNNAME_FONT_ITALIC | [$0200] FontItalic property is valid
ANNNAME_FONT_STRIKEOUT | [$0400] FontStrikeOut property is valid
ANNNAME_FONT_UNDERLINE | [$0800] FontUnderline property is valid
ANNNAME_FONT_NAME | [$1000] FontName property is valid
ANNNAME_FONT_SIZE | [$2000] FontSize property is valid
ANNNAME_FONT_INFO | (ANNNAME_FONT_BOLD +
 | ANNNAME_FONT_ITALIC +
 | ANNNAME_FONT_STRIKEOUT +
 | ANNNAME_FONT_UNDERLINE +
 | ANNNAME_FONT_SIZE +
 | ANNNAME_FONT_NAME)
ANNNAME_ALL | (ANNNAME_SHOW_NAME + All Properties are valid
 | ANNNAME_NAME +
 | ANNNAME_OFFSET +
 | ANNNAME_RESTRICT +
 | ANNNAME_FORECOLOR +
 | ANNNAME_BACKCOLOR +
 | ANNNAME_BACK_TRANSPARENT +
 | ANNNAME_FONT_INFO)

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations: Object Manipulation
 | Annotation Automation Object


FontBold property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | bool FontBold
Delphi Syntax | FontBold: Boolean
Overview | Refer to Implementing Annotations.

Remarks

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

Setting | Description
TRUE | The font is bold
FALSE | The font is not bold

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


FontItalic property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | bool FontItalic
Delphi Syntax | FontItalic: Boolean
Overview | Refer to Implementing Annotations.

Remarks

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

Setting | Description
TRUE | The font is italicized
FALSE | The font is not italicized

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontBold property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


FontName property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | AnsiString FontName
Delphi Syntax | FontName: String
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a string that contains the name of the font used to display the annotation name text.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


FontSize property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | double FontSize
Delphi Syntax | FontSize: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the size, in logical units, of the font's character cell or character.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


FontStrikeOut property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | bool FontStrikeOut
Delphi Syntax | FontStrikeOut: Boolean
Overview | Refer to Implementing Annotations.

Remarks

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

Setting | Description
TRUE | The font is drawn with a strikeout
FALSE | The font is drawn without a strikeout

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


FontUnderline property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | bool FontUnderline
Delphi Syntax | FontUnderline: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the font is drawn with an underline. Possible values are:

Setting | Description
TRUE | The font is drawn with an underline.
FALSE | T he font is drawn without an underline.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


NameBackTransparent property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | bool NameBackTransparent
Delphi Syntax | NameBackTransparent: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the background text color is transparent. Possible values are:

Setting | Description
TRUE | Background text color is transparent.
FALSE | Use the color in the BackNameColor property for the background color of the text.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


NameOffsetX property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | double NameOffsetX
Delphi Syntax | NameOffsetX: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the X coordinate of the name offset (in pixels viewed at 100%) relative to the upper left corner of the bounding box of the annotation object.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


NameOffsetY property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | double NameOffsetY
Delphi Syntax | NameOffsetY: L_DOUBLE
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the Y coordinate of the name offset (in pixels viewed at 100%) relative to the upper left corner of the bounding box of the annotation object.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


NameRestrict property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | bool NameRestrict
Delphi Syntax | NameRestrict: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the annotation object name is restricted to appear fully within the bitmap. Possible values are:

Setting | Description
TRUE | Restrict the annotation name to appear fully within the bitmap. (Annotation container).
FALSE | Allow the annotation name to be moved outside the container.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), ShowName property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


ShowName property (TAnnNameOptions)

C++ Builder example

Delphi example

Builder Syntax | Bool ShowName
Delphi Syntax | ShowName: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether to display the annotation object's name. Possible values are:

Setting | Description
TRUE | Show the annotation object name.
FALSE | Hide the annotation object name.

See Also

Elements: | AnnGetNameOptions method, AnnSetNameOptions method, Flags property (TAnnNameOptions), AnnotationName property (TAnnNameOptions), NameOffsetX property (TAnnNameOptions), NameOffsetY property (TAnnNameOptions), NameRestrict property (TAnnNameOptions), FaceNameColor property (TAnnNameOptions), BackNameColor property (TAnnNameOptions), NameBackTransparent property (TAnnNameOptions), FontName property (TAnnNameOptions), FontItalic property (TAnnNameOptions), FontStrikeOut property (TAnnNameOptions), FontUnderLine property (TAnnNameOptions), FontSize property (TAnnNameOptions), AnnNameOptions property
Topics: | Annotations:Object Manipulation


Point property (TAnnPoints)

C++ Builder example

Delphi example

Builder Syntax | LPANNPOINT Point[int iIndex]
Delphi Syntax | Point [iIndex: Integer]: LPANNPOINT
Overview | Refer to Implementing Annotations.

Remarks

(Document/Medical only)(Read only) Gets a pointer to an ANNPOINT record.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements | AnnGetPointX method, AnnGetPointY method, AnnGetPointCount method
Topics | Annotations (Document/Medical only): Automation


Flags property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | unsigned Flags
Delphi Syntax | Flags: L_UINT
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates which properties contain valid data. Possible values are one or more of the following constants "or"ed together.

Value | Meaning
ANNPOINT_USE_BITMAP | [$001] The PointUseBitmap property contains valid data.
ANNPOINT_BITMAP | [$002] The PointBitmap property contains valid data.
ANNPOINT_BITMAP_TRANSPARENT | [$004] The PointBitmapTransparent property contains valid data.
ANNPOINT_BITMAP_TRANSPARENT_COLOR | [$008] The PointBitmapTransparentColor property contains valid data.
ANNPOINT_RADIUS | [$010] The PointRadius property contains valid data.
ANNPOINT_BORDER_COLOR | [$020] The PointBorderColor property contains valid data.
ANNPOINT_FILL_COLOR | [$040] The PointFillColor property contains valid data.
ANNPOINT_TRANSPARENT_FILL | [$080] The PointTransparentFill property contains valid data.
ANNPOINT_FIXED_SIZE | [$100] The PointFixedSize property contains valid data.
ANNPOINT_ALL | [$1ff] All properties are valid.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TAnnPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


PointBitmap property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | TBitmapHandle PointBitmap
Delphi Syntax | PointBitmap: TBitmapHandle
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a pointer to a TBitmapHandle object that references the bitmap to use for the point, if the point is drawn using a bitmap.

The point is drawn using a bitmap if the PointUseBitmap property is TRUE.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions),
Topics: | Annotations: Object Manipulation


PointBitmapTransparent property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | bool PointBitmapTransparent
Delphi Syntax | PointBitmapTransparent: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether there is a transparent color. Possible values are:

Setting | Description
TRUE | If the point is drawn using a bitmap, draw with a transparent color. The transparent color to use is in the PointBitmapTransparentColor property.
FALSE | If the point is drawn using a bitmap, there is no transparent color.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


PointBitmapTransparentColor property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | TColor PointBitmapTransparentColor
Delphi Syntax | PointBitmapTransparentColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the transparent color to use if the PointUseBitmap property is TRUE and the PointBitmapTransparent property is TRUE.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation
 | Using Color Values in LEADTOOLS


PointBorderColor property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | TColor PointBorderColor
Delphi Syntax | PointBorderColor: TColor
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the outline-color for the point, if the point is drawn as a circle.

The point is drawn as a circle if the PointUseBitmap property is FALSE.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation
 | Using Color Values in LEADTOOLS


PointFillColor property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | TColor PointFillColor
Delphi Syntax | PointFillColor: Tcolor
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the color used to fill the inside of a point, if it is drawn as a circle and the PointTransparentFill property is FALSE.

The point is drawn as a circle if the PointUseBitmap property is FALSE.

To convert from a TColor value to a COLORREF value, call the ColorToRGB method. To convert from a COLORREF value to a TColor value, cast the COLORREF value to a TColor type.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TSnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TSnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation
 | Using Color Values in LEADTOOLS


PointFixedSize property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | bool PointFixedSize
Delphi Syntax | PointFixedSize: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether a point drawn as a circle is a fixed size. Possible values are:

Setting | Description
TRUE | If the point is drawn as a circle, the size does not change, regardless of the zoom factor
FALSE | If the point is drawn as a circle, the size changes with the zoom factor.

The point is drawn as a circle if the PointUseBitmap property is FALSE.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TSnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TSnnPointOptions), PointFillColor property (TSnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


PointRadius property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | int PointRadius
Delphi Syntax | PointRadius: L_INT32
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets the radius of the point, in pixels (assuming no zooming), if the point is drawn as a circle.

The point is drawn as a circle if the PointUseBitmap property is FALSE.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


PointTransparentFill property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | bool PointTransparentFill
Delphi Syntax | PointTransparentFill: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether the inside of a point, drawn as a circle, is transparent or uses the fill color. Possible values are:

Setting | Description
VARIANT_TRUE | The inside of the point, drawn as a circle, is transparent.
VARIANT_FALSE | The inside of the point, drawn as a circle, is filled with the color in the PointFillColor property.

The point is drawn as a circle if the PointUseBitmap property is FALSE.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TSnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TSnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations: Object Manipulation


PointUseBitmap property (TAnnPointOptions)

C++ Builder example

Delphi example

Builder Syntax | bool PointUseBitmap
Delphi Syntax | PointUseBitmap: Boolean
Overview | Refer to Implementing Annotations.

Remarks

Gets or sets a value that indicates whether to draw the point using the current point bitmap or as a circle. Possible values are:

Setting | Description
TRUE | Draw the point using the current point bitmap.
FALSE | Draw the point as a circle.

See Also

Elements: | AnnPointOptions property, AnnGetPointOptions method, AnnSetPointOptions method, Flags property (TAnnPointOptions), PointUseBitmap property (TannPointOptions), PointBitmapTransparent property (TAnnPointOptions), PointBitmapTransparentColor property (TAnnPointOptions), PointRadius property (TAnnPointOptions), PointBorderColor property (TAnnPointOptions), PointTransparentFill property (TAnnPointOptions), PointFillColor property (TAnnPointOptions), PointFixedSize property (TAnnPointOptions), PointBitmap property (TAnnPointOptions)
Topics: | Annotations (Document/Medical only): Object Manipulation


AutoSetTool property (TAnnMenu)

C++ Builder example

Delphi 4.0 example

Builder Syntax | bool AutoSetTool
Delphi Syntax | AutoSetTool: Boolean
Overview | Refer to Annotation Toolbar .

Remarks

(Document/Medical only) Contains a value that indicates whether the toolbar will automatically set the automation tool. Possible values are:

Value | Meaning
True | Setting the AnnTool property of the LEADAnn control will also set the Tool property of the AnnTool object and will update the annotation toolbar, if the bar has been created.
False | The AnnTool property of the LEADAnn control and the Tool property of the AnnTool object are independent.

To synchronize the AnnTool property of the LEADAnn control and the Tool property of the AnnTool object, set AutoSetTool to True, or keep track of the currently selected tool by intercepting the OnAnnToolChecked event of the LEADAnn control.

See Also

Elements | ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property, ButtonCount property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonBitmapDown property (TAnnMenu)

C++ Builder example

Delphi 4.0 example

Builder Syntax | LEADTyp::TBitmapHandle ButtonBitmapDown[int iButtonIndex]
Delphi Syntax | ButtonBitmapDown [iButtonIndex: integer]: TBitmaphandle
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains a handle to a bitmap used to paint the specified button when the button is pressed. If this property is 0, the control will assume the same bitmap is used to paint the button when it is up or down.

See Also

Elements | AutoSetTool property, ButtonBitmapUp property, ButtonColumns property, ButtonCount property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonBitmapUp property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | LEADTyp::TBitmapHandle ButtonBitmapUp[int iButtonIndex]
Delphi Syntax | ButtonBitmapUp [iButtonIndex: integer]: TBitmapHandle
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains a handle to a bitmap used to paint the specified button when the button is up. If the ButtonBitmapDown property is 0, the control will assume the same bitmap is used to paint the button when it is up or down.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonColumns property, ButtonCount property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonColumns property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ButtonColumns
Delphi Syntax | ButtonColumns: Integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Number of the columns in the Toolbar. The buttons in the toolbar are ordered left to right and top to bottom.

If the number of columns is changed, the number of rows is adjusted accordingly. The relationship between rows and columns is given by the following equation:

ButtonRows = (ButtonCount + ButtonColumns – 1) / ButtonColumns

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonCount property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonCount property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ButtonCount
Delphi Syntax | ButtonCount: Integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains the number of buttons in the toolbar. To add another toolbar button to an existing toolbar, set the tool and the bitmaps for the new button in the ButtonTool property, and increment the number of buttons to make the button visible.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonMenuText property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | char * ButtonMenuText [int iButtonIndex][int iToolIndex]
Delphi Syntax | ButtonMenuText [iButtonIndex: integer; iToolIndex: integer]: PChar
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) String containing the menu text for the specified menu item of the specified button in the AnnToolbar object. For example, if ButtonMenuText [2,1] contains the string "Select", then when the user clicks the third button of the annotation toolbar (iButtonIndex is zero-based), a menu will be displayed. The second menu item will display the text Select.

This property is only valid if ButtonMenuTextID Property is -1.

The ButtonMenuXXX properties are only used for buttons that are associated with multiple tools.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonMenuTextID property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ButtonMenuTextID [int iButtonIndex][int iToolIndex]
Delphi Syntax | ButtonMenuTextID [iButtonIndex: Integer; iToolIndex: Integer]: Integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains an index into the annotation menu dialog strings (ANNAUTOTEXT_XXX). If this value is -1, the text for the tool tip is in the ButtonMenuText property. If this value is >= 0, this value is an index into the set of annotation menu dialog strings and the tool tip text will come from here.

The index stored in this property associates the corresponding menu text with the specified menu item of the specified menu button. For example, if ButtonMenuTextID[2, 1) contains the value ANNAUTOTEXT_MENU_PROTRACTOR, then the text associated with the second menu item of the third button of the annotation toolbar will be "&Protractor …". Therefore, when the user clicks on the third button of the annotation toolbar, a menu will be displayed. The second menu item will display Protractor.

Please note that a character following an ampersand will be underlined.

The ButtonMenuXXX properties are only used for buttons that are associated with multiple tools.

For a list of the available dialog strings, refer to Annotation Automation Strings.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonMenuTool property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ButtonMenuTool [int iButtonIndex][int iToolIndex]
Delphi Syntax | ButtonMenuTool [iButtonIndex: integer; iToolIndex: integer]: integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains the tool associated with the specified menu item of the specified annotation toolbar button.

For example, if ButtonMenuTool [2, 1] contains the value ANNTOOL_POINT, then the second menu item of the third button of the annotation toolbar will be associated with the Point Tool. Therefore, when the user clicks on the third button of the annotation toolbar a menu will be displayed with all the tools associated with that button. The second menu item will be the Point Tool.

Use the ButtonMenuText and ButtonMenuTextID properties to set the text for the menu item.

The ButtonMenuXXX properties are only used for buttons that are associated with multiple tools.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonRows property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ButtonRows
Delphi Syntax | ButtonRows: Integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Number of rows in the toolbar. The buttons in the toolbar are ordered left to right and top to bottom.

If the number of rows changes, the number of columns is adjusted accordingly. The relationship between rows and columns is given by the following equation:

ButtonColumns = (ButtonCount + ButtonRows – 1) / ButtonRows

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonTool property (TAnnMenu)

C++ Builder example

Delphi 4.0 example

Builder Syntax | int ButtonTool [int iButtonIndex]
Delphi Syntax | ButtonTool [iButtonIndex: Integer]: Integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains the tool associated with the specified button of the annotation toolbar. This is actually an array of values that indicates the tools associated with every button in the annotation toolbar.

If ButtonToolCount Property for the specified button is one, then the button has one tool associated with it, and the ButtonTool property and the Tool property contain the ANNTOOL_XXX constant corresponding to that tool.

If ButtonToolCount for the specified button is >1 then there are several tools associated with the specified button. In that case, ButtonTool () and the Tool property contain the ANNTOOL_XXX constant corresponding to the currently selected tool. When the user clicks on a button having more than one tool, a menu is displayed. The ButtonMenuXXX properties describe the menu items and the tools associated with the specified button.

For example, if ButtonToolCount Property [2] contains the value 1, then there is only one tool associated with the third button of the annotation toolbar. The constant for that tool is contained in ButtonTool [2].

If ButtonToolCount Property [2] contains the value 3, then there are three tools associated with the third button of the annotation toolbar. Clicking on this button will display a menu. The text for the menu is set in the ButtonMenuText Property and ButtonMenuTextID Property properties. The tools associated with the menu are set in the ButtonMenuTool property.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonToolCount property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ButtonToolCount [int iButtonIndex]
Delphi Syntax | ButtonToolCount [iButtonIndex: Integer]: Integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains the number of tools associated with the specified button in the AnnToolbar object. For example, if ButtonToolCount [2] contains the value 4, then there are four tools associated with the third button in the AnnToolbar object. (iButtonIndex is zero-based.)

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonToolTipText property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | char * ButtonToolTipText [int iButtonIndex]
Delphi Syntax | ButtonToolTipText [iButtonIndex: Integer]: PChar
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) String containing the tooltip text for the specified button in the AnnToolbar object. This text will be displayed when the user places the cursor over the associated button in the Annotation Toolbar. For example, if ButtonToolTipText [2] contains the string "Select", then when the user places the cursor over the third button of the annotation toolbar (iButtonIndex is zero-based), the text "Select" will be displayed.

This property is only valid if ButtonToolTipTextID Property is -1.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonToolTipTextID property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int ButtonToolTipTextID [int iButtonIndex]
Delphi Syntax | ButtonToolTipTextID [iButtonIndex: Integer]: Integer;
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains an index into the annotation menu dialog strings (ANNAUTOTEXT_XXX). If this value is -1, the text for the tool tip is in the ButtonToolTipText property. If this value is >= 0, this value is an index into the set of annotation menu dialog strings and the tool tip text will come from here.

For a list of the available dialog strings, refer to Annotation Automation Strings.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ButtonVisible property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | bool ButtonVisible [int iButtonIndex]
Delphi Syntax | ButtonVisible [iButtonIndex: integer]: Boolean
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains a value that indicates whether the specified button is visible. This can be set to hide specific buttons on the toolbar.

If a button is hidden on the annotation toolbar, the remaining buttons are rearranged to take up the space left by the hidden button.

Possible values are:

Value | Meaning
True | The specified button is visible.
False | The specified button is invisible.

For example, if ButtonVisible [2] is set to False, the third button in the annotation toolbar will be hidden and the remaining buttons will be rearranged to take up the space left by the hidden button.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, CreateTB method, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


h_Wnd property (TAnnMenu)

C++ Builder example

Delphi 4.0 example

Builder Syntax | HWND h_Wnd
Delphi Syntax | h_Wnd: HWND
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only Read only) Is the handle of the annotation toolbar.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


Tool property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int Tool
Delphi Syntax | Tool: integer
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Gets or sets the currently selected tool. When setting this property, the first button in the toolbar that has an assigned tool with the value stored in this property will be enabled. For a list of possible values, refer to Annotation Toolbar Buttons.

Please note that the automation mode does not automatically create objects for the ANNTOOL_USER_XXX tools.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Visible property
Topics | Annotations (Document/Medical only): Automation


Visible property (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | bool Visible
Delphi Syntax | Visible: Boolean
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Contains a value that indicates whether the toolbar is visible or not. This is the only property that can be set before calling the CreateTB method. Possible values are:

Value | Meaning
True | The toolbar is visible.
False | The toolbar is not visible.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, CreateTB method, h_Wnd property, Tool property
Topics | Annotations (Document/Medical only): Automation


CreateTB method (TAnnMenu)

C++ Builder example

Delphi example

Builder Syntax | int CreateTB (int x, int y, int iAlign);
Delphi Syntax | Function CreateTB (x: Integer; y: Integer; iAlign: Integer): Integer;
Overview | Refer to Annotation Toolbar

Remarks

(Document/Medical only) Creates the annotation toolbar. The toolbar must be created before using most of the properties associated with the AnnToolbar object. Only the Visible property can be used before creating the toolbar.

See Also

Elements | AutoSetTool property, ButtonBitmapDown property, ButtonBitmapUp property, ButtonColumns property,ButtonCount property, ButtonMenuText property, ButtonMenuTextID property, ButtonMenuTool property, ButtonRows property, ButtonTool property, ButtonToolCount property, ButtonToolTipText property, ButtonToolTipTextID property, ButtonVisible property, h_Wnd property, Tool property, Visible property
Topics | Annotations (Document/Medical only): Automation


ContinueBrowse property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool ContinueBrowse
Delphi Syntax | ContinueBrowse : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only) If this property is set to True during the ThumbnailEvent event, thumbnail generation will continue. If you wish to stop thumbnail generation, set this property to false in the ThumbnailEvent event.

See Also

Elements: | EnableMethodErrors property, StopOnError property, ThumbnailEvent event, BrowseDir method
Topics: | Raster Images: Displaying Images


DitherFlags property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int DitherFlags
Delphi Syntax | DitherFlags : longInt
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only)Indicates the dithering options that should be used when both ForceSize and MaintainAspect are True and the source image is not 24-bit. In this case, the thumbnail image is converted to 24-bit, then, combined with a "background" bitmap. Then, the resulting bitmap is returned to the thumbnail image's original bit-depth using this setting.

Possible values are:

Setting | Description
CRF_NODITHERING | Use nearest color matching.
CRF_FLOYDSTEINDITHERING | Use Floyd-Steinberg dithering.
CRF_STUCKIDITHERING | Use Stucki dithering.
CRF_BURKESDITHERING | Use Burkes dithering.
CRF_SIERRADITHERING | Use Sierra dithering.
CRF_STEVENSONARCEDITHERING | Use Stevenson Arce dithering.
CRF_JARVISDITHERING | Use Jarvis dithering.
CRF_ORDEREDDITHERING | Use ordered dithering, which is faster but less accurate than other dithering methods.
CRF_CLUSTEREDDITHERING | Use clustered dithering.

See Also

Elements: | BrowseDir method, PaletteFlags property, InfoBits property, ThumbnailBitsPerPixel property, ForceSize property, MaintainAspect property, ColorRes method (Main Control)
Topics: | Raster Images: Displaying Images


EnableMethodErrors property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool EnableMethodErrors
Delphi Syntax | EnableMethodErrors : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Specifies whether LEADTOOLS generates runtime exceptions (in addition to method return values). If EnableMethodErrors is True, the runtime exceptions will be generated. If FALSE, they will not be generated.

See Also

Elements: | ContinueBrowse property, StopOnError property, Error property, ErrorMsg property
Topics: | Raster Images: Displaying Images


Error property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int Error
Delphi Syntax | Error : Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only)Gets the result of last Thumbnail Browser operation. If the last Thumbnail Browser method resulted in no errors, this property returns SUCCESS.

See Also

Elements: | EnableMethodErrors property, ErrorMsg property
Topics: | Raster Images: Displaying Images


ErrorMsg property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString ErrorMsg
Delphi Syntax | ErrorMsg : String
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only)Gets description of the result of last Thumbnail Browser operation. If the last Thumbnail Browser method resulted in no errors, this property returns an empty string.

See Also

Elements: | EnableMethodErrors property, Error property
Topics: | Raster Images: Displaying Images


ExpandMultipage property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool ExpandMultipage
Delphi Syntax | ExpandMultipage : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Flag indicating whether or not to expand multipage files. If True, each page from a multipage file will be loaded.

If this property is set to True, the control will expand any multipage files it finds, and generate thumbnails for each page.

This defaults to False.

See Also

Elements: | BrowseDir method
Topics: | Raster Images: Displaying Images


Filter property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString Filter
Delphi Syntax | Filter : String
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Character string containing the file filter to browse for. Ex. *.jpg.

This defaults to "*.*", which searches all files.

See Also

Elements: | BrowseDir method
Topics: | Raster Images: Displaying Images


ForceSize property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool ForceSize
Delphi Syntax | ForceSize : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Flag indicating whether the generated thumbnail should be forced to the requested size even if MaintainAspect is set to True. If set to True, the thumbnail bitmap will be generated by creating a "canvas" bitmap with the requested size, and then centering the actual image inside that bitmap. Note this is a slower process.

This property is ignored if MaintainAspect is False.

Default setting is False.

See Also

Elements: | BrowseDir method, ThumbnailWidth property, ThumbnailHeight property, MaintainAspect property, ThumbnailBackgroundColor property, Resample property
Topics: | Raster Images: Displaying Images


IncludeSubDirectories property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool IncludeSubDirectories
Delphi Syntax | IncludeSubDirectories : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Flag indicating whether or not to recurse subdirectories when looking for files.

If this property is set to True, the control will search for files in the specified directory, and any subdirectories.

This defaults to False.

See Also

Elements: | BrowseDir method
Topics: | Raster Images: Displaying Images


InfoBits property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoBits
Delphi Syntax | InfoBits: Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the number of bits per pixel of the file from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoCompression property, InfoFormat property, InfoWidth property, InfoHeight property, InfoTotalPages property, InfoPage property, InfoSizeDisk property, InfoSizeMem property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoCompression property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | System::AnsiString InfoCompression
Delphi Syntax | InfoCompression: String
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the compression method of the file from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoFormat property, InfoWidth property, InfoHeight property, InfoTotalPages property, InfoPage property, InfoSizeDisk property, InfoSizeMem property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoFormat property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoFormat
Delphi Syntax | InfoFormat: Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the format of the file from which the thumbnail was generated.

For possible values, refer to Formats of Input Files.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoWidth property, InfoHeight property, InfoTotalPages property, InfoPage property, InfoSizeDisk property, InfoSizeMem property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoHeight property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoHeight
Delphi Syntax | InfoHeight: Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the height of the image from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoWidth property, InfoTotalPages property, InfoPage property, InfoSizeDisk property, InfoSizeMem property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoPage property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoPage
Delphi Syntax | InfoPage: Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the number of the page within the file, from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoWidth property, InfoHeight property, InfoTotalPages property, InfoSizeDisk property, InfoSizeMem property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoSizeDisk property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoSizeDisk
Delphi Syntax | InfoSizeDisk: LongInt
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the size of the file from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoWidth property, InfoHeight property, InfoTotalPages property, InfoPage property, InfoSizeMem property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoSizeMem property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoSizeMem
Delphi Syntax | InfoSizeMem: LongInt
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the amount of memory required to load the original image from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoWidth property, InfoHeight property, InfoPage property, InfoTotalPages property, InfoSizeDisk property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoTotalPages property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoTotalPages
Delphi Syntax | InfoTotalPages : Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the total number of pages in the file from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoWidth property, InfoHeight property, InfoPage property, InfoSizeMem property, InfoSizeDisk property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoWidth property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoWidth
Delphi Syntax | InfoWidth: Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the width of the image from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoTotalPages property, InfoHeight property, InfoPage property, InfoSizeMem property, InfoSizeDisk property, InfoXRes property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoXRes property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoXRes
Delphi Syntax | InfoXRes : Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the x resolution of the original image from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoWidth property, InfoHeight property, InfoPage property, InfoSizeMem property, InfoSizeDisk property, InfoTotalPages property, InfoYRes property
Topics: | Raster Images: Displaying Images


InfoYRes property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int InfoYRes
Delphi Syntax | InfoYRes : Integer
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only, Read-only) Is the y resolution of the original image from which the thumbnail was generated.

This property is updated by the successful generation of a thumbnail. You can read this property in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, BrowseDir method, InfoBits property, InfoCompression property, InfoFormat property, InfoWidth property, InfoHeight property, InfoPage property, InfoSizeMem property, InfoSizeDisk property, InfoTotalPages property, InfoXRes property
Topics: | Raster Images: Displaying Images


LoadStamp property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool LoadStamp
Delphi Syntax | LoadStamp : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Flag indicating whether or not to attempt to load stamps from file formats that support preview images, such as JPEG and LEAD CMP.

Default setting is True.

See Also

Elements: | BrowseDir method, ThumbnailWidth property, ThumbnailHeight property, MaintainAspect property, ThumbnailBackgroundColor property, ForceSize property, Resample property
Topics: | Raster Images: Displaying Images


MaintainAspect property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool MaintainAspect
Delphi Syntax | MaintainAspect : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Flag indicating if aspect ratio of the image should be maintained when generating thumbnails. When set to True, the generated thumbnail's width and height will not match both ThumbnailWidth and ThumbnailHeight if the original aspect ratio was not the same as the ratio between ThumbnailWidth and ThumbnailHeight. If you desire the thumbnail be generated with exactly the requested width and height while still maintaining, aspect ratio of the actual image, set both MaintainAspect and ForceSize to True.

Default setting is True.

See Also

Elements: | BrowseDir method, ThumbnailWidth property, ThumbnailHeight property, ForceSize property, ThumbnailBackgroundColor property, Resample property
Topics: | Raster Images: Displaying Images


MaxSizeDisk property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int MaxSizeDisk
Delphi Syntax | MaxSizeDisk : longint
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) This value specifies the filesize limit of files for which the thumbnail browser will attempt to load.

Set this to 0 to indicate there should be no filesize limit.

This defaults to 0.

See Also

Elements: | BrowseDir method, MaxSizeMem property, InfoSizeDisk property, InfoSizeMem property
Topics: | Raster Images: Displaying Images


MaxSizeMem property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int MaxSizeMem
Delphi Syntax | MaxSizeMem : longInt
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) This value specifies the limit of the required memory to load an image for images that the thumbnail browser will attempt to load.

Set this to 0 to indicate there should be no memory size limit.

This defaults to 0.

See Also

Elements: | BrowseDir method, MaxSizeMem property, InfoSizeDisk property, InfoSizeMem property
Topics: | Raster Images: Displaying Images


PaletteFlags property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int PaletteFlags
Delphi Syntax | PaletteFlags : longInt
Overview | Refer to Thumbnail Browser.

Remarks

(Runtime-only)Indicates the palette option or color order that should be used when both ForceSize and MaintainAspect are True and the source image is not 24-bit. In this case, the thumbnail image is converted to 24-bit, then, combined with a "background" bitmap. Then, the resulting bitmap is returned to the thumbnail image's original bit-depth using this setting.

Possible values are:

Setting | Description
CRF_FIXEDPALETTE | Use the LEAD fixed palette.
CRF_NETSCAPEPALETTE | Use the fixed palette that is employed by Netscape Navigator and by Microsoft Internet Explorer.
CRF_OPTIMIZEDPALETTE | Create an optimized palette.
CRF_IDENTITYPALETTE | Insert the Windows system palette, and optimize the remaining colors.
CRF_USERPALETTE | Use the palette specified in the UserPalette property.
CRF_BYTEORDERBGR | Use BGR color order. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_BYTEORDERRGB | Use RGB color order. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_BYTEORDERGRAY | Use grayscale. This flag is only valid for 12 or 16-bit grayscale images. 12 and 16-bit grayscale images are supported in the Document/Medical toolkits only.

See Also

Elements: | BrowseDir method, DitherFlags property, InfoBits property, ThumbnailBitsPerPixel property, ForceSize property, MaintainAspect property, ColorRes method (Main Control)
Topics: | Raster Images: Displaying Images


Resample property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool Resample
Delphi Syntax | Resample : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Flag indicating whether or not to use interpolated resize when generating thumbnails.

Interpolated resize is slower, but produces better quality thumbnails.

Default setting is True.

See Also

Elements: | BrowseDir method, ThumbnailWidth property, ThumbnailHeight property, MaintainAspect property, ThumbnailBackgroundColor property, ForceSize property, LoadStamp property
Topics: | Raster Images: Displaying Images


SkipFile property (ThumbnailBrowser Control)

C++ Builder example

Delphi example

Builder Syntax | bool SkipFile;
Delphi Syntax | SkipFile: Boolean;
Overview | Refer to Thumbnail Browser.

Remarks

Runtime only) Indicates whether to skip the file passed to the ThumbnailEvent event. Possible values are:

Value | Meaning
TRUE | If the nStatusCode parameter of the ThumbnailEvent event is BROWSE_PRELOAD, then skip the file indicated in the pszFilename parameter of the ThumbnialEvent event. This allows the user to avoid the internal file information processing. If the nStatusCode parameter is any other value, the file will not be skipped.
FALSE | Do not skip the file indicated in the pszFilename parameter of the ThumbnailEvent event.

See Also

Elements: | EnableMethodErrors property, StopOnError property, ThumbnailEvent event, BrowseDir method, ContinueBrowse property
Topics: | Raster Images: Using the Thumbnail Browser


StopOnError property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool StopOnError
Delphi Syntax | StopOnError : Boolean
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Flag indicating whether or not to stop generating thumbnails when an error occurs.

Default setting is False.

See Also

Elements: | EnableMethodErrors property, ContinueBrowse property, ThumbnailEvent event, BrowseDir method
Topics: | Raster Images: Displaying Images


ThumbnailBackgroundColor property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | Graphics::TColor ThumbnailBackgroundColor
Delphi Syntax | ThumbnailBackgroundColor : TColor
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Background color to use if both ForceSize and MaintainAspect are True.

Default setting is clGray.

See Also

Elements: | BrowseDir method, ThumbnailWidth property, ThumbnailHeight property, MaintainAspect property, ForceSize property
Topics: | Raster Images: Displaying Images


ThumbnailBitsPerPixel property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int ThumbnailBitsPerPixel
Delphi Syntax | ThumbnailBitsPerPixel : integer
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Specifies the bits per pixel for each generated thumbnail bitmap.

You can specify 0 to indicate the thumbnail should be the same bits per pixel as the original file from which is was generated.

Default setting is 24.

See Also

Elements: | BrowseDir method, ThumbnailWidth property, ThumbnailHeight property
Topics: | Raster Images: Displaying Images


ThumbnailHeight property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int ThumbnailHeight
Delphi Syntax | ThumbnailHeight : Integer
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Specifies the requested height of the generated thumbnails.

If 0 is specified for either the ThumbnailHeight property or the ThumbnailWidth property, the image will not be resized. The whole image will be returned in the ThumbnailEvent event.

If –1 is specified for either the ThumbnailHeight property or the ThumbnailWidth property, the image will not be loaded at all. The ThumbnailEvent event will occur for each file, but will only receive file information, not a valid image.

Default setting is 80.

See Also

Elements: | BrowseDir method, ThumbnailWidth property, ThumbnailBitsPerPixel property, MaintainAspect property, ForceSize property, ThumbnailBackgroundColor property, Resample property
Topics: | Raster Images: Displaying Images


ThumbnailWidth property (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int ThumbnailWidth
Delphi Syntax | ThumbnailWidth : Integer
Overview | Refer to Thumbnail Browser.

Remarks

(published property, available at design time) Specifies the requested width of the generated thumbnails.

If 0 is specified for either the ThumbnailHeight property or the ThumbnailWidth property, the image will not be resized. The whole image will be returned in the ThumbnailEvent event.

If –1 is specified for either the ThumbnailHeight property or the ThumbnailWidth property, the image will not be loaded at all. The ThumbnailEvent event will occur for each file, but will only receive file information, not a valid image.

Default setting is 80.

See Also

Elements: | BrowseDir method, ThumbnailHeight property, ThumbnailBitsPerPixel property, MaintainAspect property, ForceSize property, ThumbnailBackgroundColor property, Resample property
Topics: | Raster Images: Displaying Images


BrowseDir method (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int __fastcall BrowseDir(System::AnsiString Directory);
Delphi Syntax | function BrowseDir(Directory: string): Integer;
Overview | Refer to Thumbnail Browser.

Remarks

Browses the specified directory for supported images, and generates thumbnails for each image file that is found.

Each generated thumbnail can be processed in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, ContinueBrowse property, Filter property, ThumbnailWidth property, ThumbnailHeight property, ThumbnailBitsPerPixel property, MaintainAspect property, ForceSize property, ThumbnailBackgroundColor property, LoadStamp property, Resample property, StopOnError property, IncludeSubDirectories property, ExpandMultipage property, MaxSizeDisk property, MaxSizeMem property, DitherFlags property, PaletteFlags property
Topics: | Raster Images: Displaying Images


CreateThumbnailFromFile method (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | int fastcall CreateThumbnailFromFile (char * pszFilename, int nPage);
Delphi Syntax | Function CreateThumbnailFromFile (pszFilename: PChar; nPage: Integer): Integer
Overview | Refer to Thumbnail Browser.

Remarks

Generates a thumbnail from the specified image file.

The generated thumbnail can be processed in the ThumbnailEvent event.

See Also

Elements: | ThumbnailEvent event, ContinueBrowse property, Filter property, ThumbnailWidth property, ThumbnailHeight property, ThumbnailBitsPerPixel property, MaintainAspect property, ForceSize property, ThumbnailBackgroundColor property, LoadStamp property, Resample property, StopOnError property, IncludeSubDirectories property, ExpandMultipage property, MaxSizeDisk property, MaxSizeMem property, DitherFlags property, PaletteFlags property
Topics: | Raster Images: Using the Thumbnail Browser


IsSupportLocked method (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | bool __fastcall IsSupportLocked(int iType);
Delphi Syntax | function IsSupportLocked(iType: Integer): Boolean;
Overview | Refer to Thumbnail Browser.

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
Topics: | Raster Images: Displaying Images


UnlockSupport method (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall UnlockSupport(int iType, System::AnsiString sPass);
Delphi Syntax | procedure UnlockSupport(iType: integer; sPass : String);
Overview | Refer to Thumbnail Browser.

Remarks

Unlocks support for an optional feature, such as LEADTOOLS Document/Medical capabilities.

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

Note:

Unlocking the Document/Medical capabilities is necessary only if you upgrade another product to a Document/Medical product. If your LEADTOOLS package is labeled Document/Medical, the Document/Medical capabilities are enabled automatically; your application does not have to unlock them.

See Also

Elements: | IsSupportLocked method.
Topics: | Raster Images: Displaying Images


ThumbnailEvent event (Thumbnail Browser Control)

C++ Builder example

Delphi example

Builder Syntax | void __fastcall ThumbnailEvent(TObject *Sender,TBitmapHandle Bitmap, AnsiString FileName, int nStatusCode, int nPercent)
Delphi Syntax | procedure ThumbnailEvent(Sender: TObject; Bitmap: TBitmapHandle; FileName: String; nStatusCode, nPercent);
Overview | Refer to Thumbnail Browser.

Remarks

Occurs during thumbnail generation.

You must use this event to process each generated thumbnail.

You can also use this event to detect progress of image loading.

See Also

Elements: | ContinueBrowse property, EnableMethodErrors property, StopOnError property, BrowseDir method
Topics: | Raster Images: Displaying Images


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 the UnlockSupport method. L_KEY_LTPRO can be found in LTLckKey.inc.

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 method.

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, MRC 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.

MRC Support. [Document/Medical]. LEADTOOLS supports the Mixed Raster Content format, adding support for color documents containing mixed image and text components.

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. [Document/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 the Products help file to review the full line of LEADTOOLS Products.


Document/Medical Support and Licensing Requirements

Document/Medical Licensing and Royalty Agreements:

Congratulations! You have licensed one of the LEADTOOLS Document/Medical software products, the most comprehensive imaging toolkits on the market, enabling you to create powerful imaging applications. The license terms for LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite require runtime licensing based on the number of copies of your application that you deploy (i.e., distribute or install and use internally).

By paying the initial box price for the applicable LEADTOOLS product, you have obtained a development license, which entitles you to develop your application and test it. Once completed, if you wish to distribute the application or deploy it internally on multiple machines, you are required to enter into a duplication and distribution agreement with LEAD. You have the ability to choose from several licensing options depending on your volume needs.

The product you are installing is a fully functional working version and includes support for all features in LEADTOOLS Document Imaging, LEADTOOLS Document Imaging Suite, LEADTOOLS Medical Imaging and LEADTOOLS Medical Imaging Suite. (Depending on which product you have licensed, some of the features may ultimately not be available to you. See the on-line help file for a product feature comparison.) Until you sign and return the correct licensing agreement, your application will display a "nag" message. Once LEAD receives the executed contract, we will provide you a password that will permit you to terminate the "nag" message for the product that you have licensed. In addition to providing the password, you must also use the no nag version of the LTKRN DLL, found in the REDIST\NONAG directory. This is also the version you must redistribute.

Duplication and Distribution Agreements

Click this button to start the LEADTOOLS Licensing help file, which contains information governing your use of the software.


JPEG 2000 Plug In Support Instructions

To implement JPEG 2000 Plug In support, you must do the following:

1. | Find the JPEG 2000 Plug In key on the JPEG 2000 Plug In Certificate e-mailed to you.
2. | Use the JPEG 2000 Plug In keyword with the UnlockSupport method to implement JPEG 2000 Plug In support in your application.


LEAD Bitmap in Memory

The LEAD bitmap in memory is not scaled. Therefore, when translating coordinates and measurements from the LEAD control's client area, you must account for the scaling (zooming) and the offsets (scrolling) of the image in the client area.

For a description of how to translate the coordinates, refer to the code example for the particular method, property, or event.

For an illustration of the relationship between a LEAD bitmap in memory and the LEAD control's client area, refer to Concepts and Definitions.


LEAD Control's Client Area

The LEAD control's client area is where the scaled image of the LEAD bitmap is displayed. Sometimes you must translate coordinates and measurements from the client area to the bitmap, which is not scaled.

For a description of how to translate the coordinates, refer to the code example for the particular method, property, or event.

For an illustration of the relationship between a LEAD bitmap in memory and the LEAD control's client area, refer to Concepts and Definitions.


LEADTOOLS Documentation

LEADTOOLS Reference Manuals

LEADTOOLS provides reference manuals that contain the same information as the online help. You can print them from PDF files. Please note that due to the large size of the PDF files that contain the LEADTOOLS manuals, these files are no longer included in the setup. Instead, these PDF files can be downloaded from our website at http://support.leadtools.com/SupportPortal/DesktopDefault.aspx?tabindex=3&tabid=27.

To print the PDF files, you must use the Adobe Acrobat Reader 3.0 or higher. 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.


LEADTOOLS Nag Message

If you obtained a royalty-free LEADTOOLS product, simply distribute the LTKRN DLL from the REDIST\NoNagLTKRN directory.

If you obtained a royalty LEADTOOLS product (Document/Medical), then you will see a nag Message when you run your application. The LTKRN DLL that was installed into your system directory produces this message. This LTKRN DLL has the Document/Medical features unlocked for you. In order to remove the nag message, you must contact LEAD Technologies to obtain "keys" to unlock the specialized features in the "no-nag" LTKRN DLL, which is located in the REDIST\NoNagLTKRN directory. When you distribute your application, you must distribute the LTKRN DLL from the REDIST\NoNagLTKRN directory, and must unlock the specialized features in your application.


PDF Plug in Support Instructions

To implement PDF Plug in support, you must do the following:

1. | Find the PDF Plug in key on the PDF Plug in Certificate e-mailed to you.
2. | Use the PDF Plug in keyword with the UnlockSupport method function to implement PDF Plug in support in your application.


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

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 the Licensing help file to review the License Agreements governing your use of the software.

Click this button to start the Products help file to review the full line of LEADTOOLS Products.

Click this button to start the Imaging help file to review the full line of LEADTOOLS Image Categories.


.topic 0x10000000
 Exif Examples

.topic 0x10000001
 Setting Defaults

 Note:

 This topic is for  toolkits only.

 When using annotations in design mode, you can change the default properties by clicking with the right mouse button on an empty spot (a place on the image without any annotations). The popup menu lets you do the following:

 Undo the last user action.

 Select all annotation objects in the window.

 Delete all selected objects.

 Change the default line width and style properties. See .

 Change the default fill mode (transparent, translucent, or opaque) and the fill pattern. See .

 Change the polygonal fill mode, which controls which areas are filled when lines cross. See .

 Change the default foreground and background colors. See .

 Change the font selection and font characteristics. See .

 Change the ROP2 code. See

 The default background color does not affect highlight, redaction, and note objects. To change the default background color for these objects, you have to use the appropriate menu item, such as Redact Background Color.

.topic 0x10000002
 Text with an Outline and Drop Shadow

 The following properties are set in this example:

 TextStyle

 etsOutlineBlock

 TextFont.Color

 clBlue

 TextHiliteColor

 clRed

 ShadowColor

 clGreen

 ShadowXDepth

 5

 ShadowYDepth

 5

.topic 0x10000003
 Text Where the Effect Disables the Drop Shadow

 The following properties are set in this example:

 TextStyle

 etsRaisedHeavy

 DrawFontColor

 clBlue

 TextHiliteColor

 clRed

 ShadowColor

 clGreen

 ShadowXDepth

 5 (disabled by the effect)

 ShadowYDepth

 5 (disabled by the effect)

.topic 0x10000004
 Shape with a Raised Inner Band

 The following properties are set in this example:

 ShapeInnerBandHiliteColor

 clAqua

 ShapeInnerBandShadowColor

 clNavy

 ShapeInnerBandStyle

 sibRaised

 ShapeBorderColor

 clBlack

 PatternStyle

 epsSolid

 PatternForeColor

 clBlue

.topic 0x10000005
 Shape with an Inset Inner Band

 The following properties are set in this example:

 ShapeInnerBandHiliteColor

 clAqua

 ShapeInnerBandShadowColor

 clNavy

 ShapeInnerBandStyle

 sibInset

 ShapeBorderColor

 clBlack

 PatternStyle

 epsSolid

 PatternForeColor

 clBlue

.topic 0x10000006
 Shape with a Raised Outer Band

 The following properties are set in this example:

 ShapeOuterBandHiliteColor

 clAqua

 ShapeOuterBandShadowColor

 clNavy

 ShapeOuterBandStyle

 sobRaised

 ShapeBorderColor

 clBlack

 PatternStyle

 epsSolid

 PatternForeColor

 clBlue

.topic 0x10000007
 Shape with an Inset Outer Band

 The following properties are set in this example:

 ShapeOuterBandHiliteColor

 clAqua

 ShapeOuterBandShadowColor

 clNavy

 ShapeOuterBandStyle

 sobInset

 ShapeBorderColor

 clBlack

 PatternStyle

 epsSolid

 PatternForeColor

 clBlue

.topic 0x10000008
 Shape with a Fill Pattern and Drop Shadow

 The following properties are set in this example:

 ShapeBorderColor

 clBlue

 ShadowColor

 clBlack

 ShadowXDepth

 5

 ShadowYDepth

 7

 ShapeBackgroundStyle

 sbsOpaque

 PatternStyle

 epsCross

 PatternForeColor

 clRed

 PatternBackColor

 clAqua


Miscellaneous Methods and Properties

UnlockSupport method

IsSupportLocked method


Changing the Annotation Automation Background Colors

Note:

This topic is for Document/Medical only.

When working with automated annotations, the background color of most objects created by a particular automation object can be changed by calling the AnnSetBackColor method for that automation object. However, the Note (ANNOBJECT_NOTE), Push-pin (ANNOBJECT_PUSHPIN), Redact (ANNOBJECT_REDACT) and Hilite (ANNOBJECT_HILITE) objects cannot be changed using this function and must be handled differently.

The automation object (ANNOBJECT_AUTOMATION) contains four background color values:

one color for the Note and Push-pin objects

one color for the Hilite object

one color for the Redact object

one color for all other objects

When the automation object creates an object, it uses the corresponding background color. For example, if the automation object creates a Redact object, it uses the color stored for Redact objects. If the background for an object type is changed using the automation, the corresponding background color value stored for that object type is updated. Consequently, the next time the automation object creates an object of that type, the updated background color is used.

To change the background colors stored in the automation object:

right click with no objects selected. All the default properties for objects created by the automation object can then be changed.

OR

call the AnnSetAutoBackColor method. This lets you programmatically change the background color of objects created by the automation object.

To determine the current background colors stored within the automation object, use the AnnGetAutoBackColor method.


Non-Image Data

Several formats allow you to store non-image data such as comments, and tags. These are discussed in more detail in the following topics:

Implementing TIFF Comments and Tags

Types of File Comments

In addition, you can also add text or file messages to bitmaps. To add a message to a bitmap, use the AddMessage method. A message that has been added using the AddMessage method can be retrieved using the ExtractMessage method.


Return for AboutBox

Return Value

None.


hList Parameter For AddBitmaps

hList

Handle to the list of bitmaps.


Return for AddBitmaps

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For AddBitmaps

uFlags

Flag that indicates the operation to perform. Possible values are:

Value | Meaning
BC_ADD | Add the bitmaps in the specified list.
BC_AVE | Average the bitmaps in the specified list.


bBumpyShadow Parameter For AddBorder

bBumpyShadow

Boolean flag that indicates whether to increase the intensity near the far edge of the shadow. This flag is used only when bShadow is TRUE. Setting this flag to TRUE produces a good appearance for the shadow if nShadowSize is a value between 4 and 7. Possible values are:

Value | Meaning
TRUE | Increase the intensity near the far edge of the shadow.
FALSE | Do not increase the intensity near the far edge of the shadow.


bShadow Parameter For AddBorder

bShadow

Boolean flag that indicates whether to add a shadow to the border. Possible values are:

Value | Meaning
TRUE | Add a shadow to the border.
FALSE | Do not add a shadow to the border.


bSoftCurve Parameter For AddBorder

bSoftCurve

Boolean flag that indicates whether to give the border a soft curve appearance. This flag is used only when nEffectStyle is BORDER_EFFECT_RAISED. Possible values are:

Value | Meaning
TRUE | Make the border more homogeneous in intensity, giving the appearance of a smoother curve.
FALSE | Do not make the border more homogeneous in intensity.


crGradientEnd Parameter For AddBorder

crGradientEnd

The ending color when nStyle is BORDER_STYLE_GRADIENT.


crGradientStart Parameter For AddBorder

crGradientStart

The starting color when nStyle is BORDER_STYLE_GRADIENT. This is also the color used when nStyle is BORDER_STYLE_OPAQUE.


Return for AddBorder

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nBottomThickness Parameter For AddBorder

nBottomThickness

The thickness of the bottom side of the border.


nCurveIntensity Parameter For AddBorder

nCurveIntensity

Value that indicates the degree to which to change the appearance of the border. This value is used only when the nEffectStyle flag is set, the range is from –1000 to 1000.


nEffectStyle Parameter For AddBorder

nEffectStyle

Flag that indicates the change in the appearance of the border. By default there are no changes. The change also depends on the value of nCurveIntensity. If nCurveIntensity is zero, there are no changes. Possible values are:

Value | Meaning
BORDER_EFFECT_CURVEDIN | [1] Add a 3D appearance to the border by adding a high intensity color to the inner side of the border and a lower intensity color to the outer side of the border.
BORDER_EFFECT_CURVEDOUT | [2] Add a 3D appearance to the border by adding a high intensity color to the outer side of the border and a lower intensity color to the inner side of the border.
BORDER_EFFECT_RAISED | [3] Add a curved appearance to the border.


nGradientStyle Parameter For AddBorder

nGradientStyle

Flag that indicates the gradient style. This flag is used only when the nStyle parameter is BORDER_STYLE_GRADIENT. Possible values are:

Value | Meaning
BORDER_GRAD_INSIDEOUT | [0] The gradient starts from the inside of the border and progresses toward the outside of the border.
BORDER_GRAD_CENTEROUT | [1] The gradient starts from the center of the border and progresses toward both the inside and outside of the border.
BORDER_GRAD_CORNEROUT | [2] The gradient starts from the corners of the border.


nLeftThickness Parameter For AddBorder

nLeftThickness

The thickness of the left side of the border.


nLocation Parameter For AddBorder

nLocation

Flag that indicates the position of the border. Possible values are:

Value | Meaning
BORDER_INSIDE | [0] The border will be within the bitmap.
BORDER_OUTSIDE | [1] The border will be outside the bitmap.


nRightThickness Parameter For AddBorder

nRightThickness

The thickness of the right side of the border.


nShadowDirection Parameter For AddBorder

nShadowDirection

Flag that indicates the direction of the shadow. This value is used only when bShadow is TRUE. Possible values are:

Value | Meaning
BORDER_SHADOW_LEFT | [0] The shadow is on the left top side of the image.
BORDER_SHADOW_RIGHT | [1] The shadow is on the right bottom side of the image.
BORDER_SHADOW_SURROUND | [2] The shadow surrounds the border.


nShadowSize Parameter For AddBorder

nShadowSize

Value that indicates the width of the shadow, in pixels. This value is used only when bShadow is TRUE.


nStyle Parameter For AddBorder

nStyle

Flag that indicates the style of the border. Possible values are:

Value | Meaning
BORDER_STYLE_TRANSPARENT | [0] The border is transparent. Therefore, the bitmap itself shows through as the border.
BORDER_STYLE_OPAQUE | [1] Use a single color to create the border. The color used is crGradientStart.
BORDER_STYLE_GRADIENT | [2] The border contains a color gradient from crGradientStart to crGradientEnd.
BORDER_STYLE_TILES | [3] The border is taken from the bitmap referenced by the TileBitmap parameter.


nTopThickness Parameter For AddBorder

nTopThickness

The thickness of the Top side of the border.


TileBitmap Parameter For AddBorder

TileBitmap

A LEAD bitmap handle that references the tile bitmap. This is the bitmap the border is taken from when nStyle is BORDER_STYLE_TILES.


BitmapFrame Parameter For AddFrame

BitmapFrame

A LEAD bitmap handle that references the frame bitmap.


bKeepFrameState Parameter For AddFrame

bKeepFrameState

Boolean flag that indicates the state of the frame bitmap. Possible values are:

Value | Meaning
TRUE | Keep the state of the frame bitmap and operate on a copy of the frame bitmap.
FALSE | Work on the original frame bitmap so this bitmap may be resized during the AddFrame method.


bUseMask Parameter For AddFrame

bUseMask

Boolean flag that indicates whether to force the bitmap to be put on a specific region of the frame bitmap. Possible values are:

Value | Meaning
TRUE | Select a region on the frame bitmap with the same color specified in crMask and place the bitmap in this region.
FALSE | Put the bitmap in the center of the frame bitmap.


crMask Parameter For AddFrame

crMask

Color used to specify the region on the frame bitmap, in which to put the bitmap. This value is used only if the bUseMask parameter is TRUE.


Return for AddFrame

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nLocation Parameter For AddFrame

nLocation

Flag that indicates the location of the frame with respect to the bitmap. Possible values are:

Value | Meaning
FRAME_INSIDE | [0] The frame will be within the original bitmap.
FRAME_OUTSIDE | [1] The frame will be outside the original bitmap.


nQuality Parameter For AddFrame

nQuality

Flag that specifies the quality of the resulting bitmap. Possible values are:

Value | Meaning
FRAME_QUALITY_LOW | [0] Give the resulting bitmap normal quality.
FRAME_QUALITY_HIGH | [1] Give the resulting bitmap high quality.


SmoothEdge Parameter For AddFrame

SmoothEdge

Value that indicates the amount to smooth the edge between the frame and the original bitmap. In most cases, useful values are 30 and 50. This value is used only when the bUseMask parameter is FALSE.


iIndexBefore Parameter For AddItem

iIndexBefore

Index of the item before which the new item should be inserted.


Return for AddItem

Return Value

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


iType Parameter For AddItem

iType

Type of menu item to add. Possible values are:

Value | Meaning
ANNMENUITEMTYPE_NORMAL | [0] Normal menu item.
ANNMENUITEMTYPE_SEPARATOR | [1] Menu item is a separator.
ANNMENUITEMTYPE_SUBMENU | [2] Menu item is a popup menu.


nID Parameter For AddItem

nID

The command ID for the new menu item. The ID value must be in the range LTANNEVENT_MENUFIRST [$0100] to LTANNEVENT_MENULAST [$01FF]. This parameter is not valid if iType is ANNMENUITEMTYPE_SEPARATOR.


szString Parameter For AddItem

szString

String that contains the text for the new menu item. This parameter is not valid if iType is ANNMENUITEMTYPE_SEPARATOR.


iChannel Parameter For AddNoise

iChannel

Possible values are:

Value | Meaning
CHANNEL_MASTER | All channels.
CHANNEL_RED | Red channel only.
CHANNEL_GREEN | Green channel only.
CHANNEL_BLUE | Blue channel only.


Return for AddNoise

Return Value

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


iRange Parameter For AddNoise

iRange

Percentage of coverage, expressed in tenths of a percent. Valid values are 0 to 1000.


Bitmap Parameter For AlphaBlend

Bitmap

The source Main Control's bitmap to be combined with the current Main Control's bitmap.


iHeight Parameter For AlphaBlend

iHeight

The height of the rectangle to update, relative to the Main Control.


iLeft Parameter For AlphaBlend

iLeft

The X coordinate of the origin of the rectangle to update, relative to the Main Control.


Return for AlphaBlend

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iOpacity Parameter For AlphaBlend

iOpacity

Opacity value used when combining the areas from the source and destination bitmaps. This value is between 0 and 255.


iSrcLeft Parameter For AlphaBlend

iSrcLeft

The X coordinate of the origin of the source rectangle, relative to the source control.


iSrcTop Parameter For AlphaBlend

iSrcTop

The Y coordinate of the origin of the source rectangle, relative to the source control.


iTop Parameter For AlphaBlend

iTop

The Y coordinate of the origin of the rectangle to update, relative to the Main Control.


iWidth Parameter For AlphaBlend

iWidth

The width of the rectangle to update, relative to the Main Control.


index Parameter For AnimationPalette

index

Index into the array of colors.


Return for AnnAddUndoNode

Return Value

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


uIndex Parameter for AnnAutoCursor

uIndex

Specifies the cursor to be displayed on various actions associated with automated annotations. Possible values are:

Value | Meaning
ANNAUTOCURSOR_DEFAULT | [0] Displayed when the cursor is over the annotation container, and other action is occurring. The default is the windows predefined cursor IDC_ARROW.
ANNAUTOCURSOR_DRAWNEW | [1] Displayed when drawing a new annotation (design mode). This is displayed on all tools except for ANNTOOL_SELECT (which displays the ANNAUTOCURSOR_DEFAULT).
ANNAUTOCURSOR_HANDLE | [2] Displayed in design mode, when the cursor is over an annotation handle.
ANNAUTOCURSOR_HOTSPOT | [3] Displayed in run mode, when the cursor is over one of the following objects: ANNOBJECT_BUTTON ANNOBJECT_HOTSPOT ANNOBJECT_FREEHANDHOTSPOT ANNOBJECT_AUDIO ANNOBJECT_VIDEO ANNOBJECT_PUSHPIN
ANNAUTOCURSOR_MOVE | [4] Displayed in design mode, when an annotation is selected and the cursor is over the selected annotation (but not over the annotation handle).
ANNAUTOCURSOR_SELECT | [5] Displayed in design mode, when hovering over an unselected annotation. The default is the windows predefined cursor IDC_IBEAM.
ANNAUTOCURSOR_TEXT | [6] Displayed in design mode, when entering text into one of the following text annotations: ANNOBJECT_TEXT ANNOBJECT_TEXTPOINTER ANNOBJECT_RTF ANNOBJECT_NOTE The default is the windows predefined cursor IDC_IBEAM.
ANNAUTOCURSOR_WAIT | [7] Displayed during any wait operation. The default is the windows predefined cursor IDC_WAIT.


hObject Parameter For AnnBoundingRectHeight

hObject

Handle to the annotation object.


hObject Parameter For AnnBoundingRectLeft

hObject

Handle to the annotation object.


hObject Parameter For AnnBoundingRectTop

hObject

Handle to the annotation object.


hObject Parameter For AnnBoundingRectWidth

hObject

Handle to the annotation object.


fEmpty Parameter For AnnCopy

fEmpty

Flag that indicates whether to empty the clipboard before copying data to it. Possible values are:

Value | Meaning
True | Empty the clipboard before copying data to it.
False | Do not empty the clipboard before copying data to it.


fSelected Parameter For AnnCopy

fSelected

Flag that indicates which objects to copy. Possible values are:

Value | Meaning
True | Copy only the selected objects.
False | Copy all of the annotation objects.


iFormat Parameter For AnnCopy

iFormat

Format to use when copying the annotations. Possible values are:

Value | Meaning
ANNFMT_NATIVE | Use LEAD's own format for annotations.
ANNFMT_WMF | Use the Windows WMF format.


Return for AnnCopy

Return Value

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


bAutoInsert Parameter For AnnCreate

bAutoInsert

Flag that indicates whether to insert the created annotation object in AnnContainer. Possible values are:

Value | Meaning
True | Automatically insert the annotation object in AnnContainer.
False | Do not automatically insert the annotation object in AnnContainer.


bVisible Parameter For AnnCreate

bVisible

Flag that indicates whether the object will be visible. Possible values are:

Value | Meaning
True | The annotation object will be visible with default properties.
False | The annotation object will not be visible.


bVisible Parameter For AnnCreateItem

bVisible

Flag that indicates whether the object will be visible. Possible values are:

Value | Meaning
True | The annotation object will be visible with default properties.
False | The annotation object will not be visible.


hContainer Parameter For AnnCreateItem

hContainer

Handle to the annotation object that is the container for the object to be created.


Object Parameter For AnnCreateItem

hObject

HANNOBJECT variable to be updated by the handle of the newly created item.


Return for AnnCreateItem

Return Value

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


nType Parameter For AnnCreateItem

nType

The type of annotation object to create. For descriptions of object types, refer to Types of Annotations.


iType Parameter For AnnCreate

iType

The type of annotation object to create. For descriptions of object types, refer to Types of Annotations.


Return for AnnCreate

Return Value

Return | Meaning
<> 0 | Handle to the newly created annotation object..
0 | An error occurred. Refer to Error Codes.


bEmpty Parameter For AnnCut

bEmpty

Flag that indicates whether to empty the clipboard before copying data to it. Possible values are:

Value | Meaning
True | Empty the clipboard before copying data to it.
False | Do not empty the clipboard before copying data to it.


bSelected Parameter For AnnCut

bSelected

Flag that indicates which objects to cut. Possible values are:

Value | Meaning
True | Copy only the selected objects.
False | Copy all of the annotation objects.


Object Parameter For AnnCut

hObject

Handle to the annotation object.


Return for AnnCut

Return Value

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


nFormat Parameter For AnnCut

nFormat

Format for the annotation data. Possible values are:

Value | Meaning
ANNFMT_NATIVE | Use LEAD's own format for annotations.
ANNFMT_WMF | Use the Windows WMF format.


Object Parameter For AnnDefine

hObject

Handle to the annotation object.


Return for AnnDefine

Return Value

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


iState Parameter For AnnDefine

iState

Flag that indicates the state of the process of modifying the annotation object.

Value | Meaning
ANNDEFINE_BEGINSET | [0] This is the first point to define a new object.
ANNDEFINE_BEGINMOVE | [1] This is the point from which to move the object.
ANNDEFINE_BEGINROTATE | [2] This is the starting point for calculating the angle of rotation.
ANNDEFINE_BEGINRESIZE | [3] This is the starting point for calculating how to resize the object.
ANNDEFINE_BEGINSELECT | [4] This is the first corner of the rectangle used to select objects.
ANNDEFINE_APPEND | [5] This is the next point when defining an object that requires more than two points.
ANNDEFINE_UPDATE | [6] This is the current mouse position during creation of the object. Use this on a mouse move event to reflect the current shape of the object.
ANNDEFINE_END | [7] This is the last point.
ANNDEFINE_BEGINMOVESELECTED | [8] This is the point from which to move all selected objects.
ANNDEFINE_BEGINROTATESELECTED | [9] This is the starting point for calculating the angle of rotation for all selected objects.
ANNDEFINE_BEGINRESIZESELECTED | [10] This is the starting point for calculating how to resize all selected objects.
ANN_DEFINE_SETANCHORPOINT | [13] This is an anchor point. Use this value when rotating an annotation object around a point other than its center. When doing this, call AnnDefine with this flag prior to calling AnnDefine with the ANN_DEFINE_BEGINROTATE flag.
ANN_DEFINE_BEGINMOVEPOINT | [11] This is a starting point, used when moving one point on an annotation object.

The behavior depends on the annotation object being manipulated.

This can be used to move a single point on any of the following annotation objects:

ANN_OBJECT_LINE
ANN_OBJECT_POLYLINE
ANN_OBJECT_POLYGON
ANN_OBJECT_POINTER
ANN_OBJECT_FREEHAND
ANN_OBJECT_FREEHANDHOTSPOT
ANN_OBJECT_RULER
ANN_OBJECT_CROSSPRODUCT
ANN_OBJECT_PROTRACTOR
ANN_OBJECT_CURVE
ANN_OBJECT_CURVECLOSED

You can use ANN_DEFINE_BEGINMOVEPOINT to perform a simultaneous rotate and resize for the following objects: When doing this, call AnnDefine with the ANN_DEFINE_SETANCHORPOINT flag prior to calling AnnDefine with the ANN_DEFINE_BEGINMOVEPOINT flag.

(Note that you must set an anchor point prior to using ANN_DEFINE_BEGINMOVEPOINT)

ANN_OBJECT_RECT
ANN_OBJECT_ELLIPSE
ANN_OBJECT_HILITE
ANN_OBJECT_REDACT
ANN_OBJECT_TEXT
ANN_OBJECT_NOTE
ANN_OBJECT_STAMP
ANN_OBJECT_HOTSPOT


x Parameter For AnnDefine

x

X coordinate of a point. This coordinate is relative to the window of the LEADAnn control. This value is in pixels.


y Parameter For AnnDefine

y

Y coordinate of a point. This coordinate is relative to the window of the LEADAnn control. This value is in pixels.


Return for AnnDeletePage

Return Value

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


hMem Parameter For AnnDeletePageMemory

hMem

A global handle (HGLOBAL) to the annotation file in memory. If the AnnSaveMemory method is used to create the file in memory, that method updates the handle and buffer size variables.


Return for AnnDeletePageMemory

Return Value

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


nPage Parameter For AnnDeletePageMemory

nPage

Number of the page to be deleted. The page number is 1-based. Therefore, the first page is page 1; the second page is page 2, etc.


plSize Parameter For AnnDeletePageMemory

plSize

Address of the long integer variable that you use to track the size of the file in memory. In C++ Builder and Delphi, declare the variable and pass its address. In most other languages, pass the variable by reference. The method updates the value of the variable. The variable must be declared with the appropriate data type. To see the correct data type, refer to the code example for your development system.


nPage Parameter For AnnDeletePage

nPage

Number of the page to be deleted. The page number is 1-based. Therefore, the first page is page 1; the second page is page 2, etc.


szName Parameter For AnnDeletePage

szName

Character string containing the annotation file from which to delete the specified page.


hObject Parameter For AnnDestroy

hObject

Handle to the annotation object to be destroyed. If hObject is a container, then iFlags indicates which objects within the container to destroy.


iFlags Parameter For AnnDestroy

iFlags

Flag that indicates the objects to destroy. Use 0 if hObject is not a container.

If hObject is a container, use 0, to destroy only hObject, or combine some of the values given below, using a bitwise OR. For example, ANNFLAG_SELECTED + ANNFLAG_RECURSE processes only the selected objects.

Value | Meaning
ANNFLAG_SELECTED | [$0001] Destroy only the selected objects.
ANNFLAG_NOTCONTAINER | [$0002] Destroy all objects that are not containers.
ANNFLAG_NOTTHIS | [$0003] Destroy all objects except hObject.
ANNFLAG_RECURSE | [$0004] Destroy all objects contained in hObject and any contained in any sub-containers.
ANNFLAG_CHECKMENU | [$0020] Destroy objects only if the ANNAUTOTEXT_MENU_DELETE menu item has not been disabled.


Return for AnnDestroy

Return Value

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


hObject Parameter For AnnEnumerate

hObject

The object being enumerated, most often a Container object.


iFlags Parameter For AnnEnumerate

iFlags

Flag that indicates the objects to process. Possible values are:

Value | Meaning
ANNFLAG_SELECTED | [$0001] Enumerate only the selected objects.
ANNFLAG_NOTCONTAINER | [$0002] Enumerate all objects that are not containers.
ANNFLAG_NOTTHIS | [$0003] Enumerate all objects except hObject.
ANNFLAG_RECURSE | [$0004] Enumerate all objects contained in hObject and any contained in any sub-containers,
ANNFLAG_USER | [$0040] Process only those objects with users listed in pszUserList.


Return for AnnEnumerate

Return Value

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


pszUserList Parameter For AnnEnumerate

pszUserList

Character string that contains the users.


Return for AnnFileInfo

Return Value

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


hMem Parameter For AnnFileInfoMemory

hMem

A global handle (HGLOBAL) to the annotation file in memory. If the AnnSaveMemory method is used to create the file in memory, that method updates the handle and buffer size variables.


Return for AnnFileInfoMemory

Return Value

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


lSize Parameter For AnnFileInfoMemory

lSize

The size in bytes, of the file referenced by hMem. If the AnnSaveMemory method is used to create the file in memory, that method updates the handle and buffer size variables.


szName Parameter For AnnFileInfo

szName

Character string containing the annotation file from which to obtain information.


bSelected Parameter For AnnFlip

bSelected

Flag that indicates which objects to flip. Possible values are:

Value | Meaning
True | Flip only the selected objects.
False | Flip all of the annotation objects.


bUseHorz Parameter For AnnFlip

bUseHorz

Flag that indicates the axis about which to flip the object(s). Possible values are:

Value | Meaning
True | Flip all objects on the axis specified by the fHorz parameter.
False | Flip each object on its own center.


fHorz Parameter For AnnFlip

fHorz

The horizontal axis (Y value) on which the objects are flipped. This value is used only if the bUseHorz parameter is True.

The position is relative to the bitmap in the control.


Return for AnnFlip

Return Value

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


dAngle Parameter For AnnGetAngle

dAngle

Double variable to be updated by the Angle of the protractor object specified in hObject.


hObject Parameter For AnnGetAngle

hObject

Handle to the annotation object.


Return for AnnGetAngle

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


clBack Parameter for AnnGetAutoBackColor

clBack

The TColor variable to be updated by the Background color of the specified object type.


hObject Parameter for AnnGetAutoBackColor

hObject

Handle to the annotation object.


Return for AnnGetAutoBackColor

Return Value

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


nType Parameter for AnnGetAutoBackColor

nType

Type of object for which the background color is being retrieved. For descriptions of object types, refer to Types of Annotations.


hObject Parameter For AnnGetAutoMenuItemEnable

hObject

Handle to an annotation or automation object.


iItem Parameter For AnnGetAutoMenuItemEnable

iItem

Constant that specifies the menu or dialog box item to enable or disable. For lists of constants and their default values, refer to the following:

Annotation Automation Menu Strings

Annotation Automation Line Dialog Strings

Annotation Automation Fill Dialog Strings

Annotation Automation Text Dialog Strings

Annotation Automation Audio Dialog Strings

Annotation Automation Stamp Dialog Strings

Annotation Automation ROP2 Dialog Strings

Annotation Automation Lock/Unlock Dialog Strings

Annotation Automation Miscellaneous Dialog Strings

Annotation Automation Ruler Dialog Strings

Annotation Automation Point Dialog Strings

Annotation Automation Video Dialog Strings

Annotation Automation Push Pin Dialog Strings

Annotation Automation Nodes Dialog Strings

Annotation Automation Protractor Dialog Strings

Annotation Automation Name Dialog Strings

Annotation Automation Play Video Dialog Strings

Annotation Automation Stamp Metafile Dialog Strings

Annotation Automation ToolTip Dialog Strings

Annotation Automation Transparent Color Dialog Strings

Annotation Automation Capture Dialog Strings


Return for AnnGetAutoMenuItemEnable

Return Value

Returns a value that indicates whether the specified menu item has been enabled or disabled for the object. Possible values are:

Value | Meaning
ANNMENU_ENABLED | Enable the menu item.
ANNMENU_DISABLED | Disable the menu item.
ANNMENU_DEFAULT | Enable or disable the menu item, based on the setting for the object type.


iType Parameter For AnnGetAutoMenuItemEnable

iType

Constant that specifies an object's type. For descriptions of possible object types, refer to Types of Annotations. This parameter is valid only if hObject is an automation object.


iItem Parameter For AnnGetAutoText

iItem

Constant that specifies the menu or dialog box item, which appears when the user presses the right mouse button. For lists of constants and their default values, refer to the following:

Annotation Automation Menu Strings

Annotation Automation Line Dialog Strings

Annotation Automation Fill Dialog Strings

Annotation Automation Text Dialog Strings

Annotation Automation Audio Dialog Strings

Annotation Automation Stamp Dialog Strings

Annotation Automation Lock/Unlock Dialog Strings

Annotation Automation Miscellaneous Dialog Strings

Annotation Automation ROP2 Dialog Strings

Annotation Automation Ruler Dialog Strings


Return for AnnGetAutoText

Return Value

If ppText was nil then, the return value will be the number of characters in the text.

Otherwise the return value will be:

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


ppText Parameter For AnnGetAutoText

ppText

Address of a PChar variable to be updated with the text.


Bitmap Parameter for AnnGetBitmap

Bitmap

TBitmapHandle variable to be updated by the object’s Bitmap.


hObject Parameter for AnnGetBitmap

hObject

Handle to the annotation object.


Return for AnnGetBitmap

Return Value

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


hContainer Parameter for AnnGetContainer

hContainer

HANNOBJECT variable to be updated by the object’s container handle.


hObject Parameter for AnnGetContainer

hObject

Handle to the annotation object.


Return for AnnGetContainer

Return Value

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


Return for AnnGetGrouping

Return Value

Return | Meaning
True | The objects in the specified container are grouped.
False | The objects in the specified container are not grouped.


hObject Parameter For AnnGetGrouping

hObject

Handle to a container object.


hObject Parameter For AnnGetHyperlinkParam

hObject

Handle of the annotation object.


Return for AnnGetHyperlinkParam

Return Value

Return | Meaning
>0 | Value of the parameter indicated by iParamIndex.
=0 | Check the Error property (if Error = SUCCESS, then this is the value of the parameter indicated by iParamIndex, Otherwise an error occurred).
<0 | An error occurred. Refer to Error Codes.


iParamIndex Parameter For AnnGetHyperlinkParam

iParamIndex

Index value indicating the parameter to get. Valid values are 1, 2, 3, 4, 5.


hObject Parameter For AnnGetHyperlinkString

hObject

Handle of the annotation object.


Return for AnnGetHyperlinkString

Return Value

If ppText was nil then, the return value will be the number of characters in the string.

Otherwise the return value will be:

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


ppText Parameter For AnnGetHyperlinkString

ppText

Address of a PChar variable to be updated with the hyperlink string.


hObject Parameter For AnnGetHyperlinkType

hObject

Handle of the annotation object.


Return for AnnGetHyperlinkType

Return Value

Return | Meaning
ANNLINK_NONE | (0) The object has no hyperlink.
ANNLINK_ANNEVENT | (1) The OnAnnHyperlink event will be sent with no parameters.
ANNLINK_ANNEVENT5 | (2) The OnAnnHyperlink event will be sent with 2 parameters.
ANNLINK_RUN | (3) The hyperlink will run a program.
ANNLINK_WEBPAGE | (4) The default browser will be instructed to go to the specified web page.


iIndex Parameter For AnnGetItemHandle

iIndex

Index indicating which handle to retrieve. The index is zero-based.


Return for AnnGetItemHandle

Return Value

Return | Meaning
<>0 | The handle of the object.
0 | An error occurred.


phObjects Parameter For AnnGetItemHandle

phObjects

Pointer to an array of handles. This pointer can be obtained from:

AnnGetSelectList method.

OnAnnSelect event,

OnAnnHyperlinkMenu event


Return for AnnGetLocked

Return Value

Return | Meaning
True | Object is locked.
False | Object is not locked.


hObject Parameter For AnnGetLocked

hObject

Handle of the annotation object.


hFile Parameter for AnnGetMetafile

hFile

Handle to a metafile to be updated by the handle of the object’s metafile.


hObject Parameter for AnnGetMetafile

hObject

Handle to the annotation object.


Return for AnnGetMetafile

Return Value

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


hObject Parameter For AnnGetNameOffsetX

hObject

Handle to the annotation object.


Return for AnnGetNameOffsetX

Return Value

X-offset of the name of the annotation object specified in hObject.


hObject Parameter For AnnGetNameOffsetY

hObject

Handle to the annotation object.


Return for AnnGetNameOffsetY

Return Value

Y- offset of the name of the annotation object specified in hObject.


Return for AnnGetNameRestrict

Return Value

Return | Meaning
TRUE | The name of the specified annotation object is restricted.
FALSE | The name of the specified annotation object is not restricted.


hObject Parameter For AnnGetNameRestrict

hObject

Handle to the annotation object.


bShowNodes Parameter For AnnGetNodes

bShowNodes

Boolean variable to be updated with a value that indicates whether to show the nodes. Possible values are:

Value | Meaning
True | Show the nodes.
False | Do not show the nodes.

Set this parameter to False if you do not wish to retrieve this information; otherwise, set it to True.


hObject Parameter for AnnGetNodes

hObject

Handle to the container annotation object.


Return for AnnGetNodes

Return Value

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


uGapNodes Parameter For AnnGetNodes

uGapNodes

Unsigned variable to be updated by the value that indicates which nodes to display. This value represents the number of nodes to skip before displaying another node. Possible values are:

Value Meaning

0 Show every node.

1 Show a node, skip a node, show a node …

.

.

.

.

9 Show a node, skip the next nine, …


bSelected Parameter For AnnGetObjectFromTag

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
True | Process only the selected objects.
False | Process all objects.


hObject Parameter For AnnGetObjectFromTag

hObject

Handle to a container object.


ITag Parameter For AnnGetObjectFromTag

lTag

The long value used as the object's tag.


Return for AnnGetObjectFromTag

Return Value

Return | Meaning
0 | An object with the specified tag was not found.
<>0 | Handle to the annotation object that has the tag specified in lTag. If an object with the specified tag is not found, the method will return 0.


hObject Parameter For AnnGetPointCount

hObject

Handle to the annotation object.


Return for AnnGetPointCount

Return Value

The number of vertices (corner points) in the annotation object.


hObject Parameter For AnnGetPointX

hObject

Handle to the annotation object.


Return for AnnGetPointX

Return Value

Return | Meaning
<> 0 | TAnnPoints Object.
0 | An error occurred. Refer to Error Codes.


hObject Parameter For AnnGetPointY

hObject

Handle to the annotation object.


Return for AnnGetPointY

Return Value

Return | Meaning
<> 0 | TAnnPoints Object.
0 | An error occurred. Refer to Error Codes.


bEnhanced Parameter For AnnGetPredefinedMetafile

bEnhanced

Boolean variable to be updated with a flag that indicates whether the retrieved metafile is enhanced or not. Possible values are:

Value | Meaning
True | The retrieved metafile is an enhanced metafile.
False | The retrieved metafile is a windows metafile.

Set this parameter to False if you do not wish to retrieve this information; otherwise, set it to True.


hMetaFile Parameter for AnnGetPredefinedMetafile

hMetaFile

HMETAFILE variable to be updated by the handle to the retrieved metafile.


Return for AnnGetPredefinedMetafile

Return Value

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


nType Parameter For AnnGetPredefinedMetafile

nType

Constant that indicates which metafile to retrieve. Possible values are:

Value | Meaning
ANNMETAFILE_APPROVED | [0] Predefined metafile - APPROVED
ANNMETAFILE_ASSIGNED | [1] Predefined metafile - ASSIGNED
ANNMETAFILE_CHECKED | [2] Predefined metafile -CHECKED
ANNMETAFILE_CLATPRV | [3] Predefined metafile - CLIENT ATTORNEY PRIVILEGE
ANNMETAFILE_COPY | [4] Predefined metafile - COPY
ANNMETAFILE_DRAFT | [5] Predefined metafile - DRAFT
ANNMETAFILE_EXTENDED | [6] Predefined metafile - EXTENDED
ANNMETAFILE_FAX | [7] Predefined metafile - FAX
ANNMETAFILE_FAXED | [8] Predefined metafile - FAXED
ANNMETAFILE_IMPORTANT | [9] Predefined metafile - IMPORTANT
ANNMETAFILE_INVOICE | [10] Predefined metafile - INVOICE
ANNMETAFILE_NOTICE | [11] Predefined metafile - NOTICE
ANNMETAFILE_OFFICIAL | [12] Predefined metafile - OFFICIAL
ANNMETAFILE_ONFILE | [13] Predefined metafile - ON FILE
ANNMETAFILE_PAID | [14] Predefined metafile - PAID
ANNMETAFILE_PASSED | [15] Predefined metafile - PASSED
ANNMETAFILE_PENDING | [16] Predefined metafile - PENDING
ANNMETAFILE_PROCESSED | [17] Predefined metafile - PROCESSED
ANNMETAFILE_RECEIVED | [18] Predefined metafile - RECEIVED
ANNMETAFILE_REJECTED | [19] Predefined metafile - REJECTED
ANNMETAFILE_RELEASE | [20] Predefined metafile - RELEASE
ANNMETAFILE_SENT | [21] Predefined metafile - SENT
ANNMETAFILE_SHIPPED | [22] Predefined metafile - SHIPPED
ANNMETAFILE_TOPSECRET | [23] Predefined metafile - TOP SECRET
ANNMETAFILE_URGENT | [24] Predefined metafile - URGENT
ANNMETAFILE_VOID | [25] Predefined metafile – VOID
ANNMETAFILE_HOTSPOT | [26] Predefined metafile for Hotspot and Freehand
ANNMETAFILE_ENCRYPTOR | [27] predefined metafile for an encrypt object in the ‘encryptor’ state.
ANNMETAFILE_DECRYPTOR | [28] predefined metafile for an encrypt object in the ‘decryptor’state


bAcute Parameter For AnnGetProtractorOptions

bAcute

Boolean variable to be updated with a value that indicates whether the inside (acute) angle or the outside angle of the protractor is being drawn. Possible values are:

Value | Meaning
True | The inside (acute) angle of the protractor is being drawn.
False | The outside (obtuse) angle of the protractor is being drawn.

Set this parameter to False if you do not wish to retrieve this information; otherwise, set it to True.


fArcRadius Parameter For AnnGetProtractorOptions

fArcRadius

Single variable to be updated with the length of the arc radius.

Set this parameter to -1 if you do not wish to retrieve this information; otherwise, set it to any other value (<> -1).


hObject Parameter for AnnGetProtractorOptions

hObject

Handle to the annotation object.


Return for AnnGetProtractorOptions

Return Value

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


nPrecision Parameter For AnnGetProtractorOptions

nPrecision

Integer variable to be updated with the number of digits after the decimal. ( "." ) Valid values are 0 – 200.

Set this parameter to -1 if you do not wish to retrieve this information; otherwise, set it to any other value <> -1.


nUnit Parameter for AnnGetProtractorOptions

nUnit

Integer variable to be updated with a value that indicates whether the units of the angle are degrees or radians. Set this parameter to -1 if you do not wish to retrieve this information; otherwise, set it to any other value <> -1.

Possible values are:

Value | Meaning
ANNANGLE_DEGREES | The angle is measured in degrees. The default abbreviation for this unit is the degree sign.
ANNANGLE_RADIANS | The angle is measured in radians. The default abbreviation for this unit is "rad".


strAbbrev Parameter For AnnGetProtractorOptions

strAbbrev

String variable to be updated by the abbreviation string that follows the angle.


hObject Parameter for AnnGetROP2

hObject

Handle to the annotation object.


Return for AnnGetROP2

Return Value

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


uROP2 Parameter for AnnGetROP2

uROP2

Unsigned variable to be updated by the binary raster operation (ROP2) code. ROP2 codes specify how pen or brush colors are to be combined with the colors in the image. Possible ROP2 code values are:

Value | Meaning
ANNROP2_COPY | [0x0000] Draw the object using the object's color.
ANNROP2_AND | [0x0001] Draw the object, performing an AND operation between the object's color and the background color. This creates a highlight effect. White objects become transparent.
ANNROP2_XOR | [0x0002] Draw the object, performing an XOR operation between the object's color and the background color. This creates an inverted effect. Black objects become transparent.


Bitmap Parameter for AnnGetSecondaryBitmap

Bitmap

TBitmapHandle variable to be updated by the object’s secondary Bitmap.


hObject Parameter for AnnGetSecondaryBitmap

hObject

Handle to the annotation object.


Return for AnnGetSecondaryBitmap

Return Value

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


Return for AnnGetSelectCount

Return Value

The number of currently selected annotation objects.


bSelected Parameter For AnnGetSelected

bSelected

Boolean variable to be updated by the value that indicates whether the annotation object is selected. Possible values are:

Value | Meaning
True | The object is selected.
False | The object is not selected.


hObject Parameter For AnnGetSelected

hObject

Handle to the annotation object.


Return for AnnGetSelected

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


Return for AnnGetSelectList

Return Value

None


hObject Parameter For AnnGetSelectRect

hObject

Handle to the annotation container object.


Return for AnnGetSelectRect

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


rcSelect Parameter For AnnGetSelectRect

rcSelect

TRect variable to be updated by the selection rectangle.


hObject Parameter For AnnGetShowFlags

hObject

Handle to the annotation object.


Return for AnnGetShowFlags

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uShowFlags Parameter For AnnGetShowFlags

uShowFlags

Unsigned variable to be updated by the value that indicates how Rulers, Polyrulers, Cross-products, and Protractors will be shown. Possible values are:

Value | Meaning
0 | Do not display the ruler length or the ruler gauge or the tic marks. In this case, the ruler looks like a line.
ANNSHOW_LENGTH | Display the ruler length.
ANNSHOW_GAUGE | Display the ruler gauge.
ANNSHOW_TICMARKS | Display the tic marks.


hObject Parameter For AnnGetTag

hObject

Handle to the annotation object.


Return for AnnGetTag

Return Value

Tag that identifies the particular object.


hObject Parameter for AnnGetTopContainer

hObject

Handle to the annotation object.


hTopContainer Parameter for AnnGetTopContainer

hTopContainer

HANNOBJECT variable to be updated by the handle of the root container.


Return for AnnGetTopContainer

Return Value

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


bTransparent Parameter For AnnGetTransparent

bTransparent

Boolean variable to be updated by the value that indicates whether the bitmap is using a transparent color. Possible values are:

Value | Meaning
True | The object is using a transparent color.
False | The object is not using a transparent color.


clTransparent Parameter for AnnGetTransparentColor

clTransparent

The TColor variable to be updated by the TColor variable to be updated by the transparent color.


hObject Parameter for AnnGetTransparentColor

hObject

Handle to the annotation object.


Return for AnnGetTransparentColor

Return Value

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


hObject Parameter For AnnGetTransparent

hObject

Handle to the annotation object.


Return for AnnGetTransparent

Return Value

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


hObject Parameter For AnnGetType

hObject

Handle to the annotation object.


Return for AnnGetType

Return Value

One of the following constants:

Value | Meaning
ANNOBJECT_CONTAINER | The object is a container object
ANNOBJECT_LINE | The object is a line
ANNOBJECT_RECT | The object is a rectangle
ANNOBJECT_ELLIPSE | The object is an ellipse
ANNOBJECT_POLYLINE | The object is a polyline
ANNOBJECT_POLYGON | The object is a polygon
ANNOBJECT_POINTER | The object is a pointer
ANNOBJECT_FREEHAND | The object is a freehand line
ANNOBJECT_HILITE | The object is a highlight
ANNOBJECT_REDACT | The object is a redaction object
ANNOBJECT_TEXT | The object is a text object
ANNOBJECT_NOTE | The object is a note
ANNOBJECT_STAMP | The object is a stamp
ANNOBJECT_BUTTON | The object is a button
ANNOBJECT_HOTSPOT | The object is a hot spot
ANNOBJECT_AUDIO | The object is an audio clip
ANNOBJECT_RULER | The object is a ruler
ANNOBJECT_CROSSPRODUCT | The object is a cross-product
ANNOBJECT_POINT | The object is a point
ANNOBJECT_PROTRACTOR | The object is a protractor
ANNOBJECT_VIDEO | The object is a video clip
ANNOBJECT_PUSHPIN | The object is a pushpin
ANNOBJECT_FREEHANDHOTSPOT | The object is a freehand hotspot


Return for AnnGetVisible

Return Value

Return | Meaning
True | The specified object is visible.
False | The specified object is not visible.


hObject Parameter For AnnGetVisible

hObject

Handle to an annotation object.


hObject Parameter For AnnGroup

hObject

Handle to a container object.


iFlags Parameter For AnnGroup

iFlags

Flags that determine which objects to group. Most of the flags apply only to container objects. Values can be combined when appropriate by using a bitwise OR ( + ). The following are valid values:

Value | Meaning
0 | Process only the specified object.
ANNFLAG_SELECTED | [$0001] Process only objects that have the selected property set to True. To get a list of selected objects, use the AnnGetSelectList method.
ANNFLAG_NOTTHIS | [$0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not.
ANNFLAG_RECURSE | [$0008] Process objects within a container, and within any subcontainers, down to any level.
ANNFLAG_NOTCONTAINER | [$0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.
ANNFLAG_NOINVALIDATE | [$0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages.
ANNFLAG_CHECKMENU | [$0020] Process objects only if the ANNAUTOTEXT_MENU_GROUP menu item has been selected.
ANNFLAG_USER | [$0040] Group only those objects with users listed in pUserList.


Return for AnnGroup

Return Value

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


pszUserList Parameter For AnnGroup

pszUserList

String that contains the list of users associated with the specified object. pUserList has the form ‘User1,User2,…,UserN’. This must be a nil terminated string with user names separated by a comma. This parameter is valid only if ANNFLAG_USER is set in iFlags.


bStripContainer Parameter For AnnInsert

bStripContainer

Flag that indicates whether to insert a container. Possible values are:

Value | Meaning
True | If the hObject parameter specifies a container, only the objects in the container will be inserted into the new container. In this case, the container specified in hObject is destroyed.
False | If the hObject parameter specifies a container, the container and all objects within the container (objects and other containers) will be inserted into the new container. If the hObject parameter specifies an object, that object will be inserted into the new container.


Container Parameter For AnnInsert

hContainer

Handle to the container object.


hObject Parameter For AnnInsert

hObject

Handle to the annotation object to insert.


Return for AnnInsert

Return Value

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


Return for AnnLoad

Return Value

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


hMem Parameter For AnnLoadMemory

hMem

A global handle (HGLOBAL) to the file in memory. If the AnnSaveMemory method is used to create the file in memory, that method updates the handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


Return for AnnLoadMemory

Return Value

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


iSize Parameter For AnnLoadMemory

iSize

The size of the file referenced by hMem in bytes. If the AnnSaveMemory method is used to create the file in memory, that method updates the handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


nPage Parameter For AnnLoadMemory

nPage

Page number. If hMem refers to a multi-page-TIF file, nPage refers to the page in the TIF file from which to load the annotations. If hMem refers to an annotation file, nPage refers to one of the pages in the annotation file.


nPage Parameter For AnnLoad

nPage

Page number, in a multi-page TIF file, from which to load the annotations. For example, if iPage is 2, the annotations on page 2 of the file will be loaded.


szFile Parameter For AnnLoad

szFile

Character string containing the name of the file from which to load the annotations.


fSelected Parameter For AnnLock

fSelected

Flag that indicates whether all or only selected annotation objects will be locked, if hObject is a container object. Possible values are:

Value | Meaning
True | Only selected annotation objects will be locked.
False | All annotation objects will be locked.


hObject Parameter For AnnLock

hObject

Handle of the annotation object.


Return for AnnLock

Return Value

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


szKey Parameter For AnnLock

szKey

String containing the key used to lock the annotation objects.


bSelected Parameter For AnnMove

bSelected

Flag that indicates which annotation objects to move. Possible values are:

Value | Meaning
True | Move only the selected object or objects.
False | Move all annotation objects.


xOffset Parameter For AnnMove

dxOffset

Amount to move the annotation objects horizontally (in the X direction). This value is in pixels.


dyOffset Parameter For AnnMove

dyOffset

Amount to move the annotation objects vertically (in the Y direction). This value is in pixels.


Return for AnnMove

Return Value

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


hObject Parameter For AnnNameBoundingRectHeight

hObject

Handle to the annotation object.


hObject Parameter For AnnNameBoundingRectLeft

hObject

Handle to the annotation object.


hObject Parameter For AnnNameBoundingRectTop

hObject

Handle to the annotation object.


hObject Parameter For AnnNameRectHeight

hObject

Handle to the annotation object.


hObject Parameter For AnnNameRectLeft

hObject

Handle to the annotation object.


hObject Parameter For AnnNameRectTop

hObject

Handle to the annotation object.


hObject Parameter For AnnNameRectWidth

hObject

Handle to the annotation object.


Return for AnnPaste

Return Value

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


fRedactOnly Parameter For AnnRealize

fRedactOnly

Flag that indicates which annotation objects to realize. Possible values are:

Value | Meaning
True | Realize only redaction objects.
False | Realize all annotation objects.


Return for AnnRealize

Return Value

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


hObject Parameter For AnnRectHeight property

hObject

Handle to the annotation object.


hObject Parameter For AnnRectLeft

hObject

Handle to the annotation object.


hObject Parameter For AnnRectTop

hObject

Handle to the annotation object.


hObject Parameter For AnnRectWidth

hObject

Handle to the annotation object.


hObject Parameter for AnnRemove

hObject

Handle to the annotation object to be removed.


Return for AnnRemove

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnReverse

bSelected

Flag that indicates which objects to reverse. Possible values are:

Value | Meaning
True | Reverse only the selected objects.
False | Reverse all of the annotation objects.


bUseVert Parameter For AnnReverse

bUseVert

Flag that indicates the axis about which to reverse the object(s). Possible values are:

Value | Meaning
True | Reverse all objects on the axis specified by the fVert parameter.
False | Reverse each object on its own center.


fVert Parameter For AnnReverse

fVert

The Vertical Axis (X value) on which the objects are reversed. This value is used only if the bUseVert parameter is True.

The position is relative to the bitmap in the control.


Return for AnnReverse

Return Value

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


bSelected Parameter For AnnRotate

bSelected

Flag that indicates which annotation objects to rotate. Possible values are:

Value | Meaning
True | Rotate only the selected objects.
False | Rotate all of the annotation objects.


bUseCenter Parameter For AnnRotate

bUseCenter

Flag that indicates the point about which to rotate the object(s). Possible values are:

Value | Meaning
True | Rotate all objects around the point specified by the fCenterX and fCenterY parameters.
False | Rotate each object on its own center.


dAngle Parameter For AnnRotate

dAngle

The number of degrees to rotate the objects.


fCenterX Parameter For AnnRotate

fCenterX

The X coordinate of the point around which the objects are rotated. This value is used only if the bUseCenter parameter is True.

The position is relative to the bitmap in the control. This value is in pixels.


fCenterY Parameter For AnnRotate

fCenterY

The Y coordinate of the point around which the objects are rotated. This value is used only if the bUseCenter parameter is True.

The position is relative to the bitmap in the control. This value is in pixels.


Return for AnnRotate

Return Value

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


fSelected Parameter For AnnSave

fSelected

Flag that indicates which annotation objects to save. Possible values are:

Value | Meaning
True | Save only the selected objects.
False | Save all of the annotation objects.


iFormat Parameter For AnnSave

iFormat

Format to use when saving the annotations. Possible values are:

Value | Meaning
ANNFMT_NATIVE | Use LEAD's own format for annotations.
ANNFMT_WMF | Use the Windows WMF format.


iModify Parameter For AnnSave

iModify

Flag that indicates how to save a new page in a multi-page annotation file. Possible values are:

Value | Meaning
SAVE_OVERWRITE | [0] No insert/replace/append is performed. An existing file is overwritten.
SAVE_APPEND | [1] The page is appended if the file exists.
SAVE_REPLACE | [2] Replace the page specified in the iSavePage parameter.
SAVE_INSERT | [3] Insert the new page before the page specified in the iSavePage parameter.


Return for AnnSave

Return Value

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


bSelected Parameter For AnnSaveMemory

bSelected

Flag that indicates which annotation objects to save. Possible values are:

Value | Meaning
True | Save only the selected objects.
False | Save all of the annotation objects.


iFormat Parameter For AnnSaveMemory

iFormat

Format to use when saving the annotation objects. Possible values are:

Value | Meaning
ANNFMT_NATIVE | Use LEAD's own format for annotations.
ANNFMT_WMF | Use the Windows WMF format.
ANNFMT_TIFFTAG | Save all annotation properties, including those not supported by the Wang specification as an ANNTAG_TIFF tag.
ANNFMT_WANGTAG | Save only the annotation properties supported by the Wang specification as an ANNTAG_TIFF tag.


iModify Parameter For AnnSaveMemory

iModify

Flag that indicates how to save a new page in a multipage annotation file. Possible values are:

Value | Meaning
SAVE_OVERWRITE | [0] No insert/replace/append is performed. An existing file is overwritten.
SAVE_APPEND | [1] The page is appended if the file exists.
SAVE_REPLACE | [2] Replace the page specified in the iSavePage parameter.
SAVE_INSERT | [3] Insert the new page before the page specified in the iSavePage parameter.


Return for AnnSaveMemory

Return Value

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


nSavePage Parameter For AnnSaveMemory

nSavePage

Number of the page to overwrite, append, replace, or insert, based on the iModify parameter. The page number is 1-based. Therefore, the first page is page 1, the second page is page 2, etc.


phMem Parameter For AnnSaveMemory

phMem

Address of the L_HANDLE variable used to reference the file in memory. In Delphi, declare the variable and pass its address. In most other languages, pass the variable by reference. The method updates the value of the variable. The variable must be a global handle (HGLOBAL) and must be declared with the appropriate data type. To see the correct data type, refer to the code example for your development system.


piSize Parameter For AnnSaveMemory

piSize

Address of the long integer variable used to track the size of the file in memory. In Delphi, declare the variable and pass its address. In most other languages, pass the variable by reference. The method updates the value of the variable. The variable must be declared with the appropriate data type. To see the correct data type, refer to the code example for your development system.


nSavePage Parameter For AnnSave

nSavePage

Number of the page to overwrite, append, replace, or insert, based on the iModify parameter. The page number is 1-based. Therefore, the first page is page 1, the second page is page 2, etc.


szFile Parameter For AnnSave

szFile

A character string that specifies the file to save.


fSelected Parameter For AnnSaveTag

fSelected

Boolean flag that indicates whether to save all objects within a container or only selected objects. Possible values are:

Value | Meaning
True | Only selected annotation objects will be saved.
False | All annotation objects are saved.


fWangMode Parameter For AnnSaveTag

fWangMode

Boolean flag that indicates whether to save annotations in a WANG compatible TIFF tag, or in the LEAD format. Possible values are:

Value | Meaning
True | Save the annotations in a WANG compatible TIFF tag.
False | Save the annotations in the LEAD format.


Return for AnnSaveTag

Return Value

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


hContainer Parameter For AnnSelectPoint

hContainer

Handle to the annotation container object.


Return for AnnSelectPoint

Return Value

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


ptSelect Parameter For AnnSelectPoint

ptSelect

Selection point.


hContainer Parameter For AnnSelectRect

hContainer

Handle to the annotation container object.


Return for AnnSelectRect

Return Value

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


rcSelect Parameter For AnnSelectRect

rcSelect

Selection rectangle.


clBack Parameter for AnnSetAutoBackColor

clBack

The TColor value that specifies the background color.


hObject Parameter for AnnSetAutoBackColor

hObject

Handle to the annotation object.


Return for AnnSetAutoBackColor

Return Value

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


nType Parameter for AnnSetAutoBackColor

nType

Type of object having its background color changed. For a list of possible values, refer to Types of Annotations.


hObject Parameter For AnnSetAutoDefaults

hObject

Handle to the annotation object.


iFlags Parameter For AnnSetAutoDefaults

iFlags

Flag that indicates the objects to process. Use 0 if hObject is not a container.

If hObject is a container, use 0 (process only hObject), or combine some of the values given below, using a bitwise OR. For example, ANNFLAG_SELECTED + ANNFLAG_RECURSE processes only the selected objects.

Value | Meaning
ANNFLAG_SELECTED | [$0001] Process only the selected objects.
ANNFLAG_NOTCONTAINER | [$0002] Process all objects that are not containers.
ANNFLAG_NOTTHIS | [$0003] Process all objects except hObject.
ANNFLAG_RECURSE | [$0004] Process all objects contained in hObject and any contained in any sub-containers.


Return for AnnSetAutoDefaults

Return Value

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


hObject Parameter For AnnSetAutoMenuItemEnable

hObject

Handle to the annotation object.


iEnable Parameter For AnnSetAutoMenuItemEnable

iEnable

Flag that indicates whether to enable or disable the specified item. Possible values are:

Value | Meaning
ANNMENU_ENABLED | Enable the menu item.
ANNMENU_DISABLED | Disable the menu item.
ANNMENU_DEFAULT | Enable or disable the menu item, based on the setting for the object type.


iFlags Parameter For AnnSetAutoMenuItemEnable

iFlags

Flag that indicates the objects to process. Use 0 if hObject is not a container.

If hObject is a container, use 0 (process only hObject), or combine some of the values given below, using a bitwise OR. For example, ANNFLAG_SELECTED + ANNFLAG_RECURSE

processes only the selected objects.

Value | Meaning
ANNFLAG_SELECTED | [$0001] Process only the selected objects.
ANNFLAG_NOTCONTAINER | [$0002] Process all objects that are not containers.
ANNFLAG_NOTTHIS | [$0003] Process all objects except hObject.
ANNFLAG_RECURSE | [$0004] Process all objects contained in hObject and any contained in any sub-containers.
ANNFLAG_USER | [$0040] Process only those objects with users listed in szUserList.


iItem Parameter For AnnSetAutoMenuItemEnable

iItem

Constant that specifies the menu or dialog box item to enable or disable. For lists of constants and their default values, refer to the following:

Annotation Automation Menu Strings

Annotation Automation Line Dialog Strings

Annotation Automation Fill Dialog Strings

Annotation Automation Text Dialog Strings

Annotation Automation Audio Dialog Strings

Annotation Automation Stamp Dialog Strings

Annotation Automation ROP2 Dialog Strings

Annotation Automation Lock/Unlock Dialog Strings

Annotation Automation Miscellaneous Dialog Strings

Annotation Automation Ruler Dialog Strings

Annotation Automation Point Dialog Strings

Annotation Automation Video Dialog Strings

Annotation Automation Push Pin Dialog Strings

Annotation Automation Nodes Dialog Strings

Annotation Automation Protractor Dialog Strings

Annotation Automation Name Dialog Strings

Annotation Automation Play Video Dialog Strings

Annotation Automation Stamp Metafile Dialog Strings

Annotation Automation ToolTip Dialog Strings

Annotation Automation Transparent Color Dialog Strings

Annotation Automation Capture Dialog Strings


Return for AnnSetAutoMenuItemEnable

Return Value

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


iType Parameter For AnnSetAutoMenuItemEnable

iType

Constant that specifies an object's type. If hObject is an automation object, the specified menu item for all objects of type iType will be enabled or disabled. For descriptions of possible object types, refer to Types of Annotations.


pszUserList Parameter For AnnSetAutoMenuItemEnable

pszUserList

String that contains the list of users associated with the specified object. pUserList has the form "User1,User2,…,UserN". This must be a Nil terminated string with user names separated by a comma. This parameter is valid only if ANNFLAG_USER is set in iFlags.


iItem Parameter For AnnSetAutoText

iItem

Constant that specifies the menu or dialog box item, which appears when the user presses the right mouse button. For lists of constants and their default values, refer to the following:

Annotation Automation Menu Strings

Annotation Automation Line Dialog Strings

Annotation Automation Fill Dialog Strings

Annotation Automation Text Dialog Strings

Annotation Automation Audio Dialog Strings

Annotation Automation Stamp Dialog Strings

Annotation Automation Lock/Unlock Dialog Strings

Annotation Automation Miscellaneous Dialog Strings

Annotation Automation ROP2 Dialog Strings

Annotation Automation Ruler Dialog Strings

Annotation Automation Point Dialog Strings

Annotation Automation Video Dialog Strings

Annotation Automation Push Pin Dialog Strings

Annotation Automation Nodes Dialog Strings

Annotation Automation Protractor Dialog Strings

Annotation Automation Name Dialog Strings

Annotation Automation Play Video Dialog Strings

Annotation Automation Stamp Metafile Dialog Strings

Annotation Automation ToolTip Dialog Strings

Annotation Automation Transparent Color Dialog Strings

Annotation Automation Capture Dialog Strings


Return for AnnSetAutoText

Return Value

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


pszText Parameter For AnnSetAutoText

pszText

The text string to use for the specified item.


Bitmap Parameter for AnnSetBitmap

Bitmap

The Bitmap to be assigned to the specified object.


bSelected Parameter For AnnSetBitmap

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
True | Process only the selected objects.
False | Process all objects.


hObject Parameter for AnnSetBitmap

hObject

Handle to the annotation object.


Return for AnnSetBitmap

Return Value

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


AutoGroup Parameter For AnnSetGrouping

bAutoGroup

Flag that indicates whether to group the objects in a container. Possible values are:

Value | Meaning
True | All objects in the container are to be grouped.
False | Each object in the container can be modified and selected independently.


hObject Parameter For AnnSetGrouping

hObject

Handle to a container object.


iFlags Parameter For AnnSetGrouping

iFlags

Flags that determine which objects to process. Most of the flags apply only to container objects. Values can be combined when appropriate by using a bitwise OR (+). The following are valid values:

Value | Meaning
0 | Process only the specified object.
ANNFLAG_SELECTED | [$0001] Process only objects that have the selected property set to True. To get a list of selected objects, use the AnnGetSelectList method.
ANNFLAG_NOTTHIS | [$0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not.
ANNFLAG_RECURSE | [$0008] Process objects within a container, and within any sub-containers, down to any level.
ANNFLAG_NOTCONTAINER | [$0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.


Return for AnnSetGrouping

Return Value

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


hObject Parameter For AnnSetHyperlinkMsg

hObject

Handle of the annotation object.


Return for AnnSetHyperlinkMsg

Return Value

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


IParam1 Parameter For AnnSetHyperlinkMsg

lParam1

First parameter to the OnAnnHyperlink event.


Iparam2 Parameter For AnnSetHyperlinkMsg

lParam2

Second parameter to the OnAnnHyperlink event.


Iparam3 Parameter For AnnSetHyperlinkMsg

lParam3

Third parameter to the OnAnnHyperlink event.


Iparam4 Parameter For AnnSetHyperlinkMsg

lParam4

Fourth parameter to the OnAnnHyperlink event.


Iparam5 Parameter For AnnSetHyperlinkMsg

lParam5

Fifth parameter to the OnAnnHyperlink event.


iType Parameter For AnnSetHyperlinkMsg

iType

Value that indicates the type of hyperlink. Possible values are:

Value | Meaning
ANNLINK_NONE | (0) The object has no hyperlink
ANNLINK_ANNEVENT | (1) The OnAnnHyperlink event will be sent with no parameters
ANNLINK_ANNEVENT5 | (2) The OnAnnHyperlink event will be sent with 5 parameters


hObject Parameter For AnnSetHyperlinkString

hObject

Handle of the annotation object.


Return for AnnSetHyperlinkString

Return Value

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


iType Parameter For AnnSetHyperlinkString

iType

Value that indicates the type of hyperlink to set. Possible values are:

Value | Meaning
ANNLINK_NONE | (0) The object has no hyperlink
ANNLINK_RUN | (3) The hyperlink will run a program.
ANNLINK_WEBPAGE | (4) The default browser will be instructed to go to thespecified web page.


pszHyperlink Parameter For AnnSetHyperlinkString

pszHyperlink

String containing the name of a program, with all required command line parameters, or the URL of a web page. For iType 3, pszHyperlink is the program to run with its command line parameters. For iType 4, pszHyperlink is the web URL. If you have a web page link, the default web browser will be run and instructed to go to that web page.


bSelected Parameter For AnnSetMetafile

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
True | Process only the selected objects.
False | Process all objects.


hFile Parameter for AnnSetMetafile

hFile

Handle to a metafile.


hObject Parameter for AnnSetMetafile

hObject

Handle to the annotation object.


Return for AnnSetMetafile

Return Value

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


nType Parameter for AnnSetMetafile

nType

Constant that indicates the metafile to set. Possible values are:

Value | Meaning
ANNMETAFILE_APPROVED | [0] Predefined metafile - APPROVED
ANNMETAFILE_ASSIGNED | [1] Predefined metafile - ASSIGNED
ANNMETAFILE_CHECKED | [2] Predefined metafile -CHECKED
ANNMETAFILE_CLATPRV | [3] Predefined metafile - CLIENT ATTORNEY PRIVILEGE
ANNMETAFILE_COPY | [4] Predefined metafile - COPY
ANNMETAFILE_DRAFT | [5] Predefined metafile - DRAFT
ANNMETAFILE_EXTENDED | [6] Predefined metafile - EXTENDED
ANNMETAFILE_FAX | [7] Predefined metafile - FAX
ANNMETAFILE_FAXED | [8] Predefined metafile - FAXED
ANNMETAFILE_IMPORTANT | [9] Predefined metafile - IMPORTANT
ANNMETAFILE_INVOICE | [10] Predefined metafile - INVOICE
ANNMETAFILE_NOTICE | [11] Predefined metafile - NOTICE
ANNMETAFILE_OFFICIAL | [12] Predefined metafile - OFFICIAL
ANNMETAFILE_ONFILE | [13] Predefined metafile - ON FILE
ANNMETAFILE_PAID | [14] Predefined metafile - PAID
ANNMETAFILE_PASSED | [15] Predefined metafile - PASSED
ANNMETAFILE_PENDING | [16] Predefined metafile - PENDING
ANNMETAFILE_PROCESSED | [17] Predefined metafile - PROCESSED
ANNMETAFILE_RECEIVED | [18] Predefined metafile - RECEIVED
ANNMETAFILE_REJECTED | [19] Predefined metafile - REJECTED
ANNMETAFILE_RELEASE | [20] Predefined metafile - RELEASE
ANNMETAFILE_SENT | [21] Predefined metafile - SENT
ANNMETAFILE_SHIPPED | [22] Predefined metafile - SHIPPED
ANNMETAFILE_TOPSECRET | [23] Predefined metafile - TOP SECRET
ANNMETAFILE_URGENT | [24] Predefined metafile - URGENT
ANNMETAFILE_VOID | [25] Predefined metafile – VOID
ANNMETAFILE_HOTSPOT | [26] Predefined metafile for Hotspot and Freehand
ANNMETAFILE_ENCRYPTOR | [27] predefined metafile for an encrypt object in the ‘encryptor’ state.
ANNMETAFILE_DECRYPTOR | [28] predefined metafile for an encrypt object in the ‘decryptor’state


bSelected Parameter For AnnSetNameOffsetX

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetNameOffsetX

hObject

Handle to the annotation object.


Return for AnnSetNameOffsetX

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


NameOffsetX Parameter For AnnSetNameOffsetX

NameOffsetX

X-offset to set for the name of the annotation object specified in hObject.


bSelected Parameter For AnnSetNameOffsetY

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetNameOffsetY

hObject

Handle to the annotation object.


Return for AnnSetNameOffsetY

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


NameOffsetY Parameter For AnnSetNameOffsetY

NameOffsetY

Y- offset to set for the name of the annotation object specified in hObject.


bNameRestrict Parameter For AnnSetNameRestrict

bNameRestrict

Flag that indicates whether to restrict the name of the specified annotation object. Possible values are:

Value | Meaning
TRUE | Restrict the name of the specified annotation object so that it fully appears on the bitmap.
FALSE | Do not restrict the name of the specified annotation object.


bSelected Parameter For AnnSetNameRestrict

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetNameRestrict

hObject

Handle to the annotation object.


Return for AnnSetNameRestrict

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnSetNodes

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


bShowNodes Parameter For AnnSetNodes

bShowNodes

Flag that indicates whether to show the nodes. Possible values are:

Value | Meaning
TRUE | Show the nodes.
FALSE | Do not show the nodes.


hObject Parameter for AnnSetNodes

hObject

Handle to the container annotation object.


Return for AnnSetNodes

Return Value

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


uGapNodes Parameter For AnnSetNodes

uGapNodes

Value that represents the number of nodes to skip before displaying another node. Use 0 to display all nodes. Possible values are:

Value Meaning

0 Show every node.

1 Show a node, skip a node, show a node …

.

.

.

.

9 Show a node, skip the next nine, …


hMetaFile Parameter for AnnSetPredefinedMetafile

hMetaFile

Handle to the metafile used to replace the specified predefined metafile. Passing 0 will reset the predefined metafile specified by nType to its original metafile.


Return for AnnSetPredefinedMetafile

Return Value

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


nType Parameter For AnnSetPredefinedMetafile

nType

Constant that indicates the metafile to change. Possible values are:

Value | Meaning
ANNMETAFILE_APPROVED | [0] Predefined metafile - APPROVED
ANNMETAFILE_ASSIGNED | [1] Predefined metafile - ASSIGNED
ANNMETAFILE_CHECKED | [2] Predefined metafile -CHECKED
ANNMETAFILE_CLATPRV | [3] Predefined metafile - CLIENT ATTORNEY PRIVILEGE
ANNMETAFILE_COPY | [4] Predefined metafile - COPY
ANNMETAFILE_DRAFT | [5] Predefined metafile - DRAFT
ANNMETAFILE_EXTENDED | [6] Predefined metafile - EXTENDED
ANNMETAFILE_FAX | [7] Predefined metafile - FAX
ANNMETAFILE_FAXED | [8] Predefined metafile - FAXED
ANNMETAFILE_IMPORTANT | [9] Predefined metafile - IMPORTANT
ANNMETAFILE_INVOICE | [10] Predefined metafile - INVOICE
ANNMETAFILE_NOTICE | [11] Predefined metafile - NOTICE
ANNMETAFILE_OFFICIAL | [12] Predefined metafile - OFFICIAL
ANNMETAFILE_ONFILE | [13] Predefined metafile - ON FILE
ANNMETAFILE_PAID | [14] Predefined metafile - PAID
ANNMETAFILE_PASSED | [15] Predefined metafile - PASSED
ANNMETAFILE_PENDING | [16] Predefined metafile - PENDING
ANNMETAFILE_PROCESSED | [17] Predefined metafile - PROCESSED
ANNMETAFILE_RECEIVED | [18] Predefined metafile - RECEIVED
ANNMETAFILE_REJECTED | [19] Predefined metafile - REJECTED
ANNMETAFILE_RELEASE | [20] Predefined metafile - RELEASE
ANNMETAFILE_SENT | [21] Predefined metafile - SENT
ANNMETAFILE_SHIPPED | [22] Predefined metafile - SHIPPED
ANNMETAFILE_TOPSECRET | [23] Predefined metafile - TOP SECRET
ANNMETAFILE_URGENT | [24] Predefined metafile - URGENT
ANNMETAFILE_VOID | [25] Predefined metafile – VOID
ANNMETAFILE_HOTSPOT | [26] Predefined metafile for Hotspot and Freehand
ANNMETAFILE_ENCRYPTOR | [27] predefined metafile for an encrypt object in the ‘encryptor’ state.
ANNMETAFILE_DECRYPTOR | [28] predefined metafile for an encrypt object in the ‘decryptor’state


bAcute Parameter For AnnSetProtractorOptions

bAcute

Boolean variable that indicates whether to draw the inside (acute or <180 degrees) angle or the outside (obtuse or >180 degrees) angle of the protractor. Possible values are:

Setting | Description
True | Draw the inside (acute) angle of the protractor.
False | Draw the outside (obtuse) angle of the protractor.


bSelected Parameter For AnnSetProtractorOptions

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


fArcRadius Parameter For AnnSetProtractorOptions

fArcRadius

The arc radius.


hObject Parameter for AnnSetProtractorOptions

hObject

Handle to the annotation object.


Return for AnnSetProtractorOptions

Return Value

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


nPrecision Parameter For AnnSetProtractorOptions

nPrecision

The number of digits after the decimal. ( "." ) Valid values are 0 – 200.


nUnit Parameter for AnnSetProtractorOptions

nUnit

Integer variable that indicates whether the measurement unit for the angle is degrees or radians. Possible values are:

Value | Meaning
ANNANGLE_DEGREES | Measure the angle in degrees. The default abbreviation for this unit is the degree sign.
ANNANGLE_RADIANS | Measure the angle in radians. The default abbreviation for this unit is "rad".


strAbbrev Parameter For AnnSetProtractorOptions

strAbbrev

String containing the abbreviation to be put after the angle. Use Nil to set the default abbreviation for the specified unit.

To get the default abbreviations for the current angle unit, add ANNUNIT_DEF_ABBR [0x4000] to the unit value passed in nUnit. In this case, strAbbrev will be ignored.


bSelected Parameter For AnnSetROP2

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetROP2

hObject

Handle to the annotation object.


Return for AnnSetROP2

Return Value

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


uROP2 Parameter for AnnSetROP2

uROP2

Constant that specifies the binary raster operation (ROP2) code for one or more objects. ROP2 codes specify how pen or brush colors are to be combined with the colors in the image. Possible ROP2 code values are:

Value | Meaning
ANNROP2_COPY | [0x0000] Draw the object using the object's color.
ANNROP2_AND | [0x0001] Draw the object, performing an AND operation between the object's color and the background color. This creates a highlight effect. White objects become transparent.
ANNROP2_XOR | [0x0002] Draw the object, performing an XOR operation between the object's color and the background color. This creates an inverted effect. Black objects become transparent.

The default value is ANNROP2_COPY.


Bitmap Parameter for AnnSetSecondaryBitmap

Bitmap

The Bitmap to be used as a secondary bitmap.


bSelected Parameter For AnnSetSecondaryBitmap

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetSecondaryBitmap

hObject

Handle to the annotation object.


Return for AnnSetSecondaryBitmap

Return Value

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


bSelected Parameter For AnnSetSelected

bSelected

Flag that indicates whether to change the selection status for the selected objects only, or for all objects. This value is valid only if hObject is a container object. Possible values are:

Value | Meaning
True | Change the selection status of those objects within the container that have their Selected property set.
False | Change the selection status for all objects. This is comparable to setting iFlags to ANNFLAG_NOTCONTAINER+ANNFLAG_RECURSE.


bValue Parameter For AnnSetSelected

bValue

Flag that indicates whether to select or deselect hObject. Possible values are:

Value | Meaning
True | Select the specified object and all objects that it contains.
False | Deselect the object and all objects that it contains.


hObject Parameter For AnnSetSelected

hObject

Handle to an annotation object.


Return for AnnSetSelected

Return Value

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


bSelected Parameter For AnnSetShowFlags

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetShowFlags

hObject

Handle to the annotation object.


Return for AnnSetShowFlags

Return Value

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


uShowFlags Parameter For AnnSetShowFlags

uShowFlags

Flag that indicates how to display the rulers. Possible values are:

Value | Meaning
0 | Do not display the ruler length or the ruler gauge or the tic marks. In this case, the ruler looks like a line.
ANNSHOW_LENGTH | Display the ruler length.
ANNSHOW_GAUGE | Display the ruler gauge.
ANNSHOW_TICMARKS | Display the tic marks.


hObject Parameter For AnnSetTag

hObject

Handle to the annotation object.


Return for AnnSetTag

Return Value

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


iTag Parameter For AnnSetTag

iTag

The numeric tag that will be assigned to the object.


bSelected Parameter For AnnSetTransparent

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


bTransparent Parameter For AnnSetTransparent

bTransparent

Flag that indicates whether to have the bitmap use a transparent color. Possible values are:

Value | Meaning
TRUE | Have the bitmap use a transparent color.
FALSE | Do not have the bitmap use a transparent color. This is the default.


bSelected Parameter For AnnSetTransparentColor

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


clTransparent Parameter for AnnSetTransparentColor

clTransparent

The transparent color.


hObject Parameter for AnnSetTransparentColor

hObject

Handle to the annotation object.


Return for AnnSetTransparentColor

Return Value

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


hObject Parameter For AnnSetTransparent

hObject

Handle to the annotation object.


Return for AnnSetTransparent

Return Value

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


bSelected Parameter For AnnSetUser

bSelected

Flag that indicates whether to process only objects with their Selected property set, or process all objects within the container. This value is valid only for container objects. Possible values are:

Value | Meaning
True | Process only those objects in the container with the Selected property set.
False | Process all objects within the container.


hObject Parameter For AnnSetUser

hObject

Handle to the annotation object.


Return for AnnSetUser

Return Value

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


pNewUser Parameter For AnnSetUser

pNewUser

String that contains the new user string.


pOldUser Parameter For AnnSetUser

pOldUser

String that contains the old user string.


bVisible Parameter For AnnSetVisible

bVisible

Flag that indicates whether to make the object or objects visible or invisible. Possible values are:

Value | Meaning
True | Make the object or objects visible.
False | Make the object or objects invisible.


hObject Parameter For AnnSetVisible

hObject

Handle to the annotation object.


iFlags Parameter For AnnSetVisible

iFlags

Flag that indicates the objects to process. Use 0 if hObject is not a container.

If hObject is a container, use 0 (process only hObject), or combine some of the values given below, using a bitwise OR. For example, ANNFLAG_SELECTED + ANNFLAG_RECURSE processes only the selected objects.

Value | Meaning
0 | Process only the specified object.
ANNFLAG_SELECTED | [$0001] Process only objects that have the selected property set to True. To get a list of selected objects, use the AnnGetSelectList method.
ANNFLAG_NOTTHIS | [$0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not.
ANNFLAG_RECURSE | [$0008] Process objects within a container, and within any sub- containers, down to any level.
ANNFLAG_NOTCONTAINER | [$0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.
ANNFLAG_NOINVALIDATE | [$0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages.
ANNFLAG_USER | [$0040] Process only those objects that have a user included in pUserList. If pUserList is Nil, process only those objects that do not have an associated user.


Return for AnnSetVisible

Return Value

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


pszUserList Parameter For AnnSetVisible

pszUserList

String that contains the list of users associated with the specified object. pUserList has the form "User1,User2,…,UserN". This must be a Nil terminated string with user names separated by a comma. This parameter is valid only if ANNFLAG_USER is set in iFlags.


hObject Parameter For AnnUngroup

hObject

Handle to the annotation object.


iFalgs Parameter For AnnUngroup

iFlags

Flags that determine which objects to process. Most of the flags apply only to container objects. The following are valid values:

Value | Meaning
0 | Process only the specified object.
ANNFLAG_SELECTED | [$0001] Process only objects that have the selected property set to True. To get a list of selected objects, use the AnnGetSelectList method.
ANNFLAG_NOTTHIS | [$0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not.
ANNFLAG_RECURSE | [$0008] Process objects within a container, and within any sub-containers, down to any level.
ANNFLAG_NOTCONTAINER | [$0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.
ANNFLAG_NOINVALIDATE | [$0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages.
ANNFLAG_CHECKMENU | [$0020] Process objects only if the ANNAUTOTEXT_MENU_UNGROUP menu item has been selected.
ANNFLAG_USER | [$0040] Ungroup only those objects with users listed in pUserList.


Return for AnnUngroup

Return Value

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


pszUserList Parameter For AnnUngroup

pszUserList

String that contains the list of users associated with the specified object. pUserList has the form "User1,User2,…,UserN". This must be a Nil terminated string with user names separated by a comma. This parameter is valid only if ANNFLAG_USER is set in iFlags.


hObject Parameter For AnnUnlock

hObject

Handle of the annotation object.


Return for AnnUnlock

Return Value

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


szKey Parameter For AnnUnlock

szKey

String containing the key used to unlock the annotation objects.


fSelected Parameter For AnnUnrealize

fSelected

Boolean flag that indicates whether to restore all objects within a container or only selected objects. Possible values are:

Value | Meaning
True | Restore only the selected objects within the container.
False | Restore all objects within the container.


hObject Parameter For AnnUnrealize

hObject

Handle of the annotation object.


Return for AnnUnrealize

Return Value

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


iDim Parameter For AntiAlias

iDim

Value that indicates the size of the anti-aliasing mask. For example, a value of three indicates an anti-aliasing mask of 3 X 3.


iFilter Parameter For AntiAlias

iFilter

Flag that indicates the type of anti-aliasing filter to use. Possible values are:

Value | Meaning
ANTIALIAS_1 | [$0000] Anti-alias the bitmap vertically and horizontally.
ANTIALIAS_2 | [$0001] Anti-alias the bitmap in all directions.
ANTIALIAS_3 | [$0002] Anti-alias the bitmap in all directions. The filter used for this option is different from the filter used for the ANTIALIAS_2 option.
ANTIALIAS_DIAG | [$0003] Anti-alias the bitmap diagonally.
ANTIALIAS_HORZ | [$0004] Anti-alias the bitmap horizontally.
ANTIALIAS_VERT | [$0005] Anti-alias the bitmap vertically.


Return for AntiAlias

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iThreshold Parameter For AntiAlias

iThreshold

Threshold value that indicates which pixels to smooth. The application of the anti-aliasing filter on the image associates a value with each pixel. Only pixels with values above this threshold are smoothed.


Return for AutoTrim

Return Value

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


uThreshold Parameter For AutoTrim

uThreshold

Delta value for detecting blank space. Starting at each edge of the bitmap and evaluating toward the center, any change in intensity that is less than or equal to uThreshold is considered blank space. Valid values are 0 to 255.


iDim Parameter For Average

iDim

Size of the averaging neighborhood. It is the length, in pixels, of one side of a square.


Return for Average

Return Value

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


BlueFact Parameter For BalanceColors

BlueFact

COLORBALANCING Record (structure) that contains the values to use for redistributing the bitmap's blue values.


GreenFact Parameter For BalanceColors

GreenFact

COLORBALANCING Record (structure) that contains the values to use for redistributing the bitmap's green values.


Return for BalanceColors

Return Value

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


RedFact Parameter For BalanceColors

RedFact

COLORBALANCING Record (structure) that contains the values to use for redistributing the bitmap's red values.


iIndex Parameter For BezierX

iIndex

Index into the ordered array of X coordinates for the control points. This is a zero-based index.


iIndex Parameter For BezierY

iIndex

Index into the ordered array of Y coordinates for the control points. This is a zero-based index.


Return for BinaryFilter

Return Value

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


iType Parameter For BinaryFilter

iType

Pointer to the binary filter to use. You can use one of the following predefined filters:

Value | Meaning
BFLT_EROSION_OMNI BFLT_EROSION_HORZ BFLT_EROSION_VERT BFLT_EROSION_DIAG | Shrinks black objects in the bitmap. The effect is biased in the specified direction.
BFLT_DILATION_OMNI BFLT_DILATION_HORZ BFLT_DILATION_VERT BFLT_DILATION_DIAG | Enlarges black objects in the bitmap. The effect is biased in the specified direction.


iIndex Parameter For BitmapPalette

iIndex

Index into the array of colors.


Return for BitmapToClient

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


X Parameter For BitmapToClient

X

The bitmap X coordinate to be converted to a client X coordinate.


Y Parameter For BitmapToClient

Y

The bitmap Y coordinate to be converted to a client Y coordinate.


Return For BorderRemove

Return Value

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


nBorderPercent Parameter For BorderRemove

nBorderPercent

Percent of the image dimension in which the border will be found. For most images, use 20. For example, if an image is 200 pixels wide, nBorderPercent is set to 20 and uBorderToRemove is set to BORDER_LEFT, then the left border will be found in the area between the left edge of the image and a line 40 pixels from the left edge. If the border is closer to the edge of the image, use a smaller value. If the border is farther from the edge, use a larger value.


nVariance Parameter For BorderRemove

nVariance

Amount of variance tolerated in the border. If the border varies significantly in thickness, you should use a higher value for nVariance. Range is 0 to 10.


nWhiteNoiseLength Parameter For BorderRemove

nWhiteNoiseLength

Amount of white noise tolerated when determining the border. The units are in pixels. Values of 0 to 10 are sufficient for most images.


uBorderToRemove Parameter For BorderRemove

uBorderToRemove

Flag that indicates which border to remove. These values can be combined using the OR operator . Possible values are:

Value | Meaning
BORDER_LEFT | Remove the left border.
BORDER_RIGHT | Remove the right border.
BORDER_TOP | Remove the top border.
BORDER_BOTTOM | Remove the bottom border.
BORDER_ALL | Remove all borders. This is the same as BORDER_LEFT | BORDER_RIGHT | BORDER_TOP | BORDER_BOTTOM.


uProcessFlags Parameter For BorderRemove

uProcessFlags

Flags that determine the behavior of the border removal process. Flags may be combined using a bitwise OR. Possible values are:

Value | Meaning
BORDER_SINGLE_REGION: | For each border found by the BorderRemove method, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the OnBorderRemove, the removed border is added to an internal single region. If the DocCleanSuccess propertyis set to SUCCESS_NOREMOVE, the border is not added to the single region. When the BorderRemove method returns, either the DocCleanBitmap property or the hDocCleanRgn property will be set to a region that contains all the removed borders. If BORDER_LEAD_REGION is also set, the DocCleanBitmap property will be set to a bitmap that has a LEAD region that contains all the removed borders. If BORDER_LEAD_REGION is not set, hDocCleanRgn is set to a Windows region that contains all the removed borders. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.
BORDER_LEAD_REGION | When the BorderRemove method returns, the DocCleanBitmap property is set to a bitmap that also contains a region with all the removed lines. This flag must be used in conjunction with BORDER_SINGLE_REGION. Pass BORDER_SINGLE_REGION | BORDER_LEAD_REGION in the uProcessFlags parameter of the BorderRemove method. The DocCleanBitmap property will be set when the BorderRemove method returns.
BORDER_IMAGE_UNCHANGED | The original image is unchanged.
BORDER_CALLBACK_REGION | The OnBorderRemove event receives a Windows region that contains the current border to be removed. Setting this flag lets the user create his or her own composite of removed borders by combining the regions received by the event, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the event. The regions can be combined using a logical OR operator. Combining all regions received by the event, that are removed, results in a region identical to the region created when BORDER_SINGLE_REGION is set in uProcessFlags. When the region received by the event is no longer needed, it must be destroyed.
BORDER_USE_VARIANCE | Consider border variance when performing border removal. If this flag is passed, the nVariance parameter of this method is used. If this flag is not passed, the nVariance parameter is ignored.


Return for BrowseDir

Return Value

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


pszDirecotry Parameter For BrowseDir

Directory

The starting directory for the browse operation.

If the IncludeSubDirectories property is True, subdirectories will also be searched.


iButtonIndex Parameter For ButtonBitmapDown

iButtonIndex

Index indicating a button in the AnnToolbar object. The array is zero-based.


iButtonIndex Parameter For ButtonBitmapUp

iButtonIndex

Index indicating a button in the AnnToolbar object. The array is zero-based.


iButtonIndex Parameter For ButtonMenuText

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


iToolIndex Parameter For ButtonMenuText

iToolIndex

Index into a list of menu items associated with the specified button in the annotation toolbar. This is a zero-based index.


iButtonIndex Parameter For ButtonMenuTextID

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


ItoolIndex Parameter For ButtonMenuTextID

IToolIndex

Index into a list of menu items associated with the specified button in the annotation toolbar. This is a zero-based index.


iButtonIndex Parameter For ButtonMenuTool

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


iToolIndex Parameter For ButtonMenuTool

iToolIndex

Index into a list of menu items associated with the specified button in the annotation toolbar. This is a zero-based index.


iButtonIndex Parameter For ButtonToolCount

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


iButtonIndex Parameter For ButtonTool

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


iButtonIndex Parameter For ButtonToolTipText

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


iButtonIndex Parameter For ButtonToolTipTextID

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


iButtonIndex Parameter For ButtonVisible

iButtonIndex

Index indicating a button in the AnnToolbar object. This is a zero-based index.


Return for CancelFloater

Return Value

SUCCESS | The function was successful.
<=0 | An error occurred. Refer to Error Codes.


hDevice Parameter For Capture

hDevice

Handle to the source device. The mapping mode of the device context must be MM_TEXT.


iHeight Parameter For Capture

iHeight

The height of the rectangle to capture. The unit of measure pixels.


iLeft Parameter For Capture

iLeft

The X coordinate of the origin of the rectangle to capture, relative to the specified device context. The unit of measure is pixels.


Return for Capture

Return Value

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


iTop Parameter For Capture

iTop

The X coordinate of the origin of the rectangle to capture, relative to the specified device context. The unit of measure is pixels.


iWidth Parameter For Capture

iWidth

The width of the rectangle to capture. The unit of measure is pixels.


Return for Clear

Return Value

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


Return for ClientToBitmap

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


X Parameter For ClientToBitmap

X

The client X coordinate to be converted to a bitmap X coordinate.


Y Parameter For ClientToBitmap

Y

The client Y coordinates to be converted to a bitmap Y coordinate.


iFlags Parameter For ColorMerge

iFlags

The type of separation that was used to create the grayscale bitmaps. Valid values are:

Value | Meaning
COLORSEP_RGB | Merge bitmaps from three RGB planes.
COLORSEP_CMYK | Merge bitmaps from four CMYK planes.
COLORSEP_CMY | Merge bitmaps from three CMY planes.
COLORSEP_HSV | Merge bitmaps from three HSV planes.
COLORSEP_HLS | Merge bitmaps from three HLS planes.


Return for ColorMerge

Return Value

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


nIndex Parameter For ColorPlanes

nIndex

The index into the array of grayscale bitmaps that are the color separations. The separations follow the color order of the image data. In most cases, this is the same as the abbreviation of the color-plane model. For example, in a CMYK separation, ColorPlanes(0) is the cyan plane. The only exception is RGB, where the image data is usually stored as blue-green-red, and ColorPlanes(0) is the blue plane.


iBitsPerPixel Parameter For ColorRes

iBitsPerPixel

The number of bits per pixel to increase or decrease the bitmap to. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 48, and 64.


iColors Parameter For ColorRes

iColors

The number of colors in the palette. Pass 0 for to get the default (such as 256 for 8 bits per pixel). Otherwise, do one of the following:

If you specify CRF_USERPALETTE in the iPalette parameter, pass the number of entries in your palette.

If you specify CRF_OPTIMIZEDPALETTE in the iPalette parameter, you can use this parameter to limit the number of colors that the method maps in the optimized palette.


iDither Parameter For ColorRes

iDither

Dithering options. Note that the dithering options are useful only when the resulting bitmap requires a palette (when it is 8 bits per pixel or less).

The following are valid values:

Value | Meaning
CRF_NODITHERING | Use nearest color matching.
CRF_FLOYDSTEINDITHERING | Use Floyd-Steinberg dithering.
CRF_STUCKIDITHERING | Use Stucki dithering.
CRF_BURKESDITHERING | Use Burkes dithering.
CRF_SIERRADITHERING | Use Sierra dithering.
CRF_STEVENSONARCEDITHERING | Use Stevenson Arce dithering.
CRF_JARVISDITHERING | Use Jarvis dithering.
CRF_ORDEREDDITHERING | Use ordered dithering, which is faster but less accurate than other dithering methods.
CRF_CLUSTEREDDITHERING | Use clustered dithering.


Return for ColorRes

Return Value

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


iPalette Parameter For ColorRes

iPalette

Palette options.

The following are valid values:

Value | Meaning
CRF_FIXEDPALETTE | Use the LEAD fixed palette.
CRF_NETSCAPEPALETTE | Use the fixed palette that is employed by Netscape Navigator and by Microsoft Internet Explorer.
CRF_OPTIMIZEDPALETTE | Create an optimized palette.
CRF_IDENTITYPALETTE | Insert the Windows system palette, and optimize the remaining colors.
CRF_USERPALETTE | Use the palette specified in the UserPalette property.
CRF_BYTEORDERBGR | Use BGR color order. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_BYTEORDERRGB | Use RGB color order. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_BYTEORDERGRAY | Use grayscale. This flag is only valid for 12 or 16-bit grayscale images. 12 and 16-bit grayscale images are supported in the Document/Medical toolkits only.


iBitsPerPixel Parameter For ColorResList

iBitsPerPixel

The number of bits per pixel to increase or decrease the bitmaps to. Valid values are 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 48, 64.


Return for ColorResList

Return Value

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


uColors Parameter For ColorResList

uColors

The number of colors in the palette. Pass 0 for to get the default (such as 256 for 8 bits per pixel). Otherwise, do one of the following:

If you specify CRF_USERPALETTE in the iPalette parameter, pass the number of entries in your palette.

If you specify CRF_OPTIMIZEDPALETTE in the iPalette parameter, you can use this parameter to limit the number of colors that the method maps in the optimized palette.


uDither Parameter For ColorResList

uDither

Dithering options. Note that the dithering options are useful only when the resulting bitmaps require a palette (when they are 8 bits per pixel or less).

The following are valid values:

Value | Meaning
CRF_NODITHERING | Use nearest color matching.
CRF_FLOYDSTEINDITHERING | Use Floyd-Steinberg dithering.
CRF_STUCKIDITHERING | Use Stucki dithering.
CRF_BURKESDITHERING | Use Burkes dithering.
CRF_SIERRADITHERING | Use Sierra dithering.
CRF_STEVENSONARCEDITHERING | Use Stevenson Arce dithering.
CRF_JARVISDITHERING | Use Jarvis dithering.
CRF_ORDEREDDITHERING | Use ordered dithering, which is faster but less accurate than other dithering methods.
CRF_CLUSTEREDDITHERING | Use clustered dithering.


uPalette Parameter For ColorResList

uPalette

Palette options.

The following are valid values:

Value | Meaning
CRF_FIXEDPALETTE | Use the LEAD fixed palette.
CRF_NETSCAPEPALETTE | Use the fixed palette that is employed by Netscape Navigator and by Microsoft Internet Explorer.
CRF_OPTIMIZEDPALETTE | Create an optimized palette.
CRF_IDENTITYPALETTE | Insert the Windows system palette, and optimize the remaining colors.
CRF_USERPALETTE | Use the palette specified in the UserPalette property.
CRF_BYTEORDERBGR | Use BGR color order. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_BYTEORDERRGB | Use RGB color order. This flag only has meaning when going to 16 bits per pixel or higher.
CRF_BYTEORDERGRAY | Use grayscale. This flag is only valid for 12 or 16-bit grayscale images. 12 and 16-bit grayscale images are supported in the Document/Medical toolkits only.


iFlags Parameter For ColorSeparate

iFlags

The type of separation. Valid values are:

Value | Meaning
COLORSEP_RGB | Create bitmaps for three RGB planes.
COLORSEP_CMYK | Create bitmaps for four CMYK planes.
COLORSEP_CMY | Create bitmaps for three CMY planes.
COLORSEP_HSV | Create bitmaps for three HSV planes.
COLORSEP_HLS | Create bitmaps for three HLS planes.


Return for ColorSeparate

Return Value

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


Bitmap Parameter For CombineExt

Bitmap

The source Main Control's bitmap to be combined with the current Main Control's bitmap.


iFlags Parameter For CombineExt

iFlags

The flags are in four groups that define treatment of the source, treatment of the destination, the operation to use when combining the data, treatment of the resulting image, and the color plan for destination, source and result image. The flags apply only to the defined rectangles (not necessarily the whole bitmap). You can use a bitwise OR ( | ) to specify one flag from each group. In high-level languages such as Visual Basic, you can use a plus (+) operator to specify more than one flag.

For a simple paste, use CB_OP_ADD and CB_DST_0 as the flags.

Refer to Flags for the CombineExt Method for the list of flags.


iHeight Parameter For CombineExt

iHeight

The height of the rectangle to update, relative to the Main Control.


iLeft Parameter For CombineExt

iLeft

The X coordinate of the origin of the rectangle to update, relative to the Main Control.


Return for CombineExt

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iSrcLeft Parameter For CombineExt

iSrcLeft

The X coordinate of the origin of the source rectangle, relative to the source control.


iSrcTop Parameter For CombineExt

iSrcTop

The Y coordinate of the origin of the source rectangle, relative to the source control.


iTop Parameter For CombineExt

iTop

The Y coordinate of the origin of the rectangle to update, relative to the Main Control.


iWidth Parameter For CombineExt

iWidth

The width of the rectangle to update, relative to the Main Control.


iFlags Parameter For Combine

iFlags

The flags are in four groups that define treatment of the source, treatment of the destination, the operation to use when combining the data, and the treatment of the resulting image. The flags apply only to the defined rectangles (not necessarily the whole bitmap). You can use a bitwise OR ( | ) to specify one flag from each group.

For a simple paste, use CB_OP_ADD and CB_DST_0 as the flags.

Refer to Flags for the Combine Method for the list of flags.


Return for Combine

Return Value

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


nHeight Parameter For Combine

nHeight

The height of the rectangle to update, relative to the Main Control. The unit of measure is pixels.


nLeft Parameter For Combine

nLeft

The X coordinate of the origin of the rectangle to update, relative to the Main Control. The unit of measure is pixels.


nSrcLeft Parameter For Combine

nSrcLeft

The X coordinate of the origin of the source rectangle, relative to the source control. The unit of measure is pixels.


nSrcTop Parameter For Combine

nSrcTop

The Y coordinate of the origin of the source rectangle, relative to the source control. The unit of measure is pixels.


nTop Parameter For Combine

nTop

The Y coordinate of the origin of the rectangle to update, relative to the Main Control. The unit of measure is pixels.


nWidth Parameter For Combine

nWidth

The width of the rectangle to update, relative to the Main Control. The unit of measure is pixels.


pBitmap Parameter For Combine

pBitmap

The source Main Control's bitmap to be combined with the current Main Control's bitmap.


BitmapSrc Parameter for CombineWarp

BitmapSrc

The bitmap handle referencing the source bitmap. This is the slave bitmap, which is combined with the destination bitmap (already loaded in the Main control.).


Return for CombineWarp

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nSrcHeight Parameter for CombineWarp

nSrcHeight

The height of the area in the source bitmap to be warped to the destination bitmap. This value, along with ptSrc and nSrcWidth define the area of the source bitmap to be warped.


nSrcWidth Parameter for CombineWarp

nSrcWidth

The width of the area in the source bitmap to be warped to the destination bitmap. This value, along with ptSrc and nSrcHeight define the area of the source bitmap to be warped.


ptDstArray Parameter for CombineWarp

ptDstArray

An array that contains the four points that define the warp area in the destination bitmap. (TLEADCombineWarpDstPointsArray is an array of 4 TPoint records (Array [0..3] of TPoint).)


ptSrc Parameter for CombineWarp

ptSrc

TPoint record (structure) that contains the point of origin of the source bitmap. This is the upper left corner. This point, along with nSrcWidth and nSrcHeight define the area of the source bitmap to be warped.


uFlags Parameter for CombineWarp

uFlags

Flags that indicate the type of interpolation to use, if interpolation is used. Possible values are:

Value | Meaning
0 | No interpolation
CBW_BILINEAR | Bilinear interpolation. This value is only valid if the bits per pixel of the image is 1-bit, 8-bit grayscale, 12-bit without a lookup table, 16-bit without a lookup table, 24, 32, 48, or 64.


nIndex Parameter For Comment

nIndex

Index into the array of comments. For possible values, refer to Types of File Comments.


Return for ContourFilter

Return Value

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


nDeltaDir Parameter For ContourFilter

nDeltaDir

Maximum angle for the thinning algorithm. Values can be from 1 to 64. Default is 35.


nMaximumError Parameter For ContourFilter

nMaximumError

Maximum error for the approximation algorithm. Values can be from 0 to 255. Default is 5. This parameter is only valid if nOption is CONTOUR_APPROX_COLOR.


nOption Parameter For ContourFilter

nOption

Flag that controls the resulting image. This value tells the method what process to complete before returning. Possible values are:

Value | Meaning
CONTOUR_THIN | [0] return after the thinning algorithm
CONTOUR_LINK_BLACKWHITE | [1] return after contour linking, using only black and white
CONTOUR_LINK_GRAY | [2] return after contour linking, using 256 grayscale
CONTOUR_LINK_COLOR | [3] return after contour linking, using colors
CONTOUR_APPROX_COLOR | [4] return after line segment approximation, using colors


nThreshold Parameter For ContourFilter

nThreshold

Threshold of the gradient magnitude. Values below this will be considered as background, and will be set to 0. Values can be from 1 to 254. A lower threshold provides a better quality image. Default is 15.


iChange Parameter For Contrast

iChange

Amount of contrast change. Valid values are -1000 to +1000.


Return for Contrast

Return Value

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


Return for ConvertSignedToUnsigned

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uShift Parameter For ConvertSignedToUnsigned

uShift

Flag that indicates how the shift will be done. Possible values are:

Value | Meaning
SHIFT_ZERO_TO_CENTER | [0] Shift by 32768 (16-bit images) or by 2048 (12-bit images)
SHIFT_MIN_TO_ZERO | [1] Shift all image data to make minimum value in the image 0 and the maximum value to the maximum possible value (65535 for 16-bit, 4095 for 12-bit).
SHIFT_NEG_TO_ZERO | [2] Set all the negative pixels to 0 and leave the positive pixels unchanged. (Default).
SHIFT_RANGE_ONLY | [3] Shift data by adding half the range to each pixel without changing bits outside the (LowBit-HighBit) range.
SHIFT_RANGE_PROCESS_OUTSIDE | [4] Shift data by adding half the range to each pixel and set to zero all bits outside the (LowBit-HighBit) range.


BlueFact Parameter For ConvertToColoredGray

BlueFact

Value that represents the percentage or weight given to the blue value of each pixel in the bitmap. Possible values are 0 to 1000.


BlueGrayFact Parameter For ConvertToColoredGray

BlueGrayFact

Additional weighting factor (percentage) used to modify the blue component in the output pixel. This value can be negative. Possible values are -1000 to 1000.


GreenFact Parameter For ConvertToColoredGray

GreenFact

Value that represents the percentage or weight given to the green value of each pixel in the bitmap. Possible values are 0 to 1000.


GreenGrayFact Parameter For ConvertToColoredGray

GreenGrayFact

Additional weighting factor (percentage) used to modify the green component in the output pixel. This value can be negative. Possible values are -1000 to 1000.


Return for ConvertToColoredGray

Return Value

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


RedFact Parameter For ConvertToColoredGray

RedFact

Value that represents the percentage or weight given to the red value of each pixel in the bitmap.Possible values are 0 to 1000.


RedGrayFact Parameter For ConvertToColoredGray

RedGrayFact

Additional weighting factor (percentage) used to modify the red component in the output pixel.

This value can be negative. Possible values are -1000 to 1000.


Return for ConvertUnsignedToSigned

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter for ConvertUnsignedToSigned

uFlags

Flag that indicates how to process bits outside the low bit to high bit range. Possible values are:

Value | Meaning
PROCESS_RANGE_ONLY | [1] Shift data by adding half the range to each pixel without changing bits outside the (LowBit-HighBit) range.
PROCESS_OUTSIDE_RANGE | [2] Shift data by adding half the range to each pixel and set to zero all bits outside the (LowBit-HighBit) range.


iFlags Parameter For Copy

iFlags

Indicates how image data is placed on the clipboard. You can use a bitwise OR to pass more than one value.

Valid values are:

Value | Meaning
COPY_EMPTY | Empty the clipboard before copying data to it.
COPY_DIB | Copy DIB data to the clipboard.
COPY_DDB | Copy DDB data to the clipboard.
COPY_PALETTE | Copy palette data to the clipboard.


Return for Copy

Return Value

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


iBitsPerPixel Parameter For CreateBitmap

iBitsPerPixel

The number of bits per pixel. Valid values are 1, 4, 8, 16, 24, 32, 48, and 64. Use 0 to create an 8-bit image with a grayscale palette.


Return for CreateBitmap

Return Value

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


nHeight Parameter For CreateBitmap

nHeight

Height of the bitmap. The unit of measure is pixels.


nWidth Parameter For CreateBitmap

nWidth

Width of the bitmap. The unit of measure is pixels.


Bitmap Parameter For CreateFadedMask

Bitmap

LEAD bitmap. This bitmap must have a region.


crTransparent Parameter For CreateFadedMask

crTransparent

Transparency color.


iFadeRate Parameter For CreateFadedMask

iFadeRate

Value that represents the rate at which the color will fade with each step. Values are between 0 and 255.


iFlag Parameter For CreateFadedMask

iFlag

Flags that indicate how the fade mask will be created. Possible values are:

Value | Meaning
FADE_OUTER | [$0001] If this flag is set, the fade will be outside the bitmap's region. If this flag is not set, the fade will be inside the bitmap's region.
FADE_DUMPFILL | [$0002] If this flag is set, the dump part of the mask will be filled with the dump color. The FADE_FILLCOLOR_START and FADE_WHITETOBLACK flags determine the dump color. If this flag is not set, the dump part is filled with the crTransparent color.
FADE_FILLCOLOR_START | [$0004] If this flag is set, the dump color is the color used at the start of the fade. The start color may be white or black, based on the FADE_WHITETOBLACK. If this flag is not set, the dump color is the color at the end of the fade. If the FADE_DUMPFILL flag is not set, this flag is ignored.
FADE_WHITETOBLACK | [$0008] If this flag is set, the fade starts with white and changes toward black. If this flag is not set, the fade changes from black to white.
FADE_NOTRANSPARENCY | [$0010] If this flag is set, fill the transparency part with a color other than crTransparency. The color is either the same as the dump color, or its opposite, depending on whether the FADE_TRANSPARENCY_DUMPCOLOR flag is set. If the FADE_NOTRANSPARENCY flag is not set, fill the transparency with crTransparency. If the FADE_DUMPFILL flag is not set, this flag is ignored.
FADE_TRANSPARENCY_DUMPCOLOR | [$0020] If this flag is set, the transparency color is the same as the dump color. If this flag is not set, the transparency color is the opposite of the dump color. This flag is used only if FADE_NOTRANSPARENCY is set


iInflate Parameter For CreateFadedMask

iInflate

Value that indicates the amount to expand resulting bitmap. This parameter is used only if FADE_OUTER is set in iFlag.


iLenght Parameter For CreateFadedMask

iLength

Value that represents the extent of the fade, in pixels.


iMaxGray Parameter For CreateFadedMask

iMaxGray

The maximum value of the fade color. Possible values are between 0 and 255.


Return for CreateFadedMask

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iStepSize Parameter For CreateFadedMask

iStepSize

Step size at which the color will change. This value is in pixels.


Return for CreateMaskFromBitmapRgn

Return Value

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


iAlign Parameter For CreateTB

iAlign

Flag that indicates how to align the annotation toolbar. Possible values are given below, and may be combined:

Value | Meaning
ANNTOOLALIGN_LEFT | [$0000] Toolbar’s left margin will be at x.
ANNTOOLALIGN_RIGHT | [$0001] Toolbar’s right margin will be at x.
ANNTOOLALIGN_TOP | [$0002] Toolbar’s top margin will be at y.
ANNTOOLALIGN_BOTTOM | [$0003] Toolbar’s bottom margin will be at y.


Return for CreateTB

Return Value

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


x Parameter For CreateTB

x

X coordinate for the annotation toolbar. This coordinate is relative to the window of the LEADAnn control. This value is in pixels.


y Parameter For CreateTB

y

Y coordinate for the annotation toolbar. This coordinate is relative to the window of the LEADAnn control. This value is in pixels.


nPage Parameter For CreateThumbnailFromFile

nPage

The page number (for multipage files) that contains the image to be loaded.

If the file is not a multipage file, pass 0.


pszFilename Parameter For CreateThumbnailFromFile

pszFilename

Character string containing the name of the image file to load.


Return for CreateThumbnailFromFile

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


Return for CurveToBezier

Return Value

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


iIndex Parameter For CurveX

iIndex

Index into the ordered array of X coordinates of the points that define the curve. This is a zero-based index.


iIndex Parameter For CurveY

iIndex

Index into the ordered array of Y coordinates of the points that define the curve. This is a zero-based index.


Return for DeleteBitmapListItems

Return Value

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


uCount Parameter For DeleteBitmapListItems

uCount

The number of bitmaps to delete.


uIndex Parameter For DeleteBitmapListItems

uIndex

Index of the first bitmap to delete.


iIndex Parameter For DeleteItem

iIndex

Index into the menu items in the AnnMenu object. This is a zero-based index.


Return for DeleteItem

Return Value

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


Return for DeletePage

Return Value

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


iPage Parameter For DeletePage

iPage

Number of the page to delete. Possible values are:

Value | Meaning
-1 | Delete the last page.
>= 1 | Delete page iPage, where 1 is the first page, 2 is the second page, etc. The page indicated by iPage must exist, or an error will be returned.


Name Parameter For DeletePage

Name

Name of the file from which to delete the page.


Return for DeleteRgnHandle

Return Value

Value | Meaning
TRUE | The stored region was successfully deleted.
FALSE | The deletion failed.


hRegion Parameter For DeleteRgnHandle

hRegion

The handle of the stored region. The handle is returned by the method that stores the region.


crFill Parameter For Deskew

crFill

Color used to fill the background following rotation. This is used only if DSK_FILL is set in uFlags.

If the image is 8 bits per pixel or less, the color comes from the current palette, and it may not exactly match the specified color.

You can specify a COLORREF value (the return value of the RGB macro), or you can specify a palette index as explained in Using Palette Indexes As Color Values.


Return for Deskew

Return Value

SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For Deskew

nAngle

Variable to be updated with the amount that the function rotates the image. The amount of rotation is expressed in hundredths of degrees. For example, 500 mean 5 degrees clockwise. You can pass Nil (NULL) if you do not need to check the amount of rotation.


uFlags Parameter For Deskew

uFlags

Flags that indicate whether or not to deskew the image and what background color to use. You can use a bitwise OR (|) to specify one flag from each group.

The following flags indicate whether to deskew the image after the function finds the skew angle:

Value | Meaning
DSKW_PROCESS | [$00000000] Deskew (rotate) the image.
DSKW_NOPROCESS | [$00000001] Don’t deskew (rotate) the image. Generally this flag is used to find the angle of rotation.

The following flags indicate what background color to use:

Value | Meaning
DSKW_FILL | [$00000000] Use the color in crFill to fill areas exposed after rotation.
DSKW_NOFILL | [$00000010] Let the function automatically find the suitable background color used to fill areas exposed after rotation. crFill is ignored in this case.

The following flags indicate the image type:

Value | Meaning
DSKW_DOCUMENTIMAGE | [$00000000] The image contains text only.
DSKW_DOCUMENTANDPICTURE | [$00010000] The image contains text and pictures or light text.


Return for Despeckle

Return Value

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


Return For DotRemove

Return Value

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


nMaxDotHeight Parameter For DotRemove

nMaxDotHeight

The maximum height of a dot to be removed. If DOT_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


nMaxDotWidth Parameter For DotRemove

nMaxDotWidth

The maximum width of a dot to be removed. If DOT_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


nMinDotHeight Parameter For DotRemove

nMinDotHeight

The minimum height of a dot to be removed. If DOT_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


nMinDotWidth Parameter For DotRemove

nMinDotWidth

The minimum width of a dot to be removed. If DOT_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


uProcessFlags Parameter For DotRemove

uProcessFlags

Flags that determine the behavior of the dot removal process. Flags may be combined using a bitwise OR. Possible values are:

Value | Meaning
DOT_SINGLE_REGION: | For each dot found by the DotRemove method, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the OnDotRemove event, the removed dot is added to an internal single region. If the DocCleanSuccess property is set to SUCCESS_NOREMOVE, the dot is not added to the single region. When the DotRemove method returns, either the DocCleanBitmap property or the hDocCleanRgn property will reference a region that contains all the removed dots. If DOT_LEAD_REGION is also set, the DocCleanBitmap property will be set to a bitmap that has a LEAD region that contains all the removed dots. If DOT_LEAD_REGION is not set, hDocCleanRgn is set to a Windows region that contains all the removed borders. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.
DOT_LEAD_REGION | When the DotRemove method returns, the DocCleanBitmap property is updated with a bitmap that also contains a region with all the removed dots. This flag must be used in conjunction with DOT_SINGLE_REGION. To use this flag set uProcessFlags to DOT_SINGLE_REGION | DOT_LEAD_REGION. The DocCleanBitmap property will be updated when the DotRemove method returns.
DOT_IMAGE_UNCHANGED | The original image is unchanged.
DOT_USE_DPI | The unit of measure for all parameters of this method is thousandths of an inch. Use the image's DPI to convert to pixels. This allows the processing of many images with different DPI. If this flag is not set, the unit of measure is pixels.
DOT_CALLBACK_REGION | The OnDotRemove event receives a Windows region that contains the current dot to be removed. Setting this flag lets the user create his or her own composite of removed dots by combining the regions received by the event, if the DocCleanSuccess property was set to SUCCESS_REMOVE in the event. The regions can be combined using a logical OR operator. Combining all regions received by the event, that are removed, results in a region identical to the region created when DOT_SINGLE_REGION is set in uProcessFlags.
DOT_USE_SIZE | Use the nMinDotWidth, nMinDotHeight, nMaxDotWidth, nMaxDotHeight parameters to indicate the size of the dots to remove. If this flag is not set, default values for the four sizes will be used. These defaults are as follows: nMinDotWidth = 1, nMinDotHeight = 1, nMaxDotWidth = 2 and nMaxDotHeight = 2.


iHeight Parameter For DrawEllipse

iHeight

The height of the rectangle in the Main Control's client area. The unit of measure is pixels.


iLeft Parameter For DrawEllipse

iLeft

The X coordinate of the origin of the bounding rectangle in the Main Control's client area. The unit of measure is pixels.


Return for DrawEllipse

Return Value

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


iTop Parameter For DrawEllipse

iTop

The Y coordinate of the origin of the bounding rectangle in the Main Control's client area. The unit of measure is pixels.


iWidth Parameter For DrawEllipse

iWidth

The width of the ellipse in the Main Control's client area. The unit of measure is pixels.


Return for DrawLine

Return Value

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


iX1 parameter for DrawLine

iX1

The X coordinate of the beginning point of the line in the Main Control's client area. The unit of measure is pixels.


iX2 parameter for DrawLine

iX2

The X coordinate of the ending point of the line in the Main Control's client area. The unit of measure is pixels.


iY1 parameter for DrawLine

iY1

The Y coordinate of the beginning point of the line in the Main Control's client area. The unit of measure is pixels.


iY2 parameter for DrawLine

iY2

The Y coordinate of the ending point of the line in the Main Control's client area. The unit of measure is pixels.


iHeight Parameter For DrawRectangle

iHeight

The height of the rectangle in the Main Control's client area. The unit of measure is pixels.


iLeft Parameter For DrawRectangle

iLeft

The X coordinate of the origin of the rectangle in the Main Control's client area. The unit of measure is pixels.


Return for DrawRectangle

Return Value

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


iTop Parameter For DrawRectangle

iTop

The Y coordinate of the origin of the rectangle in the Main Control's client area. The unit of measure is pixels.


iWidth Parameter For DrawRectangle

iWidth

The width of the rectangle in the Main Control's client area. The unit of measure is pixels.


BackGroundImage Parameter For DrawShape

BackGroundImage

LEAD bitmap used as the background image if the ShapeBackgroundStyle property requires one. To use a background image, the PatternStyle property must not be epsSolid. Use 0 in this parameter if no background image is required.


Return for DrawShape

Return Value

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


uShape Parameter For DrawShape

uShape

Constant that specifies the shape. For possible values, refer to Shapes.


Return for DrawTextHeight

Return Value

Height of the specified string. The unit of measure is pixels.


sText Parameter For DrawTextHeight

sText

Text string to be evaluated.


ForegroundImage Parameter For DrawTextStr

ForegroundImage

LEAD control's bitmap to be used as the foreground of the text object (instead of the text color). Pass 0 if you do not want to use a bitmap as the foreground of the text object.

The bitmap that you specify is positioned at the origin of the text object's rectangle, and it is not scaled. Therefore the bitmap that you use for this purpose should be sized accordingly. In most cases it should be the same size as the rectangle.


Return for DrawTextStr

Return Value

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


Str Parameter For DrawTextStr

Str

Text string to be drawn.


Return for DrawTextWidth

Return Value

Width of the specified string. The unit of measure is pixels.


sText Parameter For DrawTextWidth

sText

Text string to be evaluated.


iFilter Parameter For EdgeDetector

iFilter

Flag that indicates which edge detection filter to apply. Possible values are:

Value | Meaning
EDG_SOBEL_VERT | [$0101] Detect the vertical edges
EDG_SOBEL_HORZ | [$0102] Detect the horizontal edges
EDG_SOBEL_ALL | [$0103] Detect horizontal & vertical edges
EDG_PREWITT_VERT | [$0201] Detect the vertical edges
EDG_PREWITT_HORZ | [$0202] Detect the horizontal edges
EDG_PREWITT_ALL | [$0203] Detect horizontal & vertical edges
EDG_LAPLACE_1 | [$0301] Detect vertical & horizontal edges
EDG_LAPLACE_2 | [$0302] Detect general edges
EDG_LAPLACE_3 | [$0303] Detect general edges. (The filter used for this option is different than the filter used for the EDG_LAPLACE_2 filter.)
EDG_LAPLACE_DIAG | [$0304] Detect the diagonal edges
EDG_LAPLACE_HORZ | [$0305] Detect the horizontal edges
EDG_LAPLACE_VERT | [$0306] Detect the vertical edges
EDG_GRADIENT_N | [$0401] Detect north edges
EDG_GRADIENT_NE | [$0402] Detect north east edges
EDG_GRADIENT_E | [$0403] Detect east edges
EDG_GRADIENT_SE | [$0404] Detect south east edges
EDG_GRADIENT_S | [$0405] Detect south edges
EDG_GRADIENT_SW | [$0406] Detect south west edges
EDG_GRADIENT_W | [$0407] Detect west edges
EDG_GRADIENT_NW | [$0408] Detect north west edges


Return for EdgeDetector

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iThresold Parameter For EdgeDetector

iThreshold

Threshold value used to determine which pixels are edge pixels. If the difference determined for a pixel is greater than this value, the pixel is an edge pixel.


iDepth Parameter For Emboss

iDepth

The apparent depth of this three-dimensional effect. Valid values are 0 to 1000, with 500 as normal.


iDirection Parameter For Emboss

iDirection

The direction of the apparent light source. Valid values are:

EMBOSS_N
EMBOSS_NE
EMBOSS_E
EMBOSS_SE
EMBOSS_S
EMBOSS_SW
EMBOSS_W
EMBOSS_NW


Return for Emboss

Return Value

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


Return for EnsureVisible

Return Value

Return value is the actual number of lines scrolled to ensure visibility of the specified item.


nIndex Parameter For EnsureVisible

nIndex

0 based Index of item to ensure visibility of.


Return for EnumTags

Return Value

Return | Meaning
SUCCESS | The function/method was successful.
<1 | An error occurred. Refer to Error Codes.


nPage Parameter For EnumTags

nPage

The page number (for multi-page files) that contains the tags to be enumerated.

If the file is not a multi-page file, pass 0.


strFileName Parameter For EnumTags

strFileName

String value containing the name of the file in which to enumerate the tags.


uFlags Parameter For EnumTags

uFlags

Flags parameter. Reserved for future use. Pass 0.


hExportedBitmapList Parameter For ExportBitmapList

hExportedBitmapList

Handle to the bitmap list to be updated with the exported bitmaps


Return for ExportBitmapList

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nItemsToExport Parameter For ExportBitmapList

nItemsToExport

Number of bitmaps to be exported starting from nStartIndex.

Note:

(nStartIndex + nItemsToInsert) should not exceed the number of items in the ImageList Control.


nStartIndex Parameter For ExportBitmapList

nStartIndex

Index of the first bitmap in the ImageList control to be exported.


Return for FastRotate

Return Value

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


nAngle Parameter For FastRotate

nAngle

Degrees of rotation. Valid values are +-90, +-180, +-270, or +-360. Positive values are clockwise; negative values are counterclockwise.


BitmapoMask Parameter For FeatherAlphaBlend

BitmapMask

The Main Control's bitmap that contains the fade mask


BitmapSrc Parameter For FeatherAlphaBlend

BitmapSrc

The source Main Control's bitmap to be combined with the current Main Control's bitmap.


iHeight Parameter For FeatherAlphaBlend

iHeight

The height of the rectangle to update, relative to the Main Control.


iLeft Parameter For FeatherAlphaBlend

iLeft

The X coordinate of the origin of the rectangle to update, relative to the Main Control.


Return for FeatherAlphaBlend

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iSrcLeft Parameter For FeatherAlphaBlend

iSrcLeft

The X coordinate of the origin of the source rectangle, relative to the source control.


iSrcTop Parameter For FeatherAlphaBlend

iSrcTop

The Y coordinate of the origin of the source rectangle, relative to the source control.


iTop Parameter For FeatherAlphaBlend

iTop

The Y coordinate of the origin of the rectangle to update, relative to the Main Control.


iWidth Parameter For FeatherAlphaBlend

iWidth

The width of the rectangle to update, relative to the Main Control.


Return for FeedLoad

Return Value

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


iSize Parameter For FeedLoad

iSize

The size of your buffer.


vBuffer Parameter For FeedLoad

vBuffer

Your buffer, defined as an array of bytes.


crFill Parameter For Fill

crFill

The fill color.

You can specify a COLORREF value (the return value of the RGB macro), or you can specify a palette index as explained in Using Palette Indexes As Color Values.


Return for Fill

Return Value

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


Return for Flip

Return Value

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


Return for ForceRepaint

Return Value

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


Return for FreeRgn

Return Value

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


iGamma Parameter For GammaCorrect

uGamma

Unsigned integer that represents the gamma value.

Because this is an unsigned integer, it is 100 times the actual gamma value. For example, use 235 to set a gamma value of 2.35.


Return for GammaCorrect

Return Value

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


Return for GaussianFilter

Return Value

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


nRadius Parameter For GaussianFilter

nRadius

Value that indicates the radius of the neighborhood on which the filter is applied.


Return for GetBitmapClipSegments

Return Value

Return | Meaning
SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Error Codes.


Return for GetBitmapClipSegmentsMax

Return Value

Return | Meaning
SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Error Codes.


puMaxSegments Parameter For GetBitmapClipSegmentsMax

puMaxSegments

Pointer to a variable to be updated with the maximum number of segments in a row within the region.


nRow Parameter For GetBitmapClipSegments

nRow

The number of the row for which to get the segments. The first row is 0, and the last row is 1 less than the bitmap height.


pSegmentBuffer Parameter For GetBitmapClipSegments

pSegmentBuffer

Pointer to the buffer to be updated with the segments from row nRow contained in the region. This buffer should be large enough to contain twice as many values as indicated in *puSegmentCount.


puSegmentCount Parameter For GetBitmapClipSegments

puSegmentCount

Address of a variable to be updated with the number of segments from row nRow that are contained in the region.


Return for GetBitmapDC

Return Value

Return | Meaning
>0 | Function was successful. The return value is the L_HDC.
NULL | An error occurred.


hDevice Parameter For GetBitmapPalette

hDevice

The device context that has the palette you want to get.


Return for GetBitmapPalette

Return Value

The handle of the palette used by the specified device context.


Return for GetBitmapRowCol

Return Value

Return | Meaning
>=1 | The number of bytes gotten.
< 1 | An error occurred. Refer to Error Codes.


nCol Parameter For GetBitmapRowCol

nCol

The column offset within the row to retrieve. The first column offset is 0, and the last column offset is 1 less than the bitmap width.


nRow Parameter For GetBitmapRowCol

nRow

The number of the row to retrieve. The first row is 0, and the last row is 1 less than the bitmap height.


pBuffer Parameter For GetBitmapRowCol

pBuffer

Pointer to the buffer to hold the image data that this method gets. You must allocate the buffer before calling this method, and the buffer must be large enough to hold the image data.


uBytes Parameter For GetBitmapRowCol

uBytes

The number of bytes in the row to retrieve. To get a full row, use the value in the BitmapBytesPerLine Property.

When getting less than full row, you must consider the bits per pixel. For a 1-bit bitmap, each byte represents 8 pixels. For a 4-bit bitmap, each byte represents 2 pixels. For an 8-bit bitmap, each byte represents 1 pixel. For a 16-bit bitmap, every 2 bytes represent one pixel. For 24-bit images, every three bytes represent one pixel. For a 32-bit bitmap, every four bytes represent one pixel. For 48-bit images, every six bytes represent one pixel. For 64-bit images, every eight bytes represent one pixel.

You can use the bitmap handle's BitmapBits Property with integer math to calculate the number of bytes needed for a particular number of pixels.

For example (In C++ Builder Syntax):

NumberOfBytes = (Bitmap.BitmapBits * NumberOfPixels) / 8;
if ((Bitmap.BitmapBits * NumberOfPixels) % 8)
++NumberOfBytes; /* Round up if necessary for a 1- or 4-bit image */


Return for GetBitmapRow

Return Value

Return | Meaning
>=1 | The number of bytes gotten.
< 1 | An error occurred. Refer to Error Codes.


nRow Parameter For GetBitmapRow

nRow

The number of the row to retrieve. The first row is 0, and the last row is 1 less than the bitmap height.


pBuffer Parameter For GetBitmapRow

pBuffer

Pointer to the buffer to hold the image data that this method gets. You must allocate the buffer before calling this method, and the buffer must be large enough to hold the image data.


uBytes Parameter For GetBitmapRow

uBytes

The number of bytes in the row to retrieve. To get a full row, use the value in the BitmapBytesPerLine Property.

When getting less than full row, you must consider the bits per pixel. For a 1-bit bitmap, each byte represents 8 pixels. For a 4-bit bitmap, each byte represents 2 pixels. For an 8-bit bitmap, each byte represents 1 pixel. For a 16-bit bitmap, every 2 bytes represent one pixel. For 24-bit images, every three bytes represent one pixel. For a 32-bit bitmap, every four bytes represent one pixel. For 48-bit images, every six bytes represent one pixel. For 64-bit images, every eight bytes represent one pixel.

You can use the bitmap handle's BitmapBits Property with integer math to calculate the number of bytes needed for a particular number of pixels.

For example (In C++ Builder Syntax):

NumberOfBytes = (Bitmap.BitmapBits * NumberOfPixels) / 8;
if ((Bitmap.BitmapBits * NumberOfPixels) % 8)
++NumberOfBytes; /* Round up if necessary for a 1- or 4-bit image */


Return for GetClientDC

Return Value

Return | Meaning
>0 | Function was successful. The return value is the L_HDC.
NULL | An error occurred.


Return for GetDDB

Return Value

Return | Meaning
>0 | Handle to the DDB.
0 | An error occurred.


hDevice Parameter For GetDDB

hDevice

Handle to the device responsible for the conversion. The mapping mode of the device context must be MM_TEXT.


Return for GetDIB

Return Value

Return | Meaning
>0 | Handle to the DIB.
0 | An error occurred.


uType Parameter For GetDIB

uType

Type of DIB to create. Possible values are:

Value | Meaning
DIB_BITMAPINFOHEADER | [0] DIB that uses a BITMAPINFOHEADER
DIB_BITMAPV4HEADER | [1] DIB that uses a BITMAPV4HEADER. (Introduced in Windows 95 and Windows NT 4.0)
DIB_BITMAPV5HEADER | [2] DIB that uses a BITMAPV5HEADER (Introduced in Windows 2000 and Windows 98)


fName Parameter For GetFileInfo

fName

Character string containing the file name.


Return for GetFileInfo

Return Value

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


iPage Parameter For GetFileInfo

iPage

The page number of the image, if the file is a multipage file.

GIF, TIFF (MPT), or PCX (DCX) files can be multipage files (containing more than one image). If you set the value to the page number of an image in the file, this method provides information about the specified image.

If you set the value of the page number to a number greater than the total number of pages in the file, this method updates the InfoPage property with the highest page number. Therefore, if you do not know how many pages are in a file, you can use this method to find out.

If the file is not a multipage file, pass 0.


Return for GetFunctionalLookupTable

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nEnd Parameter For GetFunctionalLookupTable

nEnd

Index of the last entry in the lookup table to update. The indices of the table correspond to the intensity values.


nFactor Parameter For GetFunctionalLookupTable

nFactor

Value that indicates the factor to be applied in the function operation specified in the uFlag parameter. This parameter is used only if uFlag is FLT_EXP or FLT_LN.


nFlag Parameter For GetFunctionalLookupTable

nFlag

Flag that indicates the function used to update the lookup table. Possible values are:

Value | Meaning
FLT_EXP | [0] Apply the exponential function.
FLT_LN | [1] Apply the natural logarithm function.
FLT_LINEAR | [2] Apply the linear function.


nStart Parameter For GetFunctionalLookupTable

nStart

Index of the first entry in the lookup table to update. The indices of the table correspond to the intensity values.


Return for GetHistogramGray

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iChannel Parameter For GetHistogram

iChannel

Color channel.

Possible values are:

Value | Meaning
CHANNEL_MASTER | All channels.
CHANNEL_RED | Red channel only.
CHANNEL_GREEN | Green channel only.
CHANNEL_BLUE | Blue channel only.


Return for GetHistogram

Return Value

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


Return for GetLoadResolution

Return Value

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


nFormat Parameter For GetLoadResolution

nFormat

Image format to use.

Value | Meaning
FILE_PCD | Kodak PhotoCD
FILE_FPX | Kodak FlashPix
FILE_JBIG | JBIG
FILE_JP2 | JPEG 2000. This file format contains image data and extra information about the contents and organization of the file.
FILE_J2K | JPEG 2000. This file format contains only a stream of image data.


hMem Parameter For GetMemoryInfo

hMem

A global handle (HGLOBAL) to the file in memory. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


Return for GetMemoryInfo

Return Value

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


iPage Parameter For GetMemoryInfo

iPage

The page number of the image, if the image is in a multipage file.

GIF, TIFF (MPT), and PCX (DCX) files can be multipage files (containing more than one image). If you set the value to the page number of an image in the file, this method provides information about the specified image.

If you set the value of the page number to a number greater than the total number of pages in the file, this method updates the InfoPage property with the highest page number. Therefore, if you do not know how many pages are in a file, you can use this method to find out.

If the file is not a multipage file, pass 0.


iSize Parameter For GetMemoryInfo

iSize

The size in bytes of the file referenced by hMem. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


pnConvBuffers Parameter For GetMemoryThresholds

pnConvBuffers

Pointer to a variable to be updated with the number of buffers used to cache disk tiles, or the percentage of tiles cache in buffer, set by the SetMemoryThresholds method.


pnConvTiles Parameter For GetMemoryThresholds

pnConvTiles

Pointer to a variable to be updated with the number of tiles in conventional memory set by SetMemoryThresholds method.


pnMaxConvSize Parameter For GetMemoryThresholds

pnMaxConvSize

Pointer to a variable to be updated with the maximum conventional bitmap size set by the SetMemoryThresholds method.


pnTiledThreshold Parameter For GetMemoryThresholds

pnTiledThreshold

Pointer to a variable to be updated with the tiled threshold value set by the SetMemoryThresholds method.


pnTileSize Parameter For GetMemoryThresholds

pnTileSize

Pointer to a variable to be updated with the tile size set by the SetMemoryThresholds method.


Return for MinMaxBits

Return Value

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


Return for GetMinMaxVal

Return Value

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


Return for GetPixelData

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nCol Parameter For GetPixelData

nCol

The column number of the pixel.


nRow Parameter For GetPixelData

nRow

The row number of the pixel.


nSize Parameter For GetPixelData

nSize

Size of the buffer pointed to by pData. The size should be large enough to contain the data for the pixel. The minimum size can be calculated with the following formula:

(BitmapBits + 7) / 8.


pData Parameter For GetPixelData

pData

Pointer to a buffer to be updated with the pixel data. This buffer should be able to store

nBytes bytes.


Return for GetRgnArea

Return Value

The number of pixels in the bitmap region.


Return for GetRgnBounds

Return Value

SUCCESS | The function was successful.
<=0 | An error occurred. Refer to Error Codes.


RgnRect Parameter For GetRgnBounds

RgnRect

TRect structure containing bounding rectangle.


Return for GetRgnHandle

Return Value

A handle to the stored region.


iIndex Parameter For GetSubMenu

iIndex

Index of the item before which the new item should be inserted.


Return for GetSubMenu

Return Value

Return | Meaning
<>0 | Pointer to a TAnnMenu object that references the specified submenu.
0 | An error occurred.


Return for GetTagCount

Return Value

The number of data values associated with the specified tag.


uTag Parameter For GetTagCount

uTag

Tag in the TIFF file from which to get the data count. Use 0 to get the data count from the tag read using the ReadTag method or the ReadTagMemory method. Otherwise, use the tag value that was set using the SetTag method. For more information on tags available in the TIFF format, refer to the SetTag method.


uTag Parameter For GetTagData

uTag

Tag to identify the data in the TIFF file. Use 0 to get the data from the tag read using the ReadTag method or the ReadTagMemory method. Otherwise, use the tag value that was set using the SetTag method. For more information on tags available in the TIFF format, refer to the SetTag method.


Return for GetTagData

Return Value

The variant that contains the tag data. The variant can be a single value or an array of values.


uTag Parameter For GetTagType

uTag

Tag to identify the data in the TIFF file from which to get the data type. Use 0 to get the data type from the tag read using the ReadTag method or the ReadTagMemory method. Otherwise, use the tag value that was set using the SetTag method. For more information on tags available in the TIFF format, refer to the SetTag method.


Return for GetTagType

Return Value

The data type of the specified tag. Possible values are:

Value | Meaning
TAG_BYTE | [1] Byte.
TAG_ASCII | [2] Byte in the range of 0 to 255.
TAG_SHORT | [3] Two bytes, unsigned.
TAG_LONG | [4] Four bytes, unsigned.
TAG_RATIONAL | [5] Eight bytes, used as a pair of unsigned long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_SBYTE | [6] Byte used as signed number in the range of -128 to +127.
TAG_UNDEFINED | [7] Byte, with application-defined usage.
TAG_SSHORT | [8] Two bytes, signed.
TAG_SLONG | [9] Four bytes, signed.
TAG_SRATIONAL | [10] Eight bytes, used as a pair of signed long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_FLOAT | [11] Four bytes used as a floating point number.
TAG_DOUBLE | [12] Eight bytes used as a double-precision floating point number.


Return for GetUserLookupTable

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nPointCount Parameter For GetUserLookupTable

nPointCount

Address of the long variable to be updated with the number of entries in the lookup table that were actually modified. In Delphi and C++ Builder, you declare the variable and pass its address. In most other languages, you pass the variable by reference.


BlueFact Parameter For GrayScaleExt

BlueFact

Value that represents the percentage or weight given to the blue value of each pixel in the bitmap. Possible values are 0 to 1000.


GreenFact Parameter For GrayScaleExt

GreenFact

Value that represents the percentage or weight given to the green value of each pixel in the bitmap. Possible values are 0 to 1000.


Return For GrayScaleExt

Return Value

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


RedFact Parameter For GrayScaleExt

RedFact

Value that represents the percentage or weight given to the red value of each pixel in the bitmap. Possible values are 0 to 1000.


Return for Grayscale

Return Value

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


nValue Parameter for Grayscale

nValue

Bits per pixel of the resultant bitmap.


hList Parameter For Halftone

hList

Handle to the list of bitmaps that will be used in half toning if the HT_USERDEF option is selected.


Return for Halftone

Return Value

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


nAngle Parameter For Halftone

nAngle

The angle of rotation, expressed in hundredths of degrees. A value of 0 produces a horizontal halftone pattern. This parameter specifies the number of degrees to change the pattern. Positive values rotate the pattern clockwise; negative values rotate the pattern counterclockwise. This value is ignored if the selected halftone pattern is HT_RECT, HT_CIRC, HT_RAND or HT_USERDEF.


uDim Parameter For Halftone

uDim

Value that indicates the size of the grain. This value is ignored if the selected halftone pattern is HT_VIEW or HT_PRINT.


uType Parameter For Halftone

uType

Type of halftoning to do. Possible values are:

Value | Meaning
HT_PRINT | Halftone for printing
HT_VIEW | Halftone for display
HT_RECT | Rectangular halftone
HT_CIRC | Circular halftone
HT_ELLIPS | Elliptical halftone
HT_RAND | Random halftone
HT_LINEAR | Linear halftone
HT_USERDEF | [$0007] User defined halftone


iChange Parameter For HistoContrast

iChange

Amount of contrast change. Valid values are -1000 to +1000.


Return for HistoContrast

Return Value

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


Return for HistoEqualize

Return Value

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


nFlags Parameter For HistoEqualize

nFlags

Flag that indicates which color space to equalize. Possible values are:

Value | Meaning
RGB_SPACE | [$0001] Linearizes the number of pixels across the RGB color space.(separated channels)
YUV_SPACE | [$0002] Linearizes the number of pixels across the YUV color space.(Best results)
GRAY_SPACE | [$0004] linearizes the number of pixels per gray level in a gray level representation of the image.


iIndex Parameter For HistogramGrayTable

nIndex

Index into the array of Integer values.


iIndex Parameter For HistogramTable

iIndex

The index into the histogram table. The index corresponds to the intensity level. For example, use an index of 0 to get the number of occurrences of 0 intensity values.


Return for HitTest

Return Value

Return | Meaning
>=0 | The 0-based index of the item at the specified location
-1 | No item at the specified location.


x Parameter For HitTest

x

Horizontal position of the location in question.


y Parameter For HitTest

y

Vertical position of the location in question.


Return For HolePunchRemove

Return Value

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


nLocation Parameter For HolePunchRemove

nLocation

Indicates the location within the document of the hole-punches to remove. Possible values are:

Value | Meaning
HOLEPUNCH_LEFT | Searches for the hole-punch pattern on the left side of the document
HOLEPUNCH_RIGHT | Searches for the hole-punch pattern on the right side of the document
HOLEPUNCH_TOP | Searches for the hole-punch pattern across the top of the document
HOLEPUNCH_BOTTOM | Searches for the hole-punch pattern across the bottom of the document


nMaxHoleCount Parameter For HolePunchRemove

nMaxHoleCount

Maximum number of holes to detect. This member is valid only if HOLEPUNCH_USE_COUNT is set in uProcessFlags.


nMaxHoleHeight Parameter For HolePunchRemove

nMaxHoleHeight

The maximum height of one of the holes of the hole punch configuration to be removed. If HOLEPUNCH_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels. This parameter is valid only if HOLEPUNCH_USE_SIZE is set in uProcessFlags.


nMaxHoleWidth Parameter For HolePunchRemove

nMaxHoleWidth

The maximum width of one of the holes of the hole punch configuration to be removed. If HOLEPUNCH_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels. This parameter is valid only if HOLEPUNCH_USE_SIZE is set in uProcessFlags.


nMinHoleCount Parameter For HolePunchRemove

nMinHoleCount

Minimum number of holes to detect. This member is valid only if HOLEPUNCH_USE_COUNT is set in uProcessFlags.


nMinHoleHeight Parameter For HolePunchRemove

nMinHoleHeight

The minimum height of one of the holes of the hole punch configuration to be removed.. If HOLEPUNCH_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels. This parameter is valid only if HOLEPUNCH_USE_SIZE is set in uProcessFlags.


nMinHoleWidth Parameter For HolePunchRemove

nMinHoleWidth

The minimum width of one of the holes of the hole punch configuration to be removed. If HOLEPUNCH_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels. This parameter is valid only if HOLEPUNCH_USE_SIZE is set in uProcessFlags.


uProcessFlags Parameter For HolePunchRemove

uProcessFlags

Flags that determine the behavior of the border removal process. Flags may be combined using a bitwise OR (|). Possible values are:

Value | Meaning
HOLEPUNCH_SINGLE_REGION: | For each hole punch found by the HolePunchRemove method, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the OnHolePunchRemove event, the removed hole punch is added to an internal single region. If the DocCleanSuccess property is set to SUCCESS_NOREMOVE, the hole punch is not added to the single region. When the HolePunchRemove method returns, either the DocCleanBitmap property or the hDocCleanRgn property will reference a region that contains all the removed hole punches. If HOLEPUNCH_LEAD_REGION is also set, the DocCleanBitmap property will be set to a bitmap that has a LEAD region that contains all the removed hole punches. If HOLEPUNCH_LEAD_REGION is not set, hDocCleanRgn is set to a Windows region that contains all the removed hole punches. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.
HOLEPUNCH_LEAD_REGION | When the HolePunchRemove method returns, the DocCleanBitmap property is updated with a copy of the bitmap that also contains a region with all the removed hole punches. This flag must be used in conjunction with HOLEPUNCH_SINGLE_REGION. To use this flag set uProcessFlags to HOLEPUNCH_SINGLE_REGION | HOLEPUNCH_LEAD_REGION. The DocCleanBitmap property will be updated when the HolePunchRemove method returns.
HOLEPUNCH_IMAGE_UNCHANGED | The original image is unchanged.
HOLEPUNCH_USE_DPI | The unit of measure for all parameters of this method is thousandths of an inch. Use the image's DPI to convert to pixels. This allows the processing of many images with different DPI. If this flag is not set, the unit of measure for all fields of the HOLEPUNCH structure is pixels.
HOLEPUNCH_CALLBACK_REGION | The OnHolePunchRemove event receives a Windows region that contains the current hole punch to be removed. Setting this flag lets the user create his or her own composite of removed hole punches by combining the regions received by the event, if the DocCleanSuccess property was set to SUCCESS_REMOVE in the event. The regions can be combined using a logical OR operator. Combining all regions received by the event, that are removed, results in a region identical to the region created when HOLEPUNCH_SINGLE_REGION is set in uProcessFlags.
HOLEPUNCH_USE_SIZE | Use the nMinHoleWidth, nMinHoleHeight, nMaxHoleWidth, nMaxHoleHeight parameters of this method to indicate the size of the hole punches to remove. If this flag is not set, default values for the four sizes will be used. If HOLEPUNCH_USE_DPI is set, the defaults are calculated from the image DPI. Otherwise, the defaults are calculated from the image width and height.
HOLEPUNCH_USE_COUNT | Use the nMinHoleCount and nMaxHoleCount parameters of this method to indicate the number of hole punches to remove. If this flag is not set, default values for the two count values will be used. These default values are as follows: nMinHoleCount = 3 and nMaxHoleCount = 3.
HOLEPUNCH_USE_LOCATION | Use the nLocation parameter of this method to indicate the location of the hole punches to remove. If this flag is not set, a default of HOLEPUNCH_LEFT will be used.


cr Parameter For HSV_HfromRGB

cr

TColorRef for which to return the corresponding Hue.


Return for HSV_HfromRGB

Return Value

Returns the Hue corresponding to the specified TColorRef.


cr Parameter For HSV_SfromRGB

cr

TColorRef for which to return the corresponding Saturation.


Return for HSV_SfromRGB

Return Value

Returns the Saturation corresponding to the specified TColorRef.


cr Parameter For HSV_VfromRGB

cr

TColorRef for which to return the corresponding Value.


Return for HSV_VfromRGB

Return Value

Returns the Value corresponding to the specified TColorRef.


uIndex Parameter For HTable

uIndex

The index into the array. The first element of the array is 0. The values present in this array are hue values used to remap the hues of an image.


iAngle Parameter For Hue

iAngle

Angular amount to change the hue, in degrees.


Return for Hue

Return Value

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


Filters Parameter For IgnoreFilters

Filters

String containing which filters should be ignored. Filters has the same format as in PreLoadFilters method.


Return for IgnoreFilters

Return Value

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


hList Parameter For ImportBitmapList

hList

Handle to the list of bitmaps that contains the bitmaps to be imported.


Return for ImportBitmapList

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nItemsToInsert Parameter For ImportBitmapList

nItemsToInsert

Number of bitmaps to be imported starting from nStartIndex.

Note:

(nStartIndex + nItemsToInsert) should not exceed the number of bitmaps in the hList parameter.


nStartIndex Parameter For ImportBitmapList

nStartIndex

Index of the first bitmap in the hList to be imported.


pText Parameter For ImportBitmapList

strText

Character string that contains the text for the bitmaps to be imported.


pTextExt Parameter For ImportBitmapList

strTextExt

Character string that contains the extra text for the bitmaps to be imported.


bContinue Parameter For OnEnumTags

bContinue

Boolean variable that indicates whether to continue or stop enumerating tags.

Possible values are:

Value | Meaning
True | Continue enumerating tags.
False | Stop enumerating Tags.


uCount Parameter For OnEnumTags

uCount

Number of elements of type uType, Note that this is not the same as the number of bytes. For example, if uCount is 10 and uType is TAG_LONG, you will need 10 x 4 = 40 bytes to read the tag data.


uTag Parameter For OnEnumTags

uTag

Tag to identify the data in the TIFF file. This may be any tag specified in the SetTag method, or any other tag added by the TIFF filter when saving the file. For example, all of the TIFF comments would generate a particular TIFF tag.


uType Parameter For OnEnumTags

uType

Tagged data type. Valid values are:

Value | Meaning
TAG_BYTE | [1] Byte.
TAG_ASCII | [2] Byte in the range of 0 to 255.
TAG_SBYTE | [6] Byte used as signed number in the range of -128 to +127.
TAG_UNDEFINED | [7] Byte, with application-defined usage.
TAG_SHORT | [3] Two bytes, unsigned.
TAG_SSHORT | [8] Two bytes, signed.
TAG_LONG | [4] Four bytes, unsigned.
TAG_SLONG | [9] Four bytes, signed.
TAG_RATIONAL | [5] Eight bytes, used as a pair of unsigned long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_SRATIONAL | [10] Eight bytes, used as a pair of signed long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_FLOAT | [11] Four bytes used as a floating point number.
TAG_DOUBLE | [12] Eight bytes used as a double-precision floating point number.


Return for SetRgnFromMask

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uCombineMode Parameter For SetRgnFromMask

uCombineMode

The action to take regarding the existing bitmap region, if one is defined. For descriptions of the possible values, refer to Creating a Bitmap Region.


bEnable Parameter For Animate

bEnable

One of the following values:

TRUE | Animation playback is about to start.
FALSE | Animation playback has stopped.


n Parameter For InfoPCDRes

The index into the array of boolean values. Use the following constants as possible values:

Index(n) | Resolution
L_PCD_BASE_OVER_64 | [0] 64 x 96
L_PCD_BASE_OVER_16 | [1] 128 x 192
L_PCD_BASE_OVER_4 | [2] 256 x 384
L_PCD_BASE | [3] 512 x 768
L_PCD_4BASE | [4] 1024 x 1536
L_PCD_16BASE | [5] 2048 x 3072


Bitmap Parameter For InsertAt

Bitmap

Handle of the bitmap to be inserted.


Data Parameter For InsertAt

Data

Data attribute for the new item to insert. You can use this for any extra information you wish to associate with the item.


Return for InsertAt

Return Value

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


nIndex Parameter For InsertAt

nIndex

Index at which to insert the new item.


sText Parameter For InsertAt

sText

Text attribute for the new item to insert.


Bitmap Parameter For Insert

Bitmap

Handle of the bitmap to be inserted.


Return for InsertBitmapListItem

Return Value

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


newBitmap Parameter For InsertBitmapListItem

newBitmap

Bitmap to insert into the list. You can get a bitmap to insert by referencing the Bitmap property of another Main Control.


uIndex Parameter For InsertBitmapListItem

uIndex

Position of the bitmap in the list. Use LST_APPEND to append the bitmap to the end of the list.


Data Parameter For Insert

Data

Data attribute for the new item to insert. You can use this for any extra information you wish to associate with the item.


BitmapList Parameter For InsertFromBitmapList

BitmapList

Handle of the bitmap list from which items are to be inserted.


Return for InsertFromBitmapList

Return Value

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


sDefaultText Parameter For InsertFromBitmapList

sDefaultText

Text attribute for the new items to be inserted.


Return for Insert

Return Value

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


sText Parameter For Insert

sText

Text attribute for the new item to insert.


crInColor Parameter For IntensityDetect

crInColor

The color used to fill those pixels having an intensity value between uLow and uHigh. This parameter has no effect if the bitmap is not a grayscale bitmap or there is only one affected channel.


crOutColor Parameter For IntensityDetect

crOutColor

The color used to fill those pixels having an intensity value less than uLow or greater than uHigh. This parameter has no effect if the bitmap is not a grayscale bitmap or there is only one affected channel.


Return for IntensityDetect

Return Value

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


uChannel Parameter For IntensityDetect

uChannel

A value that indicates the channel to process. Possible values are:

Value | Meaning
IDB_CHANNEL_MASTER | [0x0000] Grayscale Channel.
IDB_CHANNEL_RED | [0x0001] Red Channel.
IDB_CHANNEL_GREEN | [0x0010] Green Channel.
IDB_CHANNEL_BLUE | [0x0100] Blue Channel.


uHigh Parameter For IntensityDetect

uHigh

Highest intensity to detect.


uLow Parameter For IntensityDetect

uLow

Lowest intensity to detect.


iChange Parameter For Intensity

iChange

Amount to change the intensity. The intensity ranges from -1000 to 1000. A positive value increases (or lightens) the brightness of the bitmap. A negative values decreases (or darkens) the brightness of the bitmap.


Return for Intensity

Return Value

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


Return For InvertedText

Return Value

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


nMaxBlackPercent Parameter For InvertedText

nMaxBlackPercent

The maximum percent of total pixels in an inverted text area that must be black. Areas with a higher percent of black pixels are not considered.


nMinBlackPercent Parameter For InvertedText

nMinBlackPercent

The minimum percent of total pixels in an inverted text area that must be black. Areas with a lower percent of black pixels are not considered.


nMinInvertHeight Parameter For InvertedText

nMinInvertHeight

The minimum height of an area that is considered to be inverted text. If INVERTEDTEXT_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


nMinInvertWidth Parameter For InvertedText

nMinInvertWidth

The minimum width of an area that is considered to be inverted text. If INVERTEDTEXT_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


uProcessFlags Parameter For InvertedText

uProcessFlags

Flags that determine the behavior of the inverted text removal process. Flags may be combined using a bitwise OR. Possible values are:

Value | Meaning
INVERTEDTEXT_SINGLE_REGION: | For each inverted text segment found by the InvertedText method, if the DocCleanSuccess property is set to SUCCESS_REMOVE, the inverted text is added to an internal single region. If the DocCleanSuccess property is set to SUCCESS_NOREMOVE, the inverted text is not added to the single region. When the InvertedText method returns, either the DocCleanBitmap property or the hDocCleanRgn property will reference a region that contains all the corrected inverted text. If INVERTEDTEXT_LEAD_REGION is also set, the DocCleanBitmap property will be updated with a bitmap that has a LEAD region that contains all the corrected inverted text. If INVERTEDTEXT_LEAD_REGION is not set, hDocCleanRgn is updated with a Windows region that contains all the corrected inverted text. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.
INVERTEDTEXT_LEAD_REGION | When the InvertedText method returns, the DocCleanBitmap property is updated with a bitmap that also contains a region with all the corrected inverted text. This flag must be used in conjunction with INVERTEDTEXT_SINGLE_REGION. To use this flag set uProcessFlags to INVERTEDTEXT_SINGLE_REGION | INVERTEDTEXT_LEAD_REGION. The DocCleanBitmap property will be updated when the InvertedText method returns.
INVERTEDTEXT_IMAGE_UNCHANGED | The original image is unchanged.
INVERTEDTEXT_USE_DPI | The unit of measure for all parameters of this method is thousandths of an inch. Use the image's DPI to convert to pixels. This allows the processing of many images with different DPI. If this flag is not set, the unit of measure is pixels.
INVERTEDTEXT_CALLBACK_REGION | The OnInvertedText event receives a Windows region that contains the current inverted text to be inverted. Setting this flag lets the user create his or her own composite of inverted text by combining the regions received by the OnInvertedText event, if the event returns SUCCESS_REMOVE. The regions can be combined using a logical OR operator. Combining all regions received by the event, that are removed, results in a region identical to the region created when INVERTEDTEXT_SINGLE_REGION is set in uProcessFlags. When the region received by the event is no longer needed, it must be destroyed.


Return for Invert

Return Value

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


Return for ISISAcquire

Return Value

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


hWnd Parameter For ISISAcquire

BaseFileName

Base filename string for the output file or files.

If bMultiPage is False, save each scanned image in a separate TIFF file. In this case, filenames are created using the string in BaseFileName and incrementing each filename by one. By default, the numbering will begin with "0001" and will be incremented with each page scanned ("0002","0003", ... ). Each file will be saved according to the format indicated in nFormat. If a file already exists, for example "Page0002", it will be overwritten. The user can control the number of digits used in numbering the filenames by including asterisks '*' in the filename, before the extension. For example, passing "c:\temp\isis\test**.tif" for BaseFileName indicates to use only two digits in the filenames (test04.tif), while passing "c:\temp\isis\test*****.tif" for BaseFileName indicates to use only five digits in the filenames (test00001.tif). If no asterisks are included, the default of four digits will be used (test0003.tif).


bMultiPage Parameter For ISISAcquireMulti

bMultiPage

Flag indicating how to save the scanned images.

True | Save scanned images in a single multi-page TIFF file.
False | Save each scanned image in a separate TIFF file. In this case, filenames are created using the string in BaseFileName and incrementing each filename by one.


nFormat Parameter For ISISAcquireMulti

nFormat

Value indicating the format to use when saving one or more images to one or more files. The available formats depend on whether or not the data is acquired in compressed form or in uncompressed form. If the data is uncompressed, that is if the ISIS tags TAG_COMPRESSION has been set to TAG_COMPRESSION_NONE, any format supported by LEADTOOLS is valid. For a list of these formats, refer to Formats of Output Files.

If the data is compressed, the type of compression will determine the output format. If a format that is incompatible with the current compression is passed, an error will occur. Possible valid format values and the corresponding compressions are:

FILE_CCITT | [25] Tiff, compressed using CCITT. A file is saved in this format when TAG_COMPRESSION is set to TAG_COMPRESSION_MG3 and nFormat is set to either FILE_CCITT or FILE_FASTEST.
FILE_CCITT_GROUP3_1DIM | [27] TIFF, compressed using CCITT, group 3, 1 dimension. A file is saved in this format when TAG_COMPRESSION is set to TAG_COMPRESSION_G3 and nFormat is set to either FILE_CCITT_GROUP3_1DIM or FILE_FASTEST.
FILE_CCITT_GROUP4 | [29] TIFF, compressed using CCITT, group 4. A file is saved in this format when TAG_COMPRESSION is set to TAG_COMPRESSION_G4 and nFormat is set to either FILE_CCITT_GROUP4 or FILE_FASTEST.
FILE_TIFLZW | [17] TIFF, compressed using LZW. A file is saved in this format when TAG_COMPRESSION is set to TAG_COMPRESSION_LZW and nFormat is set to either FILE_TIFLZW or FILE_FASTEST.
FILE_TIF_PACKBITS | [87] TIFF, compressed using Packed Bits. A file is saved in this format when TAG_COMPRESSION is set to TAG_COMPRESSION_32771 and nFormat is set to either FILE_TIF_PACKBITS or FILE_FASTEST.
FILE_FASTEST | [105] Saves the file as a TIFF using the current compression from the scanner.


uFlags Parameter For ISISAcquireMulti

uFlags

Flags indicating ISIS Acquire options. Possible values are:

0 | Don't show the user interface.
ISIS_SHOWUI | [1] Shows the ISIS UI.
ISIS_MULTI_NOSAVE | [2] Do not save data to file.


uFlags Parameter For ISISAcquire

uFlags

Flags indicating ISIS Acquire options. Possible values are:

ISIS_SHOWUI | [1] Enable the ISIS user interface.
0 | Do not show user interface.


bDefault Parameter For ISISGetASCIITag

bDefault

Flag that indicates whether to get the default or current value. Possible values are:

Value | Meaning
True | Get the scanner's default value for the specified tag.
False | Get the scanner's current value for the specified tag.


Return for ISISGetASCIITagChoiceCount

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


plCount Parameter For ISISGetASCIITagChoiceCount

plCount

Address of a variable to be updated with the number of possible values or choices for the tag designated in uTag.


uTag Parameter For ISISGetASCIITagChoiceCount

uTag

One of the supported ISIS® ASCII tags. For more information on tags, refer to ISIS ASCII tags.


Return for ISISGetASCIITagChoice

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nIndex Parameter For ISISGetASCIITagChoice

nIndex

Index of the value or choice to get for the tag designated in uTag. This value must be between 0 and the maximum number of choices - 1. To determine the maximum number of available choices, call the ISISGetASCIITagChoiceCount method.


ppszValue Parameter For ISISGetASCIITagChoice

ppszValue

Address of a string to be updated with the value or choice, at the specified index, of the tag designated in uTag.


uTag Parameter For ISISGetASCIITagChoice

uTag

One of the supported ISIS® ASCII tags. For more information on tags, refer to ISIS ASCIItags.


Return for ISISGetASCIITag

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


ppszValue Parameter For ISISGetASCIITag

ppszValue

Address of a string to be updated with the current or default value of the tag designated in uTag.


uTag Parameter For ISISGetASCIITag

uTag

One of the supported ISIS® ASCII tags. For more information on tags, refer to ISIS ASCII tags.


Return for ISISGetTagChoiceCount

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


plCount Parameter For ISISGetTagChoiceCount

plCount

Address of a variable to be updated with the number of possible values or choices for the tag designated in uTag.


uTag Parameter For ISISGetTagChoiceCount

uTag

One of the supported ISIS® tags. For more information on tags, refer to ISIS tags.


Return for ISISGetTagChoice

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nIndex Parameter For ISISGetTagChoice

nIndex

Index of the value or choice to get for the tag designated in uTag. This value must be between 0 and the maximum number of choices - 1. To determine the maximum number of available choices, call the ISISGetTagChoiceCount method.


plValue Parameter For ISISGetTagChoice

plValue

Address of a variable to be updated with the value or choice, at the specified index, of the tag designated in uTag.


uTag Parameter For ISISGetTagChoice

uTag

One of the supported ISIS® tags. For more information on tags, refer to ISIS tags.


Return for ISISGetTag

Return Value

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


nValue Parameter For ISISGetTag

nValue

Address of a long integer that receives the current value of the tag designated in uTag. If the value pointed to by nValue is ISIS_DEFAULT [-99], then the scanner's default for the tag designated by uTag will be used for scanning. For example, if the value pointed to by nValue is ISIS_DEFAULT and uTag is TAG_COMPRESSION, then the scanner's default setting for compression will be used for scanning, unless the value pointed to by nValue is set to another value using the ISISSetTag method.


uTag Parameter For ISISGetTag

uTag

One of the supported ISIS tags. For more information on tags, refer to ISIS tags.


Return for ISISLoadDriver

Return Value

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


FileName Parameter For ISISPage

FileName

Filename into which the page was saved.


nPage Parameter For ISISPage

nPage

Number of the page just scanned.


Return for ISISSelect

Return Value

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


Return for ISISSetASCIITag

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


pszValue Parameter For ISISSetASCIITag

pszValue

String that contains the new value of the tag designated in uTag.


uTag Parameter For ISISSetASCIITag

uTag

One of the supported ISIS® ASCII tags. For more information on tags, refer to ISIS ASCII tags.


Return for ISISSetScanOptions

Return Value

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


Return for ISISSetTag

Return Value

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

.


nValue Parameter For ISISSetTag

nValue

New value for the tag designated in uTag.


uTag Parameter For ISISSetTag

uTag

One of the supported ISIS tags. For more information on tags, refer to ISIS tags.


Return for ISISUnloadDriver

Return Value

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


Return for IsPtInFloater

Return Value

Return | Meaning
TRUE | The point is in the floater.
FALSE | The point is outside the floater.


x Parameter For IsPtInFloater

x

The X coordinate of the point to test. In the MouseDown event, you can use the event's X parameter.


y Parameter For IsPtInFloater

y

The Y coordinate of the point to test. In the MouseDown event, you can use the event's Y parameter.


Return for IsPtInRgn

Return Value

Return | Meaning
TRUE | The point is in the region.
FALSE | The point is outside the region.


Return for IsSupportLocked

Return Value

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


iType Parameter For IsSupportLocked

iType

The optional feature to unlock. For a list of possible values, refer to the iType parameter of the UnlockSupport method.


Return for IsSupportLocked

Return Value

Return | Meaning
True | The optional feature is locked.
False | The optional feature is available in your toolkit.


iType Parameter For IsSupportLocked

iType

The optional feature to check. For a list of possible values, refer to the iType parameter of the UnlockSupport method.


Return for IsSupportLocked

Return Value

Return | Meaning
true | The optional feature is locked.
false | The optional feature is available in your toolkit.


iIndex Parameter For ItemChecked

iIndex

Index into the menu items in the AnnMenu object. This is a zero-based index.


iIndex Parameter For ItemEnabled

iIndex

Index into the menu items in the AnnMenu object. This is a zero-based index.


iIndex Parameter For ItemID

iIndex

Index into the menu items in the AnnMenu object. This is a zero-based index.


iIndex Parameter For ItemString

iIndex

Index into the menu items in the AnnMenu object. This is a zero-based index.


iIndex Parameter For ItemType

iIndex

Index into the menu items in the AnnMenu object. This is a zero-based index.


iLayer Parameter For LayerBlendModeKey

iLayer

Index into the array of layer blend mode keys.


iLayer Parameter For LayerClipping

iLayer

Index into the array of layer clipping values.


iLayer Parameter For LayerLeft

iLayer

If this value is 0, the property contains information that was last read from the file using the LoadLayer method.

If this value is > 0, this is an index into the array of layer left positions.


iLayer Parameter For LayerMaskBitmap

iLayer

Index into the array of layer mask bitmaps.


iLayer Parameter For LayerOpacity

iLayer

Index into the array of layer opacity values.


iLayer Parameter For LayerTop

iLayer

If this value is 0, the property contains information that was last read from the file using the LoadLayer method.

If this value is > 0, this is an index into the array of layer top positions.


n Parameter For LevelLUT

n

Short value containing an index into the LevelLUT.
It is used to get or set a color stored in LevelLUT.


FirstPoint Parameter for LineProfile

FirstPoint

TPoint that contains the starting point for the line.


Return for LineProfile

Return Value

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


pBlue Parameterfor LineProfile

pBlue

Pointer to be updated with an array that contains the blue values for the line specified by FirstPoint and SecondPoint. A memory buffer for this array is allocated by the method. When the array is no longer needed, it should be freed by the user by calling the GlobalFreePtr macro.


pGreen Parameter for LineProfile

pGreen

Pointer to be updated with an array that contains the green values for the line specified by FirstPoint and SecondPoint. A memory buffer for this array is allocated by the method. When the array is no longer needed, it should be freed by the user by calling the GlobalFreePtr macro.


pRed Parameter for LineProfile

pRed

Pointer to be updated with an array that contains the red values for the line specified by FirstPoint and SecondPoint. A memory buffer for this array is allocated by the method. When the array is no longer needed, it should be freed by the user by calling the GlobalFreePtr macro.


SecondPoint Parameter for LineProfile

SecondPoint

TPoint that contains the end point for the line. Information for this point is included in the arrays.


Return for LineRemove

Return Value

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


nGapLength Parameter For LineRemove

nGapLength

Maximum length of a break or a hole in a line. This can be used to remove dotted lines, dashed lines, or lines that have breaks due to scanning. If LINE_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels. This parameter is valid only if LINE_USE_GAP is set in uProcessFlags.


nMaxLineWidth Parameter For LineRemove

nMaxLineWidth

Maximum average width of a line that is considered for removal. Lines that are greater in average width are not removed. If LINE_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


nMinLineLength Parameter For LineRemove

nMinLineLength

Minimum length of a line considered for removal. Lines less than this length are not removed. If LINE_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


nVariance Parameter For LineRemove

nVariance

Amount of width change that is tolerated between adjacent line slices. If LINE_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels. This parameter is valid only if LINE_USE_VARIANCE is set in uProcessFlags. For example, the following horizontal line is 30 pixels in length (X represents a pixel)

XXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXX

XXXXXXXXXX

If nVariance is 2 pixels (i.e. tolerate width changes of 2 pixels or less), the first 10 columns and the last 10 columns of the line will be removed. The middle 10 columns will be unchanged. This helps preserve characters that intersect a line that is being removed.


nWall Parameter For LineRemove

nWall

Height of a wall. Walls are slices of a line that are too wide to be considered part of the line. Examples of walls include a character that a line passes through or a perpendicular line. If the image contains lines that pass through characters, set nWall to be equal to or a little larger than nMaxLineWidth. If LINE_USE_DPI is set in uProcessFlags, units are in thousandths of an inch, otherwise units are in pixels.


uProcessFlags Parameter for LineRemove

uProcessFlags

Flags that determine the behavior of the line removal process. Flags may be combined using a bitwise OR. Possible values are:

Value | Meaning
LINE_SINGLE_REGION: | For each line found by the LineRemove method, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the OnLineRemove event, the removed line is added to an internal single region. If the DocCleanSuccess property is set to SUCCESS_NOREMOVE, the line is not added to the single region. When the LineRemove method returns, either the DocCleanBitmap property or the hDocCleanRgn property will reference a region that contains all the removed lines. If LINE_LEAD_REGION is also set, the DocCleanBitmap property will be updated with a bitmap that has a LEAD region that contains all the removed lines. If LINE_LEAD_REGION is not set, the hDocCleanRgn property is updated with a Windows region that contains all the removed lines. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.
LINE_LEAD_REGION | When the LineRemove method returns, the DocCleanBitmap property is updated with a bitmap that also contains a region with all the removed lines. This flag must be used in conjunction with LINE_SINGLE_REGION. To use this flag set uProcessFlags to LINE_SINGLE_REGION | LINE_LEAD_REGION. The DocCleanBitmap property will be updated when the LineRemove method returns.
LINE_IMAGE_UNCHANGED | The original image is unchanged.
LINE_USE_DPI | The unit of measure for all parameters of this method is thousandths of an inch. Use the image's DPI to convert to pixels. This allows the processing of many images with different DPI. If this flag is not set, the unit of measure is pixels.
LINE_CALLBACK_REGION | The OnLineRemove event receives a Windows region that contains the current line to be removed. Setting this flag lets the user create his or her own composite of removed lines by combining the regions received by the event, if the DocCleanSuccess property was set to SUCCESS_REMOVE. The regions can be combined using a logical OR operator. Combining all regions received by the event, that are removed, results in a region identical to the region created when LINE_SINGLE_REGION is set in uProcessFlags.
LINE_REMOVE_ENTIRE | Remove the entire line, even if the line passes through a character or a wall.
LINE_USE_GAP | Consider "gaps" in lines when performing line removal. If this flag is passed, the nGapLength parameter is used. If this flag is not passed, the nGapLength parameter is ignored.
LINE_USE_VARIANCE | Consider line variance when performing line removal. If this flag is passed, the nVariance parameter is used. If this flag is not passed, the parameter is ignored.


uRemoveFlags Parameter For LineRemove

uRemoveFlags

Flag that indicates which lines to remove. Possible values are:

Value | Meaning
LINEREMOVE_HORIZONTAL | Remove horizontal lines
LINEREMOVE_VERTICAL | Remove vertical lines


FileName Parameter For LoadDatabase

FileName

Character string that contains the name of the file from which to load the database.


Return for LoadDatabase

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iBitsPerPixel Parameter For LoadFileTile

iBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap
4 | 4 bits per pixel in the resultant bitmap
8 | 8 bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


Return for LoadFileTile

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iPage Parameter For LoadFileTile

iPage

The page number (for multipage files) that contains the first image to be loaded.

If the file is not a multipage file, pass 0.


iPages Parameter For LoadFileTile

iPages

The number of pages to load. To load all pages in a multipage file, pass -1. If the file is not a multipage file, pass 1.


nHeight Parameter For LoadFileTile

nHeight

The height of the required tile to load, relative to the origin of the bitmap.


nLeft Parameter For LoadFileTile

nLeft

The X coordinate of the origin of the required tile to load, relative to the origin of the bitmap.


nTop Parameter For LoadFileTile

nTop

The Y coordinate of the origin of the required tile to load, relative to the origin of the bitmap.


nWidth Parameter For LoadFileTile

nWidth

The width of the required tile to load, relative to the origin of the bitmap.


szFileName Parameter For LoadFileTile

szFileName

String containing the name of the file that has the tile to be loaded.


Return for LoadFromFile

Return Value

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


nBits Parameter For LoadFromFile

nBits

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap
2 | 2 bit per pixel in the resultant bitmap
3 | 3 bit per pixel in the resultant bitmap
4 | 4 bits per pixel in the resultant bitmap
5 | 5 bit per pixel in the resultant bitmap
6 | 6 bit per pixel in the resultant bitmap
7 | 7 bit per pixel in the resultant bitmap
8 | 8 bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


nItems Parameter For LoadFromFile

nItems

The number of items to load. To load all pages in a multi-page file, pass -1. If the file is not a multi-page file, pass 1.


nStart Parameter For LoadFromFile

nStart

The number of the page, in a multi-page file, that contains the first image to be loaded.

If the file is not a multi-page file, pass 0.


sFile Parameter For LoadFromFile

sFile

Name of file from which items should be loaded.


iBitsPerPixel Parameter For Load

iBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap
4 | 4 bits per pixel in the resultant bitmap
8 | 8 bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


Return for Load

Return Value

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


iPage Parameter For Load

iPage

The page number (for multipage files) that contains the first image to be loaded.

If the file is not a multipage file, pass 0.


iPages Parameter For Load

iPages

The number of pages to load. To load all pages in a multipage file, pass -1. If the file is not a multipage file, pass 1.


iBitsPerPixel Parameter For LoadLayer

iBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 to 8 | The specified bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap
48 | 48 bits per pixel in the resultant bitmap
64 | 64 bits per pixel in the resultant bitmap


iLayer Parameter For LoadLayer

iLayer

Index of the layer to load. This index is zero-based. Pass 0 to load the first layer, 1 to load the second layer, etc.


Return for LoadLayer

Return Value

Retrun | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


szName Parameter For LoadLayer

szName

String containing the name of the file from which to load the layer.


hMem Parameter For LoadMemory

hMem

A global handle (HGLOBAL) to the file in memory. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


iBitsPerPixel Parameter For LoadMemory

iBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap
4 | 4 bits per pixel in the resultant bitmap
8 | 8 bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


iBufSize Parameter For LoadMemory

iBufSize

The size in bytes of the file referenced by hMem. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


Return for LoadMemory

Return Value

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


iPage Parameter For LoadMemory

iPage

The page number of the image, if the file is in a multipage file.

GIF, TIFF (MPT), and PCX (DCX) files can be multipage files (containing more than one image). If you set the value to the page number of an image in the file, this method provides information about the specified image.

If the file is not a multipage file, pass 0.


hMem Parameter For LoadMemoryTile

hMem

A global handle (HGLOBAL) to the file in memory. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


iBitsPerPixel Parameter For LoadMemoryTile

iBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap
4 | 4 bits per pixel in the resultant bitmap
8 | 8 bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


iBufSize Parameter For LoadMemoryTile

iBufSize

The size in bytes of the file referenced by hMem. If you use the SaveMemory method to create the file in memory, that method updates your handle and buffer size variables. Otherwise, your code must update and pass the appropriate variables.


iPage Parameter For LoadMemoryTile

iPage

The page number of the image, if the file is in a multipage file.

GIF, TIFF (MPT), and PCX (DCX) files can be multipage files (containing more than one image). If you set the value to the page number of an image in the file, this method provides information about the specified image.

If the file is not a multi-page file, pass 0.


iPages Parameter For LoadMemoryTile

iPages

The number of pages to load. To load all pages in a multi-page file, pass -1. If the file is not a multipage file, pass 1.


nHeight Parameter For LoadMemoryTile

nHeight

The height of the required tile to load, relative to the origin of the bitmap.


nLeft Parameter For LoadMemoryTile

nLeft

The X coordinate of the origin of the required tile to load, relative to the origin of the bitmap.


nTop Parameter For LoadMemoryTile

nTop

The Y coordinate of the origin of the required tile to load, relative to the origin of the bitmap.


nWidth Parameter For LoadMemoryTile

nWidth

The width of the required tile to load, relative to the origin of the bitmap.


iBitsPerPixel Parameter For LoadResize

iBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap.
4 | 4 bits per pixel in the resultant bitmap.
8 | 8 bits per pixel in the resultant bitmap.
12 | 12 bits per pixel in the resultant bitmap.
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap
48 | 48 bits per pixel in the resultant bitmap
64 | 64 bits per pixel in the resultant bitmap


iFlags Parameter For LoadResize

iFlags

Flag that indicates the type of resizing to use. Possible values are:

Value | Meaning
SIZE_NORMAL | [$0] Normal resizing.
SIZE_RESAMPLE | [$2] Linear interpolation resizing.
SIZE_BICUBIC | [$4] Bicubic interpolation resizing.


Return for LoadResize

Return Value

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


nHeight Parameter For LoadResize

nHeight

New height of the image.


nWidth Parameter For LoadResize

nWidth

New width of the image.


szFileName Parameter For LoadResize

szFileName

String containing the name of the file to load.


nIndex Parameter For LoadResolutionHeight

nIndex

The index into the array. The first element of the array is 0. The last element of the array is one less than the value of the LoadResolutionCount property.


nIndex Parameter For LoadResolutionWidth

nIndex

The index into the array. The first element of the array is 0. The last element of the array is one less than the value of the LoadResolutionCount property.


sFileName Parameter For Load

sFileName

Character string containing the name of the file to load.


fName Parameter For LoadStamp

fName

Character string containing the JPEG or LEAD CMP compressed file name.


Return for LoadStamp

Return Value

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


uIndex Parameter For MaskTable

uIndex

The index into the array. The first element of the array is 0. The values present in this array identify which values in the HTable property are valid.


iDim Parameter For MaxFilter

uDim

Dimensions of the neighborhood used for filtering (uDim x uDim), in pixels.


Return for MaxFilter

Return Value

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


iDim Parameter For Median

uDim

Dimensions of the neighborhood used for filtering (uDim x uDim), in pixels.


Return for Median

Return Value

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


iDim Parameter For MinFilter

uDim

Dimensions of the neighborhood used for filtering (uDim x uDim), in pixels.


Return for MinFilter

Return Value

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


iDim Parameter For Mosaic

uDim

Dimensions of the tiles (uDim x uDim), in pixels.


Return for Mosaic

Return Value

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


bUnidirectional Parameter For MotionBlur

bUnidirectional

Flag that indicates whether the motion extends only in one direction. Possible values are:

Value | Meaning
TRUE | The motion blur effect is only in the direction specified in lAngle.
FALSE | The motion blur effect is along the line with that angle. For example, if lAngle is 0, the blur effect will occur in the 0 degree direction and the 180 degree direction.


iDim Parameter For MotionBlur

iDim

Size of the blur effect, in pixels.


Return for MotionBlur

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


lAngle Parameter For MotionBlur

lAngle

Value that represents the direction of the motion, in hundredths of a degree (+/-) This value can be a number from 0 to 36000. If the value is positive, the motion will be clockwise. If the value is negative, the motion is counter-clockwise.


Return for OffsetRgn

Return Value

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


nDxOffset Parameter For OffsetRgn

nDx

The number of rows to shift the region.


nDy Parameter For OffsetRgn

nDy

The number of columns to shift the region.


iDim Parameter For Oilify

uDim

Dimensions of the neighborhood used for filtering (uDim x uDim), in pixels.


Return for Oilify

Return Value

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


hObject Parameter For OnAnnChange

hObject

Handle to the annotation object.


hObject Parameter For OnAnnClicked

hObject

Handle to the annotation object.


hObject Parameter For OnAnnCreate

hObject

Handle to the annotation object that is created.


hObject Parameter For OnAnnDestroy

hObject

Handle to the annotation object that is deleted.


hObject Parameter For OnAnnDrawn

hObject

Handle to the annotation object.


hObject Parameter For OnAnnEnumerate

hObject

Handle to the enumerated object.


hObject Parameter For OnAnnHyperlink

hObject

Handle to the annotation object.


iParamCount Parameter For OnAnnHyperlink

iParamCount

Number of valid parameters. Possible values are 0 or 5. If iParamCount is 5, then lParam1, lParam2, lParam3, lParam4 and lParam5 are valid, otherwise they are undefined and should be ignored.


lParam1 Parameter For OnAnnHyperlink

lParam1

First parameter. This parameter is only valid if iParamCount is set to 5.


lParam2 Parameter For OnAnnHyperlink

lParam2

Second parameter. This parameter is only valid if iParamCount is set to 5.


lParam3 Parameter For OnAnnHyperlink

lParam3

Third parameter. This parameter is only valid if iParamCount is set to 5.


lParam4 Parameter For OnAnnHyperlink

lParam4

Fourth parameter. This parameter is only valid if iParamCount is set to 5.


lParam5 Parameter For OnAnnHyperlink

lParam5

Fifth parameter. This parameter is only valid if iParamCount is set to 5.


iCount Parameter For OnAnnHyperlinkMenu

iCount

Number of objects in phObjects.


phObjects Parameter For OnAnnHyperlinkMenu

phObjects

Pointer to an array of selected objects. To get each handle, use the AnnGetItemHandle method.


hObject Parameter For OnAnnLocked

hObject

Handle to the annotation object.


AnnMenu Parameter For OnAnnMenu

AnnMenu

Pointer to an object the references the menu to be displayed.


Button Parameter For OnAnnMouseDown

Button

An integer that identifies the button that was pressed to cause the event. Possible values are:

Value | Meaning
1 | Left button


Shift Parameter For OnAnnMouseDown

Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is pressed. Possible values are:

Value | Meaning
1 | SHIFT key
2 | CTRL key
4 | ALT key
3 | CTRL/SHIFT key
5 | ALT/SHIFT key
6 | CTRL/ALT key
7 | CTRL/ALT/SHIFT key


x Parameter For OnAnnMouseDown

x

The X coordinate of the mouse pointer. This is a client coordinate. If scroll bars are present, they are not taken into consideration. This value is in pixels.


y Parameter For OnAnnMouseDown

y

The Y coordinate of the mouse pointer. This is a client coordinate. If scroll bars are present, they are not taken into consideration. This value is in pixels.


Button Parameter For OnAnnMouseMove

Button

An integer that identifies any buttons pressed when the user moved the mouse. Possible values are:

Value | Meaning
0 | No button was pressed.
1 | Left button was pressed.
2 | Right button was pressed.


Shift Parameter For OnAnnMouseMove

Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is pressed. Possible values are:

Value | Meaning
1 | SHIFT key
2 | CTRL key
4 | ALT key
3 | CTRL/SHIFT key
5 | ALT/SHIFT key
6 | CTRL/ALT key
7 | CTRL/ALT/SHIFT key


x Parameter For OnAnnMouseMove

x

The X coordinate of the mouse pointer. This is a client coordinate. If scroll bars are present, they are not taken into consideration. This value is in pixels.


y Parameter For OnAnnMouseMove

y

The Y coordinate of the mouse pointer. This is a client coordinate. If scroll bars are present, they are not taken into consideration. This value is in pixels.


Button Parameter For OnAnnMouseUp

Button

An integer that identifies the button that was released to cause the event. Possible values are:

Value | Meaning
1 | Left button


Shift Parameter For OnAnnMouseUp

Shift

An integer that indicates which of the SHIFT, CTRL, and ALT keys are down when the button specified in the button argument is released. Possible values are:

Value | Meaning
1 | SHIFT key
2 | CTRL key
4 | ALT key
3 | CTRL/SHIFT key
5 | ALT/SHIFT key
6 | CTRL/ALT key
7 | CTRL/ALT/SHIFT key


x Parameter For OnAnnMouseUp

x

The X coordinate of the mouse pointer. This is a client coordinate. If scroll bars are present, they are not taken into consideration. This value is in pixels.


y Parameter For OnAnnMouseUp

y

The Y coordinate of the mouse pointer. This is a client coordinate. If scroll bars are present, they are not taken into consideration. This value is in pixels.


iCount Parameter For OnAnnSelect

iCount

Number of selected annotation objects.


phObjects Parameter For OnAnnSelect

phObjects

Array of annotation object handles. These handles can be accessed through the AnnGetItemHandle method.


iTool Parameter For OnAnnToolChecked

iTool

Value that indicates the selected tool. For a list of possible values, refer to Annotation Toolbar Buttons.


hObject Parameter For OnAnnUnlocked

hObject

Handle to the annotation object.


nID Parameter For OnAnnUserMenu

nID

Identifies the user-defined menu item that has been clicked. This is the same nID that was passed to the AddItem method.


BorderRgn Parameter For OnBorderRemove

hBorderRgn

Windows region representing the border to be removed.


nBoundingRectHeight Parameter For OnBorderRemove

nBoundingRectHeight

Height of the bounding rectangle of the border being processed.


nBoundingRectLeft Parameter For OnBorderRemove

nBoundingRectLeft

X coordinate of the origin of the bounding rectangle of the border being processed.


nBoundingRectTop Parameter For OnBorderRemove

nBoundingRectTop

Y coordinate of the origin of the bounding rectangle of the border being processed.


nBoundingRectWidth Parameter For OnBorderRemove

nBoundingRectWidth

Width of the bounding rectangle of the border being processed.


uBorderToRemove Parameter For OnBorderRemove

uBorderToRemove

Flag that indicates which border is being processed. Possible values are:

Value | Meaning
BORDER_LEFT | The left border is being processed.
BORDER_TOP | The top border is being processed.
BORDER_RIGHT | The right border is being processed.
BORDER_BOTTOM | The bottom border is being processed.


hDotRgn Parameter For OnDotRemove

hDotRgn

Windows region representing the dot to be removed.


iBlackCount Parameter For OnDotRemove

iBlackCount

Total number of black pixels in the dot being processed.


iWhiteCount Parameter For OnDotRemove

iWhiteCount

Total number of white pixels in the dot being processed.


nBoundingRectHeight Parameter For OnDotRemove

nBoundingRectHeight

Height of the bounding rectangle of the dot being processed.


nBoundingRectLeft Parameter For OnDotRemove

nBoundingRectLeft

X coordinate of the origin of the bounding rectangle of the dot being processed.


nBoundingRectTop Parameter For OnDotRemove

nBoundingRectTop

Y coordinate of the origin of the bounding rectangle of the dot being processed.


nBoundingRectWidth Parameter For OnDotRemove

nBoundingRectWidth

Width of the bounding rectangle of the dot being processed.


fName Parameter For OnDropFile

fName

Full path and name of the dropped file.


hHoleRgn Parameter For OnHolePunchRemove

hHoleRgn

Windows region representing one of the holes of the hole punch pattern.


iBlackCount Parameter For OnHolePunchRemove

iBlackCount

Total number of black pixels in one of the holes of a hole punch pattern.


iHoleIndex Parameter For OnHolePunchRemove

iHoleIndex

Index of the hole within a hole punch pattern. The holes are numbered from 1 to n, where n is the total number of holes in the hole punch pattern.


iHoleTotalCount Parameter For OnHolePunchRemove

iHoleTotalCount

The total number of holes that make up the hole punch pattern. This value will not change for a particular call to the HolePunchRemove method.


iWhiteCount Parameter For OnHolePunchRemove

iWhiteCount

Total number of white pixels in one of the holes of a hole punch pattern.


nBoundingRectHeight Parameter For OnHolePunchRemove

nBoundingRectHeight

Height of the bounding rectangle of the hole punch being processed.


nBoundingRectLeft Parameter For OnHolePunchRemove

nBoundingRectLeft

X coordinate of the origin of the bounding rectangle of the hole punch being processed.


nBoundingRectTop Parameter For OnHolePunchRemove

nBoundingRectTop

Y coordinate of the origin of the bounding rectangle of the hole punch being processed.


nBoundingRectWidth Parameter For OnHolePunchRemove

nBoundingRectWidth

Width of the bounding rectangle of the hole punch being processed.


hTextRgn Parameter For OnInvertedText

hTextRgn

Windows region representing an area of inverted text.


iBlackCount Parameter For OnInvertedText

iBlackCount

Total number of black pixels in the inverted text region being processed.


iWhiteCount Parameter For OnInvertedText

iWhiteCount

Total number of white pixels in the inverted text region being processed.


nBoundingRectHeight Parameter For OnInvertedText

nBoundingRectHeight

Height of the bounding rectangle of the inverted text being processed.


nBoundingRectLeft Parameter For OnInvertedText

nBoundingRectLeft

X coordinate of the origin of the bounding rectangle of the inverted text being processed.


nBoundingRectTop Parameter For OnInvertedText

nBoundingRectTop

Y coordinate of the origin of the bounding rectangle of the inverted text being processed.


nBoundingRectWidth Parameter For OnInvertedText

nBoundingRectWidth

Width of the bounding rectangle of the inverted text being processed.


nIndex Parameter For OnItemSelected

nIndex

The 0-based index of the item that was selected.


hRgnLine Parameter for OnLineRemove

hRgnLine

Windows region representing a line to be removed. It is the programmer's responsibility to delete this region when it is no longer needed.


nLength Parameter For OnLineRemove

nLength

Length (in pixels) of the line.


nStartCol Parameter For OnLineRemove

nStartCol

The starting column of the line. The columns are zero-based.


nStartRow Parameter For OnLineRemove

nStartRow

The starting row of the line. The rows are zero-based.


Button Parameter For OnOLECompleteDrag

Button

The button used to cause the event. For more information refer to TMouseButton in your Delphi help file.


Shift Parameter For OnOLECompleteDrag

Shift

Indicates the state of the Alt, Ctrl, and Shift keys and the mouse buttons. For more information refer to TShiftState in your Delphi help file.


X Parameter For OnOLECompleteDrag

X

X coordinate of the mouse pointer relative to the origin of the Main control.


X Parameter For OnOLECompleteDrag

X

X coordinate of the mouse pointer relative to the origin of the ImageList control.


Y Parameter For OnOLECompleteDrag

Y

Y coordinate of the mouse pointer relative to the origin of the Main control.


Y Parameter For OnOLECompleteDrag

Y

Y coordinate of the mouse pointer relative to the origin of the ImageList control.


Button Parameter For OnOLEDragOver

Button

The button used to cause the event. For more information refer to TMouseButton in your Delphi help file.


Shift Parameter For OnOLEDragOver

Shift

Indicates the state of the Alt, Ctrl, and Shift keys and the mouse buttons. For more information refer to TShiftState in your Delphi help file.


X Parameter For OnOLEDragOver

X

X coordinate of the mouse pointer relative to the origin of the Main control.


X Parameter For OnOLEDragOver

X

X coordinate of the mouse pointer relative to the origin of the ImageList Control.


Y Parameter For OnOLEDragOver

Y

Y coordinate of the mouse pointer relative to the origin of the Main control.


Y Parameter For OnOLEDragOver

Y

Y coordinate of the mouse pointer relative to the origin of the ImageList Control.


bUseDefaultCursor Parameter For OnOLEGiveFeedback

bUseDefaultCursor

Boolean variable to be updated with a value that indicates whether to use the default cursors. Possible values are:

Value | Meaning
TRUE | Use default drag-and-drop cursors.
FALSE | Use custom drag-and-drop cursors. Set the custom cursor in the OLEDragCursor property.


Button Parameter For OnOLEStartDrag

Button

The button used to cause the event. For more information refer to TMouseButton in your Delphi help file.


Shift Parameter For OnOLEStartDrag

Shift

Indicates the state of the Alt, Ctrl, and Shift keys and the mouse buttons. For more information refer to TShiftState in your Delphi help file.


X Parameter For OnOLEStartDrag

X

X coordinate of the mouse pointer relative to the origin of the Main control.


X Parameter For OnOLEStartDrag

X

X coordinate of the mouse pointer relative to the origin of the ImageList control.


Y Parameter For OnOLEStartDrag

Y

Y coordinate of the mouse pointer relative to the origin of the Main control.


Y Parameter For OnOLEStartDrag

Y

Y coordinate of the mouse pointer relative to the origin of the ImageList control.


uPass Parameter For OnPaintNotify

uPass

The number of completed passes.


uType Parameter For OnPaintNotify

uType

The type of effect. The following are possible values:

Value | Meaning
EFX_NOTIFY_TRANSITION | Painting a transition.
EFX_NOTIFY_IMAGE | Painting an image.


ReadyState Parameter For OnReadyStateChanged

ReadyState

The new value of the ReadyState property. The following are possible values:

Value | Description
rsLoading | Currently loading
rsComplete | Finished loading


nBumpOrNick Parameter For OnSmooth

nBumpOrNick

Flag that indicates whether to remove bumps or fill in nicks. Possible values are:

Value | Meaning
SMOOTH_BUMP | Remove a bump.
SMOOTH_NICK | Fill in a nick.


nLength Parameter For OnSmooth

nLength

Length (in pixels) of the bump or nick.


nStartCol Parameter For OnSmooth

nStartCol

The starting column of the bump or nick. The columns are zero-based.


nStartRow Parameter For OnSmooth

nStartRow

The starting row of the bump or nick. The rows are zero-based.


uHorV Parameter For OnSmooth

uHorV

Flag that indicates whether the element being smoothed is vertical or horizontal. Possible values are:

Value | Meaning
SMOOTH_HORIZONTAL_ELEMENT | A horizontal bump or nick
SMOOTH_VERTICAL_ELEMENT | A vertical bump or nick


Percent Parameter For OnStatus

Percent

The completion percentage of the current LEADTOOLS function.


iMarker Parameter For OnTransformMarker

iMarker

ID of the JPEG marker. The JPEG markers are uniquely identified by a byte value. Possible values are 1 to 254. (0 and 255 are not allowed.)


iTransform Parameter For OnTransformMarker

iTransform

Flags that indicate the transform to be performed. These are the same flags passed to the TransformFile method. Possible values are:

Value | Meaning
FILE_TRANSFORM_FLIP | [$0001] Flip the image.
FILE_TRANSFORM_REVERSE | [$0002] Reverse the image.
FILE_TRANSFORM_ROTATE90 | [$0004] Rotate the image clockwise by 90 degrees.
FILE_TRANSFORM_ROTATE180 | [$0008] Rotate the image clockwise by 180 degrees.
FILE_TRANSFORM_ROTATE270 | [$000C] Rotate the image clockwise by 270 degrees.


lSize Parameter For OnTransformMarker

lSize

Size of the JPEG marker. The size will be less than 65535. If this value is 0, then the marker does not have any extra data.


pData Parameter For OnTransformMarker

pData

Pointer to the marker data.


x Parameter For OnZoomInDone

x

x location of the ZoomIn capture, relative to the top, left corner of the screen, measured in pixels.


y Parameter For OnZoomInDone

y

y location of the ZoomIn capture, relative to the top, left corner of the screen, measured in pixels.


hDC Parameter For OwnerDrawItem

h_DC

Handle to a device context. This is the device context on which the ImageList items will be drawn/painted.


Index Parameter For OwnerDrawItem

Index

Index of the item that needs to be painted. This is a 0-based index.


ItemBackBottom Parameter For OwnerDrawItem

ItemBackBottom

This is the Y coordinate of the bottom boundary of the background of the ImageList item to be drawn/painted.


ItemBackLeft Parameter For OwnerDrawItem

ItemBackLeft

This is the X coordinate of the origin of the background of the ImageList item to be drawn/painted.


ItemBackRight Parameter For OwnerDrawItem

ItemBackRight

This is the X coordinate of the right boundary of the background of the ImageList item to be drawn/painted.


ItemBackTop Parameter For OwnerDrawItem

ItemBackTop

This is the Y coordinate of the origin of the background of the ImageList item to be drawn/painted.


ItemBottom Parameter For OwnerDrawItem

ItemBottom

This is the Y coordinate of the bottom boundary of the ImageList item to be drawn/painted.


ItemLeft Parameter For OwnerDrawItem

ItemLeft

This is the X coordinate of the origin of the ImageList item to be drawn/painted.


ItemRight Parameter For OwnerDrawItem

ItemRight

This is the X coordinate of the right boundary of the ImageList item to be drawn/painted.


ItemTop Parameter For OwnerDrawItem

ItemTop

This is the Y coordinate of the origin of the ImageList item to be drawn/painted.


hPanWin Parameter For PanWin

hPanWin

Handle to the Pan Window.


iFlag Parameter For PanWin

iFlag

The reason for the callback notification. Possible values are:

Value | Meaning
PANWIN_CREATED | [0] Pan Window was created.
PANWIN_UPDATED | [1] Pan Window was updated/repainted.
PANWIN_DESTROYED | [2] Pan Window was destroyed.
PANWIN_MOVED | [3] Pan Window was moved.
PANWIN_REPAINTED | [4] Pan Window image has been painted.(This occurs before the pan rect is painted.)


iFlags Parameter For Paste

iFlags

Determines whether the method tests the data on the clipboard or completes the paste.

Valid values are:

Value | Meaning
PASTE_ISREADY | Test to see if the clipboard contains data that can be pasted.
0 | Paste the data.


Return for Paste

Return Value

Return | Meaning
SUCCESS | If the iFlags parameter is set to PASTE_ISREADY, this means that the clipboard does contain a valid image. Otherwise, this means that the method was successful.
<=0 | If the iFlags parameter is set to PASTE_ISREADY, this means that the clipboard does not contain a valid image. Otherwise, this means that an error occurred while attempting to paste. Refer to Error Codes.


hList Parameter For PicturizeBitmapList

hList

Handle to the LEAD BitmapList used to create the thumbnail images which are in turn used to picturize the specified image.


iCellHeight Parameter For PicturizeBitmapList

iCellHeight

Height of the thumbnail bitmap.


iCellWidth Parameter For PicturizeBitmapList

iCellWidth

Width of the thumbnail bitmap.


iLightnessFact Parameter For PicturizeBitmapList

iLightnessFact

Value that represents how much to lighten the thumbnail bitmap. Valid values are between 0 and 1000. This value is divided internally by 1000. Values between 0 and 499 darken the image. Values between 500 and 1000 lighten the image.


Return for PicturizeBitmapList

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iFlags Parameter For Picturize

iFlags

Flags that control the behavior of the process. Possible values are given below. These values can be combined by bit-wise ORing them.

Value | Meaning
PICTURIZE_LOADALL | [0x0001] Load all files in memory.
PICTURIZE_RESIZE | [0x0002] Resize all images that are not the required size (nCellWidth x nCellHeight).
PICTURIZE_RESAMPLE | [0x0004] Resample the images that are not the required size (nCellWidth x nCellHeight). (slower process, better quality)
PICTURIZE_ONCE | [0x0010] Use an image only once throughout the process.
PICTURIZE_EQUALUSAGE | [0x0020] Use all images equally. That is, before an image will be used twice, all other images must be used at least once.
PICTURIZE_BESTFIT | [0x0040] Images will be resized to fit the image if the bitmap width or height is not a multiple of nCellWidth/nCellHeight.
0 | The picturize process will not use any of the above flags. It will: reload all the files each time you look for a rectangle to substitute and ignore all the images present in pszDirectory if their size is not nCellWidth x nCellHeight


Return for Picturize

Return Value

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


nCellHeight Parameter For Picturize

nCellHeight

The height of the images used to reconstruct the image in pixels.


nCellWidth Parameter For Picturize

nCellWidth

The width of the images used to reconstruct the image in pixels.


sDirectory Parameter For Picturize

sDirectory

String containing the name of the directory containing the images. Only the images in the specified directory are used. Images from subdirectories are NOT used.


Bitmap Parameter For PicturizeSingle

Bitmap

The Main Control's bitmap used to create the thumbnail.


iCellHeight Parameter For PicturizeSingle

iCellHeight

Height of the thumbnail bitmap.


iCellWidth Parameter For PicturizeSingle

iCellWidth

Width of the thumbnail bitmap.


iLightnessFact Parameter For PicturizeSingle

iLightnessFact

Value that represents how much to lighten the thumbnail bitmap. Valid values are between 0 and 1000. This value is divided internally by 1000. Values between 0 and 499 darken the image. Values between 500 and 1000 lighten the image.


Return for PicturizeSingle

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nCol Parameter For Pixel

nCol

X coordinate of the pixel.


nRow Parameter For Pixel

nRow

Y coordinate of the pixel.


uIndex Parameter For PLTPenColor

uIndex

Index into the array of pen colors. This index should be >= 0 and <= 7.


uIndex Parameter For PLTPenWidth

uIndex

Index into the array of pen width values. This index should be >= 0 and <= 7.


iIndex Parameter For Point

iIndex

Index indicating which Point from the array to retrieve. The array is zero-based.

This value must be:

0=<iIndex< PointCount, where PointCount is the number of the points retrieved from the AnnGetPointCount method


uIndex Parameter For PolygonPoint

uIndex

The index into the ordered array of points.


iLevels Parameter For Posterize

uLevels

The number of color levels to use. Valid values are 2 through 64.


Return for Posterize

Return Value

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


Filters Parameter For PreLoadFilters

Filters

String containing the filters which should be loaded. If Filters is an empty string, all file filters LEADTOOLS can find will be loaded and LEADTOOLS will determine the order in which the files will be used.


iCachedFilters Parameter For PreLoadFilters

iCachedFilters

Number of filters that should be loaded, but can be unloaded later to make room for other filters.


iFixedFilters Parameter For PreLoadFilters

iFixedFilters

Number of filters that should stay loaded in memory at all times.


Return for PreLoadFilters

Return Value

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


Return for PutBitmapRowCol

Return Value

Return | Meaning
>=1 | The number of bytes gotten.
< 1 | An error occurred. Refer to Error Codes.


nCol Parameter For PutBitmapRowCol

nCol

The column offset within the row to update. The first column offset is 0, and the last column offset is 1 less than the bitmap width.


nRow Parameter For PutBitmapRowCol

nRow

The number of the row to update. The first row is 0, and the last row is 1 less than the bitmap height.


pBuffer Parameter For PutBitmapRowCol

pBuffer

Pointer to the buffer containing the image data.


uBytes Parameter For PutBitmapRowCol

uBytes

The number of bytes to update. Consider the bits per pixel, and avoid specifying a number that goes past the end of the row.

For a 1-bit bitmap, each byte represents 8 pixels. For a 4-bit bitmap, each byte represents 2 pixels. For an 8-bit bitmap, each byte represents 1 pixel. For a 16-bit bitmap, every 2 bytes represent one pixel. For 24-bit images, every three bytes represent one pixel. For a 32-bit bitmap, every four bytes represent one pixel. For a 48-bit bitmap, every six bytes represent one pixel. For a 64-bit bitmap, every eight bytes represent one pixel.


Return for PutBitmapRow

Return Value

Return | Meaning
>=1 | The number of bytes gotten.
< 1 | An error occurred. Refer to Error Codes.


nRow Parameter For PutBitmapRow

nRow

The number of the row to update. The first row is 0, and the last row is 1 less than the bitmap height.


pBuffer Parameter For PutBitmapRow

pBuffer

Pointer to the buffer containing the image data.


uBytes Parameter For PutBitmapRow

uBytes

Number of bytes to be updated. Use the BitmapBytesPerLine Property to determine the byte count of each line.


Return for PutPixelData

Return Value

Return | Meaning
SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Error Codes.


nBytes Parameter For PutPixelData

nBytes

Size of the buffer pointed to by pData. The size should be large enough to contain the

data for the pixel. The minimum size can be calculated with the following formula:

(BitmapBits + 7) / 8.


nCol Parameter For PutPixelData

nCol

The column number of the pixel.


nRow Parameter For PutPixelData

nRow

The row number of the pixel.


pData Parameter For PutPixelData

pData

Pointer to a buffer that contains the pixel data to set. This buffer should be able to store

nBytes bytes.


iPage Parameter For ReadComment

iPage

The page number (for multipage files) that contains the image.

If the file is not a multipage file, pass 0.


nIndex Parameter For ReadComment

nIndex

Index into the array of comments. For possible values, refer to Types of File Comments.


sFile Parameter For ReadComment

sFile

Character string containing the name of the file.


Return for ReadComment

Return Value

Value of the specified comment in an image file. For the data types of various comments, refer to Types of File Comments.


Return for ReadLoadResolutions

Return Value

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


sFile Parameter For ReadLoadResolutions

sFile

Character string containing the name of the file to examine.


Return for ReadTag

Return Value

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


lPage Parameter For ReadTag

lPage

Number of the page within the specified file from which to read the specified tag. The first page is page 1. The specified page must exist. If the page does not exist, an error will be returned.


hMem Parameter for ReadTagMemory

hMem

A global handle (HGLOBAL) to the file in memory.


Return for ReadTagMemory

Return Value

Return | Meaning
SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Error Codes.


nPage Parameter for ReadTagMemory

nPage

The number of the page within the specified file in memory from which to read the specified tag. The first page is page 1. The specified page must exist. If the page does not exist, an error will be returned.


uBufSize Parameter for ReadTagMemory

uBufSize

The size in bytes of the file referenced by hMem.


uTag Parameter for ReadTagMemory

uTag

The tag to read from the specified file. For more information on tags available in the TIFF format, refer to the uTag parameter of the SetTag method.


psFile Parameter For ReadTag

pszFile

String that contains the name of the file from which to read the specified tag. Please note that this file must exist.


uTag Parameter For ReadTag

uTag

The tag to read from the specified file. For more information on tags available in the TIFF format, refer to the SetTag method.


Return for ReleaseBitmapDC

Return Value

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


Return for ReleaseClientDC

Return Value

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


bUseHTable Parameter For RemapHue

bUseHTable

Flag that indicates whether to use the HTable property. Possible values are:

Value | Meaning
TRUE | Use the HTable property, which is the Hue lookup table. If MaskTable [i] for a particular hue is not 0, then the hue is changed to the corresponding entry in HTable [i]. For example, if a pixel has a hue of 85 and MaskTable [85] is NOT 0, then the hue of the pixel is changed to the Hue in HTable [85].
FALSE | The Hue of each pixel is unchanged.


bUseMaskTable Parameter For RemapHue

bUseMaskTable

Flag that indicates whether to use the MaskTable property to identify valid values within the HTable property. Possible values are:

Value | Meaning
TRUE | Use the MaskTable property to identify which values in the HTable property is valid. If MaskTable [i] is not 0, then HTable [i] is to be used. If MaskTable [i] is 0, then HTable [i] is ignored.
FALSE | All entries in the HTable are marked as valid.


bUseSTable Parameter For RemapHue

bUseSTable

Flag that indicates whether to use the STable property. Possible values are:

Value | Meaning
TRUE | Use the STable property, which is the Saturation lookup table. If MaskTable [i] for a particular hue is not 0, then the saturation is changed to the corresponding entry in STable [i]. For example, if a pixel has a hue of 85 and MaskTable (85) is NOT 0, then the saturation of the pixel is changed to the saturation in STable [85]. If bUseHTable is FALSE, the saturation is changed to STable [85].
FALSE | The Saturation of each pixel is unchanged.


bUseVTable Parameter For RemapHue

bUseVTable

Flag that indicates whether to use the VTable property. Possible values are:

Value | Meaning
TRUE | Use the VTable property, which is the Value lookup table. If MaskTable [i] for a particular hue is not 0, then the Value is changed to the corresponding entry in VTable [i]. For example, if a pixel has a hue of 85 and MaskTable [85] is NOT 0, then the Value of the pixel is changed to the Value in VTable [85]. If bUseHTable is FALSE, the Value is changed to VTable [85].
FALSE | The Value of each pixel is unchanged.


Return for RemapHue

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iChannel Parameter For RemapIntensity

iChannel

Possible values are:

Value | Meaning
CHANNEL_MASTER | All channels.
CHANNEL_RED | Red channel only.
CHANNEL_GREEN | Green channel only.
CHANNEL_BLUE | Blue channel only.


Return for RemapIntensity

Return Value

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


n Parameter For RemapTable

n

The index into the lookup table. The index corresponds to the current intensity value, and the value of the entry is the intensity value to be applied.


Return for Remove

Return Value

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


nIndex Parameter For Remove

nIndex

Index of the item to be removed.


iLightness Parameter For RemoveRedeye

iLightness

"Percentage" value that indicates whether the pixels that are replaced are lightened or darkened. If this value is greater than 100, the replaced pixels will be lightened. If this value is less than 100, the replaced pixels will be darkened. This method preserves the lightness of the original pixels and substitutes the red color with the new color.


Return for RemoveRedeye

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iThreshold Parameter For RemoveRedeye

iThreshold

Threshold value that indicates which pixels will be changed by this method. All pixels with a red component value greater than this value will be changed. Pixels with a red component value less than this value will not be changed. This value is between 0 and 255.


rcNewColor Parameter For RemoveRedeye

rcNewColor

New color value used to replace the red color in the eyes.


hDevice Parameter For Render

hDevice

Handle to the device context (DC) where the bitmap is to print. The mapping mode of the device context must be MM_TEXT.


iHeight Parameter For Render

iHeight

The printed height. The value is in dots, and the actual height depends on the dots per inch (DPI) of the printer. Pass a 0 to let the method calculate the height. If only the width or only the height is specified, the method will calculate the remaining dimension. If 0 is passed for both the width and the height, the method calculates the maximum dimensions that fit on the page while preserving the aspect ratio.


iLeft Parameter For Render

iLeft

X position to start the print. The value is in dots, and the actual position depends on the dots per inch (DPI) of the printer. Pass a 0 and set the RenderCenter property to True to center the image horizontally on the page.


Return for Render

Return Value

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


iTop Parameter For Render

iTop

Y position to start the print. The value is in dots, and the actual position depends on the dots per inch (DPI) of the printer. Pass a 0 and set the RenderCenter property to True to center the image vertically on the page.


iWidth Parameter For Render

iWidth

The printed width. The value is in dots, and the actual width depends on the dots per inch (DPI) of the printer. Pass a 0 to let the method calculate the width. If only the width or only the height is specified, the method will calculate the remaining dimension. If 0 is passed for both the width and the height, the method calculates the maximum dimensions that fit on the page while preserving the aspect ratio.


bErase Parameter For RepaintRect

bErase

Specifies whether to erase the background before painting.

Setting | Description
TRUE | Erase the background.
FALSE | Do not erase the background.


iHeight Parameter For RepaintRect

iHeight

The height of the rectangle to paint.

The measurement is relative to the Main Control's client area. The unit of measure is pixels.


iLeft Parameter For RepaintRect

iLeft

The X coordinate of the origin of the rectangle to paint.

The position is relative to the Main Control's client area. The unit of measure is pixels.


Return for RepaintRect

Return Value

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


iTop Parameter For RepaintRect

iTop

The Y coordinate of the origin of the rectangle to paint.

The position is relative to the Main Control's client area. The unit of measure is pixels.


iWidth Parameter For RepaintRect

iWidth

The width of the rectangle to paint.

The measurement is relative to the Main Control's client area. The unit of measure is pixels.


bAsFrame Parameter For ResizeRgn

bAsFrame

Flag that indicates whether to create a frame associated with the resized bitmap region. Possible values are:

Value | Meaning
TRUE | Create a frame of thickness iDim for the resized region. If iFlag is RGN_EXPAND, the frame created will exist outside the boundaries of the resized region. If iFlag is RGN_CONTRACT, the frame will be within the boundaries of the resized region.
FALSE | Resize the region only. Do not create a frame.


iDim Parameter For ResizeRgn

iDim

Number of pixels by which to resize the region.


iFlag Parameter For ResizeRgn

iFlag

Flag that indicates whether to contract or expand the bitmap region. Possible values are:

Value | Meaning
RGN_EXPAND | [$0001] Expand the region.
RGN_CONTRACT | [$0002] Contract the region.


Return for ResizeRgn

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


Return for Reverse

Return Value

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


nH Parameter For RGBfromHSV

nH

Hue of the color for which to return the RGB equivalent.


nS Parameter For RGBfromHSV

nS

Saturation of the color for which to return the RGB equivalent.


nV Parameter For RGBfromHSV

nV

Value of the color for which to return the RGB equivalent.


Return for RGBfromHSV

Return Value

The TColorRef equivalent of the color specified by nH, nS and nV.


crFill Parameter For Rotate

crFill

The background fill color.

If the image is 8 bits per pixel or less, the color comes from the current palette, and it may not exactly match the specified color.

You can specify a COLORREF value (the return value of the RGB macro), or you can specify a palette index as explained in Using Palette Indexes As Color Values.


iAngle Parameter For Rotate

iAngle

Hundredths of degrees to rotate (+/-). This can be a number from 0 to 36,000. A positive value will rotate the bitmap in a clockwise rotation, while a negative value will rotate the bitmap in a counter-clockwise rotation.


iFlags Parameter For Rotate

iFlags

Flag to keep the resulting bitmap the same size as the original bitmap or to resize according to the rotation specified. Valid values are:

Value | Meaning
ROTATE_RESIZE | Size resulting bitmap as needed.
0 | Do not resize the bitmap. Crop it.


Return for Rotate

Return Value

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


iChange Parameter For Saturation

iChange

Amount to change saturation. Values are percentages between -1000 and 1000.


Return for Saturation

Return Value

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


iBitsPerPixel Parameter For SaveBuffer

iBitsPerPixel

Resulting file's pixel depth.

Note that not all bits per pixel are available to all file formats. For valid values, refer to Formats of Output Files. If iBitsPerPixel is 0, the file will be stored using the closest bits per pixel value supported by that format. For example, if a file format supports 1, 4, and 24 bits per pixel, and the BitmapBits property was 5, the file will be stored as 24 bit. Likewise, if the BitmapBits property was 2, the file will be stored as 4-bit.


iBufferSize Parameter For SaveBuffer

iBufferSize

The size, in bytes, of the buffer pointed to by pBuffer.


iFormat Parameter For SaveBuffer

iFormat

Output file format. For valid values, refer to Formats of Output Files.


Return for SaveBuffer

Return Value

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


iQuality Parameter For SaveBuffer

iQuality

This parameter is used when saving an image file to LEAD or JPEG formats. Quality factor is a number that determines the degree of loss in the compression process.

For possible values, refer to Compression Quality Factors.


pBuffer Parameter For SaveBuffer

pBuffer

Pointer to a buffer that the user allocates. It should be large enough to hold the bitmap.


piSize Parameter For SaveBuffer

piSize

Address of a cardinal variable to be updated with the size, in bytes, of the file saved in memory.


bSelected Parameter For SaveDatabase

bSelected

Flag that indicates which items in the database to save. Possible values are:

Value | Meaning
TRUE | Save only selected items within the database.
FALSE | Save all items in the database.


FileName Parameter For SaveDatabase

FileName

Character string that contains the name of the file in which to save the database.


Return for SaveDatabase

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


fileName Parameter For Save

fileName

Character string containing the output file name.


iBitsPerPixel Parameter For Save

iBitsPerPixel

Resulting file's pixel depth.

The output file pixel depth. Note that not all bits per pixel are available to all file formats. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits . For valid values, refer to Formats of Output Files.


iFormat Parameter For Save

iFormat

Output file format. For valid values, refer to Formats of Output Files.


iModify Parameter For Save

iModify

Indicates how to save a new page in a multipage file that supports insert and replace operations.

Value | Meaning
SAVE_OVERWRITE | [0] No insert/replace/append is performed. An existing file is overwritten.
SAVE_APPEND | [1] or [-1] The page is appended if the file exists.
SAVE_REPLACE | [2] Replace the page specified in the SavePage property.
SAVE_INSERT | [3] Insert the new page before the page specified in the SavePage property

The following file formats support append operations:

TIFF (most TIFF formats, including JTIF but excluding EXIF)

PCX

FlashPix

AWD

Winfax

GIF

The following file formats support replace operations:

TIFF (most TIFF formats, including JTIF but excluding EXIF)

PCX

The following file formats support insert operations:

TIFF (most TIFF formats, including JTIF but excluding EXIF)

PCX


Return for Save

Return Value

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


iQuality Parameter For Save

iQuality

This parameter is used when saving an image file to LEAD or JPEG formats. The quality factor is a number that determines the degree of loss in the compression process.

For possible values, refer to Compression Quality Factors.


uIndex Parameter for AnnContainerPointX

uIndex

Index into the array of X coordinates.


uIndex Parameter for AnnContainerPointY

uIndex

Index into the array of Y coordinates.


hObject Parameter for AnnFixed

hObject

Handle of the annotation object


clBack Parameter for AnnGetBackColor

clBack

The TColor variable to be update by object's background color.


hObject Parameter for AnnGetBackColor

hObject

Handle to the annotation object.


Return for AnnGetBackColor

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


dBitmapDpiX Parameter for AnnGetBitmapDpiX

dBitmapDpiX

Variable to be updated with the current horizontal DPI value.


hObject Parameter for AnnGetBitmapDpiX

hObject

Handle to an annotation automation object.


Return for AnnGetBitmapDpiX

Return Value

Return | Meaning
SUCCESS | The function was successful.
<= 0 | An error occurred, Refer to Error Codes.


dBitmapDpiY Parameter for AnnGetBitmapDpiY

dBitmapDpiY

Variable to be updated with the current vertical DPI value.


hObject Parameter for AnnGetBitmapDpiY

hObject

Handle to an annotation automation object.


Return for AnnGetBitmapDpiY

Return Value

Return | Meaning
SUCCESS | The function was successful.
<= 0 | An error occurred, Refer to Error Codes.


dDistance Parameter for AnnGetDistance

dDistance

The variable to be updated with the length of the ruler object. For objects having only one ruler, this variable will be updated with the length. For cross products, which have two rulers, this variable will be updated with the length of the primary ruler.


dDistance2 Parameter for AnnGetDistance

dDistance2

The variable to be updated with the distance of the ruler object. For cross products and protractors, which have two rulers, this variable will be updated with the length of the secondary ruler.


hObject Parameter for AnnGetDistance

hObject

Handle to the annotation automation object.


Return for AnnGetDistance

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnGetEncryptOptions

hObject

Handle of the annotation object


Return for AnnGetEncryptOptions

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnGetFillMode

hObject

Handle to the annotation object.


Return for AnnGetFillMode

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uFillMode Parameter for AnnGetFillMode

uFillMode

Unsigned integer variable to be updated with the object’s fill mode constant. Possible fill mode values are:

Value | Meaning
ANNFILLMODE_TRANSPARENT | [0] Transparent
ANNFILLMODE_TRANSLUCENT | [1] Translucent
ANNFILLMODE_OPAQUE | [2] Opaque


bBold Parameter for AnnGetFontBold

bBold

Boolean variable to be updated with a value that indicates whether the font is bold. Possible values are:

Value | Meaning
TRUE | The font is bold
FALSE | The font is not bold.


hObject Parameter for AnnGetFontBold

hObject

Handle to the annotation object.


Return for AnnGetFontBold

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bItalic Parameter for AnnGetFontItalic

bItalic

Boolean variable to be updated with a value that indicates whether the font is italic. Possible values are:

Value | Meaning
TRUE | The font is italic
FALSE | The font is not italic.


hObject Parameter for AnnGetFontItalic

hObject

Handle to the annotation object.


Return for AnnGetFontItalic

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnGetFontName

hObject

Handle to the annotation object.


Return for AnnGetFontName

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


strName Parameter for AnnGetFontName

strName

String variable to be updated with the name of the font used by the annotation object.


dFontSize Parameter for AnnGetFontSize

dFontSize

Double variable to be updated by the current un-scaled font size of the annotation object.


hObject Parameter for AnnGetFontSize

hObject

Handle to the annotation object.


Return for AnnGetFontSize

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bStrikeThrough Parameter for AnnGetFontStrikeThrough

bStrikeThrough

Boolean variable to be updated with a value that indicates whether the font has a strike-through. Possible values are:

Value | Meaning
TRUE | The font has a strike-through.
FALSE | The font does not have a strike-through.


hObject Parameter for AnnGetFontStrikeThrough

hObject

Handle to the annotation object.


Return for AnnGetFontStrikeThrough

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


Return for AnnGetFontUnderline

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


clFore Parameter for AnnGetForeColor

clFore

A TColor variable to be updated with the annotation object's current foreground color.


hObject Parameter for AnnGetForeColor

hObject

Handle to the annotation object.


Return for AnnGetForeColor

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnGetNameOptions

hObject

Handle of the annotation object


Return for AnnGetNameOptions

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnGetPointOptions

hObject

Handle of the annotation object


Return for AnnGetPointOptions

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hFile Parameter for AnnGetSecondaryMetafile

hFile

Variable to be updated with the metafile handle.


hObject Parameter for AnnGetSecondaryMetafile

hObject

Handle of the annotation object


Return for AnnGetSecondaryMetafile

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnGetText

hObject

Handle to the annotation object.


Return for AnnGetText

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


strText Parameter for AnnGetText

strText

String to be updated with the annotation object's character string.


hObject Parameter for AnnGetUserHandle

hObject

Handle of the annotation object


Return for AnnGetUserHandle

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uIndex Parameter for AnnGetUserHandle

uIndex

Index of the user handle to get. The index is zero based.


h_Wnd Parameter for AnnGetWnd

h_Wnd

HWND variable to be updated with the annotation object's window handle.


hObject Parameter for AnnGetWnd

hObject

Handle to the annotation object.


Return for AnnGetWnd

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter for AnnSetBackColor

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


clBack Parameter for AnnSetBackColor

clBack

The TColor value that specifies the background color.


hObject Parameter for AnnSetBackColor

hObject

Handle to the annotation object.


Return for AnnSetBackColor

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter for AnnSetBitmapDpiX

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


dBitmapDpiX Parameter for AnnSetBitmapDpiX

dBitmapDpiX

The horizontal DPI value to set, Valid values are greater than or equal to 1.

If 0 or a positive value less than 1 is passed, the value will default to 150. If a negative value is passed, the method will return an error.


hObject Parameter for AnnSetBitmapDpiX

hObject

Handle to an annotation automation object.


Return for AnnSetBitmapDpiX

Return Value

Return | Meaning
SUCCESS | The function was successful.
<= 0 | An error occurred, Refer to Error Codes.


bSelected Parameter for AnnSetBitmapDpiY

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


dBitmapDpiY Parameter for AnnSetBitmapDpiY

dBitmapDpiY

The vertical DPI value to set, Valid values are greater than or equal to 1.

If 0 or a positive value less than 1 is passed, the value will default to 150. If a negative value is passed, the method will return an error.


hObject Parameter for AnnSetBitmapDpiY

hObject

Handle to an annotation automation object.


Return for AnnSetBitmapDpiY

Return Value

Return | Meaning
SUCCESS | The function was successful.
<= 0 | An error occurred, Refer to Error Codes.


hObject Parameter for AnnSetEncryptOptions

hObject

Handle of the annotation object


Return for AnnSetEncryptOptions

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter for AnnSetFillMode

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetFillMode

hObject

Handle to the annotation object.


Return for AnnSetFillMode

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uFillMode Parameter for AnnSetFillMode

uFillMode

The constant that specifies the object's fill mode. Possible fill mode values are:

Value | Meaning
ANNFILLMODE_TRANSPARENT | [0] Transparent
ANNFILLMODE_TRANSLUCENT | [1] Translucent
ANNFILLMODE_OPAQUE | [2] Opaque

To see the possible fill modes and patterns, refer to Illustration of Fill Options for Annotations.


bFontBold Parameter for AnnSetFontBold

bFontBold

Flag that indicates whether to make the font bold. Possible values are:

Value | Meaning
TRUE | Make the font bold
FALSE | Make the font not bold.


bSelected Parameter for AnnSetFontBold

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetFontBold

hObject

Handle to the annotation object.


Return for AnnSetFontBold

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bFontItalic Parameter for AnnSetFontItalic

bFontItalic

Flag that indicates whether to make the font italic. Possible values are:

Value | Meaning
TRUE | Make the font italic
FALSE | Make the font not italic.


bSelected Parameter for AnnSetFontItalic

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetFontItalic

hObject

Handle to the annotation object.


Return for AnnSetFontItalic

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter for AnnSetFontName

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetFontName

hObject

Handle to the annotation object.


Return for AnnSetFontName

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


strFontName Parameter for AnnSetFontName

strFontName

The character string containing the name of the font to set.


bSelected Parameter for AnnSetFontSize

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


dFontSize Parameter for AnnSetFontSize

dFontSize

The font size to set, expressed as an un-scaled value relative to the container.


hObject Parameter for AnnSetFontSize

hObject

Handle to the annotation object.


Return for AnnSetFontSize

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bFontStrikeThrough Parameter for AnnSetFontStrikeThrough

bFontStrikeThrough

Flag that indicates whether to apply or remove the strike-through. Possible values are:

Value | Meaning
TRUE | Apply a strike-through
FALSE | Remove the strike-through.


bSelected Parameter for AnnSetFontStrikeThrough

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetFontStrikeThrough

hObject

Handle to the annotation object.


Return for AnnSetFontStrikeThrough

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bFontUnderline Parameter for AnnSetFontUnderline

bFontUnderline

Flag that indicates whether to apply or remove an underline, Possible values are:

Value | Meaning
TRUE | Underline the text.
FALSE | Remove the underline from the text.


bSelected Parameter for AnnSetFontUnderline

bSelected

Flag that indicates whether to process only the selected objects or all objects, Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


bUnderline Parameter for AnnGetFontUnderline

bUnderline

Boolean variable to be updated with a value that indicates whether the font has an underline. Possible values are:

Value | Meaning
TRUE | The font has an underline.
FALSE | The font does not have an underline.


hObject Parameter for AnnSetFontUnderline

hObject

Handle to the annotation object.


Return for AnnSetFontUnderline

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter for AnnSetForeColor

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


clFore Parameter for AnnSetForeColor

clFore

The TColor value that specifies the foreground color.


hObject Parameter for AnnSetForeColor

hObject

Handle to the annotation object.


Return for AnnSetForeColor

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter for AnnSetLineWidth

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


dLineWidth Parameter for AnnSetLineWidth

dLineWidth

The un-scaled line width of an object, relative to its container object. The width is interpreted using the container's scaling factors, which are described in Low-Level Coordinate System for Annotations.


hObject Parameter for AnnSetLineWidth

hObject

Handle to the annotation object.


Return for AnnSetLineWidth

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnSetNameOptions

hObject

Handle of the annotation object


Return for AnnSetNameOptions

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnSetPoints

hObject

Handle of the annotation object


Return for AnnSetPoints

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


pPoints Parameter for AnnSetPoints

pPoints

Pointer to the array of LEADTOOLS ANNPOINT records (structures) that specifies the shape of the annotation.

The ANNPOINT structure is like a Windows POINT structure, except that it uses double-precision floating point values.

Coordinates of an object's points are relative to its container object. The coordinates are interpreted using the container's scaling factors and offsets, which are described in Low-Level Coordinate System for Annotations.


uCount Parameter for AnnSetPoints

uCount

The number of points in the pPoints array.


bSelected Parameter for AnnSetText

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter for AnnSetText

hObject

Handle to the annotation object.


Return for AnnSetText

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


strText Parameter for AnnSetText

strText

The character string to assign to the annotation object.


h_Wnd Parameter for AnnSetWnd

h_Wnd

The window handle to assign to the object.


hObject Parameter for AnnSetWnd

hObject

Handle to the annotation object.


Return for AnnSetWnd

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnTextAlign

hObject

Handle of the annotation object for which to get or set the text alignment.


hObject Parameter for AnnTextExpandTokens

hObject

Handle of the annotation object for which to get or set this property.


hObject Parameter for AnnTextPointerFixed

hObject

Handle of the annotation object for which to get or set this property.


hObject Parameter for AnnTextRotate

hObject

Handle of the annotation object for which to get or set the rotation flag.


hObject Parameter for AnnTicMarkLength

hObject

Handle of the annotation object for which to get or set the tic mark length.


uIndex Parameter for ClientPointX

uIndex

Index into the array of X coordinates.


uIndex Parameter for ClientPointY

uIndex

Index into the array of Y coordinates.


hBuf Parameter For SaveMemory

hBuf

Handle used to reference the file in memory, that must be passed to the method by reference. The method updates the value of the variable. The variable must be a global handle (HGLOBAL) and must be declared with the appropriate data type. To see the correct data type, refer to the code example for your development system.


iBitsPerPixel Parameter For SaveMemory

iBitsPerPixel

Resulting file's pixel depth.

Note that not all bits per pixel are available to all file formats. For valid values, refer to Formats of Output Files. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits .


iBufSize Parameter For SaveMemory

iBufSize

Integer variable that you use to track the size of the file in memory. The method updates the value of the variable. The variable must be declared with the appropriate data type. To see the correct data type, refer to the code example for your development system.


iFormat Parameter For SaveMemory

iFormat

Output file format. For valid values, refer to Formats of Output Files.


Return for SaveMemory

Return Value

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


iQuality Parameter For SaveMemory

iQuality

This parameter is used when saving an image file to LEAD or JPEG formats. Quality factor is a number that determines the degree of loss in the compression process.

For possible values, refer to Compression Quality Factors.


Return for SaveOffset

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nBitsPerPixel Parameter For SaveOffset

nBitsPerPixel

Resulting file's pixel depth.

The output file pixel depth. Note that not all bits per pixel are available to all file formats. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits . For valid values, refer to Formats of Output Files.


nFormat Parameter For SaveOffset

nFormat

Output file format. For valid values, refer to Formats of Output Files.


nModify Parameter For SaveOffset

nModify

Indicates how to save a new page in a multipage file that supports insert and replace operations.

Value | Meaning
SAVE_OVERWRITE | [0] No insert/replace/append is performed. An existing file is overwritten.
SAVE_APPEND | [1] or [-1] The page is appended if the file exists.
SAVE_REPLACE | [2] Replace the page specified in the SavePage property.
SAVE_INSERT | [3] Insert the new page before the page specified in the SavePage property

The following file formats support append operations:

TIFF (most TIFF formats, including JTIF but excluding EXIF)

PCX

FlashPix

AWD

Winfax

GIF

The following file formats support replace operations:

TIFF (most TIFF formats, including JTIF but excluding EXIF)

PCX

The following file formats support insert operations:

TIFF (most TIFF formats, including JTIF but excluding EXIF)

PCX


nOffsetBegin Parameter For SaveOffset

nOffsetBegin

Offset within the file at which to begin saving


nQuality Parameter For SaveOffset

nQuality

This parameter is used when saving an image file to LEAD or JPEG formats. Qfactor is a number that determines the degree of loss in the compression process.

For possible values, refer to Compression Quality Factors.


pszString Parameter For AddItem

pszName

Character string containing the output file name.


uIndex Parameter For SaveResolutionHeight

uIndex

Index into the array of heights.


uIndex Parameter For SaveResolutionWidth

uIndex

Index into the array of widths.


bSelected Parameter For SaveToFile

bSelected

Indicates which items to save.

Value | Meaning
True | Save only items that have the Selected attribute equal to True
False | Save all items


Return for SaveToFile

Return Value

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


nBits Parameter For SaveToFile

nBits

Resulting file's pixel depth.

The output file pixel depth. Note that not all bits per pixel are available to all file formats. Support for 12 and 16-bit grayscale images is available only in the Document/Medical toolkits. For valid values, refer to Formats of Output Files.


nFormat Parameter For SaveToFile

nFormat

Output file format. The following are valid values:

Value | Meaning
FILE_PCX | ZSoft PCX
FILE_GIF | CompuServe GIF
FILE_TIF | Tagged Image File Format
FILE_TIF_JPEG | Jpeg Tag Image File Format
FILE_TIFLZW | TIF Format with LZW compression
FILE_LEAD1JTIF | JPEG 4:1:1
FILE_LEAD2JTIF | JPEG 4:2:2
FILE_CCITT | TIFF CCITT
FILE_CCITT_GROUP3_1DIM | CCITT Group3 one dimension
FILE_CCITT_GROUP3_2DIM | CCITT Group3 two dimensions
FILE_CCITT_GROUP4 | CCITT Group4 two dimensions
FILE_FPX | FlashPix, no compression
FILE_FPX_SINGLE_COLOR | FlashPix, compression 'single color' method
FILE_FPX_JPEG | FlashPix, compression JPEG
FILE_FPX_JPEG_QFACTOR | FlashPix, compression JPEG, specify qFactor
FILE_TIF_CMYK | TIFF no compression, CMYK data
FILE_TIFLZW_CMYK | TIFF LZW compression, CMYK data
FILE_TIF_PACKBITS | TIFF PackBits compression, RGB data
FILE_TIF_PACKBITS_CMYK | TIFF PackBits compression, CMYK data
FILE_TIF_YCC | TIFF YCbCr color space, no compression
FILE_TIFLZW_YCC | TIFF YCbCr color space, LZW compression
FILE_TIF_PACKBITS_YCC | TIFF YCbCr color space, PackBits compression
FILE_EXIF | uncompressed RGB Exif file
FILE_EXIF_YCC | uncompressed YCbCr Exif file
FILE_EXIF_JPEG | JPEG 4:2:2 compressed Exif file
FILE_AWD | Microsoft Fax format
FILE_EXIF_JPEG_411 | JPEG 4:1:1 compressed Exif file


nQFactor Parameter For SaveToFile

nQFactor

This parameter is used when saving an image file to LEAD or JPEG formats. Qfactor is a number that determines the degree of loss in the compression process.

For possible values, refer to Compression Quality Factors.


sFile Parameter For SaveToFile

sFile

Name of the file into which items should be saved.

Note:

If you specify an existing file, and the format supports the append operation, the items will be appended to the existing file.


fName Parameter For SaveWithStamp

fName

Character string containing the output file name.


iBitsPerPixel Parameter For SaveWithStamp

iBitsPerPixel

Pixel depth of the main image in the file. Valid values are:

Value | Meaning
8 | For grayscale.
24 | For True color.


iFormat Parameter For SaveWithStamp

iFormat

Type of compression to use. Valid values are:

Value | Meaning
FILE_CMP | LEAD CMP compression format.
FILE_JPEG | JPEG File Interchange Format using YUV 4:4:4 color spacing.
FILE_JPEG_422 | JPEG File Interchange Format using YUV 4:2:2 color spacing.
FILE_JPEG_411 | JPEG File Interchange Format using YUV 4:1:1 color spacing.
FILE_EXIF_JPEG_411 | Exif 2.0 file containing a JPEG compressed image. uses 4:1:1 subsampling (called 4:2:0 sampling in other places).


Return for SaveWithStamp

Return Value

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


iQuality Parameter For SaveWithStamp

iQuality

Compression quality factor to use for the specified compression format. This value can be any integer ranging from 2 to 255 for all the supported compression methods. In addition, the LEAD CMP compression format can use any one of the following enhanced options:

Value | Meaning
PQ1 | Perfect Quality compression Option 1.
PQ2 | Perfect Quality compression Option 2.
QFS | Quality Far more important than Size.
QMS | Quality More important than Size.
QS | Quality and Size are equally important.
SQS | Size more important than Quality - Sharp.
SQT | Size more important than Quality - less Tiling.
MCQ | Maximum Compression, keeping quality as good as possible.
MC | Maximum Compression.


iStampBits Parameter For SaveWithStamp

iStampBits

Pixel depth of the stamp. Valid values are:

Value | Meaning
8 | For 8-bit stamp image.
24 | For 24-bit stamp image.


iStampHeight Parameter For SaveWithStamp

iStampHeight

Height of the stamp to store within the compressed image. Maximum height of the stamp is 255 pixels.


iStampWidth Parameter For SaveWithStamp

iStampWidth

Width of the stamp to store within the compressed image. Maximum width of the stamp is 255 pixels.


Return for ScrollItems

Return Value

Return value is the actual number of lines scrolled.


nAmount Parameter For ScrollItems

nAmount

The amount to scroll. Positive values scroll forward in the list, while negative values scroll backwards. The direction (either horizontal or vertical) of the scroll depends on the current setting for ScrollStyle.


bFlag Parameter For SelectAll

bFlag

Flag that indicates the new status of the Selected attribute for all items in the ImageList Control.


Return for SelectAll

Return Value

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


Index Parameter For SelectedItems

Index

Index into the array of selected ImageList items. This is an 0-based index. This value must be between 0 and SelectedCount - 1.


hBit Parameter For SetDDB

hBit

Handle to the DDB to be converted.


hDevice Parameter For SetDDB

hDevice

Handle to the device responsible for the conversion. The mapping mode of the device context must be MM_TEXT.


hPal Parameter For SetDDB

hPal

Handle to the palette used by the DDB. You can use the GetBitmapPalette method to get the palette handle.


Return for SetDDB

Return Value

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


hDIBData Parameter For SetDIB

hDIBData

GLOBAL Handle (L_HGLOBAL) to the DIB to be converted.


Return for SetDIB

Return Value

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


iHeight Parameter For SetDstClipRect

iHeight

The height of the clipping rectangle. The unit of measure is pixels.


iLeft Parameter For SetDstClipRect

iLeft

The X coordinate of the origin of the clipping rectangle.

The position is relative to the Main Control's client area. The unit of measure is pixels.


Return for SetDstClipRect

Return Value

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


iTop Parameter For SetDstClipRect

iTop

The Y coordinate of the origin of the clipping rectangle.

The position is relative to the Main Control. The unit of measure is pixels.


iWidth Parameter For SetDstClipRect

iWidth

The width of the clipping rectangle. The unit of measure is pixels.


iHeight Parameter For SetDstRect

iHeight

The height of the destination rectangle. The unit of measure is pixels.


iLeft Parameter For SetDstRect

iLeft

The X coordinate of the origin of the destination rectangle.

The position is relative to the Main Control. The unit of measure is pixels.


Return for SetDstRect

Return Value

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


iTop Parameter For SetDstRect

iTop

The Y coordinate of the origin of the destination rectangle.

The position is relative to the Main Control. The unit of measure is pixels.


iWidth Parameter For SetDstRect

iWidth

The width of the destination rectangle. The unit of measure is pixels.


iHeight Parameter For SetFloaterDstClipRect

iHeight

The height of the destination clipping rectangle.

The measurement is relative to the Main Control's client area.


iLeft Parameter For SetFloaterDstClipRect

iLeft

The X coordinate of the origin of the destination clipping rectangle.

The position is relative to the Main Control's client area.


Return for SetFloaterDstClipRect

Return Value

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


iTop Parameter For SetFloaterDstClipRect

iTop

The Y coordinate of the origin of the destination clipping rectangle.

The position is relative to the Main Control's client area.


iWidth Parameter For SetFloaterDstClipRect

iWidth

The width of the destination clipping rectangle.

The measurement is relative to the Main Control's client area.


iHeight Parameter For SetFloaterDstRect

iHeight

The height of the destination rectangle.

The measurement is relative to the Main Control's client area.


iLeft Parameter For SetFloaterDstRect

iLeft

The X coordinate of the origin of the destination rectangle.

The position is relative to the Main Control's client area.


Return for SetFloaterDstRect

Return Value

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


iTop Parameter For SetFloaterDstRect

iTop

The Y coordinate of the origin of the destination rectangle.

The position is relative to the Main Control's client area.


iWidth Parameter For SetFloaterDstRect

iWidth

The width of the destination rectangle.

The measurement is relative to the Main Control's client area.


Return for SetLoadResolution

Return Value

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


nFormat Parameter For SetLoadResolution

nFormat

Value | Meaning
FILE_PCD | Kodak PhotoCD
FILE_FPX | Kodak FlashPix
FILE_JBIG | JBIG
FILE_JP2 | JPEG 2000. This file format contains image data and extra information about the contents and organization of the file.
FILE_J2K | JPEG 2000. This file format contains only a stream of image data.


uHeight Parameter For SetLoadResolution

uHeight

Height of the bitmap to load. You can pass 0 to get the default.


uWidth Parameter For SetLoadResolution

uWidth

Width of the bitmap to load. You can pass 0 to get the default.


Return for SetMagGlassPos

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nXPos Parameter For SetMagGlassPos

nXPos

The X coordinate of the new position of the Magnifying Glass, relative to the Main Control.


nYPos Parameter For SetMagGlassPos

nYPos

The Y coordinate of the new position of the Magnifying Glass, relative to the Main Control.


Return for SetMemoryThresholds

Return Value

Return | Meaning
SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Error Codes.


nConvBuffers Parameter for SetMemoryThresholds

nConvBuffers

This is used when working with tiled images, which have disk tiles. It represents the number of buffers in conventional memory that will cache the disk tiles. The swap buffers will greatly improve the access to these disk tiles. The default is 1 (one swap buffer will be used to cache the disk tiles).

This parameter specifies how many buffers should be used:

>0, nConvBuffers indicates the number of swap buffers

<0, -nConvBuffers indicates the percentage of the total of disk tiles. For example, a value of -50 means that cache buffers will be used for 50% of the disk tiles.

If this parameter is 0, no swap buffers will be used. This uses the least amount of memory.

It is useful to have more than one swap buffer when you have an algorithm that constantly reads data going up and down. Usually, the data is read in one direction (from top to bottom or bottom to top) – in this case, one swap buffer will be enough. Also, if you only view a certain portion of the image, you might benefit from having enough swap buffers to cache the visible portion of the image (or the bitmap’s region).

The buffers are dynamic: when data is being read/written to a disk tile, a cache buffer is created (if permitted and there is enough memory). If the maximum number of cache buffers for that bitmap has been reached, the cache buffer for the last used tile will be deleted and used for the new tile.


nConvTiles Parameter for SetMemoryThresholds

nConvTiles

This is used when working with a tiled image. It represents the maximum number of tiles that will reside in conventional memory at any time. The tiles that do not reside in conventional memory will be on disk. (Default is –100 = all tiles are in memory)

If the value is >0, then this parameter represents the number of tiles.

If 0, then all the tiles in a tiled bitmap will be disk tiles.

If the value is < 0, then this parameter represents the percentage of tiles that will reside in memory.

Values less than -100 are not allowed.

This parameter is ignored if uFlags does not contain MEM_CONVTILES.


nMaxConvSize Parameter for SetMemoryThresholds

nMaxConvSize

Maximum size for a conventional bitmap (default is $7FFFFFFF). Any bitmaps with a size bigger than this will be allocated as tiled.

If this parameter is >0, then it represents the maximum size in bytes.

If the parameter is <0, then it represents the maximum size in percentage of the total memory (physical and swap).

Values less than –100 are not allowed.

This parameter is ignored if uFlags does not contain MEM_MAXCONVSIZE.


nTiledThreshold Parameter for SetMemoryThresholds

nTiledThreshold

Minimum amount of free memory required to allow the allocation of conventional bitmaps (default 0). If the amount of free memory falls below this threshold, all bitmaps will be allocated as tiled. The exception is when the bitmap size is smaller than the tile size – in this case, the bitmap will be allocated in conventional memory.

Values less than –100 are not allowed.

If this parameter is > 0, it represents the required number of free bytes.

If the parameter is 0, then there is no minimum requirement for free memory, all bitmaps are allocated as conventional if there is enough memory.

Tiled bitmaps use a combination of memory tiles and disk tiles. When a bitmap is allocated, LEADTOOLS decides how many conventional memory tiles and how many disk tiles should be allocated. This parameter influences the number of conventional tiles allocated as follows: the toolkit will not allocate any more conventional tiles when the amount of memory falls below nTiledThreshold. When the amount of memory falls below nTiledThreshold, disk tiles will be allocated and several swap buffers might back these disk tiles. For each bitmap there will be at least one swap tile.

If this parameter is < 0, then it represents a percentage of free memory out of the total memory. For example, when you pass –20, tiled bitmaps will be used when the amount of free physical and swap memory will drop below 20% of the total memory.

This parameter is ignored if uFlags does not contain MEM_TILEDTHRESHOLD.


nTileSize Parameter for SetMemoryThresholds

nTileSize

The size of the tile for tiled bitmaps (default 0). Pass a value smaller than nMaxConvSize.

All bitmaps with a size smaller than nTileSize will be allocated as conventional. (A tiled bitmap of a size smaller than nTileSize would consist of only small tile, which is the equivalent of the conventional bitmap).

If nTileSize is 0, then LEADTOOLS will pick a default size for the tile. (Currently it is 16MB)

The tiles will be smaller than this value and will be a complete number of rows. No rows will be split between tiles.

Values less than 0 are not allowed.

This parameter is ignored if uFlags does not contain MEM_TILESIZE.


uFlags Parameter for SetMemoryThresholds

uFlags

Flags that indicate which of the threshold parameters are valid. The flags can be or-ed together to change only some of the flags, or you can pass MEM_ALL to change all flags. Possible values are:

Value | Meaning
MEM_TILEDTHRESHOLD | [$0001] – nTiledThreshold is valid.
MEM_MAXCONVSIZE | [$0002] – nMaxConvSize is valid
MEM_TILESIZE | [$0004] – nTileSize is valid
MEM_CONVTILES | [$0008] - nConvTiles is valid
MEM_CONVBUFFERS | [$0010] – nConvBuffers is valid.
MEM_ALL | [$001F] – all parameters are valid. You do not need to ‘or’ this with the other flags


bUpdatePos Parameter For SetMousePos

bUpdatePos

Flag that indicates whether to update the cursor position to (x, y). Possible values are:

Value | Meaning
True | Move the cursor to (x, y).
False | Keep the cursor where it is. (The automation object will think the cursor is at (x, y).)


Return for SetMousePos

Return Value

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


x Parameter For SetMousePos

x

The new X coordinate for the automation object to use when processing the mouse messages. This value is in pixels.


y Parameter For SetMousePos

y

The new Y coordinate for the automation object to use when processing the mouse messages. This value is in pixels.


crBorderColor Parameter for SetRgnBorder

crBorderColor

Border color.


crLowerTolerance Parameter for SetRgnBorder

crLowerTolerance

Lower tolerance values that set the lower stopping point for the region.


crUpperTolerance Parameter for SetRgnBorder

crUpperTolerance

Upper tolerance values that set the upper stopping point for the region.


Return for SetRgnBorder

Return Value

Return | Meaning
SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Error Codes.


uCombineMode Parameter for SetRgnBorder

uCombineMode

Flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


x Parameter for SetRgnBorder

x

X coordinate of a point. The color of the specified point will be used to set the region.


y Parameter for SetRgnBorder

y

Y coordinate of a point. The color of the specified point will be used to set the region.


crColor Parameter For SetRgnColor

crColor

The color that defines the region.

You can specify a COLORREF color value (the return value of the RGB macro), or you can specify a palette index as explained in Using Palette Indexes As Color Values.


iCombineMode Parameter For SetRgnColorHSVRange

iCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


Return for SetRgnColorHSVRange

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nH0 Parameter For SetRgnColorHSVRange

nH0

The minimum Hue of the HSV color range.


nH1 Parameter For SetRgnColorHSVRange

nH1

The maximum Hue of the HSV color range.


nS0 Parameter For SetRgnColorHSVRange

nS0

The minimum Saturation of the HSV color range.


nS1 Parameter For SetRgnColorHSVRange

nS1

The maximum Saturation of the HSV color range.


nV0 Parameter For SetRgnColorHSVRange

nV0

The minimum Value of the HSV color range.


nV1 Parameter For SetRgnColorHSVRange

nV1

The maximum Value of the HSV color range.


Return for SetRgnColor

Return Value

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


crLower Parameter For SetRgnColorRGBRange

crLower

TColorRef that contains the minimum (inclusive) R, G and B values. A pixel must have R,G, and B all greater than or equal to crLower and less than or equal to crUpper to be included in the region.


crUpper Parameter For SetRgnColorRGBRange

crUpper

TColorRef that contains the maximum (inclusive) R, G and B values. A pixel must have R,G, and B all greater than or equal to crLower and less than or equal to crUpper to be included in the region.


iCombineMode Parameter For SetRgnColorRGBRange

iCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


Return for SetRgnColorRGBRange

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uCombineMode Parameter For SetRgnColor

uCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


iCombineMode Parameter For SetRgnCurve

iCombineMode

Flag that indicates the action to take regarding the existing bitmap region, if one is defined. For descriptions of the possible values, refer to Flags for Setting a Region.


iFillMode Parameter For SetRgnCurve

iFillMode

Flag that indicates how to handle complex crossing lines. The following are valid values, which are illustrated below:

Value | Meaning
L_POLY_WINDING | [0] All pixels that are inside the resulting exterior lines are in the region.
L_POLY_ALTERNATE | [1] The region includes the area between odd-numbered and even-numbered polygon sides on each scan line.


Return for SetRgnCurve

Return Value

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


Return for SetRgnEllipse

Return Value

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


nHeight Parameter For SetRgnEllipse

nHeight

The height of the region's bounding rectangle. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure pixels.


nLeft Parameter For SetRgnEllipse

nLeft

The X coordinate of the origin of the region's bounding rectangle. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nTop Parameter For SetRgnEllipse

nTop

The Y coordinate of the origin of the region's bounding rectangle. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nWidth Parameter For SetRgnEllipse

nWidth

The width of the region's bounding rectangle. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


uCombineMode Parameter For SetRgnEllipse

uCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


hRgn Parameter For SetRgnHandle

hRgn

Handle to the stored region. The handle is returned by the method that stores the region.


Return for SetRgnHandle

Return Value

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


nOffsetX Parameter For SetRgnHandle

nOffsetX

The horizontal distance to offset the region when adding it to the bitmap. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nOffsetY Parameter For SetRgnHandle

nOffsetY

The vertical distance to offset the region when adding it to the bitmap. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


uCombineMode Parameter For SetRgnHandle

uCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


crLowerTolerance Parameter For SetRgnMagicWand

crLowerTolerance

Lower tolerance values that set the lower stopping point for the region.


crUpperTolerance Parameter For SetRgnMagicWand

crUpperTolerance

Upper tolerance values that set the upper stopping point for the region.


Return for SetRgnMagicWand

Return Value

Return | Meaning
SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Error Codes.


uCombineMode Parameter For SetRgnMagicWand

uCombineMode

Flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


x Parameter For SetRgnMagicWand

x

X coordinate of a point. The color of the specified point will be used to set the region.


y Parameter For SetRgnMagicWand

y

Y coordinate of a point. The color of the specified point will be used to set the region.


Return for SetRgnPolygon

Return Value

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


uCombineMode Parameter For SetRgnPolygon

uCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


uFillMode Parameter For SetRgnPolygon

uFillMode

Flag that indicates how to handle complex crossing lines. The following are valid values, which are illustrated below:

Value | Meaning
L_POLY_WINDING | All pixels that are inside the resulting exterior lines are in the region.
L_POLY_ALTERNATE | The region includes the area between odd-numbered and even-numbered polygon sides on each scan line.


Return for SetRgnRect

Return Value

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


nHeight Parameter For SetRgnRect

nHeight

The height of the bounding rectangle of the region. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nLeft Parameter For SetRgnRect

nLeft

The X coordinate of the origin of the region. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure pixels.


nTop Parameter For SetRgnRect

nTop

The Y coordinate of the origin of the region. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nWidth Parameter For SetRgnRect

nWidth

The width of bounding rectangle of the region. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


uCombineMode Parameter For SetRgnRect

uCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


Return for SetRgnRoundRect

Return Value

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


nHeight Parameter For SetRgnRoundRect

nHeight

The height of the region's bounding rectangle. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure pixels.


nHeightEllipse Parameter For SetRgnRoundRect

nHeightEllipse

The height of the ellipse that describes the arc of the rounded corners. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nLeft Parameter For SetRgnRoundRect

nLeft

The X coordinate of the origin of the region's bounding rectangle. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nTop Parameter For SetRgnRoundRect

nTop

The Y coordinate of the origin of the region's bounding rectangle. Coordinates are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nWidth Parameter For SetRgnRoundRect

nWidth

The width of the region's bounding rectangle. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


nWidthEllipse Parameter For SetRgnRoundRect

nWidthEllipse

The width of the ellipse that describes the arc of the rounded corners. Measurements are unscaled relative to the LEAD bitmap in memory. The unit of measure is pixels.


uCombineMode Parameter For SetRgnRoundRect

uCombineMode

Boolean flag that determines how the added region interacts with the existing region. For possible values, refer to Flags for Setting a Region.


nHeight Parameter For SetRubberBandRect

nHeight

The height of the rubberband.


nLeft Parameter For SetRubberBandRect

nLeft

The X coordinate of the origin of the rubberband.


nTop Parameter For SetRubberBandRect

nTop

The Y coordinate of the origin of the rubberband.


nWidth Parameter For SetRubberBandRect

nWidth

The width of the rubberband.


Return for SetRubberBandRect

Return Value

None.


Bitmap Parameter For SetSelectionBitmap

Bitmap

Handle to a bitmap to use as the selection bitmap


crTransparent Parameter For SetSelectionBitmap

crTransparent

Color value of the transparent color.


iHeight Parameter For SetSrcClipRect

iHeight

The height of the clipping rectangle. The unit of measure is pixels.


iLeft Parameter For SetSrcClipRect

iLeft

The X coordinate of the origin of the clipping rectangle. The position is relative to the bitmap. The unit of measure is pixels.


Return for SetSrcClipRect

Return Value

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


iTop Parameter For SetSrcClipRect

iTop

The Y coordinate of the origin of the clipping rectangle. The position is relative to the bitmap. The unit of measure is pixels.


iWidth Parameter For SetSrcClipRect

iWidth

The width of the clipping rectangle. The unit of measure pixels.


iHeight Parameter For SetSrcRect

iHeight

The height of the source rectangle. The unit of measure is pixels.


iLeft Parameter For SetSrcRect

iLeft

The X coordinate of the origin of the source rectangle.

The position is relative to the bitmap. The unit of measure is pixels.


Return for SetSrcRect

Return Value

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


iTop Parameter For SetSrcRect

iTop

The Y coordinate of the origin of the source rectangle.

The position is relative to the bitmap. The unit of measure is pixels.


iWidth Parameter For SetSrcRect

iWidth

The width of the source rectangle. The unit of measure is pixels.


Return for SetTag

Return Value

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


uCount Parameter For SetTag

uCount

The number of data items, based on the tagged data type. For example, if the buffer size is 16 and the data type is TAG_DOUBLE, the count is 2. vData may actually contain more items than indicated by uCount. If vData contains more than uCount items, the extra items will be ignored.


uTag Parameter For SetTag

uTag

Tag to identify the data in the TIFF file. Generally, you can specify a private tag in the range of 0x8000 to 0xFFFE. However, LEADTOOLS returns an error if you use any of the following registered tags:

Value | Meaning
0x8298 | Copyright comment
0x8769 | General Exif comments
0x8825 | Exif GPS comments

LEADTOOLS does NOT return an error if you set:

Value | Meaning
0x80A4 | Annotation TIFF tag defined as ANNTAG_TIFF.

Note that the tag with index 0 is reserved and will be filled by calling the ReadTag method.


uType Parameter For SetTag

uType

Tagged data type. If vData contains data of a different type than that specified in this parameter, the data in vData will be converted to the type specified here. Valid values are:

Value | Meaning
TAG_BYTE | [1] Byte.
TAG_ASCII | [2] Byte in the range of 0 to 255.
TAG_SHORT | [3] Two bytes, unsigned.
TAG_LONG | [4] Four bytes, unsigned.
TAG_RATIONAL | [5] Eight bytes, used as a pair of unsigned long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_SBYTE | [6] Byte used as signed number in the range of -128 to +127.
TAG_UNDEFINED | [7] Byte, with application-defined usage.
TAG_SSHORT | [8] Two bytes, signed.
TAG_SLONG | [9] Four bytes, signed.
TAG_SRATIONAL | [10] Eight bytes, used as a pair of signed long integers, where the first number is the numerator and the second is the denominator of a fraction.
TAG_FLOAT | [11] Four bytes used as a floating point number.
TAG_DOUBLE | [12] Eight bytes used as a double-precision floating point number.


vData Parameter For SetTag

vData

Array that contains the tag data. The type of data is indicated by iType and the number of items in vData is indicated by lCount.


iChange Parameter For Sharpen

iChange

The amount to change the sharpness. Valid values range from -1000 to + 1000.


Return for Sharpen

Return Value

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


bHorizontal Parameter For Shear

bHorizontal

TRUE for horizontal shear, or FALSE for vertical shear.


crFill Parameter For Shear

crFill

The fill color.

If the image is 8 bits per pixel or less, the color comes from the current palette, and it may not exactly match the specified color.

You can specify a COLORREF value (the return value of the RGB macro), or you can specify a palette index as explained in Using Palette Indexes As Color Values.


iAngle Parameter For Shear

iAngle

The angle of slant. Positive values are for clockwise angles; negative values are for counterclockwise angles. The angle is expressed in hundredths of degrees, with a limit of 4500 (45 degrees).


Return for Shear

Return Value

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


bShowMagGlass Parameter For ZoomToRect ShowMagGlass

bShowMagGlass

Flag that indicates whether to show or hide the Magnifying Glass. Possible values are:

Value | Meaning
TRUE | Show the Magnifying Glass.
FALSE | Hide the Magnifying Glass.


Return for ShowMagGlass

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bShow Parameter For ShowPanWin

bShow

Specifies whether to show PanWindow.

Setting | Description
TRUE | Show the PanWindow.
FALSE | Hide the PanWindow.


Return for ShowPanWin

Return Value

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


iFlags Parameter For Size

iFlags

Possible values are:

Value | Meaning
SIZE_NORMAL | Use the normal resizing method.
SIZE_RESAMPLE | Resize the bitmap, using interpolation and averaging to produce a higher-quality image than is achieved with normal resizing.
SIZE_FAVORBLACK | (Document/Medical only) Preserve black objects when making the image smaller. This option affects only 1-bit, black-and-white images, where it prevents the disappearance of thin lines. You can use a plus (+) operator to combine this flag with another one. For example, SIZE_RESAMPLE Or SIZE_FAVORBLACK causes color images to be resampled, but applies the favor-black option to 1-bit, black-and-white images.


iHeight Parameter For Size

iHeight

New height in pixels.


Return for Size

Return Value

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


iWidth Parameter For Size

iWidth

New width in pixels.


Return For Smooth

Return Value

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


nLength Parameter for Smooth

nLength

Length of the bump (or nick) to remove (or fill). All bumps and nicks less than or equal to this size are processed. This value is in pixels.


uProcessFlags Parameter For Smooth

uProcessFlags

Flags that determine the behavior of the smoothing process. Flags may be combined using a bitwise OR . Possible values are:

Value | Meaning
SMOOTH_SINGLE_REGION: | For each bump or nick found by the Smooth method, if the DocCleanSuccess property is set to SUCCESS_REMOVE in the Smooth event, the removed bump or nick is added to an internal single region. If the DocCleanSuccess property is set to SUCCESS_NOREMOVE, the bump or nick is not added to the single region. When the Smooth method returns, either the DocCleanBitmap property or the hDocCleanRgn property will reference a region that contains all the removed bumps or nicks. If SMOOTH_LEAD_REGION is also set, the DocCleanBitmap will be updated with a bitmap that has a LEAD region that contains all the removed bumps or nicks. If SMOOTH_LEAD_REGION is not set, the hDocCleanRgn property is set to a Windows region that contains all the removed nicks or bumps. When the region (either LEAD or Windows) is no longer needed, it must be destroyed.
SMOOTH_LEAD_REGION | When the Smooth method returns, the DocCleanBitmap property is updated with a copy of the bitmap that also contains a region with all the removed bumps or nicks. This flag must be used in conjunction with SMOOTH_SINGLE_REGION. To use this flag set uProcessFlags to SMOOTH_SINGLE_REGION | SMOOTH_LEAD_REGION. The DocCleanBitmap property will be updated when the Smooth method returns.
SMOOTH_IMAGE_UNCHANGED | The original image is unchanged.
SMOOTH_FAVOR_LONG | Processes long bumps or nicks before short bumps or nicks. If this flag is not passed, short is favored over long. For example:

Smooth the following image with nLength == 3

X X

XXXXXXXXXX

Favoring short would remove the two "bumps" giving:

XXXXXXXXXX

Favoring long would fill in the "gap" giving:

XXXXX

XXXXXXXXXX


Return for Solarize

Return Value

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


uThreshold Parameter For Solarize

uThreshold

Threshold at or above which colors are to be inverted. The valid range is 0-255.


bAscending Parameter For Sort

bAscending

Flag indicating direction of the sort.

Value | Meaning
True | sort in ascending order
False | sort in descending order


bAscending Parameter For SortExt

bAscending

Flag that indicates whether to sort the items in the ImageList Control in ascending order. Possible values are:

Value | Meaning
TRUE | Sort the items in the ImageList Control in ascending order.
FALSE | Sort the items in the ImageList Control in descending order.


bCaseSensitive Parameter For SortExt

bCaseSensitive

Flag that indicates whether to sort the items in the ImageList Control with case sensitivity. Possible values are:

Value | Meaning
TRUE | Sort the items in the ImageList Control with case sensitivity.
FALSE | Sort the items in the ImageList Control with case insensitivity.


bUseExtText Parameter For SortExt

bUseExtText

Flag that indicates whether to sort the items in the ImageList Control based on their pTextExt attribute. Possible values are:

Value | Meaning
TRUE | Sort the items in the ImageList Control based on their TextExt attribute referenced in by the TextExt property in the Item property (ImageList Control).
FALSE | Sort the items in the ImageList Control based on their Text attribute referenced in by the TextExt property in the Item property (ImageList Control).


Return for SortExt

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For SortExt

uFlags

Reserved for future use. Pass 0.


Return for Sort

Return Value

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


Return for SpatialFilter

Return Value

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


iType Parameter For SpatialFilter

iType

Refer to List of Spatial Filters.


uIndex Parameter For STable

uIndex

The index into the array. The first element of the array is 0. The values present in this array are Saturation values used to remap an image.


iBitsPerPixel Parameter For StartFeedLoad

iBitsPerPixel

Resulting bitmap pixel depth. The following are valid values:

Value | Meaning
0 | Keep the original file's pixel depth (Do not convert).
1 | 1 bit per pixel in the resultant bitmap
4 | 4 bits per pixel in the resultant bitmap
8 | 8 bits per pixel in the resultant bitmap
12 | 12 bits per pixel in the resultant bitmap
16 | 16 bits per pixel in the resultant bitmap
24 | 24 bits per pixel in the resultant bitmap
32 | 32 bits per pixel in the resultant bitmap


Return for StartFeedLoad

Return Value

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


iPage Parameter For StartFeedLoad

iPage

The page number (for multipage files) that contains the first image to be loaded.

If the file is not a multipage file, pass 0.


iPages Parameter For StartFeedLoad

iPages

The number of pages to load. If the file is not a multipage file, pass 1.


b3D Parameter For StartMagGlass

b3D

Flag that indicates whether the border of a rectangular magnifying glass appears as 3D or flat. This value is valid only if bEllipse is FALSE. Possible values are:

Value | Meaning
TRUE | The rectangular magnifying glass appears with a 3D border.
FALSE | The rectangular magnifying glass appears with a flat border.


bCenter Parameter For StartMagGlass

bCenter

Flag that indicates how to center the magnified area. Possible values are:

Value | Meaning
TRUE | The zoomed rectangle is centered on the center of the pixel at the center of the magnifying glass.
FALSE | The zoomed rectangle is centered on the top, left corner of the pixel at the center of the magnifying glass.


bEllipse Parameter For StartMagGlass

bEllipse

Flag that indicates the shape of the magnifying glass. Possible values are:

Value | Meaning
TRUE | The magnifying glass is an Ellipse
FALSE | The magnifying glass is a Rectangle


bIgnoreRgn Parameter For StartMagGlass

bIgnoreRgn

Flag that indicates whether to magnify only the region in the source bitmap, or to ignore it. Quietly Possible values are:

Value | Meaning
TRUE | Ignore any existing regions within the source bitmap.
FALSE | Magnify only the region within the source bitmap. Data outside the region will be replaced with the color in clrBack.


clrBack Parameter For StartMagGlass

clrBack

The color to use for painting areas not covered by the zoomed image. (i.e. When the magnifying glass is not completely over the image.)


clrPen Parameter For StartMagGlass

clrPen

The color for the border of the magnifying glass.

This is ignored when bEllipse = FALSE and b3D = TRUE.


Return for StartMagGlass

Return Value

Value | Meaning
SUCCESS | The function was successful.
<=0 | An error occurred. Refer to Error Codes.


nBorderSize Parameter For StartMagGlass

nBorderSize

The size of the magnifying glass border in pixels. This value is ignored when bEllipse = FALSE and b3D = TRUE. In this case the magnifying glass appears as a rectangle with a 3D border. The 3D border has a thickness of 2 pixels, one pixel for the highlight color and one for the shadow color.


nCrosshair Parameter For StartMagGlass

nCrosshair

Specifies the type of crosshair. Possible values are:

Value | Meaning
CROSSHAIR_NONE | [0] No Crosshair
CROSSHAIR_FINE | [1] The crosshair is one pixel wide and uses the color in clrPen
CROSSHAIR_INVERTPEN | [2] The crosshair is three pixels wide. The center pixel uses the color in clrPen. The outer pixels use the inverse of the color in clrPen.
CROSSHAIR_INVERTSCREEN | [3] The crosshair is three pixels wide. The center pixel uses the color in clrPen. The outer pixels use the inverse of the screen color.


nHeight Parameter For StartMagGlass

nHeight

The height of the magnifying glass. Minimum size is 10 pixels.


nWidth Parameter For StartMagGlass

nWidth

The width of the magnifying glass. Minimum size is 10 pixels.


nZoom Parameter For StartMagGlass

nZoom

The zoom factor for the Magnification, in percentage. This value must be >= 100. For example, to zoom the image 2X, specify 200 for nZoom.


Return for StopFeedLoad

Return Value

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


Return for StretchIntensity

Return Value

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


Return for SwapColors

Return Value

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


nFlags Parameter For SwapColors

nFlags

Flag that indicates which color channels to swap. Possible values are:

Value | Meaning
SWAP_RG | Swap the red and green channels. (Change red to green and green to red.)
SWAP_RB | Swap the red and blue channels. (Change red to blue and blue to red.)
SWAP_GB | Swap the green and blue channels. (Change green to blue and blue to green.)
SWAP_RGBR | Change red to green, green to blue and blue to red.
SWAP_RBGR | Change red to blue, blue to green and green to red.


Bitmap Parameter For ThumbnailEvent

Bitmap

The bitmap handle of the generated thumbnail.

This is only valid when nStatus is equal to 0.


pszFilename Parameter For ThumbnailEvent

FileName

Character string containing the name of the file that is being loaded or for which the thumbnail was generated.


nPercent Parameter For ThumbnailEvent

nPercent

When nStatus is BROWSE_LOADING, this indicates the percentage completion of the current file load operation.


nStatusCode Parameter For ThumbnailEvent

nStatusCode

This is the status code for the browse operation. This indicates success or failure when browsing for files and generating thumbnails.

This can be any of the following

Return | Meaning
0 | The function was successful.
BROWSE_LOADING | [2] Indicates the file is being loaded
BROWSE_SKIPPED | [3] Indicates the file was skipped because it exceeded the specified size range
any other value | An error occurred. Refer to Error Codes.


Return for TransformFile

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


iTransform Parameter For TransformFile

iTransform

Flags that indicate the transform to be performed. Possible values are:

Value | Meaning
FILE_TRANSFORM_FLIP | [$0001] Flip the image.
FILE_TRANSFORM_REVERSE | [$0002] Reverse the image.
FILE_TRANSFORM_ROTATE90 | [$0004] Rotate the image clockwise by 90 degrees.
FILE_TRANSFORM_ROTATE180 | [$0008] Rotate the image clockwise by 180 degrees.
FILE_TRANSFORM_ROTATE270 | [$000C] Rotate the image clockwise by 270 degrees.


nPage Parameter For TransformFile

nPage

Number of the page to transform. This is used only for multi-page files. Pass 1 to rotate the first page of the file.


szNameDst Parameter For TransformFile

szNameDst

Character string containing the name of the output file. This can be the same as the input file. If this parameter is NULL or "", then the name of the output file is the same as the input file.


szNameSrc Parameter For TransformFile

szNameSrc

Character string containing the name of the input file.


Return for Trim

Return Value

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


nHeight Parameter For Trim

nHeight

The height of the rectangle. The unit of measure is pixels.


nLeft Parameter For Trim

nLeft

The X coordinate of the origin of the rectangle.

The position is relative to the current bitmap. The unit of measure is pixels.


nTop Parameter For Trim

nTop

The Y coordinate of the origin of the rectangle.

The position is relative to the current bitmap. The unit of measure is pixels.


nWidth Parameter For Trim

nWidth

The width of the rectangle. The unit of measure is pixels.


Bitmap Parameter For Underlay

Bitmap

The Main Control's bitmap to use as the underlying image. This is the image that appears to be on bottom and is grayscaled as it is combined with the target image.


Return for Underlay

Return Value

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


uFlags Parameter For Underlay

uFlags

Indicators of how the underlying image is to be positioned. Valid values are:

Value | Meaning
UB_TILE | Tile the underlay. This repeats the underlying image, so that it fills the target image. This method does not do any resizing; you are responsible for the size of the tiles.
UB_STRETCH | Stretch the underlay to fit the dimensions of the target image.


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_1D_SILVER | Support for reading and writing Linear bar codes silver module. This is available in the LEADTOOLS 1D Silver 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_BARCODES_QR_READ | Support for reading QR bar codes. This is available in the LEADTOOLS 2D QR Module (read).
L_SUPPORT_BARCODES_QR_WRITE | Support for writing QR bar codes. This is available in the LEADTOOLS 2D QR 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. This support is also unlocked using L_SUPPORT_DOCUMENT, L_SUPPORT_MEDICAL or L_SUPPORT_MEDICAL_NET.
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

sKey

The key to unlock the feature.


Key Parameter For UnlockSupport

Key

The key to unlock the feature.


sPass Parameter For UnlockSupport

sPass

The key to unlock the feature.


Return for UnlockSupport

Return Value

None.


Return for UnSharpMask

Return Value

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


nAmount Parameter For UnSharpMask

nAmount

Value that represents an adjustment factor. This is a percentage.


nRadius Parameter For UnSharpMask

nRadius

Value that indicates the size of the neighborhood used for blurring each pixel of the bitmap.


nThreshold Parameter For UnSharpMask

nThreshold

Value that indicates the threshold for modifying the original value of the pixel. If the difference in the original pixel value and the blurred pixel value is greater than the threshold value, the original pixel value will be modified.


uColorType Parameter For UnSharpMask

uColorType

Flag that indicates the color space in which to apply the mask. Possible values are:

Value | Meaning
RGB_SPACE | [$0001] Apply the mask in the RGB color space.
YUV_SPACE | [$0002] Apply the mask in the YUV color space.


Bitmap Parameter For UpdateMagGlassFromHandle

Bitmap

A LEAD bitmap handle that references the bitmap that the Magnifying Glass will display in the zoomed area.


bUpdateBitmap Parameter For UpdateMagGlassFromHandle

bUpdateBitmap

Flag that indicates whether to update the Main Control’s bitmap or not. Possible values are:

Value | Meaning
TRUE | Update the Main Control’s bitmap.
FALSE | Do not update the Main Control’s bitmap.


Return for UpdateMagGlassFromHandle

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hMagGlassRgn Parameter For UpdateMagGlassShape

hMagGlassRgn

Handle to a region that defines the Magnifying Glass shape. This parameter is used only if the nMagGlassShape parameter is MAGGLASS_SHAPE_HRGN.


Return for UpdateMagGlassShape

Return Value

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


nMagGlassShape Parameter For UpdateMagGlassShape

nMagGlassShape

Flags that indicate the magnifying glass shape. Possible values are:

Value | Meaning
MAGGLASS_SHAPE_RECT | [0] Rectangle shape of Magnifying Glass.
MAGGLASS_SHAPE_ELLIPSE | [1] Ellipse shape of Magnifying Glass.
MAGGLASS_SHAPE_HRGN | [2] User-defined shape of Magnifying Glass.


iIndex Parameter For UserLUTCurveX

iIndex

The index into the array of points.


iIndex Parameter For UserLUTCurveY

iIndex

The index into the array of points.


iIndex Parameter For UserPalette

iIndex

The index into the array of colors.


uIndex Parameter For VTable

uIndex

The index into the array. The first element of the array is 0. The short values present in this array are Values used to remap an image.


bInside Parameter For WindowLevelFillLUT

bInside

Flag that indicates which pixel value range to window level. Possible values are:

Value | Meaning
TRUE | Window level the range between nLow and nHigh.
FALSE | Window level the ranges less than nLow and greater than nHigh.


crEnd Parameter For WindowLevelFillLUT

crEnd

The ending color.


crStart Parameter For WindowLevelFillLUT

crStart

The starting color.


Return for WindowLevelFillLUT

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nHigh Parameter For WindowLevelFillLUT

nHigh

The highest grayscale value to window level.


nHighBit Parameter For WindowLevelFillLUT

nHighBit

High-bit value.


nLow Parameter For WindowLevelFillLUT

nLow

The lowest grayscale value to window level.


nLowBit Parameter For WindowLevelFillLUT

nLowBit

Low-bit value.


nMaxValue Parameter For WindowLevelFillLUT

nMaxValue

The highest grayscale value in the image.


nMinValue Parameter For WindowLevelFillLUT

nMinValue

The lowest grayscale value in the image.


Return for WindowLevel

Return Value

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


Return for WriteComment

Return Value

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


lPage Parameter For WriteComment

lPage

Number of the page within the specified file on which to write the comments. The first page is page 1. The specified page must exist. If the page does not exist, an error will be returned.


pszFile Parameter For WriteComment

pszFile

String that contains the name of the file in which to write the comment(s).


iMarker Parameter For WriteMarker

iMarker

ID of the JPEG marker to write. The JPEG markers are uniquely identified by a byte value. Possible values are 1 to 254. (0 and 255 are not allowed.) This can be the same value that was passed to the OnTransformMarker event.


Return for WriteMarker

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


lSize Parameter For WriteMarker

lSize

Size of the JPEG marker. The size will be less than 65535. If this value is 0, then the marker does not have any extra data. If the value is greater than 0, the extra data is taken from pData.


pData Parameter For WriteMarker

pData

Pointer to the marker data to write. The size of this data is indicated in lSize.


Return for WriteTag

Return Value

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


lPage Parameter For WriteTag

lPage

Number of the page within the specified file on which to write the tag(s). The first page is page 1. The specified page must exist. If the page does not exist, an error will be returned.


pszFile Parameter For WriteTag

pszFile

String that contains the name of the file in which to write the tag(s). Please note that this file must exist.


Return for ZoomIn

Return Value

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


Return for ZoomToRect

Return Value

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


nHeight Parameter For ZoomToRect

nHeight

The height of the rectangle in the Main Control's client area.


nLeft Parameter For ZoomToRect

nLeft

The X coordinate of the origin of the rectangle in the Main Control's client area


nTop Parameter For ZoomToRect

nTop

The Y coordinate of the origin of the rectangle in the Main Control's client area.


nWidth Parameter For ZoomToRect

nWidth

The width of the rectangle in the Main Control's client area.


Return for AddMessage

Return Value

Return | Meaning
SUCCESS | The method was successful.
< 1 | An error occurred. Refer to Error Codes.


ptStart Parameter For AddMessage

ptStart

The point at which the message will be added to the image.


strFileName Parameter For AddMessage

strFileName

String that contains the file name that will be added to an image.

When adding a message to a bitmap this parameter refers to the name of the file that will be added, and the strMsg parameter must be ‘’ for Delphi or NULL for C++ Builder, otherwise this parameter has no effect.


strMsg Parameter For AddMessage

strMsg

String that contains the text to be added to an image. If you want to add a file, set this string to ‘’ for Delphi or NULL for C++ Builder.


strPassword Parameter For AddMessage

strPassword

String that contains the password to be used when adding the message to the bitmap. To use the default password set this parameter to ‘’ for Delphi or NULL for C++ Builder. The default password is "LEAD Technologies".


hList Parameter For AddWeightedBitmaps

hList

Handle to the list of bitmaps.


Return for AddWeightedBitmaps

Return Value

Return | Meaning
SUCCESS | The method was successful.
<= 1 | An error occurred. Refer to Error Codes.


puFactor Parameter For AddWeightedBitmaps

puFactor

Array of unsigned integer values that represent weights associated with the bitmaps in the specified list. Used only if uFlag is BC_ADDWEIGHTED or BC_AVGWEIGHTED.


uFlag Parameter For AddWeightedBitmaps

uFlag

Flag that indicates the operation to perform. Possible values are:

Value | Meaning
BC_AVG | [$0001] Average the bitmaps in the specified list.
BC_ADD | [$0002] Add the bitmaps in the specified list.
BC_AVGWEIGHTED | [$0003] Average the bitmaps in the specified list, according to the array of weight factors, puFactor.
BC_ADDWEIGHTED | [$0004] Add the bitmaps in the specified list, according to the array of weight factors, puFactor.


hObject Parameter for AnnAddUserHandle

hObject

Handle to the annotation object.


Return for AnnAddUserHandle

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


dAnchorX Parameter for AnnAdjustPoint

dAnchorX

Value that represents the X coordinate of the anchor point.


dAnchorY Parameter for AnnAdjustPoint

dAnchorY

Value that represents the Y coordinate of the anchor point.


dAngle Parameter for AnnAdjustPoint

dAngle

Angle of rotation in radians. Ranges from -Pi to Pi, (-3.1415… - 3.1415) where a positive angle corresponds to clockwise rotation.


dMoveX Parameter for AnnAdjustPoint

dMoveX

Value that represents the X coordinate of the point to be adjusted.


dMoveY Parameter for AnnAdjustPoint

dMoveY

Value that represents the Y coordinate of the point to be adjusted.


Return for AnnAdjustPoint

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nType Parameter for AnnAdjustPoint

nType

Type of adjustment to the point. Possible values are:

ANNADJUST_HORIZONTAL | [1]
ANNADJUST_VERTICAL | [2]
ANNADJUST_45_DEGREES_FAVOR_X | [3]
ANNADJUST_45_DEGREES_FAVOR_Y | [4]


hObject Parameter For AnnBringToFront

hObject

Handle to the annotation object.


Return for AnnBringToFront

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnChangeUserHandle

hObject

Handle to the annotation object.


Return for AnnChangeUserHandle

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uIndex Parameter for AnnChangeUserHandle

uIndex

Index of the user handle to change. The index is zero based.


Return for AnnClearTextTokenTable

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hContainer Paremeter for AnnConvert

hContainer

Handle to the annotation container object.


Return for AnnConvert

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nConvert Paremeter for AnnConvert

nConvert

A value that specifies the direction of the conversion. Possible values are:

Value | Meaning
ANNCONVERT_TO_CONTAINER | [1] Convert to container coordinates.
ANNCONVERT_TO_CLIENT | [2] Convert to client coordinates.


dX Parameter for AnnDefine2

dX

X coordinate of the point specified in the call to this method. This X coordinate is in container coordinates.


dY Parameter for AnnDefine2

dY

Y coordinate of the point specified in the call to this method. This Y coordinate is in container coordinates.


hObject Parameter for AnnDefine2

hObject

Handle to the annotation object.


Return for AnnDefine2

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uState Parameter for AnnDefine2

uState

Value that represents the state of the process of modifying the annotation object. Possible values are:

Value | Meaning
ANNDEFINE_SETANCHORPOINT | [13] This is an anchor point. Use this value when rotating an annotation object around a point other than its center. When doing this, call AnnDefine2 with this flag set prior to calling AnnDefine2 with the ANNDEFINE_BEGINROTATE flag set.
ANNDEFINE_BEGINMOVEPOINT | [11] This is a starting point, used when moving one point on an annotation object. This can be used to move a single point on any of the following annotation objects:
 | ANNOBJECT_LINE
 | ANNOBJECT_POLYLINE
 | ANNOBJECT_POLYGON
 | ANNOBJECT_POINTER
 | ANNOBJECT_FREEHAND
 | ANNOBJECT_FREEHANDHOTSPOT
 | ANNOBJECT_RULER
 | ANNOBJECT_CROSSPRODUCT
 | ANNOBJECT_PROTRACTOR
 | ANNOBJECT_CURVE
 | ANNOBJECT_CURVECLOSED
 | You can use ANNDEFINE_BEGINMOVEPOINT to perform a simultaneous rotate and resize for the following objects:
 | (Note that you must set an anchor point prior to using ANNDEFINE_BEGINMOVEPOINT)
 | ANNOBJECT_RECT
 | ANNOBJECT_ELLIPSE
 | ANNOBJECT_HILITE
 | ANNOBJECT_REDACT
 | ANNOBJECT_TEXT
 | ANNOBJECT_NOTE
 | ANNOBJECT_STAMP
 | ANNOBJECT_HOTSPOT


cToken Parameter for AnnDeleteTextTokenTable

cToken

Character representing the token to delete from the text token table. For example, to delete token "#c" from the text token table, pass ‘c’ for cToken.


Return for AnnDeleteTextTokenTable

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter for AnnDeleteUserHandle

hObject

Handle to the annotation object.


Return for AnnDeleteUserHandle

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uIndex Parameter for AnnDeleteUserHandle

uIndex

Index of the user handle to delete. The index is zero based.


uIndex Parameter for AnnDistance

uIndex

Index into the array of length values. The index is zero based.


hObject Parameter for AnnEncryptApply

hObject

Handle to the annotation object.


Return for AnnEncryptApply

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uEncryptFlags Parameter for AnnEncryptApply

uEncryptFlags

Flags that determine which objects to apply. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR ( | ). The following are valid values:

Value | Meaning
ANNENCRYPTAPPLY_ENCRYPTOR | [$001] Apply encryptor objects.
ANNENCRYPTAPPLY_DECRYPTOR | [$002] Apply decryptor objects.
ANNAPPLYENCRYPT_BOTH | [$003] Apply both encryptor and decryptor objects.


hObject Parameter for AnnEnumerateHandles

hObject

Handle to the annotation object.


Return for AnnEnumerateHandles

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter For AnnGetArea

hObject

Handle to the annotation object from which to get the pixel count.


Return for AnnGetArea

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uArea Parameter For AnnGetArea

uArea

Unsigned variable to be updated with the object's pixel count.


hObject Parameter for AnnGetDistance2

hObject

Handle to the annotation automation object.


Return for AnnGetDistance2

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter For AnnGetFillPattern

hObject

Handle to the annotation object.


Return for AnnGetFillPattern

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFillPattern Parameter For AnnGetFillPattern

uFillPattern

Unsigned variable to be updated with the object's fill pattern constant. Possible values are:

Value | Meaning
ANNFILLPATTERN_SOLID | [0] Solid
ANNFILLPATTERN_BDIAGONAL | [1] Backward diagonal
ANNFILLPATTERN_CROSS | [2] Cross
ANNFILLPATTERN_DIAGCROSS | [3] Diagonal cross
ANNFILLPATTERN_FDIAGONAL | [4] Forward diagonal
ANNFILLPATTERN_HORIZONTAL | [5] Horizontal
ANNFILLPATTERN_VERTICAL | [6] Vertical


dLength Parameter For AnnGetGaugeLength

dLength

Double variable to be updated by the object's gauge length.

Length is expressed in pixels, not in points. The length is for the whole line, not just from the end point of the ruler to the end point of the gauge - it is from one end of the gauge to the other end of the gauge.


hObject Parameter For AnnGetGaugeLength

hObject

Handle to the annotation automation object.


Return for AnnGetGaugeLength

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter For AnnGetLineStyle

hObject

Handle to the annotation object.


Return for AnnGetLineStyle

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uLineStyle Parameter For AnnGetLineStyle

uLineStyle

Unsigned variable to be updated with the annotation object's current line style. Possible line style values are:

Value | Meaning
ANNLINE_SOLID | [0] Solid line
ANNLINE_DASH | [1] Dashed line
ANNLINE_DOT | [2] Dotted line
ANNLINE_DASHDOT | [3] Dash dot line
ANNLINE_DASHDOTDOT | [4] Dash dot dot line
ANNLINE_NULL | [5] No line

Note:

Windows displays all lines greater than 1 pixel as solid.

To see the possible line styles, refer to Illustration of Line Styles for Annotations.


dLineWidth Parameter for AnnGetLineWidth

dLineWidth

Variable to be updated with the annotation object's current line width.


hObject Parameter for AnnGetLineWidth

hObject

Handle to the annotation object.


Return for AnnGetLineWidth

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


dOffsetX Parameter For AnnGetOffsetX

dOffsetX

Double variable to be updated with the annotation object's X offset.


hObject Parameter For AnnGetOffsetX

hObject

Handle to the annotation object.


Return for AnnGetOffsetX

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


dOffsetY Parameter For AnnGetOffsetY

dOffsetY

Double variable to be updated with the annotation object's X offset.


hObject Parameter For AnnGetOffsetY

hObject

Handle to the annotation object.


Return for AnnGetOffsetY

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter For AnnGetPolyFillMode

hObject

Handle to the annotation object.


Return for AnnGetPolyFillMode

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uPolyFillMode Parameter For AnnGetPolyFillMode

uPolyFillMode

Unsigned variable to be updated with a value that indicates the polygonal fill-mode. Possible values are:

Value | Meaning
ANNPOLYFILLMODE_WINDING | [0] All pixels that are inside the resulting exterior lines are filled.
ANNPOLYFILLMODE_ALTERNATE | [1] The filled area includes the area between odd-numbered and even-numbered polygon sides on each scan line.


dScalarX Parameter For AnnGetScalarX

dScalarX

Double variable to be updated with the horizontal scaling factor.


hContainer Parameter For AnnGetScalarX

hContainer

Handle to the annotation object.


Return for AnnGetScalarX

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


dScalarY Parameter For AnnGetScalarY

dScalarY

Double variable to be updated with the vertical scaling factor.


hContainer Parameter For AnnGetScalarY

hContainer

Handle to the annotation object.


Return for AnnGetScalarY

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


hObject Parameter For AnnGetUnit

hObject

Handle to the annotation automation object.


Return for AnnGetUnit

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


strUnitAbbrev Parameter For AnnGetUnit

strUnitAbbrev

Character string to be updated with the unit abbreviation string to be displayed after the distance.


uPrecision Parameter For AnnGetUnit

uPrecision

Unsigned variable to be updated with the number of digits to be displayed after the decimal place.


uUnit Parameter For AnnGetUnit

uUnit

Unsigned variable to be update by the object's unit of measurement. Possible values are:

Value | Meaning
ANNUNIT_INCH | [$0000] inches
ANNUNIT_FEET | [$0001] feet
ANNUNIT_YARDS | [$0002] yards
ANNUNIT_MICROMETERS | [$0003] micrometers
ANNUNIT_MILIMETERS | [$0004] millimeters
ANNUNIT_CENTIMETERS | [$0005] centimeters
ANNUNIT_METERS | [$0006] meters
ANNUNIT_TWIPS | [$0007] twips
ANNUNIT_POINTS | [$0008] points
ANNUNIT_PIXELS | [$0009] pixels


hObject Parameter for AnnGetUserHandles

hObject

Handle to the annotation object.


Return for AnnGetUserHandles

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


dX Paremeter for AnnHitTestExt

dX

X coordinate of the point to test. Coordinates are relative to the associated window's client area.


dY Paremeter for AnnHitTestExt

dY

Y coordinate of the point to test. Coordinates are relative to the associated window's client area.


hContainer Paremeter for AnnHitTestExt

hContainer

Handle to the container object that sets the scope of the search.


Return for AnnHitTestExt

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


Return for AnnInsertTextTokenTable

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


Return for AnnIsFixedRect

Return Value

Return | Meaning
TRUE | There is a fixed annotation object in the client area.
FALSE | There are no fixed annotation objects in the client area.


hObject Parameter for AnnIsFixedRect

hObject

Handle to the annotation object for which to get or set this property.


nBottom Parameter for AnnIsFixedRect

nBottom

Bottom boundary of the rectangle representing the client area of a window.


nLeft Parameter for AnnIsFixedRect

nLeft

Left boundary of the rectangle representing the client area of a window.


nRight Parameter for AnnIsFixedRect

nRight

Right boundary of the rectangle representing the client area of a window.


nTop Parameter for AnnIsFixedRect

nTop

Top boundary of the rectangle representing the client area of a window.


hObject Parameter for AnnPopFixedState

hObject

Handle of the annotation object.


Return for AnnPopFixedState

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


uType Paremeter for AnnPredefinedBitmap

uType

Value that indicates the bitmap to retrieve. Possible values are:

Value | Meaning
ANNBITMAP_POINT | [0] Predefined metafile for an annotation point object.


hObject Parameter for AnnPushFixedState

hObject

Handle of the annotation object.


Return for AnnPushFixedState

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


bRestrictClient Parameter for AnnRestrictCursor

bRestrictClient

Flag that specifies whether the cursor is restricted to the client window. Possible values are:

Value | Meaning
TRUE | Restrict the cursor to the client window.
FALSE | Do not restrict the cursor to the client window.


dX Parameter for AnnRestrictCursor

dX

The X coordinate of the point around which the rectangle is centered.


dY Parameter for AnnRestrictCursor

dY

The Y coordinate of the point around which the rectangle is centered.


hContainer Parameter for AnnRestrictCursor

hContainer

Handle to the container object.


Return for AnnRestrictCursor

Return Value

Return | Meaning
SUCCESS | The function was successful.
<1 | An error occurred. Refer to Error Codes.


nBottom Parameter for AnnRestrictCursor

nBottom

Value that represents the bottom boundary of the rectangle within which the cursor is restricted .


nLeft Parameter for AnnRestrictCursor

nLeft

Value that represents the left boundary of the rectangle within which the cursor is restricted.


nRight Parameter for AnnRestrictCursor

nRight

Value that represents the right boundary of the rectangle within which the cursor is restricted.


nTop Parameter for AnnRestrictCursor

nTop

Value that represents the top boundary of the rectangle within which the cursor is restricted .


hObject Parameter for AnnRestrictToContainer

hObject

Handle of the annotation object for which to get or set this property.


hObject Parameter for AnnRotateAngle

hObject

Handle of the annotation object for which to get the rotation angle.


hObject Parameter for AnnRTFText

hObject

Handle to the annotation object for which to get or set this property.


uFormat Parameter for AnnRTFText

uFormat

Value that specifies the text format type. Possible values are:

Value | Meaning
RTF_FORMAT_TEXT | [0x0001] Retrieve the text as unformatted text.
RTF_FORMAT_RTF | [0x0002] Retrieve the text as rich text.


uIndex Parameter for AnnRulerUnit

uIndex

Index into the array of unit constants. The index is zero based.


hObject Parameter For AnnSendToBack

hObject

Handle to the annotation object.


Return for AnnSendToBack

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnSetFillPattern

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetFillPattern

hObject

Handle to the annotation object.


Return for AnnSetFillPattern

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFillPattern Parameter For AnnSetFillPattern

uFillPattern

The constant that specifies the fill pattern. Possible fill pattern values are:

Value | Meaning
ANNFILLPATTERN_SOLID | [0] Solid
ANNFILLPATTERN_BDIAGONAL | [1] Backward diagonal
ANNFILLPATTERN_CROSS | [2] Cross
ANNFILLPATTERN_DIAGCROSS | [3] Diagonal cross
ANNFILLPATTERN_FDIAGONAL | [4] Forward diagonal
ANNFILLPATTERN_HORIZONTAL | [5] Horizontal
ANNFILLPATTERN_VERTICAL | [6] Vertical

To see the possible fill modes and patterns, refer to Illustration of Fill Options for Annotations.


bSelected Parameter For AnnSetGaugeLength

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


dGaugeLength Parameter For AnnSetGaugeLength

dGaugeLength

The new length of the ruler object's gauge.


hObject Parameter For AnnSetGaugeLength

hObject

Handle to the annotation automation object.


Return for AnnSetGaugeLength

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnSetLineStyle

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetLineStyle

hObject

Handle to the annotation object.


Return for AnnSetLineStyle

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uLineStyle Parameter For AnnSetLineStyle

uLineStyle

The constant that specifies the line style. Possible values are:

Value | Meaning
ANNLINE_SOLID | [0] Solid line
ANNLINE_DASH | [1] Dashed line
ANNLINE_DOT | [2] Dotted line
ANNLINE_DASHDOT | [3] Dash dot line
ANNLINE_DASHDOTDOT | [4] Dash dot dot line
ANNLINE_NULL | [5] No line
Note: | Windows displays all lines greater than 1 pixel as solid.

To see the possible line styles, refer to Illustration of Line Styles for Annotations.


bSelected Parameter For AnnSetOffsetX

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.
Note: | Normally, you set this parameter only on the root container. The flag is included only to give you the same level of control as with other properties.


dOffsetX Parameter For AnnSetOffsetX

dOffsetX

The new value of the X offset.


hObject Parameter For AnnSetOffsetX

hObject

Handle to the annotation object.


Return for AnnSetOffsetX

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnSetOffsetY

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.
Note: | Normally, you set this parameter only on the root container. The flag is included only to give you the same level of control as with other properties.


dOffsetY Parameter For AnnSetOffsetY

dOffsetY

The new value of the Y offset.


hObject Parameter For AnnSetOffsetY

hObject

Handle to the annotation object.


Return for AnnSetOffsetY

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnSetPolyFillMode

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetPolyFillMode

hObject

Handle to the annotation object.


Return for AnnSetPolyFillMode

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uPolyFillMode Parameter For AnnSetPolyFillMode

uPolyFillMode

The constant that specifies the polygon fill mode. Possible values are:

Value | Meaning
ANNPOLYFILLMODE_WINDING | [0] All pixels that are inside the resulting exterior lines are filled.
ANNPOLYFILLMODE_ALTERNATE | [1] The filled area includes the area between odd-numbered and even-numbered polygon sides on each scan line.


bSelected Parameter For AnnSetScalarX

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.
Note: | Normally, you set this parameter only on the root container. The flag is included only to give you the same level of control as with other properties.


dScalarX Parameter For AnnSetScalarX

dScalarX

The horizontal scaling factor to apply.


hObject Parameter For AnnSetScalarX

hObject

Handle to the annotation object.


Return for AnnSetScalarX

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnSetScalarY

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.
Note: | Normally, you set this parameter only on the root container. The flag is included only to give you the same level of control as with other properties.


dScalarY Parameter For AnnSetScalarY

dScalarY

The vertical scaling factor to apply.


hObject Parameter For AnnSetScalarY

hObject

Handle to the annotation object.


Return for AnnSetScalarY

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bSelected Parameter For AnnSetUnit

bSelected

Flag that indicates whether to process only the selected objects or all objects. Possible values are:

Value | Meaning
TRUE | Process only the selected objects.
FALSE | Process all objects.


hObject Parameter For AnnSetUnit

hObject

Handle to the annotation automation object.


Return for AnnSetUnit

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


strUnitAbbrev Parameter For AnnSetUnit

strUnitAbbrev

Character string containing the unit abbreviation string to be displayed after the distance. Default values are:

Value | Meaning
ANNUNIT_INCHES | "in"
ANNUNIT_FEET | "ft"
ANNUNIT_YARDS | "yd"
ANNUNIT_MICROMETERS | "mm"
ANNUNIT_MILIMETERS | "mm"
ANNUNIT_CENTIMETERS | "cm"
ANNUNIT_METERS | "m"
ANNUNIT_TWIPS | "twips"
ANNUNIT_POINTS | "pt"
ANNUNIT_PIXELS | "pixels"
ANNUNIT_SMART_METRIC | Depends on length
ANNUNIT_SMART_ENGLISH | Depends on length

To get the default abbreviations for the current unit of measurement, add ANNUNIT_DEF_ABBR [$4000] to unit value passed in uUnit. In this case, strUnitAbbrev will be ignored.


uPrecision Parameter For AnnSetUnit

uPrecision

Number of digits to be displayed after the decimal place. Valid values are 0 – 200.


uUnit Parameter For AnnSetUnit

uUnit

The unit of measure of the ruler. Possible values are:

Value | Meaning
ANNUNIT_INCHES | [$0000] inches
ANNUNIT_FEET | [$0001] feet
ANNUNIT_YARDS | [$0002] yards
ANNUNIT_MICROMETERS | [$0003] micrometers
ANNUNIT_MILIMETERS | [$0004] millimeters
ANNUNIT_CENTIMETERS | [$0005] centimeters
ANNUNIT_METERS | [$0006] meters
ANNUNIT_TWIPS | [$0007] twips
ANNUNIT_POINTS | [$0008] points
ANNUNIT_PIXELS | [$0009] pixels
ANNUNIT_SMART_METRIC | [$0010] Smart Metric
ANNUNIT_SMART_ENGLISH | [$0011] Smart English

Any of the above values can also be combined with ANNUNIT_DEF_ABBR [$4000] to restore the default unit abbreviation.


uIndex Parameter for AnnSmartUnit

uIndex

Index into the array of unit constants. The index is zero based.


uIndex Parameter for AnnUserHandle

uIndex

Index into an array of user-defined annotation handles. The index is zero based.


Return for AutoBinary

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


crFill Parameter For Bending

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for Bending

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nValue Parameter For Bending

nValue

Amount of stretching, where positive values stretch the pixels toward edges, and negative values stretch the pixels toward the center. Possible values range from –500 to 500.


ptCenter Parameter For Bending

ptCenter

A TPOINT structure that contains the center of the arc. This is ignored when either BND_HORZ or BND_VERT is set in the uFlags parameter.


uFlags Parameter For Bending

uFlags

Flags that indicate how to handle peripherally exposed areas, how to handle centrally exposed areas and the type of bending. You can use a bit-wise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle peripherally exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate how to handle an exposed center:

Value | Meaning
FILL_ROT | [$0000] Rotate the image inside the arc pattern.
FILL_WOUTROT | [$0010] Fill the exposed center as you would any other exposed area. This is determined by setting the FILL_CLR, FILL_RPT or FILL_NOCHG flags.

This flag is ignored if the nValue is negative.

The following are the flags that indicate how the bitmap is bent:

Value | Meaning
BND_NORM | [$0000] Stretch the image along the vertical and horizontal planes.
BND_HORZ | [$0100] Stretch the image along the horizontal plane.
BND_VERT | [$0200] Stretch the image along the vertical plane.


bTile Parameter For BumpMap

bTile

Boolean flag that indicates whether to use tiling. Possible values are:

Value | Meaning
TRUE | use tiling
FALSE | do not use tiling.


BumpBitmap Parameter For BumpMap

BumpBitmap

The bitmap handle referencing the Bump bitmap.


Return for BumpMap

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAzimuth Parameter For BumpMap

nAzimuth

Value that describes the light source's angular position in the horizontal plane. The valid range is between –360 to 360.


nBright Parameter For BumpMap

nBright

Amount to change the intensity. The intensity ranges from -1000 to 1000. A positive value increases (or lightens) the brightness of the resulting image. A negative value decreases (or darkens) the brightness of the resulting image.


nIntensity Parameter For BumpMap

nIntensity

Amount to change the intensity. The intensity ranges from -1000 to 1000. A positive value increases (or lightens) the brightness of the destination image. A negative value decreases (or darkens) the brightness of the destination image.


nXDst Parameter For BumpMap

nXDst

The X coordinate of the origin of the destination rectangle.


nXOffset Parameter For BumpMap

nXOffset

The X coordinate of the origin of the Bump rectangle.


nYDst Parameter For BumpMap

nYDst

The Y coordinate of the origin of the destination rectangle.


nYOffset Parameter For BumpMap

nYOffset

The Y coordinate of the origin of the Bump rectangle.


pLut Parameter For BumpMap

pLut

Look up table of 256 integers containing lookup values that re-map bump bitmap data.


uDepth Parameter For BumpMap

uDepth

The apparent depth of this three-dimensional effect. Valid values are 0 to 1000, with 500 as normal.


uElevation Parameter For BumpMap

uElevation

Value that describes the light source's angular position in the vertical plane. The valid range is from 0 to 180.


Return for ChannelMix

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nBlueFactorB Parameter For ChannelMix

nBlueFactorB

The percentage of the blue color value values to use for redistributing the bitmap's blue values. Valid values are –200 to 200.


nBlueFactorConstant Parameter For ChannelMix

nBlueFactorConstant

The color value that should be added to the whole image to use for redistributing the bitmap's blue values. Valid values are –200 to 200.


nBlueFactorG Parameter For ChannelMix

nBlueFactorG

The percentage of the green color value values to use for redistributing the bitmap's blue values. Valid values are –200 to 200.


nBlueFactorR Parameter For ChannelMix

nBlueFactorR

The percentage of the red color value values to use for redistributing the bitmap's blue values. Valid values are –200 to 200.


nGreenFactorB Parameter For ChannelMix

nGreenFactorB

The percentage of the blue color value values to use for redistributing the bitmap's green values. Valid values are –200 to 200.


nGreenFactorConstant Parameter For ChannelMix

nGreenFactorConstant

The color value that should be added to the whole image to use for redistributing the bitmap's green values. Valid values are –200 to 200.


nGreenFactorG Parameter For ChannelMix

nGreenFactorG

The percentage of the green color value values to use for redistributing the bitmap's green values. Valid values are –200 to 200.


nGreenFactorR Parameter For ChannelMix

nGreenFactorR

The percentage of the red color value values to use for redistributing the bitmap's green values. Valid values are –200 to 200.


nRedFactorB Parameter For ChannelMix

nRedFactorB

The percentage of the blue color value that should be distributed to the bitmap's red values. Valid values are –200 to 200.


nRedFactorConstant Parameter For ChannelMix

nRedFactorConstant

The color value that should be added to the whole image for redistributing the bitmap's red values. Valid values are –200 to 200.


nRedFactorG Parameter For ChannelMix

nRedFactorG

The percentage of the green color value that should be distributed to the bitmap's red values. Valid values are –200 to 200.


nRedFactorR Parameter For ChannelMix

nRedFactorR

The percentage of the red color value that should be distributed to the bitmap's red values. Valid values are –200 to 200.


crBack Parameter For Cubism

crBack

The COLORREF value that specifies the background color. This value is ignored if the CUB_BKG flag has been set in uFlags.


Return for Cubism

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For Cubism

nAngle

The cube’s angle of orientation, in hundredths of a degree (+/-). This value is ignored if the CUB_RAND flag has been set in uFlags. Possible values are from–36000 to 36000.


nBrightness Parameter For Cubism

nBrightness

A value that indicates the brightness of the bitmap. This value can be a number between -1000 and 1000. Negative values darken the image and positive values lighten the image.


uFlags Parameter For Cubism

uFlags

Flags that indicate the background color, cube shape and cube orientation. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate the background color:

Value | Meaning
CUB_BKG | [$0001] Use the image itself as the background.
CUB_COLOR | [$0002] Use the color in the crColor parameter as the background color.

The following are the flags that indicate the cube’s shape:

Value | Meaning
CUB_SQR | [$0010] Cubes will have square shape.
CUB_RECT | [$0020] Cubes will have rectangular shape.

The following are the flags that indicate the cube’s orientation:

Value | Meaning
CUB_RAND | [$0100] Cubes will have random orientation.
CUB_ORNT | [$0200] All cubes will have the orientation specified by the nAngle value.


uLength Parameter For Cubism

uLength

Cube side length, in pixels.


uSpace Parameter For Cubism

uSpace

Space between cubes, in pixels. As uSpace decreases, the concentration of cubes increases, and vice versa. The valid range is from 1 to the image or region dimension (that is, min(Height, Width)).


Return for Cylindrical

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nValue Parameter For Cylindrical

nValue

Amount of stretching where positive values stretch the pixels toward the bitmap edges depending on the type of cylinder and negative values stretch the pixels toward the central line of the cylinder. The valid range is from –100 to 100.


uType Parameter For Cylindrical

uType

A value that indicates the cylinder shape. Possible values are:

Value | Meaning
CYL_HORZ | [$0000] Stretch the pixels along the vertical plane (horizontal cylinder).
CYL_VERT | [$0001] Stretch the pixels along the horizontal plane (vertical cylinder).


Return for Deinterlace

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For Deinterlace

uFlags

Flags that indicate how to deinterlace the image and whether to remove odd lines or even lines. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate how to deinterlace the image:

Value | Meaning
DEINTERLACE_NORMAL | [$0001]Deinterlace the image by copying the data line into the removed lines.
DEINTERLACE_SMOOTH | [$0002] Deinterlace the image by averaging the data lines and copying the averaged data into the removed lines.

The following are the flags that indicate whether to remove odd or even lines:

Value | Meaning
DEINTERLACE_ODD | [$0010] Remove the odd lines.
DEINTERLACE_EVEN | [$0020] Remove the even lines.


Return for Desaturate

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


crFillLower Parameter For DrawStar

crFillLower

Lower spoke side color.


crFillUpper Parameter For DrawStar

crFillUpper

Upper spoke side color.


Return for DrawStar

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For DrawStar

nAngle

Angle to rotate the star. This value is given in hundredths of a degree (+/-). This can be a number from 0 to 36,000. A positive value will rotate the star clockwise, while a negative value will rotate the star counter-clockwise.


nAngleOpac Parameter For DrawStar

nAngleOpac

Percent of feathering in towards or outward from the spoke border. The valid range is from -100 to 100.


nBorderOpac Parameter For DrawStar

nBorderOpac

Transparency, in percent, of the spoke border. The valid range is from -100 to 100.


nDistOpac Parameter For DrawStar

nDistOpac

Percent of feathering in towards or outward from the spoke center. The valid range is from -100 to 100.


nPhase Parameter For DrawStar

nPhase

Angle to shift the star's rays. This value is given in hundredths of a degree (+/-). This can be a number from 0 to 36,000. A positive value will rotate the rays clockwise, while a negative value will rotate the rays counter-clockwise.


nSpokeDiv Parameter For DrawStar

nSpokeDiv

The percent by which to increment or decrement the size of the low part of the spoke. The valid range is from -100 to 100.


ptCenter Parameter For DrawStar

ptCenter

TPoint record(structure) that contains the star center.


uFlags Parameter For DrawStar

uFlags

Flag that indicates the direction of the rays. Possible values are:

Value | Meaning
STR_INSIDE | [$0000] The rays are directed toward the center of the star.
STR_OUTSIDE | [$0001] The rays are directed out from the center of the star.
STR_INNER | [$0010] The rays fill the star outward from the center. This flag can only be used with STR_OUTSIDE.


uHoleSize Parameter For DrawStar

uHoleSize

The hole size. This value is given as a percent of the whole star from which the rays start or in which they end. . The valid range is from 0 to 100.


uOpacity Parameter For DrawStar

uOpacity

Transparency, in percent, between the star and the applied image. The valid range is from 0 to 100.


uSpoke Parameter For DrawStar

uSpoke

Number of spokes or rays directed inside or outside the star.


uStarHeight Parameter For DrawStar

uStarHeight

Star height.


uStarWidth Parameter For DrawStar

uStarWidth

Star width.


Return for Dry

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uDim Parameter For Dry

uDim

Dimensions of the neighborhood used in creating the effect (uDim x uDim), in pixels.


crBack Parameter For EdgeDetectStatistical

crBack

The COLORREF value that specifies the non edge color. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


crEdge Parameter For EdgeDetectStatistical

crEdge

The COLORREF value that specifies the edge color. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for EdgeDetectStatistical

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uDim Parameter For EdgeDetectStatistical

uDim

Dimensions of the neighborhood used to detect edges (uDim x uDim), in pixels.


uThreshold Parameter For EdgeDetectStatistical

uThreshold

Threshold value used to determine which pixels are edge pixels. If the difference determined by the edge detector algorithm for a pixel is greater than this value, the pixel is an edge pixel.


Return for ExtractMessage

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


ptStart Parameter For ExtractMessage

ptStart

Point at which the message will be extracted from the image.


strDirectory Parameter For ExtractMessage

strDirectory

String that contains the full path name of the directory in which to save the extracted file. If the extracted message is a file this parameter is used to specify the path for saving the extracted file. To save the extracted file using the original path, set this parameter to ‘’ for Delphi or NULL for C++ Builder. If the extracted message is text this parameter has no effect.


strFileName Parameter For ExtractMessage

strFileName

String to be updated with the name of the file extracted from the bitmap currently loaded in the Main Control. (This bitmap can be accessed through the Bitmap property (Main Control).)


strMsg Parameter For ExtractMessage

strMsg

String to be updated with the text extracted from the bitmap currently loaded in the Main Control. (This bitmap can be accessed through the Bitmap property (Main Control).)


strPassword Parameter For ExtractMessage

strPassword

String to be updated with the password extracted from the bitmap currently loaded in the Main Control. (This bitmap can be accessed through the Bitmap property (Main Control).)


crFill Parameter For FreeHandShear

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for FreeHandShear

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pAmplitudes Parameter For FreeHandShear

pAmplitudes

Array of integers that represent shear wave values. The real values of the array elements are divided by 1000, and the valid value of each element in the pAmplitudes array is between –1000 and 1000. These values are generally obtained from the GetCurvePoints method. They may also be obtained through the FreeHand Shear Dialog.


uAmplitudesCount Parameter For FreeHandShear

uAmplitudesCount

Number of entries in the pAmplitudes array.


uFlags Parameter For FreeHandShear

uFlags

Flags that indicate how to handle exposed areas, and the direction of the shear wave. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle the exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate the direction of the shear wave:

Value | Meaning
SHR_HORZ | [$0000] Apply the shear wave horizontally.
SHR_VERT | [$0010] Apply the shear wave vertically.


uScale Parameter For FreeHandShear

uScale

Factor used to increase or decrease the various amplitude values in the pAmplitudes array. Each value in the pAmplitudes array is multiplied by this factor. The real factor value is the uScale value divided by 100. The valid range is from 0 to 100.


crFill Parameter For FreeHandWave

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for FreeHandWave

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For FreeHandWave

nAngle

Wave rotation angle in hundredths of a degree (+/-). The valid range is from –36000 to 36000. The value in degrees is nAngle divided by 100.


pAmplitudes Parameter For FreeHandWave

pAmplitudes

Array of integers that represent wave values. The real value of the array elements is divided by 1000, and the valid value of each element in pAmplitudes array is between –1000 and 1000. These values are generally obtained from the GetCurvePoints method. They may also be obtained through the FreeHandWave Dialog.


uAmplitudesCount Parameter For FreeHandWave

uAmplitudesCount

Number of entries in the pAmplitudes array.


uFlags Parameter For FreeHandWave

uFlags

Flags that indicate how to handle exposed areas and the type of information contained in uWaveLen. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate the type of information in the uWaveLen parameter:

Value | Meaning
DIS_PER | [$0000] The value in uWaveLen is a wavelength given as a percent of the bitmap dimensions. If this value is set, the valid range of uWaveLen is from 1 to 100.
DIS_FRQ | [$0010] The value in uWaveLen is the frequency, or the number of times the wave repeats.


uScale Parameter For FreeHandWave

uScale

Factor used to increase or decrease the various amplitude values in the pAmplitudes array. Each value in the pAmplitudes array is multiplied by this factor. The real factor value is the uScale value divided by 100.


uWaveLen Parameter For FreeHandWave

uWaveLen

Value that represents the wave length, if DIS_PER is set in the uFlags parameter. Possible values range from 1 – 100 and give the wavelength as a percentage of the bitmap dimensions. If DIS_FRQ is set in uFlags, this value is the number of repeated waves.


crFill Parameter For FreePlaneBend

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for FreePlaneBend

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pnCurve Parameter For FreePlaneBend

pnCurve

Array of integers that represent surface shape values. Valid values for each element in the pnCurve array range between –1000 and 1000. Positive values mean the curve is concave in and negative values mean the curve is concave out. The values in this array are divided internally by 1000.


uCurveSize Parameter For FreePlaneBend

uCurveSize

Size of the pnCurve array.


uFlags Parameter For FreePlaneBend

uFlags

Flags that indicate how to handle exposed areas and the plane along which to stretch the pixels. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate the plane in which the stretching is to occur:

Value | Meaning
FPB_HORZ | [$0010] Stretch the pixels along the vertical plane.
FPB_VERT | [$0020] Stretch the pixels along the horizontal plane.
FPB_VRHZ | [$0030] Stretch the pixels along the horizontal and vertical plane.


uScale Parameter For FreePlaneBend

uScale

Factor used to multiply the various amplitude values in the pnCurve array. Each value in the pnCurve array is multiplied by this factor. For example, if you want to double the size of the amplitude values, use a uScale value of 2; to triple the amplitudes values, use a uScale value of 3, etc. The top practical limit for this parameter is the BitmapWidth and BitmapHeight properties.


crFill Parameter For FreeRadBend

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for FreeRadBend

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pnCurve Parameter For FreeRadBend

pnCurve

Array of integers that represent surface shape values. Valid values for each element in the pnCurve array range between –1000 and 1000. Positive values mean the curve is concave in and negative values mean the curve is concave out. The values in this array are internally divided by 1000.


ptCenter Parameter For FreeRadBend

ptCenter

POINT structure that contains the surface center.


uCurveSize Parameter For FreeRadBend

uCurveSize

Size of the pnCurve array. This can be any number, up to the size of the available buffer.


uFlags Parameter For FreeRadBend

uFlags

Flags that indicate how to handle peripherally exposed areas and areas exposed inside the surface. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle peripherally exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate how to handle exposed areas inside the surface:

Value | Meaning
FILL_ROT | [$0000] Rotate the image inside the surface pattern.
FILL_WOUTROT | [$0010] Fill the exposed center the same way the peripherally exposed areas are filled.


uScale Parameter For FreeRadBend

uScale

Factor used to multiply the various amplitude values in the pnCurve array. Each value in the pnCurve array is multiplied by this factor. For example, if you want to double the size of the amplitude values, use a uScale value of 2; to triple the amplitudes values, use a uScale value of 3, etc. The top practical limit for this parameter is the width and height of the bitmap.


apUserPoint Parameter For GetCurvePoints

apUserPoint

Pointer to an array of TPoint records(structures) that contains the points on the curve used to determine the values for pnCurve. The minimum x coordinate value is 0.


Return for GetCurvePoints

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pnCurve Parameter For GetCurvePoints

pnCurve

Pointer to the array to be updated using either the best curve or lines that pass through the points specified in the apUserPoint parameter. To get the real value of the array elements, each of the values must be divided by 1000.


puPointCount Parameter For GetCurvePoints

puPointCount

Pointer to a variable to be updated with the number of entries written to the pnCurve parameter.


uFlag Parameter For GetCurvePoints

uFlag

Flag that indicates the method to be used to update the pnCurve parameter. Possible values are:

Value | Meaning
GUB_CURVE | [$0000] Fill pnCurve with the best curve that passes through the points in the apUserPoints parameter.
GUB_LINEAR | [$0001] Fill pnCurve with lines that pass through the points in the apUserPoints parameter.


uUserPointCount Parameter For GetCurvePoints

uUserPointCount

Number of points in the apUserPoint array.


Return for GlassEffect

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uCellHeight Parameter For GlassEffect

uCellHeight

Value that represents the height of a cell in pixels or the number of cells present across the height of the bitmap, based on the flags set in uFlags. The valid range is between 2 and half the bitmap height.


uCellWidth Parameter For GlassEffect

uCellWidth

Value that represents the width of a cell in pixels or the number of cells present across the width of the bitmap, based on the flags set in uFlags. The valid range is between 2 and half the bitmap width.


uFlags Parameter For GlassEffect

uFlags

Flags that indicate what type of data is in the uCellWidth and uCellHeight parameters. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate the type of data in the uCellWidth parameter:

Value | Meaning
GLASS_WFRQ | [$0001] The parameter uCellWidth is the number of cells along the width of the bitmap.
GLASS_WPER | [$0002] The parameter uCellWidth is the width of the cell in pixels.

The following are the flags that indicate the type of data in the uCellHeight parameter:

Value | Meaning
GLASS_HFRQ | [$0010] The parameter uCellHeight is the number of cells along the height of the bitmap.
GLASS_HPER | [$0020] The parameter uCellWidth is the height of the cell in pixels.


Return for GlowFilter

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uBright Parameter For GlowFilter

uBright

Brightness factor used to create the "glow". This can be any number that is 0 or greater. If it is 0 the image will be black.


uDim Parameter For GlowFilter

uDim

Size of the neighborhood used to determine the width of the glow.


uThreshold Parameter For GlowFilter

uThreshold

Threshold value used to determine which pixels are edge pixels. If the difference determined for a pixel is greater than this value, the pixel is an edge pixel. Valid values range from 0 through 255. Use this parameter to control the number of edge pixels found.


Return for Impressionist

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uHorzDim Parameter For Impressionist

uHorzDim

Horizontal effect size, in pixels. Possible values range from 1 – 100.


uVertDim Parameter For Impressionist

uVertDim

Vertical effect size, in pixels. Possible values range from 1 – 100.


crFlare Parameter For LensFlare

crFlare

The COLORREF value that represents the color of the main flare.


Return for LensFlare

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


ptCenter Parameter For LensFlare

ptCenter

TPoint record(structure) that contains the point around which the effect is centered.


uBright Parameter For LensFlare

uBright

The brightness of the flare. This value is divided internally by 100. This parameter affects the brightness of both the flare, and any lightened circles surrounding the flare.


uFlags Parameter For LensFlare

uFlags

Flag that indicates the lens type. Possible values are:

Value | Meaning
LNS_TYPE_1 | [$0000] Standard lens
LNS_TYPE_2 | [$0001] Moderate wide-angle lens
LNS_TYPE_3 | [$0002] Moderate telephoto lens


Return for LightControl

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


puAverage Parameter For LightControl

puAverage

Pointer to an array containing the new average pixel value for the entire bitmap. The size of the array equals one, if uFlags is YUV_SPACE or GRAY_SPACE, or three, if uFlags is RGB_SPACE. If uFlags is RGB_SPACE the first element corresponds to the new blue average value, the second element to the green, and the last element to the red.


puLowerAvr Parameter For LightControl

puLowerAvr

Pointer to an array containing the new average pixel value for those pixels with values between 0 and the average pixel value for the entire bitmap. The size of the array equals one, if uFlags is YUV_SPACE or GRAY_SPACE, or three, if uFlags is RGB_SPACE. If uFlags is RGB_SPACE the first element corresponds to the new blue lower average value, the second element to the green, and the last element to the red.


puUpperAvr Parameter For LightControl

puUpperAvr

Pointer to an array containing the new average pixel value for those pixels with values between the average pixel value for the entire bitmap and the highest pixel value in the bitmap. The size of the array equals either one if uFlags is YUV_SPACE or GRAY_SPACE or three if uFlags is RGB_SPACE. If uFlags is RGB_SPACE, the first element corresponds to the new blue upper side average value, the second element to the green, and the last element to the red.


uFlags Parameter For LightControl

uFlags

Flag that indicates which color space to remap. Possible values are:

Value | Meaning
RGB_SPACE | [$0001] Use the histogram of RGB color space. (separated channels)
YUV_SPACE | [$0002] Use the histogram of YUV color space.(Best results)
GRAY_SPACE | [$0004] Use the histogram of a gray level representation of the image.


crImageAmbient Parameter For Light

crImageAmbient

The COLORREF value that specifies the ambient color of the light sources.


crLightFill Parameter For Light

crLightFill

Color of the light.


Return for Light

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nLightAngle Parameter For Light

nLightAngle

Angle by which to rotate the ellipse that represents the light. This value is given in hundredths of a degree (+/-). This can be a number from 0 to 36,000. A positive value will rotate the ellipse clockwise, while a negative value will rotate the ellipse counter-clockwise.


ptLightCenter Parameter For Light

ptLightCenter

TPoint record (structure) that contains the center of the ellipse used to represent the light.


uImageAmbient Parameter For Light

uImageAmbient

Factor used when mixing the ambient color with the image.


uImageBright Parameter For Light

uImageBright

Value that represents the brightness of the ambient light of the entire image. This can be any number that is 0 or greater. If it is 0 the image will be black. This value is divided internally by 100.


uLightBright Parameter For Light

uLightBright

Intensity or brightness of the light.


uLightEdge Parameter For Light

uLightEdge

Percentage by which to smooth the light border. The valid range is from 0 to 100.


uLightFlags Parameter For Light

uLightFlags

Value that determines the light source type. Possible values are:

Value | Meaning
LGT_SPOTLIGHT | [$0000] The light will appear as a spotlight, based on the values in the uLightWidth, uLightHeight, nLightAngle and uLightEdge parameters.
LGT_DIRELIGHT | [$0001] The light will be applied to the whole image. If this flag is used, the uLightWidth, uLightHeight, nLightAngle, uLightEdge parameters will be ignored.


uLightHeight Parameter For Light

uLightHeight

Value that represents the height of the ellipse used to represent the light.


uLightNo Parameter For Light

uLightNo

The number of light sources.


uLightOpacity Parameter For Light

uLightOpacity

Opacity of the light.


uLightWidth Parameter For Light

uLightWidth

Value that represents the width of the ellipse used to represent the light.


Return for LocalHistoEqualize

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nHeight Parameter For LocalHistoEqualize

nHeight

The height of the local histogram equalizer rectangle in pixels. The height should be more than zero.


nWidth Parameter For LocalHistoEqualize

nWidth

The width of the local histogram equalizer rectangle in pixels. The width should be more than zero.


nxExt Parameter For LocalHistoEqualize

nxExt

The extension of the width of the local histogram equalizer rectangle, in pixels.


nyExt Parameter For LocalHistoEqualize

nyExt

The extension of the height of the local histogram equalizer rectangle, in pixels.


uSmooth Parameter For LocalHistoEqualize

uSmooth

Size of the area to be used when smoothing the edges between localized blocks. Possible values range from 0 to 7, but if nHeight is less than or equal to 7 then the maximum value for this item is nHeight - 1. If uSmooth = 0 the method will operate without smoothing edges.


uType Parameter For LocalHistoEqualize

uType

Flag that indicates which color space to equalize. Possible values are:

Value | Meaning
RGB_SPACE | [$0001] Linearize the number of pixels across the RGB color space. (Separated channels)
YUV_SPACE | [$0002] Linearize the number of pixels across the YUV color space.(Best results)
GRAY_SPACE | [$0004] Linearize the number of pixels per gray level in a gray level representation of the image.


Return for Multiply

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFactor Parameter For Multiply

uFactor

An integer which represents the factor to be used when multiplying image values. The factor used is equal to uFactor/100.


bLowerTrnsp Parameter For Ocean

bLowerTrnsp

Flag that indicates the transparency direction. Possible values are:

Value | Meaning
TRUE | Transparency increases as you move from the bottom of the bitmap to the top of the bitmap, line by line.
FALSE | Transparency increases as you move from the top of the bitmap to the bottom of the bitmap, line by line.


Return for Ocean

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uAmplitude Parameter For Ocean

uAmplitude

Wave magnitude, in pixels.


uFrequency Parameter For Ocean

uFrequency

Number of repeated waves.


AnnHandleInfo Parameter for OnAnnEnumerateHandles

AnnHandleInfo

Object of the TAnnHandleInfo class that contains information on the annotation handle being enumerated.


hObject Parameter for OnAnnEnumerateHandles

hObject

Handle to the annotation object


Return for OnAnnEnumerateHandles

Return Value

Return | Meaning
SUCCESS_CHANGE | [1] Change the object.
SUCCESS_NOCHANGE | [2] Do not change the object.


cToken Parameter for OnAnnEnumerateTextTokenTable

cToken

String that contains the token. This can be ANY ascii character EXCEPT ‘#’, because the token ## is reserved to display the # character.


nTextTokenCount Parameter for OnAnnEnumerateTextTokenTable

nTextTokenCount

Total number of tokens in the text token table.


nTokenType Parameter for OnAnnEnumerateTextTokenTable

nTokenType

Value that identifies the type of token. Possible values are:

Value | Meaning
ANNTOKEN_NONE | [0] String not treated as a token
ANNTOKEN_SEPARATOR | [1] Add a separator to the automation token menu
ANNTOKEN_TEXT | [2] A text string
ANNTOKEN_DATE_YYYY | [3] Current four digit year
ANNTOKEN_DATE_YY | [4] Current two digit year
ANNTOKEN_DATE_MM | [5] Two digit representation of current month
ANNTOKEN_DATE_DD | [6] Two digit representation of current day
ANNTOKEN_DATE_MONTH_NAME | [7] Current month name (i.e. January)
ANNTOKEN_DATE_DAY_OF_WEEK | [8] Current day of week (i.e. Monday)
ANNTOKEN_TIME_HH_12 | [9] Current hour,using a 12 hour clock
ANNTOKEN_TIME_HH_24 | [10] Current hour, using a 24 hour clock
ANNTOKEN_TIME_MM | [11] Current minute (00-59)
ANNTOKEN_TIME_SS | [12] Current second (00-59)
ANNTOKEN_TIME_MILLISECONDS | [13] Current milliseconds (000-999)
ANNTOKEN_AM_PM | [14] Time of day indicator (AM or PM)


strDescription Parameter for OnAnnEnumerateTextTokenTable

strDescription

String that describes the token. This string appears on the text token table menu. For example, the string for token #0 in the default text token table is "Two Digit Month". The text token table menu is displayed by:

1. | Right-clicking on a Button, Note, PushPin, Rubber Stamp, Stamp, Text, or Text Pointer annotation object.
2. | Select Text option in menu that appears.
3. | Click the Insert Token button. A menu for the existing text token table appears, as shown in the following figure:
4. | Select the token to be inserted.


strTokenString Parameter for OnAnnEnumerateTextTokenTable

strTokenString

String that contains any combination of existing strings or any new string. This parameter is valid only if the nTokenType parameter is ANNTOKEN_TEXT. If the nTokenType parameter is not ANNTOKEN_TEXT, then strTokenString is ignored.


Return for Pixelate

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


ptCenter Parameter For Pixelate

ptCenter

Point that represents the center of revolution when circular cells are used. This parameter will be ignored if PIX_RECT is set in uFlags.


uCellHeight Parameter For Pixelate

uCellHeight

Value that represents the height of a rectangular cell, the number of rectangular cells present across the height of the bitmap, the number of cells along the radius of a circular cell, or the length of each cell along the radius of a circular cell, based on the flags set in uFlags.


uCellWidth Parameter For Pixelate

uCellWidth

Value that represents the width of a rectangular cell, the number of rectangular cells present across the width of the bitmap, the number of cells around the center point of a circular cell, or the length in degrees of each cell around the center point of a circular cell, based on the flags set in uFlags. For more information, refer to the Remarks section.


uFlags Parameter For Pixelate

uFlags

Flags that indicate the values used to fill the cells, the shape of the cells, and what type of data is in the uCellWidth and uCellHeight parameters. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate what values will be used to fill the cells:

Value | Meaning
PIX_MAX | [$0000] Fill the cell with its maximum pixel value.
PIX_MIN | [$0001] Fill the cell with its minimum pixel value.
PIX_AVR | [$0002] Fill the cell with its average pixel value.

The following are the flags that indicate the shape of the cells:

Value | Meaning
PIX_RECT | [$0000] Divide the image into rectangular cells. If this flag used, the uCellWidth value contains the cell width in pixels or the number of cells across the width of the bitmap. uCellHeight contains the cell height in pixels or the number of cells across the height of the bitmap.
PIX_RAD | [$0010] Divide the image into circular cells, centered around ptCenter. If this flag is used, the uCellWidth value determines the angular component of the cell, and uCellHeight determines the radial component of the cell. Please note that PIX_RAD must be OR-ed with PIX_WPER or PIX_WFRQ

The following are the flags the indicate what information is contained in the uCellWidth and uCellHeight parameters:

Value | Meaning
PIX_WFRQ | [$0100] Indicates the number of cells along the width of the bitmap if rectangular cells are used. If circular cells are used, this indicates the number of cells present around the center of the circle.
PIX_WPER | [$0200] Indicates the width, in pixels of a cell, if rectangular cells are used. If circular cells are used, this indicates the number of degrees in each cell around the center point.
PIX_HFRQ | [$0400] Indicates the number of cells along the height of the bitmap if rectangular cells are used. If circular cells are used, this indicates the number of cells present along the radius of the circle.
PIX_HPER | [$0800] Indicates the height, in pixels of a cell, if rectangular cells are used. If circular cells are used, this indicates the radial length of each cell along the radius.


uOpacity Parameter For Pixelate

uOpacity

Value that represents how transparent the cells are, compared to the original pixels. This is a percentage. Possible values are 0 – 100. (0 is total transparency and 100 is total opacity).


crFill Parameter For Polar

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for Polar

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For Polar

uFlags

Flags that indicate how to handle exposed areas and the type of conversion. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate the conversion type:

Value | Meaning
CART_TO_POL | [$0000] Convert the image from Cartesian (rectangular) coordinates to polar coordinates.
POL_TO_CART | [$0010] Convert the image from polar coordinates to Cartesian (rectangular) coordinates.


crFill Parameter For Punch

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for Punch

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nValue Parameter For Punch

nValue

Amount of stretching where positive values pinch the image toward its center and negative values expand the image away from its center. Valid values range from –500 to 500.


ptCenter Parameter For Punch

ptCenter

TPoint record (structure) that contains the point around which the image will be pinched or punched.


uFlags Parameter For Punch

uFlags

Flags that indicate how to handle exposed areas, both centrally and peripherally. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle peripherally exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate how to handle centrally exposed areas:

Value | Meaning
FILL_ROT | [$0000] Rotate the image inside the pinch pattern.
FILL_WOUTROT | [$0010] Fill the exposed center the same way the peripherally exposed areas are filled.

This flag is ignored if the nValue is positive.


uStress Parameter For Punch

uStress

Amount of punching intensity. This value is ignored when nValue is less than 0. Valid values range from 0 to 1000.


Return for RadialBlur

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


ptCenter Parameter For RadialBlur

ptCenter

TPoint record (structure) that contains the point around which the pixels are rotated.


uDim Parameter For RadialBlur

uDim

An integer that represents the size of the neighborhood used in blurring. Increasing this value will increase the amount of blurring. Valid values range from 1 through 100.


uStress Parameter For RadialBlur

uStress

An integer that represents the amount of the blur intensity. Valid values range from 1 through 100.


crFill Parameter For RadWave

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for RadWave

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nPhase Parameter For RadWave

nPhase

Wave phase shift, in hundredths of degrees. The valid range is from –36000 to 36000 (The value in degrees is nPhase divided by 100).


ptCenter Parameter For RadWave

ptCenter

POINT structure that contains the point from which the wave radiates.


uAmplitude Parameter For RadWave

uAmplitude

An integer that represents the magnitude of the wave. Valid values range from 0 to 100.


uFlags Parameter For RadWave

uFlags

Flags that indicate how to handle exposed areas and what type of information is in the uWaveLen parameter. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate the type of information contained in the uWaveLength parameter:

Value | Meaning
DIS_PER | [$0000] The value in uWaveLen is a wavelength given as a percent of the bitmap dimensions. If this value is set, the valid range of uWaveLen is from 0 to 100.
DIS_FRQ | [$0010] The value in uWaveLen is the frequency, or the number of times the wave repeats.


uWaveLen Parameter For RadWave

uWaveLen

Value that represents the wave length, if DIS_PER is set in the uFlags parameter. Possible values range from 1 – 100 and give the wavelength as a percentage of the bitmap dimensions. If DIS_FRQ is set in uFlags, this value is the number of repeated waves.


crFill Parameter For Ripple

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for Ripple

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nPhase Parameter For Ripple

nPhase

Wave phase shift, in hundredths of degrees. The valid range is from –36000 to 36000 (The value in degrees is nPhase divided by 100).


ptCenter Parameter For Ripple

ptCenter

POINT structure that contains the center of the Ripple wave.


uAmplitude Parameter For Ripple

uAmplitude

Wave magnitude(amount of displacement).


uAttenuation Parameter For Ripple

uAttenuation

Attenuation value. The attenuation value indicates how rapidly the wave amplitude decays as the wave travels along the radial line. The values range from 0 - 1000.


uFlag Parameter For Ripple

uFlag

Flag that indicates how to handle exposed areas. Possible values are:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.


uFrequency Parameter For Ripple

uFrequency

Number of repeated waves along the radial line.


Return for SmoothEdges

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uAmount Parameter For SmoothEdges

uAmount

This is a percentage value that indicates blur size. 0 means no blurring and 100 means total blurring.


uThreshold Parameter For SmoothEdges

uThreshold

Threshold value used to determine which pixels are edge pixels. If the difference determined for a pixel is greater than this value, the pixel is an edge. Valid values range from 0 through 255.


crFill Parameter For Spherize

crFill

The COLORREF value that specifies the fill color for any exposed areas.


Return for Spherize

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nValue Parameter For Spherize

nValue

Amount of stretching where positive values stretch the central pixels toward the edges and negative values stretch the pixels toward the center. Valid values range from –500 to 500.


ptCenter Parameter For Spherize

ptCenter

POINT structure that contains the center of the sphere.


uFlags Parameter For Spherize

uFlags

Flags that indicate how to handle exposed areas outside the sphere and inside the sphere. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle exposed areas outside the sphere:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate how to handle exposed areas inside the sphere:

Value | Meaning
FILL_ROT | [$0000] Rotate the image inside the sphere pattern.
FILL_WOUTROT | [$0010] Fill the exposed sphere pattern center as you would exposed areas outside the sphere.

This flag is ignored if the nValue is negative.


Return for Swirl

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For Swirl

nAngle

The degree of rotation. This value is in degrees (0…360…720, etc.).


ptCenter Parameter For Swirl

ptCenter

TPoint record(structure) that contains the center of the swirl.


uWaveLen Parameter For Wave

uWaveLen

Value that represents the wavelength, if DIS_PER is set in the uFlags parameter. Possible values range from 0 – 100 and give the wavelength as a percentage of the bitmap dimensions. If DIS_FRQ is set in uFlags, this value is the number of repeated waves.


crFill Parameter For Wave

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for Wave

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For Wave

nAngle

Wave’s rotation angle in hundredths of a degree. The valid range is from –18000 to 18000. (The value in degrees is nAngle divided by 100.)


uAmplitude Parameter For Wave

uAmplitude

Wave’s magnitude. The values range from 1 to the length of the image's diagonal.


uFlags Parameter For Wave

uFlags

Flags that indicate how to handle exposed areas, the type of information in the uWaveLength parameter and the wave type. You can use a bitwise OR (|) to specify one flag from each group.

The following are the flags that indicate how to handle exposed areas:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.

The following are the flags that indicate the type of information in the uWaveLen parameter:

Value | Meaning
DIS_PER | [$0000] The value in uWaveLen is a wavelength given as a percent of the bitmap dimensions. If this value is used, the valid range of uWaveLen is from 0 to 100.
DIS_FRQ | [$0010] The value in uWaveLen is the frequency, or the number of times the wave repeats.

The following are the flags that indicate the wave type:

Value | Meaning
WV_SIN | [$0000] The wave is a sinusoidal wave.
WV_COS | [$0100] The wave is a sinusoidal wave shifted by 90 degrees.
WV_SQUARE | [$0200] The wave is a square wave.
WV_TRIANG | [$0300] The wave is a triangular wave.


uHorzFact Parameter For Wave

uHorzFact

Size of the horizontal wave, given as a percentage. The valid range is from 0 to 100.


uVertFact Parameter For Wave

uVertFact

Size of the vertical wave, given as a percentage. The valid range is from 0 to 100.


Return for Wind

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For Wind

nAngle

Direction of the thin lines used to create the wind effect, in hundredths of a degree. Possible values range form –36000 to 36000. (The value in degrees is nAngle divided by 100).


uDim Parameter For Wind

uDim

Size, in pixels, of the thin lines used to create the wind effect. Possible values range from 1 - 100.


uOpacity Parameter For Wind

uOpacity

Density, in pixels, of the thin lines used to create the wind effect. The valid range is from 0 to 100.


Return for ZoomBlur

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


ptCenter Parameter For ZoomBlur

ptCenter

TPoint record(structure) that contains the center point from which to blur the image.


uDim Parameter For ZoomBlur

uDim

A value that represents the amount of the blur.


uStress Parameter For ZoomBlur

uStress

A value that represents the amount of the blur intensity.


crFill Parameter For ZoomWave

crFill

The COLORREF value that specifies the fill color for any exposed areas. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for ZoomWave

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nPhase Parameter For ZoomWave

nPhase

Wave phase shift. The valid range is from –36000 to 36000. The real value is nPhase divided by 100.


ptCenter Parameter For ZoomWave

ptCenter

POINT structure that contains the center point from which the wave is zoomed.


uAmplitude Parameter For ZoomWave

uAmplitude

Zoom wave magnitude.


uFlags Parameter For ZoomWave

uFlags

Flag that indicates how to handle exposed areas. Possible values are:

Value | Meaning
FILL_CLR | [$0000] Fill any exposed areas with crFill.
FILL_RPT | [$0001] Stretch the image edges to fill the exposed area.
FILL_NOCHG | [$0002] Leave the exposed area as is, without changing it.


uFrequency Parameter For ZoomWave

uFrequency

The number of repeated waves along the radial line.


uZoomFact Parameter For ZoomWave

uZoomFact

The percentage the wave grows as it moves from the image center. The valid range is from 0 to 100.


Return for AdaptiveContrast

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uAmount Parameter For AdaptiveContrast

uAmount

Value that represents an adjustment factor. Its range starts from 100 and has no upper limit.


uDim Parameter For AdaptiveContrast

uDim

Dimensions of the neighborhood used for filtering (uDim x uDim), in pixels.


uFlags Parameter For AdaptiveContrast

uFlags

Value that indicates the adjustment method. Possible values are:

Value | Meaning
ACE_EXP | [$0001] Apply exponential adjustment.
ACE_LIN | [$0002] Apply linear adjustment.


Return for AddShadow

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uDirection Parameter For AddShadow

uDirection

Angle value indicating the direction of the light source producing the shadow. Possible values are:

Value | Meaning
SHADOW_E | [0] East
SHADOW_NE | [1] Northeast
SHADOW_N | [2] North
SHADOW_NW | [3] Northwest
SHADOW_W | [4] West
SHADOW_SW | [5] Southwest
SHADOW_S | [6] South
SHADOW_SE | [7] Southeast


uFlags Parameter For AddShadow

uFlags

Type of the shadow. Possible values are:

Value | Meaning
SHADOW_CLR_RGB | [0] Shadows are colored.
SHADOW_CLR_GRAY | [1] Shadows are grayscale.


uThreshold Parameter For AddShadow

uThreshold

Threshold value used to determine which pixels will be affected. Valid values range from 0 through 255. When uFlags = COLOR_RGB, any component (R, G, or B) of a pixel with a value less than the uThreshold value is not affected. When uFlags = COLOR_GRAY, any pixel where the master channel value is less than the uThreshold value is not affected.


crDust Parameter For Aging

crDust

A COLORREF value representing the color of the dust.


crPits Parameter For Aging

crPits

A COLORREF value representing the color of the pits.


crScratch Parameter For Aging

crScratch

A COLORREF value representing the color of the scratch lines.


Return for Aging

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uDustDensity Parameter For Aging

uDustDensity

Dust density, expressed in tenths of a percent of the bitmap area. Valid values range between 0 and 1000. This value is divided internally by 10. If uDustDen = 1000 then dust density = 100% (that is, the number of dust points = the entire bitmap area.)


uFlags Parameter For Aging

uFlags

Flags that indicate the distortion type and the distortion color. You can use a bitwise OR (|) to specify one or more flags from each group.

The following flags indicate the distortion type:

Value | Meaning
AGING_ADD_NOTHING | [$0000] Do not add any distortion type. In this case, the bitmap will be changed by random changes in the color intensity.
AGING_ADD_VSCRATCH | [$0001] Add vertical scratch lines.
AGING_ADD_HSCRATCH | [$0002] Add horizontal scratch lines.
AGING_ADD_DUST | [$0004] Add dust.
AGING_ADD_PITS | [$0008] Add pits.

The following flags indicate the distortion color:

Value | Meaning
AGING_SCRATCH_INV | [$0000] Use pixel’s color inverse as scratch line color. If this flag is set, crScratch will be ignored.
AGING_SCRATCH_CLR | [$0010] Use the crScratch as scratch line color.
AGING_DUST_INV | [$0000] Use pixel’s color inverse as dust color. If this flag is set, crDust will be ignored.
AGING_DUST_CLR | [$0020] Use the crDust as dust color.
AGING_PITS_INV | [$0000] Use pixel’s color inverse as the color of the pits. If this flag is set, crPits will be ignored.
AGING_PITS_CLR | [$0040] Use the crPits as the color of the pits.


uHScratchCount Parameter For Aging

uHScratchCount

Number of horizontal scratch lines.


uMaxPitSize Parameter For Aging

uMaxPitSize

Maximum pit size, in pixels. The size of the pits will be selected at random between 1 and uMaxPitSize.


uMaxScratchLen Parameter For Aging

uMaxScratchLen

Maximum scratch line length, in pixels. Its minimum value is 2.


uPitsDensity Parameter For Aging

uPitsDensity

Density of the pits, expressed in tenths of a percent of the bitmap area. Valid values range between 0 and 1000. This value is divided internally by 10. If uPitsDen = 1000 then the density of the pits = 100% (that is, the number of pits = the entire bitmap area.)


uVScratchCount Parameter For Aging

uVScratchCount

Number of vertical scratch lines.


fIntercept Parameter For ApplyLinearModalityLUT

fIntercept

"Rescale Intercept": the value of "b" in the linear relationship between original pixel values and the new pixel values.

(new pixel value) = m * (original pixel value) + b. Where "m" is the "Rescale Slope".


fSlope Parameter For ApplyLinearModalityLUT

fSlope

"Rescale Slope": the value of "m" in the linear relationship between original pixel values and the new pixel values.

(new pixel value) = m * (original pixel value) + b. Where "b" is the "Rescale Intercept".


Return for ApplyLinearModalityLUT

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For ApplyLinearModalityLUT

uFlags

Flags which determine the behavior of this method. Possible values are:

Value | Meaning
M_LUT_UPDATE_MIN_MAX | [0x0002] if set the method will update the appropriate members of the Bitmap property with the new minimum and maximum intensity values.
M_LUT_ALLOW_RANGE_EXPANSION | [0x0008] If set, the method will adjust the high bit and/or low bit (if possible) inside the bitmap handle in order to hold the range of pixel values after applying the modality LUT.


dCenter Parameter For ApplyLinearVOILUT

dCenter

Center of the window of interest.


dWidth Parameter For ApplyLinearVOILUT

dWidth

Width of the window of interest


Return for ApplyLinearVOILUT

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For ApplyLinearVOILUT

uFlags

Flags which determine the behavior of this method. Possible values are one or an OR-ed combination of the following:

Value | Meaning
VOI_LUT_UPDATE_MIN_MAX | [$0001] If set, the method will recalculate the minimum and maximum intensity values inside the bitmap.
VOI_LUT_REVERSE_ORDER | [$0002] If set, the method will fill the bitmap display LUT in reverse order (light to dark instead of dark to light).


Return for ApplyMathLogic

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nFactor Parameter For ApplyMathLogic

nFactor

Mathematical or logical operation factor.


uFlags Parameter For ApplyMathLogic

uFlags

Flags that indicate the channel that will be used, the treatment of the input pixel values, the mathematical operation, and the treatment of the output pixel values. Use a bitwise OR (+) to specify one flag from each group. For a list of possible values, refer to Flags for the ApplyMathLogic Method.


Return for ApplyModalityLUT

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nFirstStoredPixelValueMapped Parameter For ApplyModalityLUT

nFirstStoredPixelValueMapped

Indicates the first index whose remapped value is stored in the LUT. All pixels that are less than this value will be remapped to pLUT[0].


pLUT Parameter For ApplyModalityLUT

pLUT

Pointer to the LUT that contains the lookup table. The length of the LUT is in uNumberOfEntries


uEntryBits Parameter For ApplyModalityLUT

uEntryBits

Specifies the number of bits for each entry in the LUT Data.


uFlags Parameter For ApplyModalityLUT

uFlags

Flags which determine the behavior of this method. Possible values may be one or an Or-ed combination of the following:

Value | Meaning
M_LUT_SIGNED | [$0001] If set, the LUT entries are signed 16-bit values. If not set, the LUT entries are unsigned 16-bit values.
M_LUT_UPDATE_MIN_MAX | [$0002] If set, the method will update the appropriate members of the Bitmap property (Main Control) with the new minimum and maximum intensity values.


uNumberOfEntries Parameter For ApplyModalityLUT

uNumberOfEntries

The number of entries in pLUT. All the pixels that are greater than nFirstStoredPixelValueMapped + uNumberOfEntries will be set to the last entry in the LUT (pLUT[uNumberOfEntries – 1])


Return for ApplyTransformationParameters

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For ApplyTransformationParameters

nAngle

Angle of rotation, in hundredths of degrees (+/-). This can be a number from 1 to 36,000. This value is internally divided by 100. A positive value means the image is rotated clockwise, while a negative value means the image is rotated counter-clockwise. This value must be equal to the angle value retrieved by the GetTransformationParameters method.


nXTranslation Parameter For ApplyTransformationParameters

nXTranslation

The amount of bitmap translation, in pixels, along the x-axis (width). This value is internally divided by 100. This value must be equal to the X translation value retrieved by the GetTransformationParameters method.


nYTranslation Parameter For ApplyTransformationParameters

nYTranslation

The amount of bitmap translation, in pixels, along the y-axis (height). This value is internally divided by 100. This value must be equal to the Y translation value retrieved by the GetTransformationParameters method.


uFlags Parameter For ApplyTransformationParameters

uFlags

Flag that specifies the type of resizing to perform and which objects to preserve. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate the type of resizing to perform:

Value | Meaning
RGS_SIZE_NORMAL | [$0001] Resize normally.
RGS_SIZE_RESAMPLE | [$0002] Use linear interpolation and averaging to produce a higher-quality image.
RGS_SIZE_BICUBIC | [$0003] Use bicubic interpolation and averaging to produce a higher quality image. This is slower than SIZE_RESAMPLE.

The following are the flags that indicate which objects to preserve:

RGS_SIZE_FAVORBLACK | [$0010] (Document/Medical only) Preserve black objects when making the image smaller. This option affects only 1-bit, black-and-white images, where it prevents the disappearance of thin lines. You can use a bitwise OR ( + ) to combine this flag with another one. For example, RGS_SIZE_RESAMPLE + RGS_SIZE_FAVORBLACK causes color images to be resampled, but applies the favor-black option to 1-bit, black-and-white images.
RGS_SIZE_FAVORWHITE | [$0020] (Document/Medical only) Preserve white objects when making the image smaller. This option affects only 1-bit, black-and-white images, where it prevents the disappearance of thin lines. You can use a bitwise OR ( + ) to combine this flag with another one. For example, RGS_SIZE_RESAMPLE + RGS_SIZE_FAVORWHITE causes color images to be resampled, but applies the favor-white option to 1-bit, black-and-white images.


uXScale Parameter For ApplyTransformationParameters

uXScale

The amount of bitmap scaling along the x-axis (width). This is a percentage value. It is internally divided by 100. This value must be equal to the scale X value retrieved by the GetTransformationParameters method.


uYScale Parameter For ApplyTransformationParameters

uYScale

The amount of bitmap scaling along the y-axis (height). This is a percentage value. It is internally divided by 100. This value must be equal to the scale Y value retrieved by the GetTransformationParameters method.


Return for ApplyVOILUT

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nFirstStoredPixelValueMapped Parameter For ApplyVOILUT

nFirstStoredPixelValueMapped

Indicates the first index whose remapped value is stored in the LUT. All bitmap display LUT entries which are less than this value will be remapped to pLUT[0].


pLUT Parameter For ApplyVOILUT

pLUT

Pointer to the LUT which contains the lookup table. The length of the LUT is in uNumberOfEntries.


uEntryBits Parameter For ApplyVOILUT

uEntryBits

Specifies the number of bits for each entry in the LUT Data.


uFlags Parameter For ApplyVOILUT

uFlags

Flags which determine the behavior of this method. Possible values are one or an OR-ed combination of the following:

Value | Meaning
VOI_LUT_UPDATE_MIN_MAX | [$0001] If set, the method will recalculate the minimum and the maximum intensity inside the bitmap.
VOI_LUT_REVERSE_ORDER | [0x0002] If set, the method will fill the bitmap display LUT in reverse order (light to dark instead of dark to light).


uNumberOfEntries Parameter For ApplyVOILUT

uNumberOfEntries

The number of entries in pLUT. All bitmap display LUT entries which are greater than nFirstStoredPixelValueMapped + uNumberOfEntries will be set to the last entry in the LUT (pLUT[uNumberOfEntries – 1])


Blue Parameter For AutoColorLevel

Blue

A LEVELCOLORINFO record (structure) to be updated with the color-leveling information of the blue channel, if uFlags contains AUTO_LEVEL.


Green Parameter For AutoColorLevel

Green

A LEVELCOLORINFO record (structure) to be updated with the color-leveling information of the green channel, if uFlags contains AUTO_LEVEL.


Return for AutoColorLevel

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


Master Parameter For AutoColorLevel

Master

A LEVELCOLORINFO record (structure) to be updated with the color-leveling information of the master channel, if uFlags contains AUTO_CONTRAST or AUTO_INTENSITY.


Red Parameter For AutoColorLevel

Red

A LEVELCOLORINFO record (structure) to be updated with the color-leveling information of the red channel, if uFlags contains AUTO_LEVEL.


uBlackClip Parameter For AutoColorLevel

uBlackClip

An unsigned integer that represents the percentage of black pixels to clip from the bitmap, in hundredths of a percent. Valid values range from 0 to 10000 (which represents 100%). Best results are found using 0.3 to 0.9 %. The default is DEFAULT_BLACK_CLIP, which indicates to clip 0.5% of the black pixels.


uFlags Parameter For AutoColorLevel

uFlags

Flags that indicate the type of leveling to perform. Possible values are:

Value | Meaning
AUTO_LEVEL | [$0001] Perform leveling on the individual R, G and B channels, treating each of the R, G and B channels as a separate entity. It introduces color cast on the image.
AUTO_CONTRAST | [$0002] Perform leveling on the MASTER channel (the grayscale values of the pixels). No color cast will be introduced.
AUTO_INTENSITY | [$0003] Perform leveling on the RGB channel (the sum of the R, G, and B channels). No color cast will be introduced.
AUTO_NOPROCESS | [$0004] Do not process the bitmap. Just update the Master, Red, Green and Blue parameters with the color leveling information used. The color leveling information used depends on which of the other flags was set with AUTO_NOPROCESS. Only one other flag may be set with AUTO_NOPROCESS.


uWhiteClip Parameter For AutoColorLevel

uWhiteClip

An unsigned integer that represents the percentage of white pixels to clip from the bitmap, in hundredths of a percent. Valid values range from 0 to 10000 (which represents 100%). The default is DEFAULT_WHITE_CLIP, which indicates to clip 0.5% of the white pixels.


Return for ChangeHueSatInt

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nHue Parameter For ChangeHueSatInt

nHue

Angular amount to change the hue, in hundredths of a degree. Valid values range from -18000 through 18000. This value is divided internally by 100.


nIntensity Parameter For ChangeHueSatInt

nIntensity

Percentage amount to change the intensity, in tenths of percent, Valid values range from –1000 (black) through 1000 (white). This value is divided internally by 10. Positive values increase (or lighten) the brightness of the bitmap image. Negative values decrease (or darken) the brightness of the bitmap image.


nSaturation Parameter For ChangeHueSatInt

nSaturation

Percentage amount to change saturation, in tenths of a percent. Valid values range from –1000 through 1000, this value is divided internally by 10. Negative values decrease the saturation of colors. Positive values increase the saturation. The saturation level is increased or decreased by a percentage of its present saturation level. For example, an increase of 20% of the current saturation level "L" will raise the new saturation level "L1" to a value L = 0.20 * L. Likewise, increasing the saturation level 100% doubles the saturation level (L1 = L + 1.0 * L). Decreasing the saturation level 100% will set the new saturation level to 0. This process is carried out for every pixel. The saturation is set to 1000 (maximum value) if the new value exceeds 1000).


pHsiData Parameter For ChangeHueSatInt

pHsiData

Pointer to array of HUESATINTDATA records (structures). Each record or structure contains information on a color range to be changed.


uHsiDataCount Parameter For ChangeHueSatInt

uHsiDataCount

Number of records (structures) in the array pointed to by pHsiData.


bLuminance Parameter For ColorIntensityBalance

bLuminance

Value that indicates whether to preserve luminance. Possible values are:

Value | Meaning
TRUE | Preserve luminance.
FALSE | Do not preserve luminance.


Return for ColorIntensityBalance

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nHighLightBlue Parameter For ColorIntensityBalance

nHighLightBlue

Value to be used for adjusting or balancing the blue channel of the bright tones (highlights). Valid values range from -100 to 100. Values > 0 increase the blue component value. Values < 0 decrease the blue component value. Using 0 leaves the blue component unchanged.


nHighLightGreen Parameter For ColorIntensityBalance

nHighLightGreen

Value to be used for adjusting or balancing the green channel of the bright tones (highlights). Valid values range from -100 to 100. Values > 0 increase the green component value. Values < 0 decrease the green component value. Using 0 leaves the green component unchanged.


nHighLightRed Parameter For ColorIntensityBalance

nHighLightRed

Value to be used for adjusting or balancing the red channel of the bright tones (highlights). Valid values range from -100 to 100. Values > 0 increase the red component. Values < 0 decrease the red component. Using 0 leaves the red component unchanged.


nMidToneBlue Parameter For ColorIntensityBalance

nMidToneBlue

Value to be used for adjusting or balancing the blue channel of the medium tones (midtones). Valid values range from -100 to 100. Values > 0 increase the blue component value. Values < 0 decrease the blue component value. Using 0 leaves the blue component unchanged.


nMidToneGreen Parameter For ColorIntensityBalance

nMidToneGreen

Value to be used for adjusting or balancing the green channel of the medium tones (midtones). Valid values range from -100 to 100. Values > 0 increase the green component value. Values < 0 decrease the green component value. Using 0 leaves the green component unchanged.


nMidToneRed Parameter For ColorIntensityBalance

nMidToneRed

Value to be used for adjusting or balancing the red channel of the medium tones (midtones). Valid values range from -100 to 100. Values > 0 increase the red component. Values < 0 decrease the red component. Using 0 leaves the red component unchanged.


nShadowsBlue Parameter For ColorIntensityBalance

nShadowsBlue

Value to be used for adjusting or balancing the blue channel of the dark tones. Valid values range from -100 to 100. Values > 0 increase the blue component value. Values < 0 decrease the blue component value. Using 0 leaves the blue component unchanged.


nShadowsGreen Parameter For ColorIntensityBalance

nShadowsGreen

Value to be used for adjusting or balancing the green channel of the dark tones. Valid values range from -100 to 100. Values > 0 increase the green component value. Values < 0 decrease the green component value. Using 0 leaves the green component unchanged.


nShadowsRed Parameter For ColorIntensityBalance

nShadowsRed

Value to be used for adjusting or balancing the red channel of the dark tones. Valid values range from -100 to 100. Values > 0 increase the red component. Values < 0 decrease the red component. Using 0 leaves the red component unchanged.


Return for ColorizeGray

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pGrayColors Parameter For ColorizeGray

pGrayColors

Pointer to an array of GRAYCOLOR records (structures). The user specifies number of entries of the array. You can automatically color the bitmap by passing Nil (NULL) value in this variable (in this case uGrayColorsCount will be ignored).


SrcBitmap Parameter For ColorizeGray

SrcBitmap

The source Bitmap handle referencing the 8, 12 or 16-bit grayscale bitmap. SrcBitmap will not be affected.


uGrayColorsCount Parameter For ColorizeGray

uGrayColorsCount

Number of entries in the pGrayColors array. It can be any number as long as it represents pGrayColors correctly. 1 means there is one entry, 2 means there is two entries. If you set it as 0 then the method will return an error code.


Blue Parameter For ColorLevel

Blue

A LEVELCOLORINFO record (structure) that contains the color-leveling information for the blue channel.


Green Parameter For ColorLevel

Green

A LEVELCOLORINFO record (structure) that contains the color-leveling information for the green channel.


Return for ColorLevel

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


Master Parameter For ColorLevel

Master

A LEVELCOLORINFO record (structure) that contains the color-leveling information for the master channel.


Red Parameter For ColorLevel

Red

A LEVELCOLORINFO record (structure) that contains the color-leveling information for the red channel.


uFlags Parameter For ColorLevel

uFlags

Flag that indicates the channel(s) being leveled. Possible values are (You can use a bitwise OR ( | ) to combine the flags):

Value | Meaning
LEVEL_RED | [$0001] Red channel
LEVEL_GREEN | [$0010] Green channel
LEVEL_BLUE | [$0100] Blue channel
LEVEL_MASTER | [$1000] All channels


Return for ColorReplace

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nBrightness Parameter For ColorReplace

nBrightness

Amount to change the brightness, in tenths of a percent. Valid values range from –1000 to 1000. This value is divided internally by 10. Positive values increase (or lighten) the brightness of the bitmap image. Negative values decrease (or darken) the brightness of the bitmap image.


nHue Parameter For ColorReplace

nHue

Angular amount to change the hue, in hundredths of a degree. Valid values range from –18000 to 18000. This value is divided internally by 100.


nSaturation Parameter For ColorReplace

nSaturation

Amount to change saturation, in tenths of a percent. Valid values range from –1000 to 1000. This value is divided internally by 10. Negative values decrease the saturation of colors. Positive values increase the saturation. The saturation level is increased or decreased by a percentage of its present saturation level. For example, an increase of 20% of the current saturation level "L" will raise the new saturation level "L1" to a value L = 0.20 * L. Likewise, increasing the saturation level 100% doubles the saturation level (L1 = L + 1.0 * L). Decreasing the saturation level 100% will set the new saturation level to 0. The saturation is set to 1000 (maximum value) if the new value exceeds 1000).


pColorReplace Parameter For ColorReplace

pColorReplace

An array of REPLACECOLOR records (structures). Each record or structure contains a color to be replaced.


uColorCount Parameter For ColorReplace

uColorCount

The number of colors to be replaced.


Return for ColorThreshold

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pCompData Parameter For ColorThreshold

pCompData

Pointer to an array of 3 COMPAREDATA records (structures) that contains the parameters used to compare and modify each component.


uColorSpace Parameter For ColorThreshold

uColorSpace

Color space on which the threshold is based. Possible values are

Value | Meaning
CLTH_RGB_SPACE | [$00000000] RGB color space
CLTH_HSV_SPACE | [$00000001] HSV color space
CLTH_HLS_SPACE | [$00000002] HLS color space
CLTH_XYZ_SPACE | [$00000003] XYZ color space
CLTH_YCrCb_SPACE | [$00000004] YCrCb color space
CLTH_YUV_SPACE | [$00000005] YUV color space
CLTH_LAB_SPACE | [$00000006] LAB color space
CLTH_CMY_SPACE | [$00000007] CMY color space


Return for ContrastBrightIntensity

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nBrightness Parameter For ContrastBrightIntensity

nBrightness

Amount of brightness change. The brightness ranges from -1000 to 1000. This value is divided internally by 1000. A positive value increases (or lightens) the brightness of the bitmap image. A negative value decreases (or darkens) the brightness of the bitmap image.


nContrast Parameter For ContrastBrightIntensity

nContrast

Amount of contrast change. The contrast ranges from -1000 to +1000. This value is divided internally by 1000. A positive value increases the contrast whereas a negative value decreases the contrast.


nIntensity Parameter For ContrastBrightIntensity

nIntensity

Amount of intensity change. The intensity ranges from -1000 to +1000. This value is divided internally by 1000. A positive value lightens the brightness pixels whereas a negative value darkens the brightness pixels.


Dst Parameter For CopyMarkers

Dst

Pointer to a TLEADMarker object to be updated with a copy of the markers.


Return for CopyMarkers

Return Value

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


Src Parameter For CopyMarkers

Src

Pointer to a TLEADMarker object that contains the markers to be copied.


CorrelationBitmap Parameter For Correlation

CorrelationBitmap

The bitmap handle of the bitmap for which to search.


Return for Correlation

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pPoints Parameter For Correlation

pPoints

Pointer to an array of points. This array will be updated by the method with the starting points for the correlated areas.


uMaxPoints Parameter For Correlation

uMaxPoints

Size of the pPoints array. This is also equal to the maximum number of regions in current active bitmap that can be found to be correlated.


uNumOfPoints Parameter For Correlation

uNumOfPoints

Variable to be updated with the number of areas in the current active bitmap actually found to be correlated to areas in CorrelationBitmap. Its maximum value is uMaxPoints.


uThreshold Parameter For Correlation

uThreshold

Value that indicates the correlation threshold, which is a measure of association required to consider two areas to be correlated. If the correlation value between CorrelationBitmap and an area in the current active bitmap is less than the correlation threshold they are uncorrelated. Valid values range from 0 (zero resemblance) to 100 (perfect resemblance).


uXStep Parameter For Correlation

uXStep

Step size in the X direction (along image width), in pixels. For best results, use 1.


uYStep Parameter For Correlation

uYStep

Step size in the Y direction (along image height) ), in pixels. For best results, use 1.


Return for CountLUTColors

Return Value

Return | Meaning
SUCCESS | The method was successful.
0 | LUT is not linear. The method failed.
< 0 | An error occurred. Refer to Error Codes.


nFirstIndex Parameter For CountLUTColors

nFirstIndex

A variable to be updated with the index of the last occurrence of the starting color.


uFlags Parameter For CountLUTColors

uFlags

Flag that indicates the LUT is belong to signed or unsigned image. Possible values are:

Value | Meaning
COUNT_LUT_UNSIGNED | [$0001] The LUT contains signed data.
COUNT_LUT_SIGNED | [$0002] The LUT contains unsigned data.


uNumberOfEntries Parameter For CountLUTColors

uNumberOfEntries

A variable to be updated with total number of entries between the start color and the end color.


Return for CreateMarkers

Return Value

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


Return for DeleteMarkerAt

Return Value

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


nIndex Parameter For DeleteMarkerAt

nIndex

Value that represents the index of the marker to be deleted.


Return for DeleteMarker

Return Value

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


lType Parameter For DeleteMarker

lType

Value that represents the type of marker to delete. Recommended values are between $E0 and $FE. Other values are possible, but before using other values, study the JPEG specs to determine which marker types are allowed.


nCount Parameter For DeleteMarker

nCount

Indicates how many markers to delete. This value is useful only if there is more than one marker of the specified type in the file. Pass 0 to delete all markers of type lType. Pass nCount > 0 to delete only the first nCount occurrences of Marker.


crBorder Parameter For DiceEffect

crBorder

Value that represents the color of the border that will be drawn around the dice blocks. This parameter will be used only if the DICE_BORDER flag is set.


Return for DiceEffect

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For DiceEffect

uFlags

Flags that specify how to apply the effect. Possible values are:

Value | Meaning
DICE_BORDER | [$0001] Draw borders around the dice blocks. The border color is given by crBorder. Each block will draw the border on the inside of the edges. The border is 1 pixel wide. In places with adjacent blocks, the border will be 2 pixels wide because each block has a 1-pixel border. If the BITMAP_RESIZE flag is not set and the edge blocks have a different size than the inner blocks, the border will not be drawn for the right and the bottom edges.
DICE_SIZE | [$0010] uXBlock and uYBlock contain the width and height of each block, in pixels.
DICE_COUNT | [$0020] uXBlock and uYBlock contain the number of blocks per row and per column.
BITMAP_RESIZE | [$0100] if this flag is set then the image will be resized to be sure that all blocks have equal size. If this flag is not set then the edge blocks might have a different size than the inner blocks. If the edge blocks have a different size, they will be manipulated differently.


uRandomize Parameter For DiceEffect

uRandomize

The starting point for the randomization process. Valid values range from 0 through 500. Use 0 to have the method select the value.


uXBlock Parameter For DiceEffect

uXBlock

If the DICE_SIZE flag is set, this parameter represents the width of the each block, in pixels. If the DICE_COUNT flag is set, this parameter represents the number of blocks per row.


uYBlock Parameter For DiceEffect

uYBlock

If the user set the DICE_SIZE flag, this parameter represents the height of the each block, in pixels. If the user set the DICE_COUNT flag instead of DICE_SIZE flag, this parameter will represent the number of blocks per column.


Return for DigitalSubtract

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


MaskBitmap Parameter For DigitalSubtract

MaskBitmap

Bitmap handle referencing the mask bitmap. The mask bitmap is the source bitmap.


uFlags Parameter For DigitalSubtract

uFlags

Flags that control how the method works. Possible values are:

Value | Meaning
0 | No enhancement.
DS_CONTRASTENH | [$0001] Perform a contrast enhancement after applying the subtraction.
DS_OPTIMIZERANGE | [$0002] Optimize and increase the tonal range of the bitmap after applying the subtraction.


crBack Parameter For DirectionEdgeStatistical

crBack

The COLORREF value that specifies the non edge color. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


crEdge Parameter For DirectionEdgeStatistical

crEdge

The COLORREF value that specifies the edge color. You can specify a COLORREF value, such as the return value of the Windows RGB macro.


Return for DirectionEdgeStatistical

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For DirectionEdgeStatistical

nAngle

Angular amount that specifies the edge detector direction, in hundredths of degrees. Valid values range from –18000 through 18000. Positive value angles are produced by counterclockwise rotation above the horizon and negative value angles are produced by clockwise rotation below the horizon. This value is divided internally by 100.


uDim Parameter For DirectionEdgeStatistical

uDim

The dimension or the number of pixels used to calculate the edge in the specified direction.


uThreshold Parameter For DirectionEdgeStatistical

uThreshold

Threshold value used to determine which pixels are edge pixels. If the difference in the intensity value between the pixel being tested and the average intensity of the pixels in the uDim area/pixels around it is greater than this value, the pixel is an edge pixel. The threshold range for the 16, 48, and 64-bit bitmaps is from 0 to 65535 and for 12-bit bitmaps from 0 to 4095. Otherwise, it is from 0 to 255. The threshold is applied on channels separately.


Return for DiscreteFourierTransformation

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nMaxHarmonicX Parameter For DiscreteFourierTransformation

nMaxHarmonicX

Value that represents the maximum X harmonic. This value is (Width-1).


nMaxHarmonicY Parameter For DiscreteFourierTransformation

nMaxHarmonicY

Value that represents the maximum Y harmonic. This value is (Height-1).


nMinHarmonicX Parameter For DiscreteFourierTransformation

nMinHarmonicX

Value that represents the minimum X harmonic. This value is 0.


nMinHarmonicY Parameter For DiscreteFourierTransformation

nMinHarmonicY

Value that represents the minimum Y harmonic. This value is 0.


uFlags Parameter For DiscreteFourierTransformation

uFlags

Flags that indicate the transformation type, operation channel, frequency data type used to reconstruct the image, the clipping type, the used or computed frequencies range, the operation on the specified X harmonics range, and the operation on the specified Y harmonics range. You can use a bitwise OR (|) to specify one flag from each group.

The following flags represent the transformation type:

Value | Meaning
DFT_DFT | [$0000001] Convert the image into frequency domain
DFT_IDFT | [$0000002] Construct an image using the frequency components

The following flags represent the operation channel type:

Value | Meaning
DFT_BLUE | [$0000010] Use the blue channel.
DFT_GREEN | [$0000020] Use the green channel.
DFT_RED | [$0000030] Use the red channel.
DFT_GRAY | [$0000040] Use the master channel. If this flag is combined with FFT_IFFT, the reconstructed image will be gray.

The following flags represent the frequency data type used for constructing the image. This flag is used only if DFT_IDFT is set and will be ignored if DFT_DFT is set:

Value | Meaning
DFT_IDFT_MAG | [$0000100] Construct the image from the frequency magnitude data only.
DFT_IDFT_PHS | [$0000200] Construct the image from frequency phase data only.
DFT_IDFT_BOTH | [$0000300] Construct the image from both magnitude and phase data.

The following flags represent the clipping type. This flag is used only if DFT_IDFT is set and ignored if DFT_DFT is set:

Value | Meaning
DFT_IDFT_CLIP | [$0001000] Clip the constructed image values so they are between 0 and 255.
DFT_IDFT_SCL | [$0002000] Scale the constructed image values so they are between 0 and 255.

The following flags represent which harmonics are used:

Value | Meaning
DFT_ALL | [$0010000] Use or compute all harmonics. If this flag is used the range rectangle and the range flags will be ignored.
DFT_RANGE | [$0020000] Use or compute the harmonics specified in the range rectangle.

The following flags represent the operations on the X Harmonics range:

Value | Meaning
DFT_INSIDE_X | [$0100000] Use or compute only X harmonics inside the X range and ignore those outside the range.
DFT_OUTSIDE_X | [$0200000] Use or compute only the X harmonics outside the X range and ignore those inside the range.

The following flags represent the operations on the Y Harmonics range:

Value | Meaning
DFT_INSIDE_Y | [$1000000] Use or compute only Y harmonics inside the Y range and ignore those outside the range.
DFT_OUTSIDE_Y | [$2000000] Use or compute only the Y harmonics outside the Y range and ignore those inside the range.


Return for DisplayFourierTransformation

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For DisplayFourierTransformation

uFlags

Flags that indicate the data to be shown and the plotting scale. You can use a bit-wise OR (|) to specify one flag from each group.

The following flags represent the data to be shown:

Value | Meaning
DSP_FT_MAG | [$0001] Plot harmonics magnitude data.
DSP_FT_PHS | [$0002] Plot harmonics phase data.

The following flags represent the plotting scale. These are ignored when DSP_FT_PHS is set:

Value | Meaning
DSP_FT_NORM | [$0010] Plot harmonics magnitudes using the normal linear scale.
DSP_FT_LOG | [$0020] Plot harmonics magnitudes using the logarithmic scale.


Return for DynamicBinary

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uDim Parameter For DynamicBinary

uDim

Dimensions of the neighborhood used when evaluating each pixel (uDim x uDim), in pixels. uDim should be at least 1.


uLocalContrast Parameter For DynamicBinary

uLocalContrast

Local contrast threshold. If the contrast of the area surrounding the pixel is below uLocalContrast, the pixel is converted to black or white using a global pre-calculated threshold. If the contrast of the area surrounding the pixel is higher than uLocalContrast, the local threshold value is calculated and used. The range for uLocalContrast is 0 to 255 for 8-bit, 0 to 4095 for 12-bit and 0 to 65535 for 16-bit.


Return for EdgeDetectEffect

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For EdgeDetectEffect

uFlags

Flag that indicates the type of edge to generate. Possible values are:

Value | Meaning
EDGE_SOFT | [0] Generate softer (smoother) edges.
EDGE_SOLID | [1] Generate rougher edges.


uLevel Parameter For EdgeDetectEffect

uLevel

Value used to determine the brightness of the edges. Standard value is 50. Valid values range from 1 to 100. Big values will produce bright edges.


uThreshold Parameter For EdgeDetectEffect

uThreshold

Threshold value used to determine which pixels are going to be filtered. If the difference determined for a pixel is less than this value, the pixel is set to 0. If the difference is greater, the filter will be applied to the pixel.


nIndex Parameter For Element

nIndex

Index into the array of elements for the current marker.


Return for EnumMarkers

Return Value

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


Return for FastFourierTransformation

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For FastFourierTransformation

uFlags

Flags that indicate the transformation type, operation channel, frequency data type used to reconstruct the image, and the clipping type. You can use a bit-wise OR (|) to specify one flag from each group.

The following flags represent the transformation type:

Value | Meaning
FFT_FFT | [$0001] Convert the image into the frequency domain.
FFT_IFFT | [$0002] Construct an image from the internal frequency components. The image will be stored in the Bitmap property.

The following flags represent the operation channel type:

Value | Meaning
FFT_BLUE | [$0010] Work on the blue channel.
FFT_GREEN | [$0020] Work on the green channel.
FFT_RED | [$0030] Work on the red channel.
FFT_GRAY | [$0040] Work on the master Channel. If this flag is combined with FFT_IFFT, the reconstructed image will be gray.

The following flags represent the frequency data type used for constructing the image: this flag is used only if FFT_IFFT is set and will be ignored if FT_FFT is set:

Value | Meaning
FFT_IFFT_MAG | [$0100] Construct the image from the frequency magnitude only.
FFT_IFFT_PHS | [$0200] Construct the image from the frequency phase only.
FFT_IFFT_BOTH | [$0300] Construct the image from both magnitude and phase.

The following flags represent the clipping type. This flag is used only if FFT_IFFT is set and will be ignored if FFT_FFT is set:

Value | Meaning
FFT_IFFT_CLIP | [$1000] Clip the constructed image values to be between 0 and 255.
FFT_IFFT_SCL | [$2000] Scale the constructed image valid values are between 0 and 255.


Return for FreeFourierTransformationData

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


Return for FrequencyFilter

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bOnOff Parameter For FrequencyFilterMask

bOnOff

Value that indicates whether the frequency components are removed if the corresponding pixel value is zero. Possible values are:

Value | Meaning
TRUE | If the pixel value equals zero the frequency components will be removed, otherwise no change.
FALSE | The frequency component in the pixel will be multiplied by the value of the pixel divided by 255.


Return for FrequencyFilterMask

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nMaxHarmonicX Parameter For FrequencyFilter

nMaxHarmonicX

Value that represents the maximum X harmonic. This value is (Width-1).


nMaxHarmonicY Parameter For FrequencyFilter

nMaxHarmonicY

Value that represents the maximum Y harmonic. This value is (Height-1).


nMinHarmonicX Parameter For FrequencyFilter

nMinHarmonicX

Value that represents the minimum X harmonic. This value is 0.


nMinHarmonicY Parameter For FrequencyFilter

nMinHarmonicY

Value that represents the minimum Y harmonic. This value is 0.


uFlags Parameter For FrequencyFilter

uFlags

Flags that indicate the operation to be performed on the specified X and Y harmonics ranges. You can use a bit wise OR (|) to specify one flag from each group.

The following flags represent operations on the X harmonics range:

Value | Meaning
FRQ_INSIDE_X | [$0001] Keep the X harmonics inside X range and remove outside ones.
FRQ_OUTSIDE_X | [$0002] Remove the X harmonics inside X range and keep outside ones.

The following flags represent operations on the Y harmonics range:

Value | Meaning
FRQ_INSIDE_Y | [$0010] Keep the Y harmonics inside the Y range and remove the outside ones.
FRQ_OUTSIDE_Y | [$0020] Remove the Y harmonics inside the Y range and keep the outside ones.


Return for FunctionalLight

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For FunctionalLight

nAngle

Value that represents the light angle, in hundredths of a degree. This parameter is used if uFlags is set to FL_TRIGONOMETRY or to FL_FREEHAND. Valid values range from -18000 to 18000. This value is divided internally by 100.


nPhase Parameter For FunctionalLight

nPhase

Value that represents the phase shift angle, in hundredths of a degree. This parameter is used if uFlags is set to FL_TRIGONOMETRY. Possible values are from -18000 to 18000. This value will be divided internally by 100.


pBuff Parameter For FunctionalLight

pBuff

Pointer to an array of values that represent the shape drawn by the user. This parameter is used only if uFlags is set to FL_FREEHAND. These values should be between –1000 and 1000. They are internally divided by 1000, so the real values are between –1 and 1.


uBAmp Parameter For FunctionalLight

uBAmp

Value that represents the amplitude of the blue channel when FL_ADD is set in uFlags. This value is ignored when grayscale images are used or when FL_MUL or FL_LINEAR_QUADRATIC is set in uFlags. Possible values are from 0 –100.


uBuffCount Parameter For FunctionalLight

uBuffCount

Number of points stored in pBuff. This parameter is used only if uFlags is set to FL_FREEHAND.


uFlags Parameter For FunctionalLight

uFlags

Flag that indicates how the light is generated. Possible values are:

Value | Meaning
FL_LINEAR_QUADRATIC | [$1000] If this flag is set, the light will be computed according to distance from the center, which is represented by the uXOrigin and uYOrigin parameters, The brightness increase for every pixel is proportional to the distance to the effect's center. If this flag is set, do not set FL_TRIGONOMETRY, FL_FREEHAND.
FL_TRIGONOMETRY | [$2000] If this flag is set then the light will be generated by a sine or cosine function. If this is set, uFreq, nAngle, uXOrigin and uYOrigin are used to compute the light. If this flag is set, do not set FL_LINEAR_QUADRATIC or FL_FREEHAND.
FL_FREEHAND | [$4000] If this flag is set, the user will pass the light shape in the pBuff parameter. If this flag is set, the nAngle, pBuff and nBuffCount parameters will be used. The nAngle will determine the angle of the light lines compared to the X axis. If this flag is set, do not set FL_LINEAR_QUADRATIC or FL_TRIGONOMETRY.
FL_LINEAR_INNER | [$0001] The linear light will be concentrated at the center (uXOrigin, uYOrigin) and will decreases as it moves away from the center. This flag is valid only if FL_LINEAR_QUADRATIC is also set.
FL_LINEAR_OUTER | [$0002] The linear light will be concentrated at the far points from the center and will decrease inwards towards the center (uXOrigin, uYOrigin). This flag is valid only if FL_LINEAR_QUADRATIC is also set.
FL_QUADRATIC_INNER | [$0004] The Quadratic light will be concentrated at the center (uXOrigin, uYOrigin) and will decrease as it moves away from the center. This flag is valid only if FL_LINEAR_QUADRATIC is also set.
FL_QUADRATIC_OUTER | [$0008] The Quadratic light will be concentrated at the far points from the center and will decrease inwards towards the center (uXOrigin, uYOrigin). This flag is valid only if FL_LINEAR_QUADRATIC is also set.
FL_UNIDIRECTION | [$0010] A sine or cosine function will generate the light as lines. This flag is valid only if FL_TRIGONOMETRY is also set. The lines are parallel and have no center. The nAngle parameter determines the angle formed by these lines with the X axis.
FL_CIRCLES | [$0020] Sine or cosine function will generate the light as circles around the center (uXOrigin, uYOrigin). This flag is valid only if FL_TRIGONOMETRY is also set.
FL_ADD | [$0040] The amplitude parameters (uRAmp, uGAmp, and uBAmp) are multiplied with the results of the selected function (sine, cosine, freehand). The results are then added to the pixel values of the equivalent channel. These values as well as the real buffer values are from –1 to 1. This flag is valid only if FL_TRIGONOMETRY or FL_FREEHAND is also set.
FL_MUL | [$0080] Multiply the color factor specified by uRAmp with the results of the selected function (sine, cosine, freehand). The results are multiplied with every channel value. This flag is valid only if FL_TRIGONOMETRY or FL_FREEHAND are also set.


uFreq Parameter For FunctionalLight

uFreq

Value that represents the frequency of the light. This parameter is used if the uFlags is set to FL_TRIGONOMETRY or to FL_FREEHAND. Valid values range from 1 – 10000. This value is divided internally by 100 (corresponding to a real interval of 0.01 – 100.0).


uGAmp Parameter For FunctionalLight

uGAmp

Value that represents the amplitude of the green color when FL_ADD is set in uFlags. This value is ignored when grayscale images are used or when FL_MUL or FL_LINEAR_QUADRATIC is set in uFlags. Possible values are from 0–100.


uRAmp Parameter For FunctionalLight

uRAmp

Value that represents the amplitude of the master channel or the amplitude of the red channel. If the bitmap is grayscale, this parameter represents the amplitude of the master channel. If the bitmap is color and FL_MUL or FL_LINEAR_QUADRATIC are set in uFlags, this parameter represents the amplitude of each channel. If the bitmap is color and FLB_ADD is used, this represents the amplitude of the red channel. This value is an integer with a value greater than or equal to 0. This value will be multiplied with the results of the selected function (sine, cosine, user buffer , …). The results of the multiplications are then added to the pixel values. These values as well as the real buffer values are from –1 to 1. Possible values are from 0–100.


uXOrigin Parameter For FunctionalLight

uXOrigin

Value that represents the X coordinate of the origin, in pixels. This parameter is used if the uFlags is set to FL_TRIGONOMETRY and FL_CIRCLES or to FL_LINEAR_QUADRATIC.


uYOrigin Parameter For FunctionalLight

uYOrigin

Value that represents the Y coordinate of the origin, in pixels. This parameter is used if the uFlags is set to FL_TRIGONOMETRY and FL_CIRCLES or to FL_LINEAR_QUADRATIC.


Return for GetFeretsDiameter

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pPoints Parameter For GetFeretsDiameter

pPoints

Pointer to an array of contour points used to determine the Feret's diameter of the region. These points are obtained using the GetRgnContourPoints method.


uFeretsDiameter Parameter For GetFeretsDiameter

uFeretsDiameter

Variable to be updated with the length of the Feret’s diameter. The length is measured in pixels and is internally multiplied by 1000. Divide this value by 1000 to obtain the real length.


uFirstIndex Parameter For GetFeretsDiameter

uFirstIndex

Variable to be updated with the index of the first end point of the Feret’s diameter.


uPointsCount Parameter For GetFeretsDiameter

uPointsCount

Number of contour points in pPoints.


uSecondIndex Parameter For GetFeretsDiameter

uSecondIndex

Variable to be updated with the index of the second end point of the Feret’s diameter.


dCenter Parameter For GetLinearVOILUT

dCenter

A variable to be updated with the center of the range of color intensities that define your window of interest, if the LUT is linear.


dWidth Parameter For GetLinearVOILUT

dWidth

A variable to be updated with the range of color intensities that define your window of interest, if the LUT is linear.


Return for GetLinearVOILUT

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For GetLinearVOILUT

uFlags

Reserved for future use. Pass 0 for now.


Return for GetMarker

Return Value

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


lIndex Parameter For GetMarker

lIndex

Value that represents the index of the marker to retrieve.


Return for GetMarkers

Return Value

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


uFlags Parameter For GetMarkers

uFlags

Reserved for future use. Pass 0.


Return for GetMarksCenterMass

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pMarkCMPoints Parameter For GetMarksCenterMass

pMarkCMPoints

Pointer to an array to be updated with points which represent the center of mass for each corresponding registration mark specified in pMarkPoints. The first center of mass point corresponds to the first registration mark in the pMarkPoints array and so on…


pMarkPoints Parameter For GetMarksCenterMass

pMarkPoints

Pointer to an array of points that represent the location of registration marks.


uMarksCount Parameter For GetMarksCenterMass

uMarksCount

Number of marks, must be 3.


bWeighted Parameter For GetObjectInfo

bWeighted

Flag that indicates the weighting factor. Possible values are:

Value | Meaning
TRUE | The pixel intensity value (color) will be used as a weighting factor.
FALSE | All non-zero pixels will have the same weight.


Return for GetObjectInfo

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For GetObjectInfo

nAngle

Variable to be updated with the orientation angle of the object’s axis. Valid values are in degrees from -180.00 to 180.00, with negative values produced from clockwise rotation and where 0 is the horizon.


uRoundness Parameter For GetObjectInfo

uRoundness

Variable to be updated with the object’s roundness (compactness). This ratio will be 0 for a line and 100 for a circle.


uX Parameter For GetObjectInfo

uX

Variable to be updated with the x coordinate, in pixels, of the object’s center of mass.


uY Parameter For GetObjectInfo

uY

Variable to be updated with the y coordinate, in pixels, of the object’s center of mass.


Return for GetRgnContourPoints

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pPoints Parameter For GetRgnContourPoints

pPoints

Pointer to be updated with an array that contains the contour points for the bitmap's region. A memory buffer for this array is allocated by the method. When the array is no longer needed, the user should free it by calling the GlobalFreePtr macro.


uPointsCount Parameter For GetRgnContourPoints

uPointsCount

Variable to be updated with the number of contour points in pPoints.


Return for GetRgnPerimeterLength

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uLength Parameter For GetRgnPerimeterLength

uLength

Address of a variable to be updated with the perimeter length of the region. The length is expressed in pixels.


Return for GetStatisticsInfo

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uChannel Parameter For GetStatisticsInfo

uChannel

Flag that indicates the channel for which to get the information. This value is ignored if the bitmap is 12 or 16-bit grayscale. Possible values are:

Value | Meaning
CHANNEL_MASTER | [0] All channels.
CHANNEL_RED | [1] Red channel only.
CHANNEL_GREEN | [2] Green channel only.
CHANNEL_BLUE | [3] Blue channel only.


uEnd Parameter For GetStatisticsInfo

uEnd

Indicates the ending color value of the range for the evaluation.


uMax Parameter For GetStatisticsInfo

uMax

Variable to be updated with the maximum pixel value found.


uMean Parameter For GetStatisticsInfo

uMean

Variable to be updated with the mean value found. This value is divided internally by 100.


uMedian Parameter For GetStatisticsInfo

uMedian

Variable to be updated with the median pixel value found.


uMin Parameter For GetStatisticsInfo

uMin

Variable to be updated with the minimum pixel value found.


uPercent Parameter For GetStatisticsInfo

uPercent

Variable to be updated with the percentage of pixels in the entire bitmap that fall between uMin and uMax. This value is in hundredths of a percent. It is divided internally by 100.


uPixelCnt Parameter For GetStatisticsInfo

uPixelCnt

Variable to be updated with the number of pixels found that fall between the starting color value (uStart) and the ending color value (uEnd).


uStart Parameter For GetStatisticsInfo

uStart

Indicates the beginning color value of the range for the evaluation.


uStdDev Parameter For GetStatisticsInfo

uStdDev

Variable to be updated with the standard deviation found by this method.


uTotalPixelCnt Parameter For GetStatisticsInfo

uTotalPixelCnt

Variable to be updated with the number of pixels found in the entire image or region.


Return for GetTransformationParameters

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pnAngle Parameter For GetTransformationParameters

pnAngle

Pointer to a variable to be updated with the angle of rotation, in hundredths of degrees.


pnXTranslation Parameter For GetTransformationParameters

pnXTranslation

Pointer to a variable to be updated with the amount of bitmap translation along the x-axis (width), in hundredths of a pixel.


pnYTranslation Parameter For GetTransformationParameters

pnYTranslation

Pointer to a variable to be updated with the amount of bitmap translation along the y-axis (height), in hundredths of a pixel.


pRefPoints Parameter For GetTransformationParameters

pRefPoints

Pointer to an array of reference points. These points represent the center of mass points for the registration marks in the reference bitmap. These points can be obtained using the GetMarksCenterMass method.


pTrnsPoints Parameter For GetTransformationParameters

pTrnsPoints

Pointer to an array of transformed points. These points represent the center of mass for the transformed points. You have to provide this information.


puXScale Parameter For GetTransformationParameters

puXScale

Pointer to a variable to be updated with the amount of bitmap scaling along the x-axis (width), in percent.


puYScale Parameter For GetTransformationParameters

puYScale

Pointer to a variable to be updated with the amount of bitmap scaling along the y-axis (height), in percent.


crColor Parameter For GrayScaleToDuotone

crColor

An RGB color that will be used to create an array of colors internally. This parameter is used when the pNewColor is set to Nil (NULL). This parameter is ignored if the pNewColor value is something other than Nil (NULL).


Return for GrayScaleToDuotone

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pNewColor Parameter For GrayScaleToDuotone

pNewColor

Pointer to an L_RGBQUAD record (structure) array that specifies an array of colors that will be mixed with the original gray values. If this parameter is set to Nil (NULL), the crColor parameter must contain a valid color. Pass Nil (NULL) when you want the method to create the array of colors, two colors when replacing both colors in a binary image, or 256 colors when using a custom array of colors.


uFlags Parameter For GrayScaleToDuotone

uFlags

Flag that indicates whether colors will be mixed or replaced. Possible values are:

Value | Meaning
DT_MIX | [$0000] Mix the old colors with the new ones
DT_REPLACE | [$0001] Replace the old colors with the new ones


Return for GrayScaleToMultitone

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pColor Parameter For GrayScaleToMultitone

pColor

Pointer to an array of RGB colors, that will be added to the grayscale bitmap. This parameter is ignored when the uDistType parameter is set to DT_USERDEFINE. If the toolkit is generating the gradient colors, the user sets the desired base color(s) in this parameter when GrayScaleToMultitone is called. The number of entries in the array depends on the value of uToneType: 1 for DT_MONOTONE, 2 for DT_DUOTONE, 3 for DT_TRITONE, 4 for DT_QUADTONE. When the toolkit generates the array of gradient colors, this parameter will be updated with that array.


pGradient Parameter For GrayScaleToMultitone

pGradient

Pointer to a user-defined array of palette entries that will hold the set of color shade gradients. This parameter is used when the uDistType parameter is set to DT_USERDEFINE.

The number of entries in this array should be 256 entries for each TONE.


uDistType Parameter For GrayScaleToMultitone

uDistType

Flag that indicates the source of the colors to be added to the bitmap. Possible values are:

Value | Meaning
DT_LINEAR | [0] Use the linear gradient from dark to light, generated by the toolkit. If this flag is set, LEADTOOLS will ignore the prcColor parameter and update the pColor parameter with an array of colors generated by the toolkit.
DT_USERDEFINE | [1] Use the user-defined gradient in the pGradient parameter.


uFlags Parameter For GrayScaleToMultitone

uFlags

Flag used to determine whether the new colors replace the old colors, or whether the new colors will be mixed with the old colors. Possible values are:

Value | Meaning
DT_MIX | [$0000] Mix the old colors with the new ones
DT_REPLACE | [$0001] Replace the old colors with the new ones


uToneType Parameter For GrayScaleToMultitone

uToneType

Flag that indicates the number of colors to add to the grayscale bitmap. Possible values are:

Value | Meaning
DT_MONOTONE | [$0000] Add one color.
DT_DUOTONE | [$0001] Add two colors.
DT_TRITONE | [$0002] Add three colors.
DT_QUADTONE | [$0003] Add four colors.


Return for HolesRemovalRgn

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


Return for InitFourierTransformationData

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


Return for InsertMarker

Return Value

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


nIndex Parameter For InsertMarker

nIndex

The position where the marker will be inserted. Pass 0 to insert the marker at the beginning (so this marker will become the first marker). Pass nIndex > 0 to insert this marker after the first nIndex markers. Pass $FFFFFFFF to insert this marker at the end of the list.


Return for IsRegMark

Return Value

Return | Meaning
SUCCESS | The method was successful.
0 | The object is not a registration mark.
< 0 | An error occurred. Refer to Error Codes.


uHeight Parameter For IsRegMark

uHeight

The height of the registration mark (in pixels).


uMaxScale Parameter For IsRegMark

uMaxScale

Maximum scaling factor of the mark to be detected. This is a percentage. It must not be lower than uMinScale, or an error will be returned.


uMinScale Parameter For IsRegMark

uMinScale

Minimum scaling factor of the mark to be detected. This is a percentage. It must not exceed uMaxScale, or an error will be returned.


uType Parameter For IsRegMark

uType

Value that specifies the type of registration mark for which to look. Possible values are:

Value | Meaning
RGS_T | [$0000] T-shape registration mark.

Currently, only one registration mark is defined (T-shape). For more information, refer to the Results section for this method.


uWidth Parameter For IsRegMark

uWidth

The width of the registration mark (in pixels).


Return for LoadMarkers

Return Value

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


strFileName Parameter For LoadMarkers

strFileName

String that contains the name of the file from which to load the collection of metadata markers.


uFlags Parameter For LoadMarkers

uFlags

Reserved for future use. Pass 0.


Return for MathFunction

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFactor Parameter For MathFunction

uFactor

Factor used as an Amplitude factor when squaring, taking the log of or taking the square root of the color values and as a Frequency factor when taking the sine or cosine of the color values. The value of uFactor is divided internally by different amounts, according to the type of the function being used. These amounts are as follows:

If uMType is set to: | then the uFactor will be divided by:
MF_SQR | 10000 internally
MF_LOG | 10 internally
MF_SQRT | 10 internally
MF_SIN | 100 internally
MF_COS | 100 internally


uMType Parameter For MathFunction

uMType

Value that represents the function to be applied. Possible values are:

Value | Meaning
MF_SQR | [0] Square the values.
MF_LOG | [1] Take the log of the values.
MF_SQRT | [2] Take the square root of the values.
MF_SIN | [3] Take the sine of the values.
MF_COS | [4] Take the cosine of the values.


Return for MultiScaleEnhancement

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uContrast Parameter For MultiScaleEnhancement

uContrast

Fraction of the contrast enhancement applied to the image. Valid values range from 0 – 10000, which are interpreted as 0% - 100%. This value is internally divided by 10000. Greater values will produce stronger contrast.


uEdgeCoeff Parameter For MultiScaleEnhancement

uEdgeCoeff

The edge enhancement coefficient. This value will be internally divided by 100. Set MSE_DEFAULT in uFlags to use the default values (which is 170 interpreted as 1.7). This option will be used only if the MSE_EDGEENH is set in the uFlags. Any value (>= 0) is valid. A value of 100 will be interpreted as 1.0 and will keep the bitmap’s edges un-enhanced. Larger values will produce more visible edges. Smaller values will produce less visible edges. Practically, the enhancement levels out at 200000 (interpreted as 2000.0) – values bigger than that will not enhance the bitmap’s edges any more.


uEdgeLevels Parameter For MultiScaleEnhancement

uEdgeLevels

The number of levels that will be used for edge enhancement. Valid values are from 1 to the maximum number of levels of the image. If MSE_DEFAULT is set in uFlags, the method will use the default number of levels (which is 3). This option will take effect only if MSE_EDGEENH is also set in uFlags. Passing zero will return an error code.


uFlags Parameter For MultiScaleEnhancement

uFlags

Flags that determine method behavior. You can specify none, one or both of the following values:

Value | Meaning
MSE_EDGEENH | [$0010] Add edge enhancement option to the method. When this flag is set, the uEdgeLevels and uEdgeCoeff parameters will be used.
MSE_LATRED | [$0020] Add latitude reduction option to the method. When this flag is set, uLatitudeLevel and uLatitudeCoeff will be used.

You must also specify one of the following values:

Value | Meaning
MSE_GAUSSIAN | [$0000] Use Gaussian filter.
MSE_RESAMPLE | [$0001] Use resample filter.
MSE_BICUBIC | [$0002] Use bicubic filter.
MSE_NORMAL | [$0003] Use normal filter.


uLatitudeCoeff Parameter For MultiScaleEnhancement

uLatitudeCoeff

The latitude reduction coefficient. This value will be internally divided by 100. Set MSE_DEFAULT in uFlags to use the default values (which is 140 interpreted as 1.4). This parameter will be used only if MSE_LATRED is set in uFlags. Any value (>= 0) is valid. A value of 100 will be interpreted as 1.0 and will keep the bitmap’s latitude un-enhanced. Decreasing latitude makes the bitmap brighter, increasing latitude makes the bitmap dimmer. Practically, the enhancement levels out at 200000 (interpreted as 2000,0) – values bigger than that will not decrease the bitmap’s latitude any more.


uLatitudeLevels Parameter For MultiScaleEnhancement

uLatitudeLevels

The number of levels that will be used for Latitude reduction. Valid values are from 1 to the maximum number of levels of the image. You can also set MSE_DEFAULT in uFlags to use the default level value (which is 5). This option will be used only if the MSE_LATRED is set in uFlags. Passing zero will return an error code.


uElementCount Parameter For OnEnumerateMarkers

uElementCount

Value that indicates the number of elements in the enumerated marker.


uType Parameter For OnEnumerateMarkers

uType

An integer that represents the ID of the marker(s) being enumerated. Recommended values are between 0xE0 and 0xFE. Other values are possible, but before using other values, study the JPEG specs to determine which marker types are allowed.


crBright Parameter For PlaneBend

crBright

The COLORREF value that specifies the color of an external light source that shines on the displayed bitmaps.


crFill Parameter For PlaneBend

crFill

The COLORREF value that specifies the background color.


Return for PlaneBend

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nDistance Parameter For PlaneBend

nDistance

Camera distance from the viewing screen, in pixels.


nPydAngle Parameter For PlaneBend

nPydAngle

The view angle, off the Z-axis. This value is given in hundredths of a degree (+/-). This can be a number from 0 to 36,000.


nRepeat Parameter For PlaneBend

nRepeat

Number of times the bitmap repeats along the Z-axis. If nRepeat equals –1 the bitmap will be infinitely repeated. Its range starts from –1.


ptCenter Parameter For PlaneBend

ptCenter

TPoint record(structure) that contains the point at which the camera or viewer is looking. This is also the point toward which the bitmaps will be bent. It may be outside the bitmap borders.


uBendFactor Parameter For PlaneBend

uBendFactor

Determines the plane’s bending value. The range starts at 100 and increases indefinitely. If uBendFactor equals 100 the planes will not be bent. If uBendFactor > 100 planes will be bent. The value of this parameter is internally divided by 100.


uBrightLength Parameter For PlaneBend

uBrightLength

Value that indicates how much the brightness changes as you move along the Z axis. This parameter is internally multiplied by 50.


uEndBright Parameter For PlaneBend

uEndBright

Value that indicates the brightness of an external light source on the last bitmap displayed. Possible values range from 0 to 100. A value of 0 indicates no external light displayed on the bitmap. A value of 100 indicates an external light source with full brightness is displayed on the bitmap.


uFlags Parameter For PlaneBend

uFlags

Flags that indicate the background color and the planes to be shown. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate the background color:

Value | Meaning
PLANE_FILL_CLR | [$0001] Use the crFill as a background color.
PLANE_NO_CHG | [$0002] Use the image itself as a background

The following are the flags that indicate which planes (with respect to the Z-axis) will be shown. You can use a bit wise OR (|) to specify more than one plane. However, you can only combine PLANE_LEFT with PLANE_RIGHT or PLANE_UP with PLANE_DOWN.

Value | Meaning
PLANE_LEFT | [$0010] The plane will be displayed to the left of the Z-axis.
PLANE_RIGHT | [$0020] The plane will be displayed to the right of the Z-axis.
PLANE_UP | [$0040] The plane will be displayed above the Z-axis.
PLANE_DOWN | [$0080] The plane will be displayed below the Z-axis.


uPlaneOffset Parameter For PlaneBend

uPlaneOffset

Distance between the parallel planes.


uStartBright Parameter For PlaneBend

uStartBright

Value that indicates the brightness of an external light source on the first bitmap displayed. Possible values range from 0 to 100. A value of 0 indicates no external light displayed on the bitmap. A value of 100 indicates an external light source with full brightness is displayed on the bitmap.


uStretch Parameter For PlaneBend

uStretch

Value that indicates whether to expand or compress the bitmap, and by how much. If uStretch < 100 bitmap will be expanded. If uStretch > 100 the bitmap will be compressed. Use 100 to maintain the bitmap's dimensions. The value of this parameter is internally divided by 100.


uZValue Parameter For PlaneBend

uZValue

Viewing screen offset on the Z-axis, in pixels.


crBright Parameter For Plane

crBright

The COLORREF value that specifies the color of an external light source that shines on the displayed bitmaps.


crFill Parameter For Plane

crFill

The COLORREF value that specifies the background color.


Return for Plane

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nDistance Parameter For Plane

nDistance

Camera distance from the viewing screen, in pixels.


nPydAngle Parameter For Plane

nPydAngle

The view angle, off the Z-axis. This value is given in hundredths of a degree (+/-). This can be a number from 0 to 36,000.


nRepeat Parameter For Plane

nRepeat

Number of times the bitmap repeats along the Z-axis. If nRepeat equals –1 the bitmap will be infinitely repeated. Its range starts from –1.


ptCenter Parameter For Plane

ptCenter

POINT structure that contains the point at which the camera or viewer is looking. It may be outside the bitmap borders.


uBrightLength Parameter For Plane

uBrightLength

Value that indicates how much the brightness changes as you move along the Z axis. This parameter is internally multiplied by 50.


uEndBright Parameter For Plane

uEndBright

Value that indicates the brightness of an external light source on the last bitmap displayed. Possible values range from 0 to 100. A value of 0 indicates no external light displayed on the bitmap. A value of 100 indicates an external light source with full brightness is displayed on the bitmap.


uFlags Parameter For Plane

uFlags

Flags that indicate the background color and the planes to be shown. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate the background color:

Value | Meaning
PLANE_FILL_CLR | [$0001] Use the crFill as a background color.
PLANE_NO_CHG | [$0002] use the image itself as a background

The following are the flags that indicate which planes (with respect to the Z-axis) will be shown. You can use a bit wise OR (|) to specify more than one plane. However, you can only combine PLANE_LEFT with PLANE_RIGHT or PLANE_UP with PLANE_DOWN.

Value | Meaning
PLANE_LEFT | [$0010] The plane will be displayed to the left of the Z-axis.
PLANE_RIGHT | [$0020] The plane will be displayed to the right of the Z-axis.
PLANE_UP | [$0040] The plane will be displayed above the Z-axis.
PLANE_DOWN | [$0080] The plane will be displayed below the Z-axis.


uPlaneOffset Parameter For Plane

uPlaneOffset

Distance between the parallel planes.


uStartBright Parameter For Plane

uStartBright

Value that indicates the brightness of an external light source on the first bitmap displayed. Possible values range from 0 to 100. A value of 0 indicates no external light displayed on the bitmap. A value of 100 indicates an external light source with full brightness is displayed on the bitmap.


uStretch Parameter For Plane

uStretch

Value that indicates whether to expand or compress the bitmap, and by how much. If uStretch < 100 bitmap will be expanded. If uStretch > 100 the bitmap will be compressed. Use 100 to maintain the bitmap's dimensions. The value of this parameter is internally divided by 100.


uZValue Parameter For Plane

uZValue

Viewing screen offset on the Z-axis, in pixels.


crBorder Parameter For PuzzleEffect

crBorder

If PUZZLE_BORDER is set in uFlags, this value represents the color of the border that will be drawn around the blocks. This parameter is ignored if the PUZZLE_BORDER flag is not set.


Return for PuzzleEffect

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For PuzzleEffect

uFlags

Flags that specify how to apply the puzzle effect. Possible values are:

Value | Meaning
PUZZLE_BORDER | [$0001] Draw borders around the puzzle blocks. Use the crBorder parameter to pass the border color. If the BITMAP_RESIZE flag is not set and the edge blocks have a different size than the inner blocks, the border will not be drawn for the right and the bottom edges.
PUZZLE_SHUFFLE | [$0002] Shuffle the blocks around, controlling the randomization process by the uRandomize parameter. If this flag is not set, the blocks will stay in their original position.
PUZZLE_SIZE | [$0010] Apply the puzzle effect using the uXBlock and uYBlock parameters as the width and height of each block, in pixels.
PUZZLE_COUNT | [$0020] Apply the puzzle effect using the uXBlock and uYBlock parameters as the number of blocks per row and per column.
BITMAP_RESIZE | [$0100] Resize the image to be sure that all blocks have equal size. If this flag is not set, then the remainder of the image (edge blocks) will be manipulated differently than the inner blocks.


uRandomize Parameter For PuzzleEffect

uRandomize

The starting point for the randomization process. Valid values range from 0 through 500. Use 0 to have the method select the starting point.


uXBlock Parameter For PuzzleEffect

uXBlock

If the PUZZLE_SIZE flag is set, this value represents the width of the each block, in pixels. If the PUZZLE_COUNT flag is set, it represents the number of blocks per row.


uYBlock Parameter For PuzzleEffect

uYBlock

If the PUZZLE_SIZE flag is set, this value represents the height of the each block, in pixels. If the PUZZLE_COUNT flag is set, it represents the number of blocks per column.


Return for RevEffect

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uLineSpace Parameter For RevEffect

uLineSpace

The space (in pixels) between each wave.


uMaximumHeight Parameter For RevEffect

uMaximumHeight

The maximum height (in pixels) that the wave can reach.


crFill Parameter For RingEffect

crFill

The color used to fill the undetermined area. This parameter is used only if uFlags contains RING_COLOR.


Return for RingEffect

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nAngle Parameter For RingEffect

nAngle

The rotation angle value for each ring compared to the inner ring, in hundredths of degrees. This parameter is used only if uFlags contains RING_FIXEDANGLE. The range of the acceptable values is from –18000 to 18000. This value is divided internally by 100.


nXOrigin Parameter For RingEffect

nXOrigin

The X-coordinate, in pixels, for the origin of the rings.


nYOrigin Parameter For RingEffect

nYOrigin

The Y-coordinate, in pixels, for the origin of the rings.


uFlags Parameter For RingEffect

uFlags

Flags that control the method’s behavior. These flags can be OR-ed together with any other flag, unless otherwise specified.

Value | Meaning
RING_COLOR | [$0000] Controls the output of rings that have undetermined areas. Fill the undetermined areas with color crFill. If you use this flag, do not use RING_REPEAT or RING_NOCHANGE.
RING_REPEAT | [$0001] Controls the output of rings that have undetermined areas. Repeat the edges of the region and fill these values in the undetermined areas. The edge will be repeated halfway throughout the missing portion of the ring. If you use this flag, do not use RING_COLOR or RING_NOCHANGE.
RING_NOCHANGE | [$0002] Controls the output of rings that have undetermined areas. Leave the edge pixels unchanged. If you rotate an incomplete ring, the original bitmap pixels will remain in places where you would have undetermined portions of the ring. If you use this flag, do not use RING_COLOR or RING_REPEAT.
RING_FIXEDANGLE | [$0010] Rotate each ring against the inner ring by a fixed rotation angle (nAngle).
RING_RADIUS | [$0100] Indicates that uRadius contains the width of each ring, in pixels. If you use this flag, do not use RING_MAXRADIUS.
RING_MAXRADIUS | [$0200] Indicates that uRadius contains the maximum radius, in pixels, that corresponds to the external ring. In this case, the width of each ring is uRadius / (uRingCount + 1). If you use this flag, do not use RING_RADIUS.


uRadius Parameter For RingEffect

uRadius

If the flag RING_RADIUS is set in uFlags, this is the width of each ring, in pixels. If RING_MAXRADIUS is set in uFlags, this is the maximum radius, in pixels. In this latter case, the width of each ring is equal to uRadius / uRingCount + 1.


uRandomize Parameter For RingEffect

uRandomize

The starting point for the randomization process. Valid range is 0-500. If this value is 0, the method will pick the starting point. If the value is > 0, this value will be the starting point.


uRingCount Parameter For RingEffect

uRingCount

Number of rings.


crSample Parameter For SampleTarget

crSample

The COLORREF value that specifies the sample color. The red value is for the red channel, the green value for the green channel, and the blue value for the blue channel.


crTarget Parameter For SampleTarget

crTarget

The COLORREF value that specifies the target color. The red value is for the red channel, the green value for the green channel, and the blue value for the blue channel.


Return for SampleTarget

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For SampleTarget

uFlags

Flags that indicate the channel for which to shift the color and how to remap the other values for that channel. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate the channel:

Value | Meaning
SAMP_RED | [$0001] Shift the color in the red channel.
SAMP_GREEN | [$0002] Shift the color in the green channel.
SAMP_BLUE | [$0003] Shift the color in the blue channel.
SAMP_RGB | [$0004] Shift the color in the red, green, and blue channels.

The following are the flags that indicate how other pixel values in the set channel will be affected:

Value | Meaning
SAMP_LOW | [$0010] Remap the shadow values for the channel set in uFlags.
SAMP_MID | [$0020] Remap the midtone values for the channel set in uFlags.
SAMP_HIGH | [$0030] Remap the highlight values for the channel set in uFlags.


Return for SearchRegMarks

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


pRegMarks Parameter For SearchRegMarks

pRegMarks

Pointer to an array of REGMARKS records (structures) that contain information used when searching for registration marks.


uMarkCount Parameter For SearchRegMarks

uMarkCount

Number of elements in pRegMarks.


Return for Segment

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uFlags Parameter For Segment

uFlags

Flag that indicates the color space used in the segmentation. Possible values are:

Value | Meaning
SGM_RGB | [$00001] Comparison done on red, green and blue differences.
SGM_Y | [$00002] Comparison done on the Y channel difference in YUV space.
SGM_U | [$00003] Comparison done on the U channel difference in YUV space.
SGM_V | [$00004] Comparison done on the V channel difference in YUV space.
SGM_UV | [$00005] Comparison done on the U and V channels differences in YUV space.


uThreshold Parameter For Segment

uThreshold

The tolerance value of each segment. Valid values for this parameter are: 0 to 255 for 1, 2, 3, 4, 5, 6, 7, 8, 24, and 32-bit bitmaps, 0 to 4095 for 12-bit bitmaps and 0 to 65535 for 16, 48, and 64-bit bitmaps.


Return for SelectData

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


bCombine Parameter For SelectData

bCombine

A flag that tells how to color the output pixels. Possible values are:

Value | Meaning
TRUE | Pixels with values greater than or equal to the threshold value are ANDed with crVariance. The source pixel is first converted to 24-bit grayscale and then And-ed with crVariance. For pixels with values less than the threshold value, the RGB pixel value will be the same as the high byte source pixel value. That is R = G = B = High byte values of the source pixel.
FALSE | Pixels with values greater than or equal to the threshold value are set to crVariance. Pixels with values less than the threshold value are set to black.


crVariance Parameter For SelectData

crVariance

Color that will be used for showing the variances in the bitmap.


SrcBitmap Parameter For SelectData

SrcBitmap

Bitmap handle referencing the 8, 12 or 16-bit grayscale bitmap. This bitmap will not be modified.


uSrcHighBit Parameter For SelectData

uSrcHighBit

Position of the last bit that will construct the mask. This is inclusive (it is part of the mask). The value should not be less than uSrcLowBit. You can also pass -1, which is interpreted as "highest bit" (Source BitmapBits - 1).


uSrcLowBit Parameter For SelectData

uSrcLowBit

Position of the first bit that will construct the mask. This is a zero based number.


uThreshold Parameter For SelectData

uThreshold

Value that indicates the threshold for showing the bitmap variances. If the mask value is greater or equal to the threshold value, then the pixel will be colored using crVariance. For more information, refer to the bCombine parameter.


Return for SelectiveColor

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


SelClrs Parameter For SelectiveColor

SelClrs

An array of 9 SELECTIVECOLORINFO record (structures). Each SELECTIVECOLORINFO record (structure) contains information about a specific color.


Return for SetMarkers

Return Value

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


Marker Parameter For SetMarkers

Marker

Pointer to a TLEADMarker object that contains the markers to set.


uFlags Parameter For SetMarkers

uFlags

Reserved for future use. Pass 0.


Return for ShiftData

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


SrcBitmap Parameter For ShiftData

SrcBitmap

The source bitmap handle referencing the 8, 12 or 16-bit grayscale bitmap. This bitmap will not be modified.


uDstBitsPerPixel Parameter For ShiftData

uDstBitsPerPixel

Bits per pixel for the destination bitmap. The allowed values are 8, 12, or 16.


uDstLowBit Parameter For ShiftData

uDstLowBit

The bit position at which the selected mask will be copied into the destination bitmap.


uSrcHighBit Parameter For ShiftData

uSrcHighBit

Position of the last bit used to construct the mask. This is inclusive (it is part of the mask). The value should not be less than uSrcLowBit. You can also pass -1, which is interpreted as "the highest bit" (Source BitmapBits - 1).


uSrcLowBit Parameter For ShiftData

uSrcLowBit

Position of the first bit used to construct the mask. This is a zero-based number.


Return for Skeleton

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uThreshold Parameter For Skeleton

uThreshold

Threshold value used to binarize the bitmap before finding the skeleton; this parameter is ignored if the bitmap is a binary bitmap.


Return for SubtractBackground

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


uBrightnessFactor Parameter For SubtractBackground

uBrightnessFactor

Brightness factor for increasing or decreasing the brightness of the image. Valid values range from 0 to 400. If you pass 100 the brightness remains unchanged. Lower values darken the image while higher values lighten the image.


uFlags Parameter For SubtractBackground

uFlags

Flags that indicate whether the background is darker than the foreground, and whether to show the objects without the background. You must select one from each group. Possible values are:

The following flags represent whether the background is darker than the foreground:

Value | Meaning
SBK_BG_DARK | [$00000000] The background in the current image is darker than the foreground.
SBK_BG_BRIGHT | [$00000001] The background in the current image is brighter than the foreground.

The following flags represent whether to show the objects without a background:

Value | Meaning
SBK_RES_SHOW | [$00000000] The output bitmap shows the result of the subtraction between the background and the original image.
SBK_BG_SHOW | [$00000010] The output bitmap shows only the background.


uRollingBall Parameter For SubtractBackground

uRollingBall

The radius (in pixels) of the ball that will roll over the entire image to determine the background. Recommended value is 50.


uShrinkSize Parameter For SubtractBackground

uShrinkSize

Shrink size ratio used to minimize the image internally in order to increase the speed with little loss of accuracy. Possible values are:

Value | Meaning
SBK_DEPEND | [0] The Shrink size depends on the ball size.
SBK_1_1 | [1] No Resize (Highest accuracy).
SBK_1_2 | [2] Resize to half width and height.
SBK_1_4 | [3] Resize to quarter width and height.
SBK_1_8 | [4] Resize to eighth width and height (very fast).


Return for TextureAlphaBlend

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


MaskBitmap Parameter For TextureAlphaBlend

MaskBitmap

The bitmap handle that references the fade mask. To combine the two bitmaps just with opacity, set this parameter to 0.


nHeight Parameter For TextureAlphaBlend

nHeight

Height of the area to be combined, in pixels. This height applies to both the source and the destination areas.


nOpacity Parameter For TextureAlphaBlend

nOpacity

Opacity value used when combining the areas from the bitmap resulting from the feathering and the destination bitmap. This value is between 0 and 255.


nWidth Parameter For TextureAlphaBlend

nWidth

Width of the area to be combined, in pixels. This width applies to both the source and the destination areas.


nXDst Parameter For TextureAlphaBlend

nXDst

The X coordinate of the origin of the destination rectangle.


nXSrc Parameter For TextureAlphaBlend

nXSrc

The X coordinate of the origin of the source rectangle.


nYDst Parameter For TextureAlphaBlend

nYDst

The Y coordinate of the origin of the destination rectangle.


nYSrc Parameter For TextureAlphaBlend

nYSrc

The Y coordinate of the origin of the source rectangle.


pOffset Parameter For TextureAlphaBlend

pOffset

Pointer to a POINT structure that contains the offset of the underlay bitmap, with respect to the destination bitmap. The method will use this point to calculate the parts of the underlay bitmap that will be applied to the mask bitmap. Using this point lets the user provide the feel of continuous texture when applying this method to neighboring parts inside the destination bitmap using the same or a different mask. If the UnderlayBitmap parameter is set to 0 also set this parameter to Nil (NULL).


SrcBitmap Parameter For TextureAlphaBlend

SrcBitmap

The bitmap handle that references the source bitmap.


UnderlayBitmap Parameter For TextureAlphaBlend

UnderlayBitmap

The bitmap handle that references the bitmap to be used as the underlying image. The method will use this bitmap to underlay the mask bitmap. To ignore this parameter, pass 0.


crBright Parameter For Tunnel

crBright

The COLORREF value that specifies the color of an external light source that shines in the tunnel.


crFill Parameter For Tunnel

crFill

The COLORREF value that specifies the background color.


Return for Tunnel

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nDistance Parameter For Tunnel

nDistance

Camera distance from the viewing screen, in pixels.


nRepeat Parameter For Tunnel

nRepeat

Number of times the bitmap repeats along the Z-axis. If nRepeat equals –1 the bitmap will be infinitely repeated. Its range starts from –1.


nRotationOffset Parameter For Tunnel

nRotationOffset

Rotates tunnel around the Z-axis in pixel steps. If TUN_AXIS_WIDTH is set, then the bitmap width is along the Z-axis and nRotationOffset set to the bitmap height is equivalent to a complete cycle. If TUN_AXIS_HEIGHT is set, then the bitmap height is along the Z-axis and nRotationOffset set to the bitmap width is equivalent to a complete cycle.


ptCenter Parameter For Tunnel

ptCenter

TPoint record (structure) that contains the point at which the camera or viewer is looking. It may be outside the bitmap borders.


uBrightLength Parameter For Tunnel

uBrightLength

Value that indicates how much the brightness changes as you move along the Z axis. This parameter is internally multiplied by 50.


uEndBright Parameter For Tunnel

uEndBright

Value that indicates the brightness of an external light source at the end of the tunnel. Possible values range from 0 to 100. A value of 0 indicates no external light displayed at the end of the tunnel. A value of 100 indicates an external light source with full brightness is displayed on the bitmap.


uFlags Parameter For Tunnel

uFlags

Flags that indicate the background color and which bitmap dimension extends along the Z-axis. You can use a bit wise OR (|) to specify one flag from each group.

The following are the flags that indicate the background color:

Value | Meaning
PLANE_FILL_CLR | [$0001] Use the crFill as a background color.
PLANE_NO_CHG | [$0002] Use the image itself as a background.

The following are the flags that indicate which bitmap dimension is along the Z-axis:

Value | Meaning
TUN_AXIS_WIDTH | [$0010] Bitmap width will be along the Z-axis.
TUN_AXIS_HEIGHT | [$0010] Bitmap height will be along the Z-axis.


uRad Parameter For Tunnel

uRad

Tunnel radius.


uStartBright Parameter For Tunnel

uStartBright

Value that indicates the brightness of an external light source at the beginning of the tunnel. Possible values range from 0 to 100. A value of 0 indicates no external light is displayed at the beginning of the tunnel. A value of 100 indicates an external light source with full brightness is displayed.


uStretch Parameter For Tunnel

uStretch

Value that indicates whether to expand or compress the bitmap, and by how much. If uStretch < 100 the bitmap will be expanded. If uStretch > 100 the bitmap will be compressed. Use 100 to maintain the bitmap's dimensions. The value of this parameter is internally divided by 100.


uZValue Parameter For Tunnel

uZValue

Viewing screen offset on the Z-axis, in pixels.


Return for UserFilter

Return Value

Return | Meaning
SUCCESS | The method was successful.
<1 | An error occurred. Refer to Error Codes.


nfltOffset Parameter For UserFilter

nfltOffset

Value used to offset the final result of the output.


ufltCenter Parameter For UserFilter

ufltCenter

Point to be used as the matrix/mask (ufltMatrix) center.


ufltDivisor Parameter For UserFilter

ufltDivisor

Value used to divide the final result of the output. This must be a non-zero value. If you want to use floating point values for the matrix elements and the divisor, multiply the matrix elements and the divisor with the same value (for example, 10, 100, 1000).


ufltFlag Parameter For UserFilter

ufltFlag

Flag that indicates the type of operation. These flags cannot be or-ed together.

Value | Meaning
UD_SUM | [$0000] Perform a summation operation.
UD_MAX | [$0001] Perform a maximum operation.
UD_MIN | [$0002] Perform a minimum operation.


ufltHeight Parameter For UserFilter

ufltHeight

Number of rows in the user-defined array (mask).


ufltMatrix Parameter For UserFilter

ufltMatrix

Two-dimensional array (ufltWidth X ufltHeight) of integers that contains the user-defined matrix (mask). The elements are stored in row order (first row, second row, etc).


ufltWidth Parameter For UserFilter

ufltWidth

Number of columns in the user-defined array (mask).


Return for WriteMetaData

Return Value

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


strFileName Parameter For WriteMetaData

strFileName

String that contains the name of the file in which to write the metadata.


uFlags Parameter For WriteMetaData

uFlags

Flags describing the type of metadata to write. These flags can be or-ed if more than one type of metadata should be written. Possible values are:

Value | Meaning
METADATA_COMMENTS | Write comments
METADATA_TAGS | Write tags
METADATA_MARKERS | Write markers
METADATA_ALL | Write all metadata (tags, comments and markers)


Raster Images: Maintaining File Comments

Raster Images:
Input and Output
Maintaining File Comments

Comment property

ReadComment method

WriteComment method


Raster Images: Maintaining TIFF Tags

Raster Images:
Input and Output
Maintaining TIFF Tags

EnumTags method

GetTagCount method

GetTagData method

GetTagType method

OnEnumTags event

ReadTag method

ReadTagMemory method

WriteTag method