Introduction

All LEADTOOLS Vector features are included in the LEADTOOLS Vector Imaging Pro toolkits. The Vector features provide C++ classes that let you load, modify and save vector images.

LEAD also offers the LEADTOOLS Vector View Plug in, which can be added to any LEADTOOLS Raster Pro product. The LEADTOOLS Vector View Plug in provides only the LEADTOOLS Vector Viewing Features. These features provide the ability to load vector images and perform limited vector image manipulation.

Please note that functions available only in the LEADTOOLS Vector Imaging Pro toolkits are designated "This function is available in the LEADTOOLS Vector Imaging Pro Toolkits." in the documentation.

Executable demos are included in all LEADTOOLS products. The executable demos provide a quick and easy way to evaluate the Vector features and performance.

The Vector features are shipped with the LEADTOOLS products listed above, however they are locked. For information on unlocking support for the Vector features, refer to Unlocking Vector Feature Support .

The Class Library comes in a WIN32 edition and supports development of software applications for any of the following environments:

Windows 3.x NT
Windows 4.x NT
Windows 95/98
Windows 2000

Getting Started with the LEADTOOLS Class Library

Summary of All Supported File Formats

Summary of All Supported Vector File Formats


Example Programs

The following example programs are in separate EXAMPLES\CLASSLIB\ subdirectories (such as C:\LEAD14\EXAMPLES\CLASSLIB\DEMO). The executable files for these examples were compiled with Document/Medical capabilities of the toolkit. To get Document/Medical capabilities, you must buy the LEADTOOLS Document/Medical toolkit. Otherwise, if you recompile the examples, the resulting executable files will not have the Document/Medical capabilities.

Note:

You can run the example programs on your system by clicking the appropriate buttons in online help. If you try to run an example program that is not on your system, an error message will appear.

VECTOR DEMO

Vector Demo is the main vector example program. It uses pull-down menus to demonstrate most of the LEADTOOLS Vector features in one application. This program was compiled using a Microsoft compiler.


Version History

Current version: | 14.5
Last update: | October 19, 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 11 to Version 11.5

Version 11


Changes from Version 14 to Version 14.5

Version 14.5 of the LEADTOOLS Vector Class Library has not changed from Version 14.


Changes from Version 13 to Version 14

Version 14 of the LEADTOOLS Vector Class Library has changed from Version 13 as follows:

LEADTOOLS Vector Class Library now supports UNICODE.

The following objects have been added since version 13:

LVectorSpline

LVectorHPolyBezier

The following data structures have been added since version 13:

VECTORSPLINE

VECTORHPOLYBEZIER

The rest of this topic lists the new functions in version 13, by class:

LVectorBase

LVectorBase::EnableFontMapper

LVectorBase::IsFontMapperEnabled


Changes from Version 12.1 to Version 13

Version 13 of the LEADTOOLS Vector Class Library has changed from Version 12.1 as follows:

The following structure has changed since version 12.1:

VECTOROBJECT

The following data structures have been added since version 12.1:

VECTORLINKHANDLING

VECTOR_TEXTRENDER

VECTORLINKDESC

VECTORLINKFILEINFO

VECTORTOOLTIPDESC

VECTOR_DISPLAY_OPTIONS

VECTOR_ANTIALIASING

The following functions have changed since version 12.1:

LVectorBase::ConvertToEMF (takes an extra parameter)

LVectorBase::ConvertToWMF (takes an extra parameter)

The rest of this topic lists the new functions in version 13, by class:

LVectorBase

LVectorBase::GetDisplayOptions

LVectorBase::InvertColors

LVectorBase::SetDisplayOptions

LVectorDialog

LVectorDialog::EnableHelp

LVectorDialog::IsHelpEnabled

LVectorDialog::VectorHelpCallback

LVectorObject

LVectorObject::AddHyperlink

LVectorObject::GetDescription

LVectorObject::GetHyperlink

LVectorObject::GetHyperlinkCount

LVectorObject::GetTooltip

LVectorObject::GetViewContext

LVectorObject::GotoHyperlink

LVectorObject::HideTooltip

LVectorObject::RemoveViewContext

LVectorObject::SetDescription

LVectorObject::SetHyperlink

LVectorObject::SetTooltip

LVectorObject::SetViewContext

LVectorObject::ShowTooltip


Changes from Version 12 to Version 12.1

Version 12.1 of the LEADTOOLS Vector Class Library has changed from Version 12 as follows:

The LVectorBase::ExplodeObject and the LVectorObject::ExplodeObject functions now support a new flag that explodes objects into lines.

Vector support can now be unlocked for viewing only. Please note that if vector viewing support is unlocked using L_SUPPORT_VECTOR_VIEW, vector editing functions will return ERROR_VECTOR_LOCKED.

The Vector toolkit now supports faster loading for DWF, DWG, DXF and HPGL files.

The Vector toolkit now supports more entities for DWG and DXF files.


Changes from Version 11.5 to Version 12

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

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

Uses L_DOUBLE instead of L_FLOAT through out the toolkit.

Supports copying and pasting into the Windows clipboard.

Added new functions to add, edit and delete layers.

Added new functions to provide a means for grouping objects into layers.

Provides new functions for adding, editing and deleting objects.

Now supports the following object types:

VECTOR_ARC

VECTOR_CHORD

VECTOR_CIRCLE

VECTOR_CLONE

VECTOR_ELLIPSE

VECTOR_ELLIPTICALARC

VECTOR_GROUP

VECTOR_LINE

VECTOR_PIE

VECTOR_POLYBEZIER

VECTOR_POLYDRAW

VECTOR_POLYGON

VECTOR_POLYLINE

VECTOR_RASTER

VECTOR_RECTANGLE

VECTOR_STOCK

VECTOR_TEXT

VECTOR_VERTEX

Supports new common dialogs for adding/editing objects and layers.

Supports vector groups for grouping vector objects.

Changed or removed functions:

The following functions have been removed since version 11.5:

LVectorBase::SetEngine

LVectorDialog::DoModalVector3DOptions

LVectorDialog::GetCamera

LVectorDialog::GetColorAmbient

LVectorDialog::GetPolygonMode

LVectorDialog::GetRotation

LVectorDialog::GetScale

LVectorDialog::GetTranslation

LVectorDialog::GetUseLights

LVectorDialog::SetCamera

LVectorDialog::SetColorAmbient

LVectorDialog::SetPolygonMode

LVectorDialog::SetRotation

LVectorDialog::SetScale

LVectorDialog::SetTranslation

LVectorDialog::SetUseLights

LVectorWindow::GetKeyMode

LVectorWindow::SetKeyMode

The following functions have changed since version 11.5:

LVectorBase::AttachToWindow (no longer static and it takes two extra parameters)

LVectorBase::ConvertToEMF (takes an extra parameter)

LVectorBase::ConvertToWMF (takes an extra parameter)

LVectorBase::Copy (takes an extra parameter)

LVectorBase::DeleteObject (takes an extra parameter)

LVectorBase::EnumVertices (takes an extra parameter)

LVectorBase::GetEngine (was static, now it is virtual)

LVectorBase::GetObjectParallelogram (takes an extra parameter)

LVectorBase::GetObjectRect (takes an extra parameter)

LVectorBase::HitTest (parameter has changed)

LVectorBase::IsObjectInsideParallelogram (takes an extra parameter)

LVectorBase::IsObjectInsideRect (takes an extra parameter)

LVectorBase::IsObjectSelected (takes fewer parameters)

LVectorBase::SetRotation (takes an extra parameter)

LVectorBase::SetScale (takes an extra parameter)

LVectorBase::SetTranslation (takes an extra parameter)

LVectorDialog::DoModalVectorCamera (takes two extra parameters)

LVectorDialog::DoModalVectorRotate (takes two extra parameters)

LVectorDialog::DoModalVectorScale (takes two extra parameters)

LVectorDialog::DoModalVectorTranslate (takes two extra parameters)

LVectorWindow::Load (takes two new parameters)

Changed structures:

The following structures have changed since version 11.5

VECTORCAMERA (New members added)

VECTOROBJECT the bSelected flag has changed to dwFlags

New Data Structures

The following data structures have been added since version 11.5:

VECTORARC

VECTORBITMAP

VECTORBRUSH

VECTORCHORD

VECTORCIRCLE

VECTORCLONE

VECTORELLIPSE

VECTORELLIPTICALARC

VECTORFONT

VECTORGROUP

VECTORGROUPDESC

VECTORHITTEST

VECTORLAYER

VECTORLAYERDESC

VECTORLINE

VECTORMARKER

VECTORPEN

VECTORPIE

VECTORPOLYBEZIER

VECTORPOLYDRAW

VECTORPOLYGON

VECTORPOLYLINE

VECTORRASTER

VECTORRECTANGLE

VECTORSTOCK

VECTORTEXT

VECTORVERTEX

New Error Codes

The following error codes have been added since version 11.5:

ERROR_VECTOR_BITMAP_NOT_FOUND

ERROR_VECTOR_BRUSH_NOT_FOUND

ERROR_VECTOR_CANT_ADD_TEXT

ERROR_VECTOR_CANT_READ_WMF

ERROR_VECTOR_CLIPBOARD

ERROR_VECTOR_CLIPBOARD_IS_EMPTY

ERROR_VECTOR_ENGINE_NOT_FOUND

ERROR_VECTOR_FONT_NOT_FOUND

ERROR_VECTOR_GROUP_NOT_FOUND

ERROR_VECTOR_GROUP_ALREADY_EXISTS

ERROR_VECTOR_INVALID_ENGINE

ERROR_VECTOR_INVALID_OBJECT_TYPE

ERROR_VECTOR_IS_EMPTY

ERROR_VECTOR_LAYER_ALREADY_EXISTS

ERROR_VECTOR_LAYER_IS_LOCKED

ERROR_VECTOR_LAYER_NOT_FOUND

ERROR_VECTOR_OBJECT_NOT_FOUND

ERROR_VECTOR_PEN_NOT_FOUND

ERROR_VECTOR_POINT_NOT_FOUND

The rest of this topic lists the new functions in version 12.

LVectorBase

LVectorBase::AddGroup

LVectorBase::AddLayer

LVectorBase::AddObject

LVectorBase::CopyFromClipboard

LVectorBase::CopyGroup

LVectorBase::CopyLayer

LVectorBase::CopyObject

LVectorBase::CopyToClipboard

LVectorBase::Empty

LVectorBase::EnumGroups

LVectorBase::EnumGroupsCallBack

LVectorBase::EnumLayers

LVectorBase::EnumLayersCallBack

LVectorBase::EnumObjectsCallBack

LVectorBase::EnumVerticesCallBack

LVectorBase::GetActiveLayer

LVectorBase::GetGroupByIndex

LVectorBase::GetGroupByName

LVectorBase::GetGroupCount

LVectorBase::GetHitTest

LVectorBase::GetLayerByIndex

LVectorBase::GetLayerByName

LVectorBase::GetLayerCount

LVectorBase::GetMarker

LVectorBase::GetOrigin

LVectorBase::GetParallelogram

LVectorBase::IsClipboardReady

LVectorBase::IsEmpty

LVectorBase::IsLocked

LVectorBase::IsObjectHidden

LVectorBase::SetActiveLayer

LVectorBase::SetHitTest

LVectorBase::SetLocked

LVectorBase::SetMarker

LVectorBase::SetObjectAttributes

LVectorBase::SetOrigin

LVectorBase::SetParallelogram

LVectorBase::ZoomRect

LVectorBase::EnableFontMapper

LVectorBase::IsFontMapperEnabled

LVectorClone

LVectorClone::LVectorClone

LVectorClone::~LVectorClone

LVectorClone::LockObject

LVectorClone::SetGroup

LVectorClone::UnlockObject

LVectorDialog

LVectorDialog::DoModalVectorEditAllGroups

LVectorDialog::DoModalVectorEditAllLayers

LVectorDialog::DoModalVectorEditGroup

LVectorDialog::DoModalVectorEditLayer

LVectorDialog::DoModalVectorEditObject

LVectorDialog::DoModalVectorHitTest

LVectorDialog::DoModalVectorNewGroup

LVectorDialog::DoModalVectorNewLayer

LVectorDialog::DoModalVectorNewObject

LVectorDialog::DoModalVectorRender

LVectorDialog::DoModalVectorViewMode

LVectorDialog::EnableNoDuplicate

LVectorDialog::EnableSelectedOnly

LVectorDialog::GetString

LVectorDialog::GetStringLen

LVectorDialog::SetFont

LVectorDialog::SetString

LVectorGroup:

LVectorGroup::LVectorGroup

LVectorGroup::~LVectorGroup

LVectorGroup::AddObject

LVectorGroup::DeleteGroup

LVectorGroup::DeleteGroupClones

LVectorGroup::EmptyGroup

LVectorGroup::EnumObjects

LVectorGroup::EnumObjectsCallBack

LVectorGroup::GetGroupDesc

LVectorGroup::SetGroupDesc

LVectorGroup::SetVector

LVectorLayer

LVectorLayer::AddObject

LVectorLayer::DeleteLayer

LVectorLayer::EmptyLayer

LVectorLayer::EnumObjects

LVectorLayer::EnumObjectsCallBack

LVectorLayer::GetLayerDesc

LVectorLayer::SetLayerDesc

LVectorLayer::SetVector

LVectorObject

LVectorObject::DeleteObject

LVectorObject::ExplodeObject

LVectorObject::GetObjectAttributes

LVectorObject::GetObjectParallelogram

LVectorObject::GetObjectRect

LVectorObject::GetType

LVectorObject::HideObject

LVectorObject::IsObjectHidden

LVectorObject::IsObjectInsideParallelogram

LVectorObject::IsObjectInsideRect

LVectorObject::IsObjectSelected

LVectorObject::IsValid

LVectorObject::LockObject

LVectorObject::SelectObject

LVectorObject::SetObjectAttributes

LVectorObject::SetRotation

LVectorObject::SetScale

LVectorObject::SetTranslation

LVectorObject::UnlockObject


Changes from Version 11 to Version 11.5

Version 11.5 of the LEADTOOLS Class Library has changed from version 11 as follows:

LEADTOOLS now supports a VectorWindow class that provides a full windowed control, capable of displaying vector images. (Selected products only)

The rest of this topic lists the new functions in version 11.5, by class.

LVectorWindow (11.5)

LVectorWindow::LVectorWindow

LVectorWindow::~LVectorWindow

LVectorWindow::CreateWnd

LVectorWindow::EnableAutoPaint

LVectorWindow::EnableAutoScroll

LVectorWindow::EnableDragAcceptFiles

LVectorWindow::EnableKeyBoard

LVectorWindow::EndChanging

LVectorWindow::FitToParent

LVectorWindow::Free

LVectorWindow::GetBackgroundColor

LVectorWindow::GetKeyMode

LVectorWindow::GetScaleFactor

LVectorWindow::GetSelectedOnly

LVectorWindow::GetToolType

LVectorWindow::GetVectorRect

LVectorWindow::GetVectorVisibleRect

LVectorWindow::GetVectorWnd

LVectorWindow::GetZoomPercent

LVectorWindow::IsAutoPaintEnabled

LVectorWindow::IsAutoScrollEnabled

LVectorWindow::IsControl

LVectorWindow::IsDragAcceptFilesEnabled

LVectorWindow::IsKeyBoardEnabled

LVectorWindow::Load

LVectorWindow::Move

LVectorWindow::MsgProcCallBack

LVectorWindow::OnDraw

LVectorWindow::OnFileDropped

LVectorWindow::OnScale

LVectorWindow::OnZoom

LVectorWindow::Repaint

LVectorWindow::Reset

LVectorWindow::ScaleIn

LVectorWindow::ScaleOut

LVectorWindow::ScrollBy

LVectorWindow::ScrollTo

LVectorWindow::SelectAllObjects

LVectorWindow::SetBackgroundColor

LVectorWindow::SetEngine

LVectorWindow::SetKeyMode

LVectorWindow::SetPan

LVectorWindow::SetScaleFactor

LVectorWindow::SetSelectedOnly

LVectorWindow::SetToolType

LVectorWindow::SetWndHandle

LVectorWindow::SetZoomPercent

LVectorWindow::StartChanging

LVectorWindow::ZoomIn

LVectorWindow::ZoomOut


Version 11

Version 11 is the first version of the LEADTOOLS Vector Class Library.

The rest of this topic lists the new functions in version 11.

LVectorBase

LVectorBase::LVectorBase

LVectorBase::~LVectorBase

LVectorBase::ApplyTransformation

LVectorBase::AttachToWindow

LVectorBase::ConvertFromEMF

LVectorBase::ConvertFromWMF

LVectorBase::ConvertToEMF

LVectorBase::ConvertToWMF

LVectorBase::Copy

LVectorBase::DeleteObjects

LVectorBase::EnableAlwaysEndNotification

LVectorBase::EnableChangeNotification

LVectorBase::EnableFileName

LVectorBase::EndChanging

LVectorBase::EnumObjects

LVectorBase::EnumObjectsCallBack

LVectorBase::EnumVertices

LVectorBase::EnumVerticesCallBack

LVectorBase::Free

LVectorBase::GetAmbientLight

LVectorBase::GetBackgroundColor

LVectorBase::GetBindVerticesMode

LVectorBase::GetCamera

LVectorBase::GetEngine

LVectorBase::GetFileName

LVectorBase::GetHandle

LVectorBase::GetObjectParallelogram

LVectorBase::GetObjectRect

LVectorBase::GetPalette

LVectorBase::GetPan

LVectorBase::GetPolygonMode

LVectorBase::GetRotation

LVectorBase::GetScale

LVectorBase::GetTranslation

LVectorBase::GetUseLights

LVectorBase::GetViewMode

LVectorBase::GetViewport

LVectorBase::HitTest

LVectorBase::Initialize

LVectorBase::Is3D

LVectorBase::IsAllocated

LVectorBase::IsAlwaysEndNotification

LVectorBase::IsChangeNotificationEnabled

LVectorBase::IsFileNameEnabled

LVectorBase::IsObjectInsideParallelogram

LVectorBase::IsObjectInsideRect

LVectorBase::IsObjectSelected

LVectorBase::Load

LVectorBase::LogicalToPhysical

LVectorBase::Paint

LVectorBase::Realize

LVectorBase::Save

LVectorBase::SelectObject

LVectorBase::SetAmbientLight

LVectorBase::SetBackgroundColor

LVectorBase::SetBindVerticesMode

LVectorBase::SetCamera

LVectorBase::SetEngine

LVectorBase::SetFileName

LVectorBase::SetHandle

LVectorBase::SetPalette

LVectorBase::SetPan

LVectorBase::SetPolygonMode

LVectorBase::SetRotation

LVectorBase::SetScale

LVectorBase::SetTranslation

LVectorBase::SetUseLights

LVectorBase::SetViewMode

LVectorBase::SetViewport

LVectorBase::StartChanging

LVectorFile

LVectorFile::LVectorFile

LVectorFile::~LVectorFile

LVectorFile::FeedLoad

LVectorFile::GetFileName

LVectorFile::IsValid

LVectorFile::LoadFile

LVectorFile::SaveFile

LVectorFile::SetFileName

LVectorFile::SetVector

LVectorFile::StartFeedLoad

LVectorFile::StopFeedLoad

LVectorMemoryFile

LVectorMemoryFile::LVectorMemoryFile

LVectorMemoryFile::~LVectorMemoryFile

LVectorMemoryFile::IsValid

LVectorMemoryFile::LoadMemory

LVectorMemoryFile::SaveMemory

LVectorDialog

LVectorDialog::LVectorDialog

LVectorDialog::~LVectorDialog

LVectorDialog::DoModalVector3DOptions

LVectorDialog::DoModalVectorCamera

LVectorDialog::DoModalVectorEditAllGroups

LVectorDialog::DoModalVectorEditAllLayers

LVectorDialog::DoModalVectorEditGroup

LVectorDialog::DoModalVectorEditLayer

LVectorDialog::DoModalVectorEditObject

LVectorDialog::DoModalVectorHitTest

LVectorDialog::DoModalVectorNewGroup

LVectorDialog::DoModalVectorNewLayer

LVectorDialog::DoModalVectorNewObject

LVectorDialog::DoModalVectorRender

LVectorDialog::DoModalVectorRotate

LVectorDialog::DoModalVectorScale

LVectorDialog::DoModalVectorTranslate

LVectorDialog::DoModalVectorViewMode

LVectorDialog::EnableAutoProcess

LVectorDialog::EnableNoDuplicate

LVectorDialog::EnablePreview

LVectorDialog::EnableSelectedOnly

LVectorDialog::GetCamera

LVectorDialog::GetColorAmbient

LVectorDialog::GetPolygonMode

LVectorDialog::GetRotation

LVectorDialog::GetScale

LVectorDialog::GetString

LVectorDialog::GetStringLen

LVectorDialog::GetTranslation

LVectorDialog::GetUseLights

LVectorDialog::GetVector

LVectorDialog::IsAutoProcessEnabled

LVectorDialog::IsNoDuplicateEnabled

LVectorDialog::IsPreviewEnabled

LVectorDialog::IsValid

LVectorDialog::SetCamera

LVectorDialog::SetColorAmbient

LVectorDialog::SetFont

LVectorDialog::SetPolygonMode

LVectorDialog::SetRotation

LVectorDialog::SetScale

LVectorDialog::SetString

LVectorDialog::SetTranslation

LVectorDialog::SetUseLights

LVectorDialog::SetVector


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, DC120V154_32.DLL, LFDCR14N.DLL, DCSPROBACK.DLL, DCSPRO3SLR.DLL, LFDCS14N.DLL, and LFKDC14N.DLL files contain material that is ©Copyright Eastman Kodak Company, 1996-2001. This software is based in part on the work of the Independent JPEG Group.

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

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

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

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

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

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

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

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

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

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

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

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


Programming with LEADTOOLS

Programming with LEADTOOLS Vector Class Library

The following topics provide a systematic approach to understanding how to program with the LEADTOOLS Class Library.

Getting Started

Getting Started with the LEADTOOLS Class Library

Considering Development Systems

Using LEADTOOLS with Your C/C++ Compiler

Using Global / Local Settings for Bitmap Objects

Loading File Filters

Unlocking Vector Feature Support

Working with Vector Images

Working with Vector Images

Using LVectorWindow as a Window

Using LVectorWindow as a Control


Unlocking Vector Feature Support

All LEADTOOLS Vector Features are included in the LEADTOOLS Vector Imaging Pro toolkits. The Vector features are shipped with the LEADTOOLS products listed above, however they are locked. To use the Vector functions, LSettings::UnlockSupport must be called with the key found on the Vector Features Unlock Certificate, included in your product packaging. LSettings::UnlockSupport (L_SUPPORT_VECTOR, L_KEY_VECTOR) tells the package to unlock support for the Vector functions and passes the key for verification. For information on unlocking support for the Vector functions, refer to LSettings::UnlockSupport.

Unlocking support for the Vector Features also unlocks support for the following file formats: DXF, DWF, DWG, PCT, PLT, DRW, DGN, WMF, EMF and CGM.


Working with Vector Images

A Vector image is a collection of vertices in either two or three-dimensional space. A Bitmap image stores the image data as a 2D array of pixels. A Vector image stores the image data as lines, arcs, rectangles, and other shapes. Advantages of vector images include resolution independence and smaller file sizes. Vector images can be scaled very large or very small, and will not lose quality.

LEADTOOLS allows you to load vector images as raster bitmaps or as native vector images. LEADTOOLS supports both 2D and 3D vector images.

For more information, refer to the following topics:

An Introduction to the Vector Classes

Overview of the Vector Structures

Getting Started

Viewing Vector Images

Vector Loading, Saving and Copying

Working with Vector Handles

Working with Vector Layers

Working with Vector Groups

Working with Vector Objects

Vector Common Dialogs

Panning Vector Images

Using the Clipboard

Manipulating the Camera

Rotating, Translating, Scaling Vector Images

Getting and Setting Global Vector Properties

Manipulating Objects or Vertices within a Vector Image

Cloning a Vector Group

Vector Conversion

Vector Notification Messages

Hyperlink Objects

Working with the Tooltips

Working with the View Context

Help Support


An Introduction to the Vector Classes

There are four Vector classes in the class library to be used with vector data:

LVectorBase

Basic methods for working with vectors, including:

Load

Save

Translate

Rotate

Scale

Paint

Selecting objects

Palettes

Set/Get Viewport

Set/Get Pan

Set/Get Camera

Image conversion (WMF, EMF)

LVectorDialog

Vector common dialogs for vector manipulation, including:

Vector rotation

Vector translation

Vector scaling

Methods for getting/setting common dialog entries

LVectorFile

Methods for working with vector files, including

Loading from a file

Saving to a file

Loading from a buffer, where you control the input stream

LVectorGroup

Methods for working with vector groups, including

Adding an object

Deleting groups

Emptying a group

Enumerating objects in groups

Getting/Setting group information

Setting the vector

LVectorLayer

Vector layer functions for working with vector layers, including:

Creating

Enumerating objects

Deleting layers

Emptying layers

Getting/setting layer information

Adding objects

Getting an object count

LVectorMemoryFile

Methods for working with files in memory, including:

Loading from a memory file

Saving to a file in memory

To see how these fit in the Class library hierarchy, refer to the Class Hierarchy Chart.

LVectorObject

Vector object functions for working with vector objects, including:

Creating

Getting/setting object information

Exploding objects

Getting bounding rectangles and parallelograms

Rotating

Scaling

Translating

Deleting

Manipulating the properties of derived class objects including:

LVectorArc | LVectorLine | LVectorRaster
LVectorChord | LVectorPie | LVectorRectangle
LVectorCircle | LVectorPolyBezier | LVectorStock
LVectorClone | LVectorPolyDraw | LVectorText
LVectorEllipse | LVectorPolygon | LVectorVertex
LVectorEllipticalArc | LVectorPolyLine | LVectorSpline
LVectorHPolyezier |  |

LVectorWindow

Vector window functions for working with vectors, including:

Loading

Zooming

Scrolling

Panning

Scaling

Painting

Selecting Objects


Overview of the Vector Structures

A vector image (or drawing) is referenced in LEADTOOLS by a VECTORHANDLE structure. This VECTORHANDLE structure is maintained internally. For a description of the entire structure, refer to the LVKRN.H header file.

Within the VECTORHANDLE that references the vector image there are one or more vector layers. LEADTOOLS provides the LVectorLayer class for maintaining and manipulating vector layers. Information about vector layers can be obtained or set using a VECTORLAYERDESC structure. LEADTOOLS provides several functions for working with vector layers. For more information, refer to Working with Vector Layers.

Each vector layer may contain 0 or more vector objects. LEADTOOLS provides a number of classes for manipulating vector objects.

These classes, and their respective objects/structures are given below:

Class | respective objects/structures
LVectorObject | VECTOROBJECT
LVectorArc | VECTORARC
LVectorChord | VECTORCHORD
LVectorCircle | VECTORCIRCLE
LVectorEllipse | VECTORELLIPSE
LVectorEllipticalArc | VECTORELLIPTICALARC
LVectorLine | VECTORLINE
LVectorPie | VECTORPIE
LVectorPolybezier | VECTORPOLYBEZIER
LVectorPolydraw | VECTORPOLYDRAW
LVectorPolygon | VECTORPOLYGON
LVectorPolyline | VECTORPOLYLINE
LVectorRaster | VECTORRASTER
LVectorRectangle | VECTORRECTANGLE
LVectorStock | VECTORSTOCK
LVectorText | VECTORTEXT
LVectorVertex | VECTORVERTEX
LVectorSpline | VECTORSPLINE
LVectorHPolyezier | VECTORHPOLYBEZIER

There is certain information that is common to all vector objects. This is contained in the Object member (type VECTOROBJECT) of each object's respective structure. Information specific to certain types of vector objects is included in that object's specific structure. For example, a VECTORRECTANGLE structure contains information about the pen and brush used to draw the rectangle, as well as an array of points that define the rectangle.

LEADTOOLS provides numerous functions for creating and manipulating vector objects. In addition, functions are provided for obtaining information about vector objects. For more information, refer to Working with Vector Objects.

When displaying vector objects, the user can modify the way the objects are displayed by setting anti-aliasing options, setting text rendering characteristics, providing a tool tip, or other display options. LEADTOOLS provides the following structures to help in modifying the display:

VECTOR_ANTIALIASING

VECTOR_DISPLAY_OPTIONS

VECTOR_TEXTRENDER

VECTORTOOLTIPDESC

A vector object may be hyperlinked with one or more targets, allowing the user to run a program, access a Web page, open a document, or focus the toolkit to a specific vector object. LEADTOOLS provides the following structures for working with hyperlinked vector objects:

VECTORLINKDESC

VECTORLINKFILEINFO

VECTORLINKHANDLING


Getting Started

A vector handle must have a vector engine associated with it for vector images to be rendered. The LVectorBase::AttachToWindow function associates a vector engine with a vector handle and attaches the vector handle to a window. Attaching the vector handle to a window allows the use of double buffering for flicker-free screen updates. An image can be drawn on the surface of any window using LVectorBase::Paint, but double buffering is only available if the vector handle is attached to a window.

To get the current vector engine, call LVectorBase::GetEngine.

Once the vector handle, with the associated vector engine, is attached to a window, vector images loaded using LVectorBase::Load, LVectorWindow::Load, LVectorFile::LoadFile or LVectorMemoryFile::LoadMemory can be rendered.


Viewing Vector Images

Once an image has been loaded and a vector engine has been associated with a vector handle, the vector image can be rendered. The way an image is viewed depends on a number of viewing characteristics. LEADTOOLS provides the following functions for modifying these viewing characteristics:

LVectorBase::GetAmbientColor

LVectorBase::GetBackgroundColor

LVectorBase::GetCamera

LVectorBase::GetDisplayOptions

LVectorObject::GetViewContext

LVectorBase::GetPan

LVectorBase::GetPolygonMode

LVectorBase::GetUseLights

LVectorBase::GetViewMode

LVectorBase::GetViewport

LVectorBase::InvertColors

LVectorBase::LogicalToPhysical

LVectorObject::RemoveViewContext

LVectorBase::SetAmbientColor

LVectorBase::SetBackgroundColor

LVectorBase::SetCamera

LVectorObject::SetViewContext

LVectorBase::SetPan

LVectorBase::SetPolygonMode

LVectorBase::SetUseLights

LVectorBase::SetViewMode

LVectorBase::SetViewport

LVectorBase::ZoomRect

LVectorWindow::Reset


Vector Loading, Saving, and Copying

For loading, saving, and copying vector images, the LEADTOOLS Class Library provides member functions in several Vector Classes:

LVectorBase::GetFileName

LVectorBase::SetFileName

LVectorBase::IsFileNameEnabled

LVectorBase::EnableFileName

LVectorBase::Free

LVectorBase::Copy

LVectorBase::Initialize

LVectorBase::Load

LVectorBase::Save

LVectorBase::GetHandle

LVectorBase::SetHandle

LVectorFile::GetFileName

LVectorFile::GetFileName

LVectorFile::SetFileName

LVectorFile::SetVector

LVectorFile::LoadFile

LVectorFile::StartFeedLoad

LVectorFile::FeedLoad

LVectorFile::StopFeedLoad

LVectorFile::SaveFile

LVectorMemoryFile::LoadMemory

LVectorMemoryFile::SaveMemory


Working with Vector Handles

LEADTOOLS references vector images through an internal VECTORHANDLE structure. Several functions are provided that let you get or set information that pertains to the vector handle itself.

LVectorBase::Empty deletes all vector layers and vector objects from the class object's vector handle. To determine whether a class object's vector handle is empty, call LVectorBase::IsEmpty.

A vector handle can be locked to prevent any changes from being made. LVectorBase::SetLocked locks or unlocks the class object's vector handle. Locking a vector handle has precedence over locking vector layers within the vector handle. Therefore, if a vector handle is locked, the layers within that vector handle cannot be edited, even if the vector layers are not locked. To determine whether a vector handle is locked, use LVectorBase::IsLocked.

Each vector handle has an origin point. To get the current origin, call LVectorBase::GetOrigin. To set the origin, call LVectorBase::SetOrigin. The origin may change when new vector objects are added. To center the vector image around its origin, call LVectorBase::SetOrigin (NULL) after adding new objects.

When a vector object is selected in a vector handle, a marker is used to indicate that the object is selected. The marker settings that indicate how the marker will look can be obtained using LVectorBase::GetMarker. To change these settings call LVectorBase::SetMarker.

For each vector handle a bounding parallelogram exists for the vector objects contained in the vector handle. To get the current bounding parallelogram, call LVectorBase::GetParallelogram. To set the bounding parallelogram, call LVectorBase::SetParallelogram. After adding new vector objects to a vector handle the logical size of the image might change. Call LVectorBase::SetParallelogram with either pMin or pMax set to NULL to have the function calculate the bounding rectangle for the vector handle based on the objects contained in the vector handle.

To copy one vector handle to another vector handle call LVectorBase::Copy.

The display options for a vector handle determine how the vector objects in that vector handle will be displayed. These display characteristics include the clip mode, anti-aliasing and text rendering options. To determine the current display options, call LVectorBase::GetDisplayOptions. To set or change the display options, use the LVectorBase::SetDisplayOptions function.

In addition to modifying the display options, the appearance of the objects within the vector handle may also be changed by inverting the colors. This is done using the LVectorBase::InvertColors function.


Working with Vector Layers

LEADTOOLS provides a number of functions for working with the vector layers within a vector handle. Several functions provide a means of obtaining information about vector layers, while other functions provide a means of actually modifying vector layers.

Getting Information about Vector Layers

A vector handle may contain multiple vector layers. The LVectorBase::GetLayerCount returns the number of layers present in the class object's associated vector handle. Once the number of layers present is known, each layer can be obtained using LVectorBase::GetLayerByIndex. If the name of a layer is known, that layer can be obtained using LVectorBase::GetLayerByName. LVectorBase::EnumLayers actually enumerates all the layers present in a vector handle. The LVectorBase::EnumLayersCallBack function called by LVectorBase::EnumLayers lets you process each enumerated layer.

Within a vector handle one layer is active. LVectorBase::GetActiveLayer obtains a handle to the active vector layer. LVectorBase::SetActiveLayer lets you set the active layer within a vector handle.

Once a handle to a vector layer is obtained, information about that vector layer can be obtained using LVectorLayer::GetLayerDesc. This vector layer information can then be modified using LVectorLayer::SetLayerDesc. LVectorLayer::GetLayerDesc fills a VECTORLAYERDESC structure with the information about the class object's vector layer. The information within the VECTORLAYERDESC structure can then be modified and the vector layer information updated using LVectorLayer::SetLayerDesc.

Manipulating Vector Layers

LEADTOOLS provides a number of functions for manipulating vector layers. LVectorBase::SetActiveLayer and LVectorLayer::SetLayerDesc let you set the active layer in a vector handle and modify information about a specific vector layer. For more information, refer to Getting Information About Vector Layers above, or the functions themselves.

LVectorLayer::EmptyLayer remove all vector objects from a vector layer. LVectorLayer::DeleteLayer actually removes a vector layer from a vector handle.

The contents of one layer can be copied to another layer using LVectorBase::CopyLayer.

LVectorBase::AddLayer lets you add a new layer to a vector handle.


Working with Vector Groups

Vector groups can be used to group vector objects. There is no relationship between the object in the group and the original object in the vector handle. The original object can be changed without affecting the corresponding object in the vector group, and vice versa.

Vector groups can also be cloned and added to a vector handle. However, if an object within a vector group is modified, all clones of that group will also be modified.

LEADTOOLS provides a number of functions for working with the vector groups within an LVectorBase object. Several functions provide a means of obtaining information about vector groups, while other functions provide a means of actually modifying vector groups.

Getting Information about Vector Groups

An LVectorBase object may contain multiple vector groups. The LVectorBase::GetGroupCount returns the number of groups present in the class object's associated vector handle. Once the number of groups present is known, each group can be obtained using LVectorBase::GetGroupByIndex. If the name of a group is known, that group can be obtained using LVectorBase::GetGroupByName. LVectorBase::EnumGroups actually enumerates all the groups present in a vector handle. The LVectorBase::EnumGroupsCallBack function, called by LVectorBase::EnumGroups, lets you process each enumerated group.

Information about that vector group can be obtained using LVectorGroup::GetGroupDesc. This vector group information can then be modified using LVectorGroup::SetGroupDesc. LVectorGroup::GetGroupDesc fills a VECTORGROUPDESCstructure with the information about the class object's vector group. The information within the VECTORGROUPDESC structure can then be modified and the vector group information updated using LVectorGroup::SetGroupDesc.

A vector group may contain numerous vector objects. To enumerate the objects within a vector group, use the LVectorGroup::EnumObjects function. This function calls the LVectorGroup::EnumObjectsCallBack function for each object enumerated

Manipulating Vector Groups

LEADTOOLS provides a number of functions for manipulating vector groups. LVectorGroup::SetGroupDesc let you modify information about a specific vector group. For more information, refer to "Getting Information About Vector Groups" above, or the functions themselves.

LVectorGroup::EmptyGroup removes all vector objects from a vector group. LVectorGroup::DeleteGroup actually removes a vector group from a vector handle. LVectorGroup::DeleteGroupClones deletes all of the clones of the LVectorGroup object.

The contents of one group can be copied to another group using LVectorBase::CopyGroup.

LVectorBase::AddGroup lets you add a new group to a vector handle. In addition, LEADTOOLS provides several functions for bringing up dialogs for adding or editing groups. These functions are LVectorDialog::DoModalVectorEditAllGroups, LVectorDialog::DoModalVectorEditGroup and LVectorDialog::DoModalVectorNewGroup.

To add an object to a vector group use the LVectorGroup::AddObject function.


Working with Vector Objects

LEADTOOLS provides numerous functions for working with vector objects within vector layers. Several functions provide a means of obtaining information about vector objects, while other functions provide a means of actually modifying vector objects.

Getting Information About Vector Objects

A vector handle may contain multiple vector layers and each vector layer may contain many objects. LEADTOOLS provides a number of functions for obtaining information about one or more objects present in a vector handle or a vector layer. The information that can be obtained includes the number of objects present, the location of objects, the boundaries of one or more objects, etc.

LVectorLayer::EnumObjects actually enumerates the vector objects within the LVectorLayer class object's vector layer. LVectorBase::EnumObjects enumerates the objects present within an entire vector handle. The LVectorBase::EnumObjects function uses the LVectorBase::EnumObjectsCallBack function and LVectorLayer::EnumObjects uses the LVectorLayer::EnumObjectsCallBack function. These callback functions let you process each enumerated vector object.

Once a handle to a vector object is obtained, information about that vector object can be obtained using LVectorObject::LockObject. This object information can then be modified using LVectorObject::UnlockObject. LVectorObject::LockObject fills a vector object structure with information about the specified vector object. The information within the structure can then be modified and the vector object information updated using LVectorObject::UnlockObject.

LVectorBase::EnumVertices enumerates the vertices of objects within a vector handle. The LVectorBase::EnumVerticesCallBack function lets you process each enumerated vertex.

Several functions provide information on the location and boundaries of one or more vector objects. LVectorObject::GetObjectParallelogram and LVectorObject::GetObjectRect determine the bounding parallelogram and bounding rectangle for class object's vector object. LVectorBase::IsObjectInsideParallelogram and LVectorBase::IsObjectInsideRect determine whether the specified object(s) is(are) within the specified parallelogram and rectangle. LVectorObject::IsObjectInsideParallelogram and LVectorObject::IsObjectInsideRect determine whether the class object's vector object is within the specified parallelogram or rectangle. LVectorBase::HitTest determines which object, if any, in a vector handle is present at a specified point. The options that control the hit test procedure can be obtained and modified using LVectorBase::GetHitTest and LVectorBase::SetHitTest.

LVectorObject::IsObjectSelected determines whether or not an object is currently selected. To select a class object's vector object, use LVectorObject::SelectObject.

To determine whether or not a specific object is hidden, call LVectorObject::IsObjectHidden

Manipulating Vector Objects

LEADTOOLS provides many functions for manipulating vector objects. LVectorObject::UnlockObject lets you modify vector object information. For more information, refer to Getting Information About Vector Objects above, or the LVectorObject::UnlockObject function.

Vector objects can be modified by scaling, rotation and translation. To accomplish this, LEADTOOLS provides LVectorObject::SetRotation, LVectorObject::SetScale and LVectorObject::SetTranslation.

Occasionally, vector objects will share vertices. When a vector object is modified, the object with which it shares one or more vertices may or may not be modified, depending on the "bind vertices mode" value. LVectorBase::GetBindVerticesMode gets the current setting for the bind vertices mode. LVectorBase::SetBindVerticesMode lets you change the "bind vertices mode" setting.

To get and set certain attributes associated with vector objects, such as pen style, pen color, brush color, brush hatch, etc., use LVectorObject::GetObjectAttributes, LVectorObject::SetObjectAttributes and LVectorBase::SetObjectAttributes.

LEADTOOLS provides several vector object classes that are derived from the LVectorObject class. Each of these classes, except LVectorStock, supports constructors, destructors and both lock and unlock functions for getting and setting object information. These derived classes include:

LVectorArc | LVectorLine | LVectorRaster
LVectorChord | LVectorPie | LVectorRectangle
LVectorCircle | LVectorPolyBezier | LVectorStock
LVectorClone | LVectorPolyDraw | LVectorText
LVectorEllipse | LVectorPolygon | LVectorVertex
LVectorEllipticalArc | LVectorPolyLine | LVectorSpline
LVectorHPolyBezier |  |

Some vector objects can be exploded into simpler vector objects using LVectorObject::ExplodeObject. LVectorBase::ExplodeObject can be used to explode all or part of a vector image.

To determine whether an LVectorObject class object is valid, call LVectorObject::IsValid.

LVectorObject::DeleteObject , LVectorBase::DeleteObject let you delete vector objects.

To determine the type of an LVectorObject class object, call LVectorObject::GetType.

LVectorObject::SelectObject selects or unselects the class object's vector object.

A vector object can be copied within the same layer, from one layer to another layer within the same vector handle, or from a layer in one vector handle to a layer in another vector handle using LVectorBase::CopyObject.

An object can be hidden by calling the LVectorObject::HideObject with the bHide parameter set to TRUE. A hidden object may be shown by calling the same function with bHide set to FALSE. To determine whether or not an object is hidden, use the LVectorObject::IsObjectHidden function.

LVectorLayer::AddObject lets you add a new vector object to a vector layer.

A vector object may contain a description string giving you some information about the object itself. To get the description for a vector object, call LVectorObject::GetDescription. To set or change the object description, use the LVectorObject::SetDescription function.

A vector object may also have a tool tip associated with it. For more information on tooltips, refer to Working with Tooltips.

In addition, vector objects may also be hyperlinked. For more information about hyperlinking vector objects, refer to Hyperlink Objects.

How an object is displayed may be affected by its view context. For more information on this, refer to Working with View Context.


Vector Common Dialogs

LEADTOOLS provides functions for displaying built-in dialog boxes for getting user input. This input may be used for any of a number of LEADTOOLS functions. The following functions bring up the dialog boxes.

LVectorDialog::DoModalVectorCamera

LVectorDialog::DoModalVectorEditAllGroups

LVectorDialog::DoModalVectorEditAllLayers

LVectorDialog::DoModalVectorEditGroup

LVectorDialog::DoModalVectorEditLayer

LVectorDialog::DoModalVectorEditObject

LVectorDialog::DoModalVectorHitTest

LVectorDialog::DoModalVectorNewGroup

LVectorDialog::DoModalVectorNewLayer

LVectorDialog::DoModalVectorNewObject

LVectorDialog::DoModalVectorRender

LVectorDialog::DoModalVectorRotate

LVectorDialog::DoModalVectorScale

LVectorDialog::DoModalVectorTranslate

LVectorDialog::DoModalVectorViewMode

The dialog can automatically change the vector. Functions that control this auto processing are:

LVectorDialog::EnableAutoProcess

LVectorDialog::IsAutoProcessEnabled

A dialog can optionally display a preview using the following:

LVectorDialog::EnablePreview

LVectorDialog::IsPreviewEnabled

Dialog options can be set prior to calling the dialog using these functions:

LVectorDialog::SetCamera

LVectorDialog::SetColorAmbient

LVectorDialog::SetPolygonMode

LVectorDialog::SetRotation

LVectorDialog::SetScale

LVectorDialog::SetTranslation

LVectorDialog::SetUseLights

After returning from the dialog, options that were set can be retrieved using:

LVectorDialog::GetCamera

LVectorDialog::GetColorAmbient

LVectorDialog::GetPolygonMode

LVectorDialog::GetRotation

LVectorDialog::GetScale

LVectorDialog::GetTranslation

LVectorDialog::GetUseLights

The dialog can be set to allow or disallow duplicate layer names in a vector.
Functions that control this are:


Vector Handle Events

Certain events that occur within a vector handle generate calls to the LVectorBase::VectorEventProcCallBack function. This callback function receives information on the calling event in a VECTOREVENT structure received as a parameter. For information on the types of events that the vector handle can generate, refer to the VECTOREVENT structure.

To use the LVectorBase::VectorEventProcCallBack function to receive the vector handle events, you must derive a class from LVectorBase and override the VectorEventProcCallBack member function.

LEADTOOLS also provides the LVectorBase::Event for implementing a user-defined event. This function also lets you group several operations into one event. To do this you must call LVectorBase::Event with the Status member of the pEvent parameter set to VECTOR_EVENT_STATUS_BEFORE. This identifies the beginning of the event. Once all the operations you wish to include have been completed, call LVectorBase::Event with the Status member of the pEvent parameter set to VECTOR_EVENT_STATUS_AFTER. This notifies the toolkit that the operation(s) have been completed successfully.


Panning Vector Images

The following functions will set the physical pan values of the vector. These can be used to scroll the vector image.

LVectorBase::SetPan

LVectorBase::GetPan

To reset the pan settings to the default values, use LVectorBase::Reset or LVectorWindow::Reset.


Using the Clipboard

The clipboard is a standard Windows object for copying data from one application to another. LEADTOOLS provides LVectorBase::CopyToClipboard to copy vector data from a vector handle to the clipboard. To copy vector data from the clipboard to a vector handle, call LVectorBase::CopyFromClipboard. To determine whether the clipboard contains valid vector data for copying, call LVectorBase::IsClipboardReady.


Manipulating the Camera

LEADTOOLS allows you to control the camera angle and distance using the following:

LVectorBase::SetCamera

LVectorBase::GetCamera

The camera can be used to control the viewing perspective of the vector image.

To reset the camera settings to the default values, use LVectorBase::Reset or LVectorWindow::Reset.


Rotating, Translating, and Scaling Vector Images

Rotating, Translating, Scaling Vector Images

You can scale, translate and rotate the vector image using the following:

LVectorBase::SetTranslation

LVectorBase::GetTranslation

LVectorBase::SetRotation

LVectorBase::GetRotation

LVectorBase::SetScale

LVectorBase::GetScale

Note the above methods can apply to an individual object, all selected objects, or the entire vector image.

The following methods control how vertices affect one another when they are changed.

LVectorBase::SetBindVerticesMode

LVectorBase::GetBindVerticesMode

To reset the rotation, translation and/or scaling settings to the default values, use LVectorBase::Reset or LVectorWindow::Reset.


Getting and Setting Global Vector Properties

The following functions can be used to get or change properties that are global to the vector.

LVectorBase::IsAllocated

LVectorBase::Is3D

LVectorBase::GetBackgroundColor

LVectorBase::SetBackgroundColor


Manipulating Objects or Vertices within a Vector Image

LEADTOOLS provides functions for working with individual objects within the vector image.

LVectorBase::EnumObjects

LVectorBase::EnumVertices

Calling these functions enumerates through all vertices/objects in a vector.

To use these, the programmer must

1. Derive a class from LVectorBase.

2. Override the corresponding virtual function:

LVectorBase::EnumObjectsCallBack

LVectorBase::EnumVerticesCallBack

In the override, you can use the following member functions to test to see if a particular object is inside a rectangle or parallelogram, delete an object, select/deselect an object, test to see if an object is selected, get the object under a two-dimensional point, determine whether hidden objects exist in the vector handle, or get the object bounds.

LVectorBase::IsObjectInsideParallelogram

LVectorBase::IsObjectInsideRect

LVectorBase::DeleteObject

LVectorBase::SelectObject

LVectorBase::IsObjectHidden

LVectorBase::HitTest

LVectorBase::GetObjectParallelogram

LVectorBase::GetObjectRect

LVectorBase::LogicalToPhysical

3. Before calling EnumObjects() or EnumVertices(),call
 the member function LBase::EnableCallBack
 (TRUE);

When manipulating individual vertices, the following affect how the vertices of the image bind with each other:

LVectorBase::SetBindVerticesMode

LVectorBase::GetBindVerticesMode


Cloning a Vector Group

A group of vector objects can be cloned and added to a vector handle as a clone object. The steps used to accomplish this are as follows:

1. | Create and add a new group in the current vector handle.
2. | Create and add any new objects of the desired type into the group.
3. | Create a clone of the group.
4. | Add the clone object to the vector handle.

For example code that shows this process, refer to:

LVectorClone::SetGroup


Vector Conversion

The Realize member function can be used to rasterize a vector image into a Bitmap. Other functions can be used to convert vector images from the native format to EMF and/or WMF objects:

LVectorBase::Realize

LVectorBase::ConvertToEMF

LVectorBase::ConvertFromEMF

LVectorBase::ConvertToWMF

LVectorBase::ConvertFromWMF


Vector Notification Messages

When calling vector class library functions, notification messages are sent through the LVectorBase::StartChanging and LVectorBase::EndChanging member functions. These functions are called before and after executing the function that changes the vector. By overriding the virtual functions, you can do other processing, or even halt the operation. For a complete list of messages, please refer to Bitmap and Vector Change Notifications and Notification Categories

The following methods are used in conjunction with vector notification messages:

LVectorBase::StartChanging

LVectorBase::EndChanging

LVectorBase::EnableChangeNotification

LVectorBase::IsChangeNotificationEnabled

LVectorBase::EnableAlwaysEndNotification

LVectorBase::IsAlwaysEndNotification


Hyperlink Objects

A vector object may be hyperlinked to run a program, access a Web page, open a document or focus the view of the toolkit on a particular vector object within the scene. This is done by hyperlinking the vector object with one or more "targets". Each vector object that is hyperlinked maintains a target list. To open a document or run an application, the target should be set to the file name of the document to open or the program to run. To access a Web page, the target should be set to the URL to access. To focus the toolkit on a specific vector object, the target should be set to that vector object.

To add a new target to a vector object and make it a hyperlinked vector object, or to add an additional target to a vector object that already has one or more other hyperlink targets, call LVectorObject::AddHyperlink. Once a target has been added to a vector object's target list, the target can be changed by calling the LVectorObject::SetHyperlink function.

To retrieve information about a specific target, call the LVectorObject::GetHyperlink function. To determine how many targets the hyperlinked vector object is maintaining, the function LVectorObject::GetHyperlinkCount can be used. L_VecGetHyperlinkCount will retrieve the number of items in the target list.

When the hyperlinked vector object is clicked, the LVectorObject::GotoHyperlink must be called with the chosen target in the target list. This activates the target.


Working with the Tooltips

A tooltip may be used to provide a small amount of information about a vector object. This is generally displayed when the cursor moves over the object. To use a tool tip, first the function LVectorObject::SetTooltip should be called to set the tool tip string. The tool tip can then be displayed by calling LVectorObject::ShowTooltip.

To hide a displayed tool tip, such as when the cursor moves off the vector object, the function LVectorObject::HideTooltip should be called.

An object's tooltip can also be changed using the LVectorObject::SetTooltip function. To determine the current tool tip, call the LVectorObject::GetTooltip function. Make the necessary changes to the string and then call LVectorObject::SetTooltip.


Working with the View Context

The view context space is a vector space assigned to a vector object. The context space is the area to be displayed when the object is the target of a hyperlinked vector object.

To set a view context of an object use the function LVectorObject::SetViewContext. To retrieve the view context of an object, use the function LVectorObject::GetViewContext.

When the view context of an object is no longer required the function LVectorObject::RemoveViewContext should be used to remove the view context.


Help Support

To support help features in the toolkit, create a class derived from LVectorDialog and override the function LVectorDialog::VectorHelpCallback. Then create an object from the new class and enable help using the function LVectorDialog::EnableHelp.

To check whether the help is enabled or not use the function LVectorDialog::IsHelpEnabled.


Using LVectorWindow as a Control

To use the LVectorWindow (or any derived) class as a windowed control in your application, you must create an LVectorWindow object as a child window of some parent window, using LVectorWindow::CreateWnd. After that, the parent window will receive control notification messages that you can process if you like.

This example was done using MFC, so your code may look different if you use some other foundation class library.

For a complete example, please refer to the Class Library Vector Demo. In the file VecView.cpp, search for this code, and follow the instructions for modifying the demo to work with the LVectorWindow as either a Window or a Control.

There are two way to use LEAD controls :
// 1.As a control:
// Enable A and Disable B
// 2.As a Window :
// Enable B and Disable As

The following is a short example of getting started using LVectorWindow as a Control. This example was done using MFC, so your code may look different if you use some other foundation class library.

// Do not forget to load the libraries in application's initialization code:
// LBase::LoadLibraries (LT_ALL_LEADLIB);

// Declare an LVectorWindow object, or a pointer to an LVectorWindow object
// In the Vector Demo, this in the Document Class
public:
LVectorWindow *m_pVectorWindow;

//If working with a pointer to an LVectorWindow object, allocate the object
//In the Vector Demo, this is in the Document class constructor
m_pVectorWindow = new LVectorWindow;

//Create the LVectorWindow control using CreateWnd
//In the vector Demo, this is done in the View Class, in the OnCreate() function
//The size of the control is 300x200. You can change this at runtime by using
// FitToParent() or
// Move()
hWnd = GetDocument()->m_pVectorWindow->CreateWnd( m_hWnd,0,
WS_VISIBLE|L_BS_CENTER|
L_BS_PROCESSKEYBOARD,
0,0,300,200);

//Add code to load a file.
//In the Vector Demo, this is in the Document class, in the OnOpenDocument() function
m_pVectorWindow->Load(szTemp);


Using LVectorWindow as a Window

To use the LVectorWindow (or any derived) class as a Window in your application, you must create a window, and then assign the newly created window handle to an LVectorWindow (or derived) object. After that, the class object will do all of the processing required to handle the Window messages that the window will receive, including those relating to displaying images. If you want to process messages yourself, you can override the LVectorWindow::MsgProcCallBack virtual function.

For a complete example, please refer to the Class Library Vector Demo. In the file VecView.cpp, search for this code, and follow the instructions for modifying the demo to work with the LVectorWindow as either a Window or a Control.

There are two way to use LEAD controls :
// 1.As a control:
// Enable A and Disable B
// 2.As a Window :
// Enable B and Disable As

The following is a short example of getting started using LVectorWindow as a Window. This example was done using MFC, so your code may look different if you use some other foundation class library.

// Do not forget to load the libraries in application's initialization code:
// LBase::LoadLibraries (LT_ALL_LEADLIB);

// Declare an LVectorWindow object, or a pointer to an LVectorWindow object
// In the Vector Demo, this in the Document Class
public:
LVectorWindow *m_pVectorWindow;

//If working with a pointer to an LVectorWindow object, allocate the object
//In the Vector Demo, this is in the Document class constructor
m_pVectorWindow = new LVectorWindow;

//Attach the LVectorWindow object to an already existing window
//In the vector Demo, this is done in the View Class, in the OnCreate() function
//The m_hWnd refers to the existing window that the LVectorWindow object is being attached
GetDocument()->m_pVectorWindow->SetWndHandle(m_hWnd);

//Add code to load a file.
//In the Vector Demo, this is in the Document class, in the OnOpenDocument() function
m_pVectorWindow->Load(szTemp);


Mapping Fonts

A font mapper is a LVectorBase::VectorFontMapperCallback callback function, defined by the user, which is used to set the font characteristics for any text added to the vector handle after enabling a font mapper for a vector handle by calling LVectorBase::EnableFontMapper. If the font mapper callback function returns an error, then the changes to the LogFont will be ignored.

For example, consider the situation in which the user is loading a CGM file that contains text of font Arial. If a font mapper callback function has not been enabled using LVectorBase::EnableFontMapper, the user has no control over the font of the text, and it will be added to the vector drawing as Arial. If a font mapper callback function is defined for the LVectorBase::VectorFontMapperCallback function, before the CGM file is loaded, the user can catch the font of the text and change it to something such as Courier New. When the text that is part of the CGM file is added to the vector drawing, the text will appear as Courier New instead of Arial.

To determine whether a font mapper is enabled, call LVectorBase::IsFontMapperEnabled.


Vector Files To Be Included With Your Application

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

REDIST\

Redistributable Vector features files.

Note: The Vector features are provided for evaluation purposes only. You may not copy or redistribute any of the following files without obtaining the proper license. In some cases, the license is included with your initial purchase of LEADTOOLS. In other cases, you must obtain a license from a third party or enter into a royalty agreement with LEAD to obtain the proper license. For these special licensing situations, see the notes below accompanying the specific file.

Note: You may not distribute the header files with your application, and you may not provide software development capabilities in your application.

The following table summarizes the files you must include on your distribution diskettes to support the LEADTOOLS Vector features functions on a WIN32 system. (\REDIST\ subdirectory contains copies of these files.)

Please note that LTKRN and LTWVC are required for ALL Class Library applications. For more information on LTKRN, LTWVC, LTFIL and other files for the Main Class Library, refer to Files To Be Included With Your Application .

Redistributables: | Explanation: | If you are using a standard release without Unicode, the files to use are: | If you are using a standard release with Unicode, the files to use are: | If you are using an evaluation release without Unicode, the files to use are: | If you are using an evaluation release with Unicode, the files to use are:
LVKRN LVDLG LVGL | Vector Features Support. LVKRN14_N.DLL is the LEADTOOLS Vector Support DLL. LVDLG14N.DLL is required for Vector Common Dialog support. LVGL14N.DLL is required for OpenGL support. | DLL: LVKRN14N.DLL LVDLG14N.DLL LVGL14N.DLL Library: LVKRN_N.LIB LVDLG_N.LIB | DLL: LVKRN14NU.DLL LVDLG14NU.DLL LVGL14NU.DLL Library: LVKRN_NU.LIB LVDLG_NU.LIB | DLL: LVKRN14E.DLL LVDLG14E.DLL LVGL14E.DLL Library: LVKRN_E.LIB LVDLG_E.LIB | DLL: LVKRN14EU.DLL LVDLG14EU.DLL LVGL14EU.DLL Library: LVKRN_EU.LIB LVDLG_EU.LIB


Installation Directory

The installation procedure creates a directory tree for the LEADTOOLS files, and adds the demonstration programs and online help to your desktop. You specify the root directory during installation.

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:

ACROBAT | LEADTOOLS manuals in the PDF format, which you can view and print using Adobe Acrobat. These files are optional and are available when installing from the CD-ROM.
BIN | Executable files for the demonstration programs.
HELP | Online help files.
IMAGES | Sample images and databases containing images.
EXAMPLES\DLL | One subdirectory for each example API program.
EXAMPLES\OCX | One subdirectory for each example ActiveX program.
EXAMPLES\COM | One subdirectory for each example COM program.
EXAMPLES\CLASSLIB | One subdirectory for each example Class Library program.
EXAMPLES\RES | Resource files for the example programs.
INCLUDE | Header files, BAS files, and the ActiveX's MFC interface files for versions of Visual C++ earlier than 4.0.
INCLUDE\CLASSLIB | Header files for the Class Library
LIB | Library 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.


Summary of All Supported Image File Formats

Color and Grayscale

Computer Graphics Metafile (CGM)

Corel Presentation Exhange (CMX)

DGN (DGN)

DRaWing (DRW)

Drawing Interchange Format (DXF)

DWF Format (DWF)

DWG Format (DWG)

ESRI Shape (SHP) Format

Gerber Format (GBR)

Macintosh Pict Format (PCT)

PLT (PLT)

Printer Command Language Format (PCL)

Scalable Vector Graphics Format (SVG)

Windows Metafile Formats (WMF and EMF)

WordPerfect Format (WPG)


Formats of Vector Input Files

This topic has been replaced. Refer to Summary of All Supported Image File Formats.


Formats of Vector Output Files

This topic has been replaced. Refer to Summary of All Supported Image File 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, PLT - PLT / HPGL 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: 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, PLT - PLT / HPGL 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: 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, PLT - PLT / HPGL 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: 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 LMemoryFile::LoadMemory , LMemoryFile::SaveBitmap , or LFile::FeedLoad .

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, PLT - PLT / HPGL 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: DWF Format (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, PLT - PLT / HPGL 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: 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, PLT - PLT / HPGL 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: 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 LMemoryFile::LoadMemory , LMemoryFile::SaveBitmap , or LFile::FeedLoad .

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, PLT - PLT / HPGL 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: 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, PLT - PLT / HPGL 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: 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, PLT - PLT / HPGL 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: 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, PLT - PLT / HPGL 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: 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 LMemoryFile::LoadMemory , LMemoryFile::SaveBitmap , or LFile::FeedLoad .

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: 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, PLT - PLT / HPGL Format, PDF - Portable Document 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: 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, PLT - PLT / HPGL Format, PDF - Portable Document 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: 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, PLT - PLT / HPGL 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, WMZ - Compressed Windows Metafile Format .


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, PLT - PLT / HPGL 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,WMF - Windows Metafile Formats, WMZ - Compressed Windows Metafile Format .


Class Hierarchy Chart

Below is a chart that outlines the derivation of the LEADTOOLS Vector classes. For information on the LBase and LBaseFile classes, refer to:

Class Hierarchy Chart

Note: LEADTOOLS also offers DICOM Classes in selected products. For information about the DICOM classes, refer to Ltdiclibn.hlp in the LEAD\HELP\ directory.

Note: LEADTOOLS also offers Multimedia Classes in selected products. For information about the Multimedia classes, refer to Ltvidlibn.chm in the LEAD\HELP\ directory.

Vector Class Map Macros


LVectorArc

Description

The LVectorArc class is derived from LVectorObject class. This class contains the support for creating and managing vector arc objects. You can use objects created from this class to set/get the properties of a vector arc object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorArc::Class Members

Constructors / Destructors

LVectorArc::LVectorArc

LVectorArc::~LVectorArc

Locking / Unlocking

LVectorArc::LockObject

LVectorArc::UnlockObject

Return to LVectorArc


LVectorBase

Description

The LVectorBase class is the main vector class. This class contains the main functionality for dealing with vectors in memory. It includes functions for basic vector transforms such as scaling, translating, and rotating. This class also includes functions for loading vectors from files and saving vectors to files. This class also contains functions for the following:

Modifying vector object characteristics

Copying whole or partial vectors from one object to another

Vector display settings

Converting vectors to or from EMFs and WMFs

Modifying the viewing characteristics such as view mode and view port.

This class is the base class for any vector classes that you wish to derive.

When calling some functions of the LVectorBase LEADTOOLS Class Library classes, the vector data is changed. To be notified of these changes, you can override the LVectorBase::StartChanging and LVectorBase::EndChanging functions. For more information, refer to Bitmap and Vector Change Notifications and Notification Categories .

If you derive a class from LVectorBase, the macros defined in Wrapper Macros may be helpful.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Derived Classes


LVectorBase::Class Members

Constructors / Destructors

Loading and Saving Vector Files

Viewing a Vector Image

Exploding a Vector Image

Modifying Vector Object Characteristics

Getting and Setting Layer Information

Getting and Setting Group Information

Getting and Setting Object Information

Converting/Changing Metafiles

Copying a Vector

Realizing a Vector To a Bitmap

Overridables

Change Notifications

Getting and Setting General Vector Information

Working With The Clipboard

Return to LVectorBase

Constructors / Destructors

LVectorBase::LVectorBase

LVectorBase::~LVectorBase

Loading and Saving a Vector Image

LVectorBase::Load

LVectorBase::Save

Viewing a Vector Image

LVectorBase::GetAmbientColor

LVectorBase::GetBackgroundColor

LVectorBase::GetCamera

LVectorBase::GetDisplayOptions

LVectorBase::GetPan

LVectorBase::GetPolygonMode

LVectorBase::GetUseLights

LVectorBase::GetViewMode

LVectorBase::GetViewport

LVectorBase::InvertColors

LVectorBase::SetAmbientColor

LVectorBase::SetBackgroundColor

LVectorBase::SetCamera

LVectorBase::SetDisplayOptions

LVectorBase::SetPan

LVectorBase::SetPolygonMode

LVectorBase::SetUseLights

LVectorBase::SetViewMode

LVectorBase::SetViewport

LVectorBase::AttachToWindow

LVectorBase::LogicalToPhysical

LVectorBase::Paint

LVectorBase::ZoomRect

Exploding a Vector Image

LVectorBase::ExplodeObject

Modifying Vector Object Characteristics

LVectorBase::ApplyTransformation

LVectorBase::DeleteObject

LVectorBase::Free

LVectorBase::GetBindVerticesMode

LVectorBase::GetRotation

LVectorBase::GetScale

LVectorBase::GetTranslation

LVectorBase::SelectObject

LVectorBase::SetBindVerticesMode

LVectorBase::SetRotation

LVectorBase::SetScale

LVectorBase::SetTranslation

Getting and Setting Layer Information

LVectorBase::AddLayer

LVectorBase::CopyLayer

LVectorBase::EnumLayers

LVectorBase::EnumLayersCallBack

LVectorBase::GetActiveLayer

LVectorBase::GetLayerByIndex

LVectorBase::GetLayerByName

LVectorBase::GetLayerCount

LVectorBase::SetActiveLayer

Getting and Setting Group Information

LVectorBase::GetGroupByName

LVectorBase::GetGroupCount

LVectorBase::GetGroupByIndex

LVectorBase::EnumGroups

LVectorBase::EnumGroupsCallBack

LVectorBase::CopyGroup

Getting and Setting Object Information

LVectorBase::AddObject

LVectorBase::CopyObject

LVectorBase::EnumObjects

LVectorBase::EnumObjectsCallBack

LVectorBase::EnumVertices

LVectorBase::EnumVerticesCallBack

LVectorBase::GetObjectParallelogram

LVectorBase::GetObjectRect

LVectorBase::HitTest

LVectorBase::Is3D

LVectorBase::IsObjectInsideParallelogram

LVectorBase::IsObjectInsideRect

LVectorBase::IsObjectSelected

LVectorBase::SetObjectAttributes

Converting Metafiles

LVectorBase::ConvertFromEMF

LVectorBase::ConvertFromWMF

LVectorBase::ConvertToEMF

LVectorBase::ConvertToWMF

Copying a Vector

LVectorBase::Initialize

LVectorBase::Copy

Realizing a Vector to a Bitmap

LVectorBase::Realize

Overridables

LVectorBase::EnumObjectsCallBack

LVectorBase::EnumVerticesCallBack

Change Notification

LVectorBase::EnableAlwaysEndNotification

LVectorBase::EnableChangeNotification

LVectorBase::EndChanging

LVectorBase::IsAlwaysEndNotification

LVectorBase::IsChangeNotificationEnabled

LVectorBase::StartChanging

Getting and Setting General Vector Information

LVectorBase::Empty

LVectorBase::EnableFileName

LVectorBase::GetEngine

LVectorBase::GetFileName

LVectorBase::GetHitTest

LVectorBase::GetHandle

LVectorBase::GetMarker

LVectorBase::GetOrigin

LVectorBase::GetPalette

LVectorBase::GetParallelogram

LVectorBase::IsAllocated

LVectorBase::IsEmpty

LVectorBase::IsFileNameEnabled

LVectorBase::IsLocked

LVectorBase::IsObjectHidden

LVectorBase::SetEngine

LVectorBase::SetFileName

LVectorBase::SetHandle

LVectorBase::SetHitTest

LVectorBase::SetLocked

LVectorBase::SetMarker

LVectorBase::SetOrigin

LVectorBase::SetPalette

LVectorBase::SetParallelogram

Working with the Clipboard

LVectorBase::CopyFromClipboard

LVectorBase::CopyToClipboard

LVectorBase::IsClipboardReady


LVectorBase::Derived Classes

The following class is derived directly from the LVectorBase class:

LVectorWindow


LVectorChord

Description

The LVectorChord class is derived from LVectorObject class. This class contains the support for creating and managing vector chord objects. You can use objects created from this class to set/get the properties of a vector chord object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorChord::Class Members

Constructors / Destructors

LVectorChord::LVectorChord

LVectorChord::~LVectorChord

Locking / Unlocking

LVectorChord::LockObject

LVectorChord::UnlockObject

Return to LVectorChord


LVectorCircle

Description

The LVectorCircle class is derived from LVectorObject class. This class contains the support for creating and managing vector circle objects. You can use objects created from this class to set/get the properties of a vector circle object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorCircle::Class Members

Constructors / Destructors

LVectorCircle::LVectorCircle

LVectorCircle::~LVectorCircle

Locking / Unlocking

LVectorCircle::LockObject

LVectorCircle::UnlockObject

Return to LVectorCircle


LVectorClone

Description

The LVectorClone class is derived from LVectorObject class. This class contains the support for creating and managing vector clone objects. You can use objects created from this class to set or get the properties of a vector clone object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class,


LVectorClone::Class Members

Constructors/Destructors

LVectorClone::LVectorClone

LVectorClone::~LVectorClone

Locking / Unlocking

LVectorClone::LockObject

LVectorClone::UnlockObject

Associating a Group with a Clone Object

LVectorClone::SetGroup

Return to LVectorClone


LVectorDialog

Description

The LEADTOOLS Class Library provides reusable dialogs for the most common LEADTOOLS vector functions.

The vector common dialog features include:

- A Thumbnail Preview option for the vector processing dialogs allows the end user to preview the proposed change to the image, before actually affecting the original image.

- A user interface control for the dialogs is provided through flags passed to each dialog function.

- An option to have the Vector Common Dialog process the image automatically is provided.

When calling some functions of the LVectorBase LEADTOOLS Class Library classes, the vector data is changed. To be notified of these changes, you can override the LVectorBase::StartChanging and LVectorBase::EndChanging functions. For more information, refer to Bitmap and Vector Change Notifications and Notification Categories

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorDialog::Class Members

Constructors / Destructors

Calling Dialogs

Getting and Setting Camera Dialog Values

Getting and Setting 3D Options Dialog Values

Getting and Setting Rotate Dialog Values

Getting and Setting Scale Dialog Values

Getting and Setting Translate Dialog Values

General Information

Help Support

Return to LVectorDialog

Constructors / Destructors

LVectorDialog::~LVectorDialog

LVectorDialog::LVectorDialog

Calling Dialogs

LVectorDialog::DoModalVector3DOptions

LVectorDialog::DoModalVectorCamera

LVectorDialog::DoModalVectorEditAllGroups

LVectorDialog::DoModalVectorEditAllLayers

LVectorDialog::DoModalVectorEditGroup

LVectorDialog::DoModalVectorEditLayer

LVectorDialog::DoModalVectorEditObject

LVectorDialog::DoModalVectorHitTest

LVectorDialog::DoModalVectorNewGroup

LVectorDialog::DoModalVectorNewLayer

LVectorDialog::DoModalVectorNewObject

LVectorDialog::DoModalVectorRender

LVectorDialog::DoModalVectorRotate

LVectorDialog::DoModalVectorScale

LVectorDialog::DoModalVectorTranslate

LVectorDialog::DoModalVectorViewMode

Getting and Setting Camera Dialog Values

LVectorDialog::GetCamera

LVectorDialog::SetCamera

Getting and Setting 3D Option Dialog Values

LVectorDialog::GetColorAmbient

LVectorDialog::GetPolygonMode

LVectorDialog::GetUseLights

LVectorDialog::SetColorAmbient

LVectorDialog::SetPolygonMode

LVectorDialog::SetUseLights

Getting and Setting Rotate Dialog Values

LVectorDialog::GetRotation

LVectorDialog::SetRotation

Getting and Setting Scale Dialog Values

LVectorDialog::GetScale

LVectorDialog::SetScale

Getting and Setting Translation Dialog Values

LVectorDialog::GetTranslation

LVectorDialog::SetTranslation

General Information

LVectorDialog::EnableAutoProcess

LVectorDialog::EnableNoDuplicate

LVectorDialog::EnablePreview

LVectorDialog::GetVector

LVectorDialog::IsAutoProcessEnabled

LVectorDialog::IsNoDuplicateEnabled

LVectorDialog::IsPreviewEnabled

LVectorDialog::IsValid

LVectorDialog::SetVector

Help Support

LVectorDialog::EnableHelp

LVectorDialog::IsHelpEnabled

LVectorDialog::VectorHelpCallback


LVectorEllipse

Description

The LVectorEllipse class is derived from LVectorObject class. This class contains the support for creating and managing vector ellipse objects. You can use objects created from this class to set/get the properties of a vector ellipse object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorEllipse::Class Members

Constructors / Deconstructors

LVectorEllipse::LVectorEllipse

LVectorEllipse::~LVectorEllipse

Locking / Unlocking

LVectorEllipse::LockObject

LVectorEllipse::UnlockObject

Return to LVectorEllipse


LVectorEllipticalArc

Description

The LVectorEllipticalArc class is derived from LVectorObject class. This class contains the support for creating and managing vector elliptical arc objects. You can use objects created from this class to set/get the properties of a vector elliptical arc object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorEllipticalArc::Class Members

Constructors / Destructors

LVectorEllipticalArc::LVectorEllipticalArc

LVectorEllipticalArc::~LVectorEllipticalArc

Locking / Unlocking

LVectorEllipticalArc::LockObject

LVectorEllipticalArc::UnlockObject

Return to LVectorEllipticalArc


LVectorFile

Description

The LVectorFile class is derived from LBaseFile and extends it to contain functions for loading and saving vectors from and to files on disk.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorFile::Class Members

Constructors / Destructors

LVectorFile::LVectorFile

LVectorFile::~LVectorFile

Loading and Saving

LVectorFile::FeedLoad

LVectorFile::LoadFile

LVectorFile::SaveFile

LVectorFile::StartFeedLoad

LVectorFile::StopFeedLoad

Getting and Setting Information

LVectorFile::GetFileName

LVectorFile::IsValid

LVectorFile::SetFileName

LVectorFile::SetVector

Return to LVectorFile


LVectorGroup

Description

The LVectorGroup class is used in conjunction with the main vector class LVectorBase, the vector layer class LVectorLayer, and the vector object class LVectorObject. This class contains the functionality for dealing with vector groups. This class contains functions for the following:

Enumerating the vector objects in a vector group

Removing the vector objects in a vector group

Copying a vector group to another vector

Getting information about a vector group

Adding objects to a vector group

Returning count of objects in a vector group

When calling some functions of the LVectorGroup class, the associated vector data is changed. To be notified of these changes, you can override the LVectorBase::StartChanging and LVectorBase::EndChanging functions. For more information, refer to Bitmap and Vector Change Notifications and Notification Categories .

If you derive a class from LVectorBase, the macros defined in Wrapper Macros may be helpful.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorGroup::Class Members

Constructors / Destructors

Enumerating Objects in Groups

Deleting Groups

Getting and Setting Group Information

Setting the Vector

Emptying a Group

Adding an Object

Overridables

Return to LVectorGroup

Constructors / Destructors

LVectorGroup::LVectorGroup

LVectorGroup::~LVectorGroup

Enumerating Objects in Groups

LVectorGroup::EnumObjects

LVectorGroup::EnumObjectsCallBack

Deleting Groups

LVectorGroup::DeleteGroup

LVectorGroup::DeleteGroupClones

Getting and Setting Group Information

LVectorGroup::GetGroupDesc

LVectorGroup::SetGroupDesc

Setting the Vector

LVectorGroup::SetVector

Emptying a Group

LVectorGroup::EmptyGroup

Adding an Object

LVectorGroup::AddObject

Overridables

LVectorGroup::EnumObjectsCallBack


LVectorHPolyBezier

Description

The LVectorHPolyBezier class is derived from LVectorObject class. This class contains the support for creating and managing vector spline objects. You can use objects created from this class to set/get the properties of a vector polygon object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorHPolyBezier::Class Members

Constructors / Destructors

Locking / Unlocking

Constructors / Destructors

LVectorHPolyBezier::LVectorHPolyBezier

LVectorHPolyBezier::~LVectorHPolyBezier

Locking / Unlocking

LVectorHPolyBezier::LockObject

LVectorHPolyBezier::UnlockObject


LVectorLayer

Description

The LVectorLayer class is used in conjunction with the main vector class LVectorBase and the vector object class LVectorObject. This class contains the functionality for dealing with vector layers, This class contains functions for the following:

Enumerating the vector objects in a vector layer

Removing the vector objects in a vector layer

Copying a vector layer to another vector

Getting information about a vector layer

Adding objects to a vector layer

Returning count of objects in a vector layer

When calling some functions of the LVectorLayer class, the associated vector data is changed. To be notified of these changes, you can override the LVectorBase::StartChanging and LVectorBase::EndChanging functions. For more information, refer to Bitmap and Vector Change Notifications and Notification Categories.

If you derive a class from LVectorLayer, the macros defined in Wrapper Macros may be helpful.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorLayer::Class Members

Constructors / Destructors

LVectorLayer::LVectorLayer

LVectorLayer::~LVectorLayer

Setting / Getting Layer Information

LVectorLayer::GetLayerDesc

LVectorLayer::SetLayerDesc

Adding, Counting and Enumerating Objects

LVectorLayer::AddObject

LVectorLayer::EnumObjects

Callback Objects

LVectorLayer::EnumObjectsCallBack

Miscellaneous

LVectorLayer::DeleteLayer

LVectorLayer::EmptyLayer

LVectorLayer::SetVector

Return to LVectorLayer


LVectorLine

Description

The LVectorLine class is derived from LVectorObject class. This class contains the support for creating and managing vector line objects. You can use objects created from this class to set/get the properties of a vector line object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorLine::Class Members

Constructors / Destructors

LVectorLine::LVectorLine

LVectorLine::~LVectorLine

Locking / Unlocking

LVectorLine::LockObject

LVectorLine::UnlockObject

Return to LVectorLine


LVectorMemoryFile

Description

The LVectorMemoryFile class is derived from LBaseFile and extends it to contain functions for loading and saving vectors from and to files in memory buffers, as opposed to files on disk.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorMemoryFile::Class Members

Constructors / Destructors

LVectorMemoryFile::LVectorMemoryFile

LVectorMemoryFile::~LVectorMemoryFile

Getting Information

LVectorMemoryFile::IsValid

Loading and Saving

LVectorMemoryFile::LoadMemory

LVectorMemoryFile::SaveMemory

Return to LVectorMemoryFile


LVectorObject

Description

The LVectorObject class is used in conjunction with the main vector class LVectorBase and the vector layer class LVectorLayer. This class contains the functionality for dealing with vector objects, this class contains functions for the following:

Removing a vector object from a vector layer

Getting and setting object attributes such as pen style, brush color, pen width, etc.

Getting information about a vector object such as bounding rectangle, bounding parallelogram, selection status, etc.

Modifying vector objects through rotation, scaling and translation

Determining the type of vector object being used

When calling some functions of the LVectorObject class, the associated vector data is changed. To be notified of these changes, you can override the LVectorBase::StartChanging and LVectorBase::EndChanging functions. For more information, refer to Bitmap and Vector Change Notifications and Notification Categories.

If you derive a class from LVectorObject, the macros defined in Wrapper Macros may be helpful.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class , Derived Classes


LVectorObject::Class Members

Constructors / Destructors

LVectorObject::LVectorObject

LVectorObject::~LVectorObject

Lock /Unlock Object

LVectorObject::LockObject

LVectorObject::UnlockObject

Getting / Setting Object Information

LVectorObject::GetObjectAttributes

LVectorObject::GetObjectParallelogram

LVectorObject::GetObjectRect

LVectorObject::GetType

LVectorObject::IsObjectHidden

LVectorObject::IsObjectInsideParallelogram

LVectorObject::IsObjectInsideRect

LVectorObject::IsObjectSelected

LVectorObject::IsValid

LVectorObject::SetObjectAttributes

LVectorObject::SetRotation

LVectorObject::SetScale

LVectorObject::SetTranslation

Hiding / Showing Objects

LVectorObject::HideObject

Selecting / Unselecting Objects

LVectorObject::SelectObject

Hyperlink Objects

LVectorObject::AddHyperlink

LVectorObject::GetHyperlink

LVectorObject::GetHyperlinkCount

LVectorObject::GotoHyperlink

LVectorObject::SetHyperlink

View Context Objects

LVectorObject::GetViewContext

LVectorObject::RemoveViewContext

LVectorObject::SetViewContext

Tooltip Objects

LVectorObject::GetTooltip

LVectorObject::HideTooltip

LVectorObject::SetTooltip

LVectorObject::ShowTooltip

Miscellaneous

LVectorObject::DeleteObject

LVectorObject::ExplodeObject

LVectorObject::GetDescription

LVectorObject::SetDescription

Return to LVectorObject


LVectorObject::Derived Classes

The following classes are derived directly from the LVectorObject class:

LVectorArc | LVectorChord
LVectorCircle | LVectorEllipse
LvectorEllipticalArc | LVectorLine
LVectorPie | LVectorPolybezier
LVectorPolydraw | LVectorPolygon
LVectorPolyline | LVectorRaster
LVectorRectangle | LVectorStock
LVectorText | LVectorVertex


LVectorPie

Description

The LVectorPie class is derived from LVectorObject class. This class contains the support for creating and managing vector pie objects. You can use objects created from this class to set/get the properties of a vector pie object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorPie::Class Members

Constructors / Destructors

LVectorPie::LVectorPie

LVectorPie::~LVectorPie

Locking / Unlocking

LVectorPie::LockObject

LVectorPie::UnlockObject

Return to LVectorPie


LVectorPolybezier

Description

The LVectorPolybezier class is derived from LVectorObject class. This class contains the support for creating and managing vector polybezier objects. You can use objects created from this class to set/get the properties of a vector polybezier object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorPolybezier::Class Members

Constructors / Destructors

LVectorPolybezier::LVectorPolyBezier

LVectorPolybezier::~LVectorPolyBezier

Locking / Unlocking

LVectorPolybezier::LockObject

LVectorPolybezier::UnlockObject

Return to LVectorPolybezier


LVectorPolydraw

Description

The LVectorPolydraw class is derived from LVectorObject class. This class contains the support for creating and managing vector polydraw objects. You can use objects created from this class to set/get the properties of a vector polydraw object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorPolydraw::Class Members

Constructors / Destructors

LVectorPolydraw::LVectorPolyDraw

LVectorPolydraw::~LVectorPolyDraw

Locking / Unlocking

LVectorPolydraw::LockObject

LVectorPolydraw::UnlockObject

Return to LVectorPolydraw


LVectorPolygon

Description

The LVectorPolygon class is derived from LVectorObject class. This class contains the support for creating and managing vector polygon objects. You can use objects created from this class to set/get the properties of a vector polygon object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorPolygon::Class Members

Constructors / Destructors

LVectorPolygon::LVectorPolygon

LVectorPolygon::~LVectorPolygon

Locking / Unlocking

LVectorPolygon::LockObject

LVectorPolygon::UnlockObject

Return to LVectorPolygon


LVectorPolyline

Description

The LVectorPolyline class is derived from LVectorObject class. This class contains the support for creating and managing vector polyline objects. You can use objects created from this class to set/get the properties of a vector polyline object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorPolyline::Class Members

Constructors / Destructors

LVectorPolyLine::LVectorPolyLine

LVectorPolyLine::~LVectorPolyLine

Locking / Unlocking

LVectorPolyline::LockObject

LVectorPolyline::UnlockObject

Return to LVectorPolyline


LVectorRaster

Description

The LVectorRaster class is derived from LVectorObject class. This class contains the support for creating and managing vector raster objects. You can use objects created from this class to set/get the properties of a vector raster object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorRaster::Class Members

Constructors / Destructors

LVectorRaster::LVectorRaster

LVectorRaster::~LVectorRaster

Locking / Unlocking

LVectorRaster::LockObject

LVectorRaster::UnlockObject

Return to LVectorRaster


LVectorRectangle

Description

The LVectorRectangle class is derived from LVectorObject class. This class contains the support for creating and managing vector rectangle objects. You can use objects created from this class to set/get the properties of a vector rectangle object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorRectangle::Class Members

Constructors / Destructors

LVectorRectangle::LVectorRectangle

LVectorRectangle::~LVectorRectangle

Locking / Unlocking

LVectorRectangle::LockObject

LVectorRectangle::UnlockObject

Return to LVectorRectangle


LVectorSpline

Description

The LVectorSpline class is derived from LVectorObject class. This class contains the support for creating and managing vector spline objects. You can use objects created from this class to set/get the properties of a vector polygon object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorSpline::Class Members

Constructors / Destructors

Locking / Unlocking

Constructors / Destructors

LVectorSpline::LVectorSpline

LVectorSpline::~LVectorSpline

Locking / Unlocking

LVectorSpline::LockObject

LVectorSpline::UnlockObject


LVectorStock

Description

The LVectorStock class is derived from LVectorObject class. This class contains the support for creating and managing vector stock objects. You can use objects created from this class to set/get the properties of a vector stock object.

LEAD VECTOR Toolkit 14 supports Stock objects libraries. These are Dynamic Link Libraries that contain user-defined objects.

The VECOFICE Library comes with more than 100 pre-defined object shapes for multiple purposes such as arrows, flowchart symbols, etc.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorStock::Class Members

Constructors / Destructors

LVectorStock::LVectorStock

LVectorStock::~LVectorStock

Return to LVectorStock


LVectorText

Description

The LVectorText class is derived from LVectorObject class. This class contains the support for creating and managing vector text objects. You can use objects created from this class to set/get the properties of a vector text object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorText::Class Members

Constructors / Destructors

LVectorText::LVectorText

LVectorText::~LVectorText

Locking / Unlocking

LVectorText::LockObject

LVectorText::UnlockObject

Return to LVectorText


LVectorVertex

Description

The LVectorVertex class is derived from LVectorObject class. This class contains the support for creating and managing vector vertex objects. You can use objects created from this class to set/get the properties of a vector vertex object.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorVertex::Class Members

Constructors / Destructors

LVectorVertex::LVectorVertex

LVectorVertex::~LVectorVertex

Locking / Unlocking

LVectorVertex::LockObject

LVectorVertex::UnlockObject

Return to LVectorVertex


LVectorWindow

Description

The LVectorWindow class is derived from LVectorBase, and extends it by adding full user interface (UI) functionality. You can consider this class as a full windowed control that is capable of displaying vector images. The LVectorWindow class provides the following functionality:

Vector Displaying

Scrolling (which can be enabled or disabled)

Palette handling

Zooming

Panning

Keyboard handling

UI tools including pan image and select objects

Windows Drag/Drop operations for loading files

LEAD common dialogs and other LEADTOOLS Class Library classes are also supported through class-maps.

Using command notification messages, the LVectorWindow object can be used in a manner similar to standard Windows controls for dialogs. By overriding the virtual functions provided by LVectorWindow, you can use LVectorWindow objects as a regular window, which handles most messages for you. For more information on the two ways in which LVectorWindow objects can be used, refer to Using LVectorWindow as a Window, Using LVectorWindow as a Control, and LVectorWindow:Window vs Control.

The LVectorWindow control handles processing the mouse messages automatically when the internal tool type is not TOOL_VECTOR_USERMODE.

Certain keys are handled by the LVectorWindow object when the vector window control has the focus. For a list of these keys and the associated action, refer to LVectorWindow Keys.

Required Libraries

You must load all required libraries using LBase::LoadLibraries before using the classes.

LVKRN
LVDLG
LTFIL
LVGL
LVDX
LFDXF

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Class Members, Class Hierarchy Chart, Parent class


LVectorWindow::Class Members

Constructors / Destructors

LVectorWindow::LVectorWindow

LVectorWindow::~LVectorWindow

Vector Display

LVectorWindow::CreateWnd

LVectorWindow::FitToParent

LVectorWindow::GetVectorRect

LVectorWindow::GetVectorVisibleRect

LVectorWindow::GetVectorWnd

LVectorWindow::Move

LVectorWindow::OnDraw

LVectorWindow::SetEngine

LVectorWindow::SetWndHandle

Loading Images

LVectorWindow::GetBackgroundColor

LVectorWindow::Load

LVectorWindow::SetBackgroundColor

LVectorWindow::SetEngine

Message Handling

LVectorWindow::MsgProcCallBack

Overridables

LVectorWindow::EndChanging

LVectorWindow::MsgProcCallBack

LVectorWindow::OnDraw

LVectorWindow::OnFileDropped

LVectorWindow::OnScale

LVectorWindow::OnZoom

LVectorWindow::StartChanging

Painting

LVectorWindow::EnableAutoPaint

LVectorWindow::FitToParent

LVectorWindow::IsAutoPaintEnabled

LVectorWindow::Move

LVectorWindow::Repaint

Pan Window

LVectorWindow::SetPan

Scaling

LVectorWindow::GetKeyMode

LVectorWindow::GetSelectedOnly

LVectorWindow::IsKeyBoardEnabled

LVectorWindow::GetScaleFactor

LVectorWindow::OnScale

LVectorWindow::ScaleIn

LVectorWindow::ScaleOut

LVectorWindow::SetKeyMode

LVectorWindow::SetScaleFactor

LVectorWindow::SetSelectedOnly

Scrolling

LVectorWindow::EnableAutoScroll

LVectorWindow::EnableKeyBoard

LVectorWindow::IsAutoScrollEnabled

LVectorWindow::IsKeyBoardEnabled

LVectorWindow::ScrollBy

LVectorWindow::ScrollTo

User Interface Tools

LVectorWindow::GetToolType

LVectorWindow::SetToolType

Windows Drag and Drop

LVectorWindow::EnableDragAcceptFiles

LVectorWindow::IsDragAcceptFilesEnabled

LVectorWindow::OnFileDropped

Zooming

LVectorWindow::EnableKeyBoard

LVectorWindow::GetKeyMode

LVectorWindow::GetZoomPercent

LVectorWindow::IsKeyBoardEnabled

LVectorWindow::OnZoom

LVectorWindow::SetKeyMode

LVectorWindow::SetZoomPercent

LVectorWindow::ZoomIn

LVectorWindow::ZoomOut

Miscellaneous

LVectorWindow::Free

LVectorWindow::IsControl

LVectorWindow::SelectAllObjects

Return to LVectorWindow


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.


Class Library Function Groups

Vector Images: Loading and Saving Vector Files

Vector Images: Viewing a Vector Image

Vector Images: Vector Handle Functions

Vector Images: Getting Vector Layer Information

Vector Images: Modifying Vector Layers

Vector Images: Modifying Vector Object Characteristics

Vector Images: Obtaining Object Information

Vector Images: Using the Clipboard

Vector Images: Converting/Changing Metafiles

Vector Images: Copying a Vector

Vector Images: Realizing a Vector To a Bitmap

Vector Images: Vector Dialogs

Vector Images: Change Notification

Vector Images: Getting and Setting General Information

Vector Images: Using Vector Groups

Vector Images: Help Support

Vector Images: Hyperlink Object

Vector Images: Tooltips


Vector Images: Change Notification

LVectorBase::EnableAlwaysEndNotification

LVectorBase::EnableChangeNotification

LVectorBase::EndChanging

LVectorBase::IsAlwaysEndNotification

LVectorBase::IsChangeNotificationEnabled

LVectorBase::StartChanging


Vector Images: Converting/Changing Metafiles

LVectorBase::ConvertFromEMF

LVectorBase::ConvertFromWMF

LVectorBase::ConvertToEMF

LVectorBase::ConvertToWMF


Vector Images: Copying a Vector

LVectorBase::Initialize

LVectorBase::Copy


Vector Images: Getting and Setting General Information

LVectorBase::EnableFileName

LVectorBase::GetEngine

LVectorBase::GetFileName

LVectorBase::GetHandle

LVectorBase::GetPalette

LVectorBase::IsAllocated

LVectorBase::IsFileNameEnabled

LVectorBase::IsObjectHidden

LVectorBase::SetEngine

LVectorBase::SetFileName

LVectorBase::SetHandle

LVectorBase::SetPalette

LVectorFile::GetFileName

LVectorFile::IsValid

LVectorFile::SetFileName

LVectorFile::SetVector

LVectorMemoryFile::IsValid

LVectorDialog::EnableAutoProcess

LVectorDialog::EnablePreview

LVectorDialog::GetVector

LVectorDialog::IsAutoProcessEnabled

LVectorDialog::IsPreviewEnabled

LVectorDialog::IsValid

LVectorDialog::SetVector

LVectorWindow::GetToolType

LVectorWindow::SetToolType

LVectorWindow::IsControl

LVectorWindow::SelectAllObjects


Vector Images: Getting Vector Layer Information

LVectorBase::EnumLayers

LVectorBase::GetActiveLayer

LVectorLayer::GetLayerDesc

LVectorBase::GetLayerByIndex

LVectorBase::GetLayerByName

LVectorBase::GetLayerCount


Vector Images: Loading and Saving Vector Files

LVectorFile::FeedLoad

LVectorFile::GetFileName

LVectorFile::LoadFile

LVectorFile::SaveFile

LVectorFile::SetFileName

LVectorFile::SetVector

LVectorFile::StartFeedLoad

LVectorFile::StopFeedLoad

LVectorMemoryFile::LoadMemory

LVectorMemoryFile::SaveMemory

LVectorWindow::GetBackgroundColor

LVectorWindow::Load

LVectorWindow::SetBackgroundColor

LVectorWindow::SetEngine

LVectorWindow::EnableDragAcceptFiles

LVectorWindow::IsDragAcceptFilesEnabled

LVectorWindow::OnFileDropped

LVectorWindow::Free


Vector Images: Modifying Vector Layer Information

LVectorBase::AddLayer

LVectorBase::CopyLayer

LVectorLayer::DeleteLayer

LVectorLayer::EmptyLayer

LVectorBase::SetActiveLayer

LVectorLayer::SetLayerDesc


Vector Images: Modifying Vector Object Characteristics

LVectorBase::ApplyTransformation

LVectorBase::DeleteObject

LVectorBase::ExplodeObject

LVectorBase::GetBindVerticesMode

LVectorBase::GetRotation

LVectorBase::GetScale

LVectorBase::GetTranslation

LVectorBase::SelectObject

LVectorBase::SetBindVerticesMode

LVectorBase::SetRotation

LVectorBase::SetScale

LVectorBase::SetTranslation

LVectorDialog::DoModalVectorRotate

LVectorDialog::DoModalVectorScale

LVectorDialog::DoModalVectorTranslate

LVectorDialog::EnableAutoProcess

LVectorDialog::EnablePreview

LVectorDialog::GetRotation

LVectorDialog::GetScale

LVectorDialog::GetTranslation

LVectorDialog::GetVector

LVectorDialog::IsAutoProcessEnabled

LVectorDialog::IsPreviewEnabled

LVectorDialog::SetRotation

LVectorDialog::SetScale

LVectorDialog::SetTranslation

LVectorDialog::SetVector

LVectorWindow::GetKeyMode

LVectorWindow::GetSelectedOnly

LVectorWindow::IsKeyBoardEnabled

LVectorWindow::GetScaleFactor

LVectorWindow::OnScale

LVectorWindow::ScaleIn

LVectorWindow::ScaleOut

LVectorWindow::SetKeyMode

LVectorWindow::SetScaleFactor

LVectorWindow::SetSelectedOnly

LVectorLayer::AddObject

LVectorBase::CopyObject

LVectorObject::ExplodeObject

LVectorObject::HideObject

LVectorObject::RemoveViewContext

LVectorObject::SetDescription

LVectorObject::SetViewContext

LVectorObject::UnlockObject


Vector Images: Obtaining Object Information

LVectorBase::EnumObjects

LVectorBase::EnumVertices

LVectorBase::GetHitTest

LVectorBase::GetObjectParallelogram

LVectorBase::GetObjectRect

LVectorBase::HitTest

LVectorBase::Is3D

LVectorBase::IsObjectInsideParallelogram

LVectorBase::IsObjectInsideRect

LVectorBase::IsObjectSelected

LVectorLayer::EnumObjects

LVectorObject::GetDescription

LVectorObject::GetViewContext

LVectorObject::IsObjectHidden

LVectorObject::LockObject


Vector Images: Realizing a Vector to a Bitmap

LVectorBase::Realize


Vector Images: Using the Clipboard

LVectorBase::IsClipboardReady

LVectorBase::CopyFromClipboard

LVectorBase::CopyToClipboard


Vector Images: Using Vector Groups

LVectorBase::AddGroup

LVectorBase::CopyGroup

LVectorBase::EnumGroups

LVectorBase::GetGroupByIndex

LVectorBase::GetGroupByName

LVectorBase::GetGroupCount

LVectorDialog::DoModalVectorEditAllGroups

LVectorDialog::DoModalVectorEditGroup

LVectorDialog::DoModalVectorNewGroup

LVectorGroup::AddObject

LVectorGroup::DeleteGroup

LVectorGroup::DeleteGroupClones

LVectorGroup::EmptyGroup

LVectorGroup::EnumObjects

LVectorGroup::GetGroupDesc

LVectorGroup::SetGroupDesc


Vector Images: Vector Dialogs

LVectorDialog::DoModalVectorCamera

LVectorDialog::DoModalVectorEditAllGroups

LVectorDialog::DoModalVectorEditAllLayers

LVectorDialog::DoModalVectorEditGroup

LVectorDialog::DoModalVectorEditLayer

LVectorDialog::DoModalVectorEditObject

LVectorDialog::DoModalVectorHitTest

LVectorDialog::DoModalVectorNewGroup

LVectorDialog::DoModalVectorNewLayer

LVectorDialog::DoModalVectorNewObject

LVectorDialog::DoModalVectorRender

LVectorDialog::DoModalVectorRotate

LVectorDialog::DoModalVectorScale

LVectorDialog::DoModalVectorTranslate

LVectorDialog::DoModalVectorViewMode

LVectorDialog::EnableAutoProcess

LVectorDialog::EnableNoDuplicate

LVectorDialog::EnablePreview

LVectorDialog::EnableSelectedOnly

LVectorDialog::GetCamera

LVectorDialog::GetColorAmbient

LVectorDialog::GetPolygonMode

LVectorDialog::GetRotation

LVectorDialog::GetScale

LVectorDialog::GetString

LVectorDialog::GetStringLen

LVectorDialog::GetTranslation

LVectorDialog::GetUseLights

LVectorDialog::GetVector

LVectorDialog::IsAutoProcessEnabled

LVectorDialog::IsNoDuplicateEnabled

LVectorDialog::IsPreviewEnabled

LVectorDialog::IsValid

LVectorDialog::SetCamera

LVectorDialog::SetColorAmbient

LVectorDialog::SetFont

LVectorDialog::SetPolygonMode

LVectorDialog::SetRotation

LVectorDialog::SetScale

LVectorDialog::SetString

LVectorDialog::SetTranslation

LVectorDialog::SetUseLights

LVectorDialog::SetVector

LVectorDialog::VectorHelpCallback


Vector Images: Vector Handle Functions

Getting/Setting the Vector Engine

LVectorBase::AttachToWindow

LVectorBase::GetEngine

Locking a Vector Handle

LVectorBase::IsLocked

LVectorBase::SetLocked

Emptying a Vector Handle

LVectorBase::Empty

LVectorBase::IsEmpty

Getting/Setting the Point of Origin

LVectorBase::GetOrigin

LVectorBase::SetOrigin

Marker Settings

LVectorBase::GetMarker

LVectorBase::SetMarker

Vector Handle Boundaries

LVectorBase::GetParallelogram

LVectorBase::SetParallelogram

Copying a Vector Handle

LVectorBase::Initialize

LVectorBase::Copy


Vector Images: Viewing a Vector Image

LVectorBase::GetAmbientColor

LVectorBase::GetBackgroundColor

LVectorBase::GetCamera

LVectorBase::GetDisplayOptions

LVectorBase::GetPan

LVectorBase::GetPolygonMode

LVectorBase::GetUseLights

LVectorBase::GetViewMode

LVectorBase::GetViewport

LVectorBase::InvertColors

LVectorBase::SetAmbientColor

LVectorBase::SetBackgroundColor

LVectorBase::SetCamera

LVectorBase::SetDisplayOptions

LVectorBase::SetPan

LVectorBase::SetPolygonMode

LVectorBase::SetUseLights

LVectorBase::SetViewMode

LVectorBase::SetViewport

LVectorBase::AttachToWindow

LVectorBase::LogicalToPhysical

LVectorBase::Paint

LVectorBase::ZoomRect

LVectorDialog::DoModalVector3DOptions

LVectorDialog::DoModalVectorCamera

LVectorDialog::EnableAutoProcess

LVectorDialog::EnablePreview

LVectorDialog::GetColorAmbient

LVectorDialog::GetCamera

LVectorDialog::GetPolygonMode

LVectorDialog::GetUseLights

LVectorDialog::IsAutoProcessEnabled

LVectorDialog::IsPreviewEnabled

LVectorDialog::IsValid

LVectorDialog::SetColorAmbient

LVectorDialog::SetCamera

LVectorDialog::SetPolygonMode

LVectorDialog::SetUseLights

LVectorWindow::CreateWnd

LVectorWindow::FitToParent

LVectorWindow::GetVectorRect

LVectorWindow::GetVectorVisibleRect

LVectorWindow::GetVectorWnd

LVectorWindow::OnDraw

LVectorWindow::SetEngine

LVectorWindow::SetWndHandle

LVectorWindow::SetPan

LVectorWindow::EnableAutoScroll

LVectorWindow::EnableKeyBoard

LVectorWindow::IsAutoScrollEnabled

LVectorWindow::IsKeyBoardEnabled

LVectorWindow::ScrollBy

LVectorWindow::ScrollTo

LVectorWindow::GetKeyMode

LVectorWindow::GetZoomPercent

LVectorWindow::OnZoom

LVectorWindow::SetKeyMode

LVectorWindow::SetZoomPercent

LVectorWindow::ZoomIn

LVectorWindow::ZoomOut

LVectorWindow::EnableAutoPaint

LVectorWindow::IsAutoPaintEnabled

LVectorWindow::Move

LVectorWindow::Repaint


Vector Images: Help Support

LVectorDialog::EnableHelp

LVectorDialog::IsHelpEnabled


Vector Images: Hyperlink Object

LVectorObject::AddHyperlink

LVectorObject::GetHyperlink

LVectorObject::GetHyperlinkCount

LVectorObject::GotoHyperlink

LVectorObject::SetHyperlink


Vector Images: Tooltips

LVectorObject::GetTooltip

LVectorObject::HideTooltip

LVectorObject::SetTooltip

LVectorObject::ShowTooltip


Data Types

Basic Data Types and Keywords

LEADTOOLS Basic Data Types

Keywords Used in Declarations

Vector Structures

VECTORARC

VECTORBITMAP

VECTORBRUSH

VECTORCAMERA

VECTORCIRCLE

VECTORCLONE

VECTORELLIPSE

VECTORELLIPTICALARC

VECTOREVENT

VECTORFONT

VECTORGROUP

VECTORGROUPDESC

VECTORHANDLE

VECTORHITTEST

VECTORLAYER

VECTORLAYERDESC

VECTORLINE

VECTORMARKER

VECTOROBJECT

VECTORPEN

VECTORPIE/VECTORCHORD

VECTORPOINT

VECTORPOLYBEZIER

VECTORPOLYDRAW

VECTORPOLYGON

VECTORPOLYLINE

VECTORRASTER

VECTORRECTANGLE

VECTORSCALEDATA

VECTORSTOCK

VECTORTEXT

VECTORVERTEX

VECTOR_ANTIALIASING

VECTOR_DISPLAY_OPTIONS

VECTORTOOLTIPDESC

VECTORLINKFILEINFO

VECTORLINKDESC

VECTOR_TEXTRENDER

VECTORLINKHANDLING

VECTORHPOLYBEZIER

VECTORSPLINE

Structures Used with Input and Output Functions

WINDOWS Structures


LEADTOOLS Basic Data Types

LEADTOOLS has defined the following basic data types for portability:

Data Type | Definition and Usage
L_BITFIELD | Defined as L_UINT; used as a bit field.
L_BOOL | Defined as L_UINT; used as a boolean value.
L_CHAR | Defined as char; used as a signed 8-bit integer.
L_DOUBLE | Defined as double; used as a double precision floating point number.
L_FLOAT | Defined as float; used as a floating point number.
L_INT | Defined as int; used as a signed integer, 16-bits or larger.
L_INT16 | Defined as short; used as a signed 16-bit integer.
L_INT32 | Defined as long; used as a signed 32-bit integer.
L_UCHAR | Defined as unsigned char; used as an unsigned 8-bit integer.
L_UINT | Defined as unsigned; used as an unsigned integer, 16-bits or larger.
L_UINT16 | Defined as unsigned short; used as an unsigned 16-bit integer.
L_UINT32 | Defined as unsigned long; used as an unsigned 32-bit integer.
L_VOID | Defined as void; used as a void.
L_COMP | Defined as L_UINT; used as a handle to a computer
L_MEDIA | Defined as L_VOID L_FAR *; used as a void pointer
L_TCHAR | Defined as either char or TCHAR. If FOR_UNICODE is defined, then L_TCHAR will be defined as TCHAR.


Keywords Used in Declarations

LEADTOOLS uses the following keywords in declarations of functions, structures, and datatypes:

Keyword | Definition and Usage
L_FAR | Defined as nothing; used as a placeholder.
L_HUGE | Defined as nothing; used as a placeholder.
L_EXPORT | Defined as nothing; used as a placeholder.
L_PASCAL | Defined as nothing; used as a placeholder.
EXT_FUNCTION | Defined as WINAPI; used as an attribute for all toolkit functions.
pEXT_FUNCTION | Defined as EXT_FUNCTION L_FAR *; used as an attribute when defining pointers to toolkit functions.
EXT_CALLBACK | Defined as _cdecl L_FAR; used as an attribute for all toolkit callback functions.
pEXT_CALLBACK | Defined as EXT_CALLBACK L_FAR *; used as an attribute when defining pointers to toolkit callback functions.


GRADIENTBRUSH

typedef struct _GRADIENTBRUSH
{
COLORREF crStartColor;
COLORREF crEndColor;
L_INT uGradientSteps;
GRADIENTBRUSHSTYLE GradientStyle;
}GRADIENTBRUSH, *pGRADIENTBRUSH;

The GRADIENTBRUSH structure contains information Used to fill a closed area with a gradient of colors, using a specific style.

Member | Description
crStartColor | COLORREF value that specifies the starting color
crEndColor | COLORREF value that specifies the ending color
uGradientSteps | Number of gradient color steps. Valid values are from 2 to 256
GradientStyle | Gradient style. For valid values, refer to Effect Gradient Styles

Comments

Examples of filling styles can be seen below:

Gradient Filling:

Hatch Filling:

Pattern Filling:

.


HATCHBRUSH

typedef struct _HATCHBRUSH
{
HATCHBRUSHSTYLE HatchBrushStyle;
LOGPEN LogPen;
LOGBRUSH LogBrush;
L_INT nStepSize;
L_DOUBLE dLineRotAngle;
L_UINT32 dwFlags;
L_INT nPointCount;
LPPOINT pEntryPoints;
}HATCHBRUSH, *pHATCHBRUSH;

The HATCHBRUSH structure contains information for creating patterns that can be repeated to fill a closed area. This is called the hatch unit and it can be one of several predefined primary types, or it can be user defined. The primary types are: Rectangle, Circle, Triangle and Line.

Member | Description
HatchBrushStyle | Value that indicates the hatch brush style. Possible values are:
 | Value | Meaning
 | HATCH_RECTANGLE | Rectangular hatches
 | HATCH_CIRCLE | Circular hatches
 | HATCH_TRIANGLE | Triangular hatched
 | HATCH_LINE | Linear hatches
 | HATCH_CUSTOM | User defined hatches
LogPen | Windows LOGPEN structure that defines the pen properties used to draw the outlines of the filling units. For more information about this data type, please refer to Microsoft documentation of the structure LOGPEN.
LogBrush | Windows LOGBRUSH structure that defines the brush properties used to fill the hatch units. For more information about this data type, please refer to Microsoft documentation of the structure LOGBRUSH. NOTE: the data in this structure is invalid in the case of linear hatches.
nStepSize | The hatch unit size (in device units)
dLineRotAngle | Rotation angle of the hatch lines, in degrees. This field is valid only in the case of linear hatches.
dwFlags | Flags used to control the hatch filling. Possible values are:
 | Value | Meaning
 | HATCH_BRUSH_CUSTOM_CLOSED | Close the user defined hatch. When this flag is set, the LogBrush attributes will be used to fill the user defined area.
 | HATCH_BRUSH_CUSTOM_OPEN | The user defined path is not closed. No filling will be applied to the hatch units and the LogBrush member will be ignored.
nPointCount | Number of points that specify the user defined path to be used as the hatch unit.
pEntryPoints | The user defined path points which specify the hatch units. This member should contain nPointCount elements.


PATTERNBRUSH

PATTERNHBRUSH

typedef struct _PATTERNBRUSH
{
BITMAPHANDLE PtrnBitmap;
}
PATTERNBRUSH, *pPATTERNBRUSH;

The PATTERNBRUSH structure contains a bitmap that can be used to fill a closed area. Depending on the size of the bitmap and the size of the area to be filled, one or more instances of this bitmap may be used to fill the area.

Member | Description
PtrnBitmap | Handle to the bitmap to use to fill the area. L_LoadBitmap can be used to load an image. The bitmap handle that is used should be freed using L_FreeBitmap . The toolkit will use its own copy of the bitmap for the internal processing.


STANDARDBRUSH

typedef struct _STANDARDBRUSH
{
LOGBRUSH LogBrush;
}STANDARDBRUSH, *pSTANDARDBRUSH;

The STANDARDBRUSH structure contains information on the most commonly required filling types.

Member | Description
LogBrush | Windows LOGBRUSH structure defining the brush properties. For more information, please refer to Microsoft documentation regarding the LOGBRUSH structure.


VECTORARC

typedef struct tagVECTORARC
{
VECTOROBJECT Object;
VECTORPOINT Point;
VECTORPEN Pen;
L_DOUBLE Radius;
L_DOUBLE StartAngle;
L_DOUBLE SweepAngle;
} VECTORARC, L_FAR * pVECTORARC;

The VECTORARC structure holds information about a vector arc object.

Member | Description
Object | Abstract object.
Point | A VECTORPOINT structure that contains the vertex of a vector arc object, about which the arc sweeps.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector arc object.
Radius | Length of the radius of the vector arc object. This value is in logical units.
StartAngle | The angle at which to begin the vector arc. Values should be between 0 and 360 degrees. Values less than 0 and greater than 360 will be modified internally.
SweepAngle | The angle through which to sweep the vector arc. Values should be between –360 and +360 degrees. Positive angles will be drawn in a counter-clockwise direction from StartAngle. Negative angles will be drawn in a clockwise direction.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_ARC.

pVECTORARC is a pointer to a VECTORARC structure.

The diagram below gives a graphical representation of the Point, Radius, StartAngle and SweepAngle parameters.


VECTORLINKHANDLING

typedef enum _VECTORLINKHANDLING
{
VECTORLINKHANDLING_CURRENTWINDOW = 0, // open in the current window
VECTORLINKHANDLING_NEWWINDOW // open in a new window

} VECTORLINKHANDLING, *pVECTORLINKHANDLING;

This enumeration determines where to show the target of the hyperlinked vector object.

Comments

pVECTORLINKHANDLING is a pointer to a VECTORLINKHANDLING structure. Where the function parameter type is pVECTORLINKHANDLING, you can declare a VECTORLINKHANDLING variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pVECTORLINKHANDLING variable is necessary only if your program requires a pointer.

The vector toolkit will display the target object in the current window if the type VECTORLINKHANDLING_CURRENTWINDOW is used. Otherwise, it will send an event VECTOR_EVENT_CREATENEWWINDOW to the VECTOREVENTPROC callback function, which should be handled by the user to create a new window and display the required object inside it.

This enumeration is used with the VECTORLINKDESC structure.


VECTOR_TEXTRENDER

typedef enum _VECTOR_TEXTRENDER
{
VECTOR_TEXTRENDER_ASTEXT = 0, // try always to render the text as text object
VECTOR_TEXTRENDER_ASCURVES // render the text always as curves and lines

} VECTOR_TEXTRENDER, *pVECTOR_TEXTRENDER;

The VECTOR_TEXTRENDER enumeration allows the user to control how the vector toolkit renders text objects.

Comments

pVECTOR_TEXTRENDER is a pointer to a VECTOR_TEXTRENDER enumeration. Where the function parameter type is pVECTOR_TEXTRENDER, you can declare a VECTOR_TEXTRENDER variable, update the enumeration’s fields, and pass the variable's address in the parameter. Declaring a pVECTOR_TEXTRENDER variable is necessary only if your program requires a pointer.

Setting the text rendering in the display options to VECTOR_TEXTRENDER_ASTEXT (default) means that the toolkit will draw the text objects as one unit. It can be useful when a text object with non-TT font is being used. VECTOR_TEXTRENDER_ASCURVES on the other hand forces the toolkit to break the text object into pieces and try to show it as a drawing.

IMPORTANT: Nothing guarantees that the toolkit will always apply this setting. Some situations should be handled in a way different from that specified by the user, so the toolkit handles them as needed, taking the user's settings into consideration.

This enumeration is used with the VECTOR_DISPLAY_OPTIONS structure.


VECTORLINKDESC

typedef struct _VECTORLINKDESC
{
L_BOOL bObject;

union
{
struct
{
VECTOROBJECT target;
VECTORLINKHANDLING handling;
}vectorobject;

struct
{
VECTORLINKFILEINFO target;
HWND hwndParent;
}fileobject;
}tar;

}VECTORLINKDESC, *pVECTORLINKDESC;

The VECTORLINKDESC structure is required to set the target type of a hyperlink object in the Vector toolkit.

Member | Description
bObject | Flag that indicates whether the Vector object will be displayed or information about the target will be activated when the hyperlinked vector object is clicked. Possible values are:
 | Value | Meaning
 | TRUE | A vector object will be displayed when the hyperlinked vector object is clicked. This vector object is contained in the target member of the vectorobject struct.
 | FALSE | Only information about the target will be displayed when the hyperlinked vector object is clicked. This information is contained in the VECTORLINKFILEINFO member of the fileobject struct.
target | Vector object that will be displayed when the hyperlinked vector object is clicked. Valid if bObject is TRUE.
handling | VECTORLINKHANDLING value that indicates how the link activation will be handled. Valid if bObject is TRUE.
target | Information about the target that will be activated when the hyperlinked vector object is clicked. Valid if bObject is FALSE.
hwndParent | Handle to the parent window which will host the new application that will start when the hyperlinked vector object is clicked.

Comments

pVECTORLINKDESC is a pointer to a VECTORLINKDESC structure. Where the function parameter type is pVECTORLINKDESC, you can declare a VECTORLINKDESC variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pVECTORLINKDESC variable is necessary only if your program requires a pointer.

The VECTORLINKDESC structure is used with the following functions:

LVectorObject::AddHyperlink

LVectorObject::GetHyperlink

LVectorObject::SetHyperlink


VECTORLINKFILEINFO

typedef struct _VECTORLINKFILEINFO
{
L_TCHAR szPath[L_MAXPATH];

}VECTORLINKFILEINFO, *pVECTORLINKFILEINFO;

The VECTORLINKFILEINFO structure contains the path of the target file assigned to a hyperlinked vector object.

Member | Description
szPath | Character string that contains the URL for the file that will be opened when the hyperlinked vector object is clicked.

Comments

pVECTORLINKFILEINFO is a pointer to a VECTORLINKFILEINFO structure. Where the function parameter type is pVECTORLINKFILEINFO, you can declare a VECTORLINKFILEINFO variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pVECTORLINKFILEINFO variable is necessary only if your program requires a pointer.

A hyperlinked vector object can be assigned a target file. The vector toolkit opens the specified file whenever the end-user clicks on the hyperlinked vector object. Currently, clicking an object is the only event available.

The VECTORLINKFILEINFO structure is used with the VECTORLINKDESC structure.


VECTORTOOLTIPDESC

typedef struct _VECTORTOOLTIPDESC
{
POINT Point;
LOGPEN Pen;
LOGBRUSH Brush;
LOGFONT Font;

} VECTORTOOLTIPDESC, *pVECTORTOOLTIPDESC;

The VECTORTOOLTIPDESC structure is used to control how the tool tip will be displayed for an object, which has a tool tip.

Member | Description
Point | This is the point where the tool tip will be placed.
Pen | Windows LOGPEN structure that defines the pen properties for the tooltip.
Brush | Windows LOGBRUSH structure that defines the brush properties for the tool tip.
Font | Windows LOGFONT structure that defines the font properties that will be used to display the tool tip.

Comments

pVECTORTOOLTIPDESC is a pointer to a VECTORTOOLTIPDESC structure. Where the function parameter type is pVECTORTOOLTIPDESC, you can declare a VECTORTOOLTIPDESC variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pVECTORTOOLTIPDESC variable is necessary only if your program requires a pointer.

The VECTORTOOLTIPDESC structure will be used by the vector toolkit to determine how and where to show the tool tip for a specific object. The Pen, Brush and Font members should be set according to the LOGPEN, LOGBRUSH and LOGFONT mentioned in the Microsoft Windows GDI documentation. This structure used with the LVectorObject::ShowTooltip function.


VECTOR_DISPLAY_OPTIONS

typedef struct _VECTOR_DISPLAY_OPTIONS
{
VECTOR_TEXTRENDER TextRender;
VECTOR_ANTIALIASING AntiAliasing;
L_INT nClipMode;
L_DOUBLE dwReserved;

}VECTOR_DISPLAY_OPTIONS, *pVECTOR_DISPLAY_OPTIONS;

The VECTOR_DISPLAY_OPTIONS structure has the display settings for the vector toolkit. Some or all of the members can be set to apply some effects or filters to the output.

Member | Description
TextRender | Text rendering options.
AntiAliasing | Anti-aliasing setting. VECTOR_ANTIALIASING structure that contains the anti-aliasing information.
nClipMode | Flag that describes how the toolkit applies the clipping when two or more clipping polydraw objects exist. Possible values are:
 | Value | Meaning
 | VECTOR_CLIPMODE_COPY | Overwrite the old clipping region with this one.
 | VECTOR_CLIPMODE_AND | Generates a new clipping region from the intersection of the old and current regions.
 | VECTOR_CLIPMODE_DIFF | Generates a new clipping region in the area between the old and current regions.
 | VECTOR_CLIPMODE_OR | Generates a new clipping region from the area represented by both the old and current regions.
 | VECTOR_CLIPMODE_XOR | Generates a clipping region from XORing the two clipping regions (the old one and the current).
 |  | The "old region" refers to the region specified by a clipping polydraw that was added previously to the vector space and the "current region" is a new region that is about to be drawn.
dwReserved | Reserved for future expansion. Use 0.

Comments

pVECTOR_DISPLAY_OPTIONS is a pointer to a VECTOR_DISPLAY_OPTIONS structure. Where the function parameter type is pVECTOR_DISPLAY_OPTIONS, you can declare a VECTOR_DISPLAY_OPTIONS variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pVECTOR_DISPLAY_OPTIONS variable is necessary only if your program requires a pointer.

The VECTOR_DISPLAY_OPTIONS structure is used with the LVectorBase::GetDisplayOptions and LVectorBase::SetDisplayOptions functions.

A clipping polydraw sets a clipping region that is applied to any vector object added after the clipping polydraw is added. For example, if the user adds object #1, then adds a clipping polydraw, and then adds objects #2 and #3, the toolkit will draw object #1 without modification. It will then render the clipping polydraw, which will set a clipping region. the toolkit will then draw objects #2 and #3, which will be clipped according to the clipping polydraw and the clip mode specified in nClipMode.

If nClipMode is set to 0, no clipping will be performed.


VECTOR_ANTIALIASING

typedef struct _VECTOR_ANTIALIASING
{
L_UINT uThreshold;
L_UINT uDim;
L_UINT uFilter;

}VECTOR_ANTIALIASING, *pVECTOR_ANTIALIASING;

The VECTOR_ANTIALIASING structure is used in the vector display options to apply the anti-aliasing effect to the vector image being displayed.

Member | Description
uThreshold | 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.
uDim | 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.
uFilter | Flag that indicates the type of anti-aliasing filter to use. Possible values are:
 | Value | Meaning
 | ANTIALIAS_1 | [0x0000] Anti-alias the bitmap vertically and horizontally.
 | ANTIALIAS_2 | [0x0001] Anti-alias the bitmap in all directions.
 | ANTIALIAS_3 | [0x0002] 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 | [0x0003] Anti-alias the bitmap diagonally.
 | ANTIALIAS_HORZ | [0x0004] Anti-alias the bitmap horizontally.
 | ANTIALIAS_VERT | [0x0005] Anti-alias the bitmap vertically.

Comments

pVECTOR_ANTIALIASING is a pointer to a VECTOR_ANTIALIASING structure. Where the function parameter type is pVECTOR_ANTIALIASING, you can declare a VECTOR_ANTIALIASING variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pVECTOR_ANTIALIASING variable is necessary only if your program requires a pointer.

This structure uses the data members the same way as the function LBitmap::AntiAlias . For more information about using LBitmap::AntiAlias, please refer to the LEADTOOLS Main Class Library Help File, Ltclibn.hlp.

The VECTOR_ANTIALIASING structure is used with the VECTOR_DISPLAY_OPTIONS structure.


VECTORBITMAP

typedef struct tagVECTORBITMAP
{
L_INT nSize;
BITMAPHANDLE Bitmap;
} VECTORBITMAP, L_FAR * pVECTORBITMAP;

The VECTORBITMAP structure holds information about a bitmap used to draw vector raster objects.

Member | Description
nSize | Size of this structure. Used for versioning.
Bitmap | LEADTOOLS bitmap handle.

Comments

pVECTORBITMAP is a pointer to a VECTORBITMAP structure.


VECTORBRUSH

typedef struct _VECTORBRUSH
{
L_INT nSize;
VECTORBRUSHSTYLE VectorBrushStyle;
union
{
STANDARDBRUSH StandardBrush;
HATCHBRUSH HatchBrush;
PATTERNBRUSH PatternBrush;
GRADIENTBRUSH GradientBrush;
}BrushType;
}VECTORBRUSH, L_FAR *pVECTORBRUSH;

The VECTORBRUSH structure holds information about the brush used to draw a vector object.

Member | Description
nSize | Size of this structure. Used for versioning.
VectorBrushStyle | Value that indicates the brush style. Possible values are:
 | Value | Meaning
 | VECTORBRUSH_STANDARD | Standard brush
 | VECTORBRUSH_PATTERN | Pattern brush
 | VECTORBRUSH_GRADIENT | Gradient brush
 | VECTORBRUSH_HATCH | Hatched brush
BrushType | Union of structures. The type of structure in this member depends on the value of the VectorBrushStyle member.
 | if VectorBrushStyle is: | BrushType contains a structure of type:
 | VECTORBRUSH_STANDARD | STANDARDBRUSH
 | VECTORBRUSH_PATTERN | PATTERNBRUSH
 | VECTORBRUSH_GRADIENT | GRADIENTBRUSH
 | VECTORBRUSH_HATCH | HATCHDBRUSH


VECTORCAMERA

typedef struct tagVECTORCAMERA
{
L_INT nSize;
L_DOUBLE Theta;
L_DOUBLE Phi;
VECTORPOINT LookAt;
L_DOUBLE Distance;
L_BOOL bPerspective;
} VECTORCAMERA, L_FAR * pVECTORCAMERA;

The VECTORCAMERA structure holds information about the camera.

Member | Description
nSize | Size of this structure. Used for versioning.
Theta | Rotation angle around the Z axis.
Phi | Rotation angle off the Z axis.
LookAt | Point on which the camera is focused.
Distance | Distance between the camera and the object.
bPerspective | Flag that indicates the type of projection. Possible values are:
 | Value | Meaning
 | TRUE | Perspective projection is used.
 | FALSE | Parallel projection is used.

Comments

The camera object is used along with the viewport to project the vector image into a 2D plane.

LVectorBase::SetCamera and LVectorBase::GetCamera are the functions used for manipulating the camera object.

The camera can be used with either 2D or 3D vector images.

pVECTORCAMERA is a pointer to a VECTORCAMERA object.


VECTORCIRCLE

typedef struct tagVECTORCIRCLE
{
VECTOROBJECT Object;
VECTORPOINT Point;
VECTORPEN Pen;
VECTORBRUSH Brush;
L_DOUBLE Radius;
} VECTORCIRCLE, L_FAR * pVECTORCIRCLE;

The VECTORCIRCLE structure holds information about a vector circle object.

Member | Description
Object | Abstract object.
Point | A VECTORPOINT structure that contains the center of a vector circle object in space.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector circle object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector circle object.
Radius | Length of the radius of the vector circle object. This value is in logical units

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_CIRCLE.

pVECTORCIRCLE is a pointer to a VECTORCIRCLE structure.


VECTORCLONE

typedef struct tagVECTORCLONE
{
VECTOROBJECT Object;
VECTORPOINT Point;
VECTORGROUP Group;
L_UINT32 dwFlags;
VECTORPEN Pen;
VECTORBRUSH Brush;
VECTORPOINT Scale;
VECTORPOINT Rotation;
} VECTORCLONE, L_FAR * pVECTORCLONE;

The VECTORCLONE structure holds information about a vector clone object.

Member | Description
Object | Abstract object.
Point | A VECTORPOINT structure that contains the center of a vector clone object in space.
Group | A VECTORGROUP structure that contains the group this clone will be using.
dwFlags | Flag that indicates how to draw this clone object. Possible values are:
 | Value | Meaning
 | VECTOR_CLONE_USE_PEN | Use the Pen member of this structure to draw the clone. If this flag is not specified, the clone will use the same pen colors and styles as the original objects inside the group.
 | VECTOR_CLONE_USE_BRUSH | Use the Brush member of this structure to draw the clone. If this flag is not specified, the clone will use the same brush colors and styles as the original objects inside the group.
 | VECTOR_CLONE_USE_POINT_AS_ORIGIN | Use the Point member as the origin point when performing Scaling and Rotation. If this flag is not specified, the Scaling and Rotation will be performed around the accumulative center of all objects inside the group.
 | VECTOR_CLONE_USE_CHILDCLONE_ATTRIBUTES | Usually when creating nested VECTORCLONE objects in the vector drawing, you may need to allow the sub clone to maintain its objects’ colors when it’s a part of a larger clone which has one or both of the flags VECTOR_CLONE_USE_PEN or VECTOR_CLONE_USE_BRUSH is set. The default behavior is to use the same Pen/Brush of the main clone object to draw the sub clones, use this flag to override this.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector clone object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector clone object.
Scale | A VECTORPOINT structure that contains the scaling factor to use when drawing this clone object.
Rotation | A VECTORPOINT structure that contains the rotation values to use when drawing this clone object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_CLONE.

When drawing a clone object, the toolkit will first rotate the group around its origin using the values in Rotation, scale it around its origin using the values in Scale and finally translate it to the position specified in Point.

pVECTORCLONE is a pointer to a VECTORCLONE structure.


VECTORELLIPSE

typedef struct tagVECTORELLIPSE
{
VECTOROBJECT Object;
VECTORPOINT Point;
VECTORPEN Pen;
VECTORBRUSH Brush;
L_DOUBLE xRadius;
L_DOUBLE yRadius;
} VECTORELLIPSE, L_FAR * pVECTORELLIPSE;

The VECTORELLIPSE structure holds information about a vector ellipse object.

Member | Description
Object | Abstract object.
Point | A VECTORPOINT structure that contains the center of a vector ellipse object in space.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector ellipse object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector ellipse object.
xRadius | Length of the radius of the x- axis. This value is in logical units.
yRadius | Length of the radius of the y- axis. This value is in logical units.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_ELLIPSE.

pVECTORELLIPSE is a pointer to a VECTORELLIPSE structure.


VECTORELLIPTICALARC

typedef struct tagVECTORELLIPTICALARC
{
VECTOROBJECT Object;
VECTORPOINT Point;
VECTORPEN Pen;
L_DOUBLE xRadius;
L_DOUBLE yRadius;
L_DOUBLE StartAngle;
L_DOUBLE SweepAngle;
} VECTORELLIPTICALARC, L_FAR * pVECTORELLIPTICALARC;

The VECTORELLIPTICALARC structure holds information about a vector elliptical arc object.

Member | Description
Object | Abstract object.
Point | A VECTORPOINT structure that contains the vertex of a vector elliptical arc object, about which the arc sweeps.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector elliptical arc object.
xRadius | Length of the radius of the x- axis. This value is in logical units.
yRadius | Length of the radius of the y- axis. This value is in logical units.
StartAngle | The angle at which to begin the vector elliptical arc. Values should be between 0 and 360 degrees. Values less than 0 and greater than 360 will be modified internally.
SweepAngle | The angle through which to sweep the vector elliptical arc. Values should be between –360 and +360 degrees. Positive angles will be drawn in a counter-clockwise direction from StartAngle. Negative angles will be drawn in a clockwise direction.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_ELLIPTICALARC.

pVECTORELLIPTICALARC is a pointer to a VECTORELLIPTICALARC structure.


VECTOREVENT

typedef struct tagVECTOREVENT
{
L_INT nSize;
L_UINT uType;
VECTOR_EVENT_STATUS Status;
L_INT nErrorCode;
pVECTOROBJECT pObject;
L_VOID L_FAR *pObjectDesc;
pVECTORLAYER pLayer;
pVECTORLAYERDESC pLayerDesc;
pVECTORGROUP pGroup;
pVECTORGROUPDESC pGroupDesc;
pVECTORPOINT pPoint1;
pVECTORPOINT pPoint2;
L_UINT32 dwFlags;
L_VOID L_FAR *pUserData;
} VECTOREVENT, L_FAR * pVECTOREVENT;

The VECTOREVENT structure holds information about an event.

Member | Description
nSize | Size of this structure. Used for versioning.
uType | The type of event that was generated. For a list of possible values, refer to the Comments section below.
Status | Status of the event. Possible values are:
 | Value | Meaning
 | VECTOR_EVENT_STATUS_BEFORE | The action that generated the event is about to be taken.
 | VECTOR_EVENT_STATUS_AFTER | The action that generated the event was just completed.
nErrorCode | Error code associated with the event. For a list of possible values, refer to the Return Codes.
pObject | Pointer to the vector object associated with the event. This structure member is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pObjectDesc | Pointer to an object descriptor. This structure is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pLayer | Pointer to the vector layer associated with the event. This structure member is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pLayerDesc | Pointer to a layer descriptor. This structure is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pGroup | Pointer to the vector group associated with the event. This structure member is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pGroupDesc | Pointer to a group descriptor. This structure is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pPoint1 | Pointer to a general point 1. This structure is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pPoint2 | Pointer to a general point 2. This structure is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
dwFlags | Flag that provides processing information. This member is only valid for certain event types. For a list of the events for which this member is valid, refer to the table in the Comments section below.
pUserData | User defined data.

Comments

The uType member will correspond to the vector function called, for example if you call LVectorBase::Empty, an event of type VECTOR_EVENT_EMPTY will be fired.

The following table lists all the defined event types plus values for the structure variables, when defined. Not all structure members are defined for every event. For example, the Object member is not defined for a VECTOR_EVENT_FREE event, but it is defined for the VECTOR_EVENT_TRANSLATION event. The data contained in the Object structure member corresponds to the vector object that was translated. More information can be obtained by using the pObject as an argument to an LVectorObject constructor, or to a constructor of a derived class of LVectorObject (i.e. LVectorRectangle.)

The pVECTOROBJECT(pObject), pVECTORGROUP(pGroup), pVECTORLAYER(pLayer) pointers can all be passed to class library constructors to create class library objects. The LVectorObject (and derived classes of LVectorObject) has a constructor that takes a pVECTOROBJECT, the LVectorGroup has a constructor that takes a pVECTORGROUP, and the LVectorLayer class has a constructor that takes a pVECTORLAYER.

Event

Function

pObject

pObjectDesc

pLayer

pLayerDesc

pGroup

pGroupDesc

pPoint1

pPoint2

dwFlags

VECTOR_EVENT_FREE

LVectorBase::SetHandle
LVectorBase::Free
LVectorBase::~LVectorBase

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_EMPTY

LVectorBase::Empty

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_COPY

LVectorBase::Copy

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_VIEWPORT

LVectorBase::SetViewport

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_PAN

LVectorBase::SetPan

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_LOCKED

LVectorBase::SetLocked

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

bLock

VECTOR_EVENT_BACKGROUND

LVectorBase::SetBackgroundColor

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Color

VECTOR_EVENT_PALETTE

LVectorBase::SetPalette

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_VIEWMODE

LVectorBase::SetViewMode

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

nMode

VECTOR_EVENT_TRANSLATION

LVectorBase::SetTranslation
LVectorDialog::DoModalVectorTranslate
LVectorObject::SetTranslation

The modified object(s).

Not used

Not used

Not used

Not used

Not used

pTranslation

Not used

dwFlags (where applicable)

VECTOR_EVENT_ROTATION

LVectorBase::SetRotation
LVectorDialog::DoModalVectorRotate
LVectorObject::SetRotation

The modified object(s).

Not used

Not used

Not used

Not used

Not used

pRotation

pOrigin

dwFlags (where applicable)

VECTOR_EVENT_SCALE

LVectorBase::SetScale
LVectorDialog.DoModalVectorScale
LVectorObject::SetScale

The modified object(s).

Not used

Not used

Not used

Not used

Not used

pScale

pOrigin

dwFlags (where applicable)

VECTOR_EVENT_ORIGIN

LVectorBase::SetOrigin

Not used

Not used

Not used

Not used

Not used

Not used

pOrigin

Not used

Not used

VECTOR_EVENT_APPLYTRANSFORMATION

LVectorBase::ApplyTransformation

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_BINDVERTICESMODE

LVectorBase::SetBindVerticesMode

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

nMode

VECTOR_EVENT_PARALLELOGRAM

LVectorBase::SetParallelogram

Not used

Not used

Not used

Not used

Not used

Not used

pMin

pMax

Not used

VECTOR_EVENT_CAMERA

LVectorBase::SetCamera
LVectorDialog::DoModalVectorCamera

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_METAFILE

LVectorBase::ConvertFromEMF
LVectorBase::ConvertFromWMF

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_ATTACHTOWINDOW

LVectorBase::AttachToWindow

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_MARKER

LVectorBase::SetMarker

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_HITTEST

LVectorBase::SetHitTest
LVectorDialog::DoModalVectorHitTest

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_POLYGONMODE

LVectorBase::SetPolygonMode

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

nMode

VECTOR_EVENT_USELIGHTS

LVectorBase::SetUseLights

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

bUseLights

VECTOR_EVENT_AMBIENTCOLOR

LVectorBase::SetAmbientColor

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Color

VECTOR_EVENT_COPYFROMCLIPBOARD

LVectorBase::CopyFromClipboard

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_ADDLAYER

LVectorBase::AddLayer , LVectorDialog::DoModalVectorNewLayer

Not used

Not used

pLayer identifier of the LVectorBase object

Not used

Not used

Not used

Not used

Not used

dwFlags (where applicable)

VECTOR_EVENT_DELETELAYER

LVectorLayer::DeleteLayer

Not used

Not used

pLayer identifier of the LVectorBase object

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_EMPTYLAYER

LVectorLayer::EmptyLayer

Not used

Not used

pLayer identifier of the LVectorBase object

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_COPYLAYER

LVectorBase::CopyLayer

Not used

Not used

pLayer identifier of the LVectorBase object

Not used

Not used

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_SETLAYER

LVectorLayer::SetLayerDesc

Not used

Not used

pLayer identifier of the LVectorBase object

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_SETACTIVELAYER

LVectorBase::SetActiveLayer

Not used

Not used

pLayer identifier of the LVectorBase object

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_ADDGROUP

LVectorBase::AddGroup

Not used

Not used

Not used

Not used

pGroup identifier of the LVectorBase object

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_DELETEGROUP

LVectorGroup::DeleteGroup

Not used

Not used

Not used

Not used

pGroup identifier of the LVectorBase object

Not used

Not used

Not used

Not used

VECTOR_EVENT_DELETEGROUPCLONES

LVectorGroup::DeleteGroupClones

Not used

Not used

Not used

Not used

pGroup identifier of the LVectorBase object

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_EMPTYGROUP

LVectorGroup::EmptyGroup

Not used

Not used

Not used

Not used

pGroup identifier of the LVectorBase object

Not used

Not used

Not used

Not used

VECTOR_EVENT_COPYGROUP

LVectorBase::CopyGroup

Not used

Not used

Not used

Not used

pGroup identifier of the LVectorBase object

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_SETGROUP

LVectorGroup::SetGroupDesc

Not used

Not used

Not used

Not used

pGroup identifier of the LVectorBase object

Not used

Not used

Not used

Not used

VECTOR_EVENT_ADDOBJECT

LVectorLayer::AddObject , LVectorBase::AddObject , LVectorDialog::DoModalVectorNewObject

The modified object(s).

Not used

pLayer identifier of the LVectorBase object

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_DELETEOBJECT

LVectorBase::DeleteObject

The modified object(s).

Not used

Not used

Not used

Not used

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_COPYOBJECT

LVectorBase::CopyObject

The modified object(s).

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_SETOBJECT

LVectorObject::UnlockObject
LVectorDialog::DoModalVectorEditObject

The modified object.

Not used

Not used

Not used

Not used

Not used

Not used

Not used

nType

VECTOR_EVENT_EXPLODEOBJECT

LVectorObject::ExplodeObject

The modified object(s).

Not used

Not used

Not used

Not used

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_SELECTOBJECT

LVectorObject::SelectObject

The modified object(s).

Not used

Not used

Not used

Not used

Not used

Not used

Not used

bSelect

VECTOR_EVENT_OBJECTATTRIBUTES

LVectorObject::SetObjectAttributes
LVectorBase::SetObjectAttributes

The modified object(s).

Not used

Not used

Not used

Not used

Not used

Not used

Not used

dwFlags

VECTOR_EVENT_LOADFILE

LVectorBase::Load
LVectorWindow::Load
LVectorFile::StartFeedLoad
LVectorFile::StopFeedLoad

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_ADDOBJECTTOGROUP

LVectorGroup::AddObject

The modified object(s).

Not used

Not used

Not used

pGroup identifier of the LVectorBase object

Not used

Not used

Not used

Not used

VECTOR_EVENT_CREATENEWWINDOW

LVectorObject::GotoHyperlink

Not used

pObjectDesc

Not used

Not used

Not used

Not used

Not used

Not used

Not used

VECTOR_EVENT_INVERTCOLORS

LVectorBase::InvertColors

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used

Not used


VECTORFONT

typedef struct tagVECTORFONT
{
L_INT nSize;
LOGFONT LogFont;
} VECTORFONT, L_FAR * pVECTORFONT;

The VECTORFONT structure holds information about the font used to draw vector text objects.

Member | Description
nSize | Size of this structure. Used for versioning.
LogFont | Windows LOGFONT structure that defines the font properties.

Comments

pVECTORFONT is a pointer to a VECTORFONT structure.


VECTORGROUP

The VECTORGROUP structure serves as a working area for vector groups. LEADTOOLS functions use this structure as a vector group handle for accessing a vector group within a vector handle.

Note: All fields of this structure are intended for internal use. If necessary, you can refer to the LVKRN.H header file, which describes the entire structure.

pVECTORGROUP is a pointer to a VECTORGROUP structure.

In all cases, the values of the fields in the VECTORGROUP structure are maintained by LEADTOOLS functions.

The following functions use the VECTORGROUP structure:

LVectorGroup::LVectorGroup

LVectorBase::EnumGroupsCallBack


VECTORGROUPDESC

typedef struct tagVECTORGROUPDESC
{
L_INT nSize;
L_TCHAR szName[VECTOR_MAX_NAME];
L_UINT32 dwTag;
} VECTORGROUPDESC, L_FAR * pVECTORGROUPDESC;

The VECTORGROUPDESC structure holds descriptive information about a vector group in a vector handle.

Member | Description
nSize | Size of this structure. Used for versioning.
szName | Character string that contains the name of the group.
dwTag | User-defined tag.

Comments

pVECTORGROUPDESC is a pointer to a VECTORGROUPDESC structure.

The following functions use a VECTORGROUPDESC structure:

LVectorGroup::GetGroupDesc

LVectorGroup::LVectorGroup

LVectorGroup::SetGroupDesc


VECTORHANDLE

The VECTORHANDLE structure serves as a working area for vector image manipulation and conversion. LEADTOOLS functions use this structure as a vector image handle for accessing the drawing in memory and for maintaining the characteristics of the vector image.

Note: All fields of this structure are intended for internal use. If necessary, you can refer to the LVKRN.H header file which describes the entire structure.

pVECTORHANDLE is a pointer to a VECTORHANDLE structure. Generally, where a function parameter type is pVECTORHANDLE, you can declare a VECTORHANDLE variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pVECTORHANDLE variable is necessary only if your program requires a pointer.

In all cases, the values of fields in the VECTORHANDLE structure are maintained by LEADTOOLS functions.


VECTORHITTEST

typedef struct tagVECTORHITTEST
{
L_INT nSize;
L_INT nDistance;
L_UINT32 dwFlags;
} VECTORHITTEST, L_FAR * pVECTORHITTEST;

The VECTORHITTEST structure holds information about hit test options.

Member | Description
nSize | Size of this structure. Used for versioning.
nDistance | Distance from the point, in pixels. This value indicates how close the point must be to an object in order to "hit" the object.
dwFlags | Flag that determines which objects to consider when hit testing. Possible values are:
 | Value | Meaning
 | VECTOR_HITTEST_CLOSEDFIGURES | Determine whether the hit test point is inside closed objects.
 | VECTOR_HITTEST_IGNORESELECTED | Do not test objects that are already selected.

Comments

LVectorBase::GetHitTest and LVectorBase::SetHitTest get and set the current hit test options. LVectorBase::HitTest actually performs the hit test.

The hit test options must be set before calling LVectorBase::HitTest.

pVECTORHITTEST is a pointer to a VECTORHITTEST structure.


VECTORHPOLYBEZIER

typedef struct _VECTORHPOLYBEZIER
{
VECTOROBJECT Object;
VECTORPOINT *Point;
L_INT nSecCount;
VECTORPEN Pen;
L_UINT *puDegree;
}VECTORHPOLYBEZIER, L_FAR *pVECTORHPOLYBEZIER;

The VECTORHPOLYBEZIER structure holds information about the heterogeneous polybezier or HPolyBezier for short. The HPolyBezier is a group of polybeziers with different degrees drawn together as a single entity.

Member | Description
Object | Abstract object.
Point | Pointer to an array of points. The number of points should be: ( puDegree[ 0 ] + puDegree[ 1 ] + … + puDegree[ nSecCount – 1 ] ) + 1
nSecCount | Number of sections in the HPolyBezier
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector polybezier object.
puDegree | Pointer to an array of PolyBezier degrees.


VECTORLAYER

The VECTORLAYER structure serves as a working area for vector layers. LEADTOOLS functions use this structure as a vector layer handle for accessing a vector layer within a vector handle.

Note: All fields of this structure are intended for internal use. If necessary, you can refer to the LVKRN.H header file, which describes the entire structure.

pVECTORLAYER is a pointer to a VECTORLAYER structure.

In all cases, the values of fields in the VECTORLAYER structure are maintained by LEADTOOLS functions.

The following functions use the VECTORLAYER structure:

LVectorBase::EnumLayersCallBack

LVectorLayer::LVectorLayer


VECTORLAYERDESC

typedef struct tagVECTORLAYERDESC
{
L_INT nSize;
L_TCHAR szName[VECTOR_MAX_NAME];
L_BOOL bVisible;
L_BOOL bLocked;
L_UINT32 dwTag;
} VECTORLAYERDESC, L_FAR * pVECTORLAYERDESC;

The VECTORLAYERDESC structure holds descriptive information about a vector layer in a vector handle.

Member | Description
nSize | Size of this structure. Used for versioning.
szName | Character string that contains the name of the layer.
bVisible | Flag that indicates whether or not the layer is visible. Possible values are:
 | Value | Meaning
 | TRUE | The layer is visible.
 | FALSE | The layer is not visible.
bLocked | Flag that indicates whether or not the layer is locked. A layer cannot be edited if it is locked. Possible values are:
 | Value | Meaning
 | TRUE | The layer is locked.
 | FALSE | The layer is not locked.
dwTag | User-defined tag.

Comments

pVECTORLAYERDESC is a pointer to a VECTORLAYERDESC structure.

The following functions use a VECTORLAYERDESC structure:

LVectorLayer::LVectorLayer

LVectorLayer::GetLayerDesc

LVectorLayer::SetLayerDesc


VECTORLINE

typedef struct tagVECTORLINE
{
VECTOROBJECT Object;
VECTORPOINT Point[2];
VECTORPEN Pen;
} VECTORLINE, L_FAR * pVECTORLINE;

The VECTORLINE structure holds information about a vector line object.

Member | Description
Object | Abstract object.
Point | An array of VECTORPOINT structures that contain the beginning and ending points of a line in space.
Pen | VECTORPEN structure that contains information about the pen to use when draws the vector line object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_LINE.

pVECTORLINE is a pointer to a VECTORLINE structure.


VECTORMARKER

typedef struct tagVECTORMARKER
{
L_INT nSize;
L_UINT32 dwFlags;
VECTORPEN Pen;
VECTORBRUSH Brush;
} VECTORMARKER, L_FAR * pVECTORMARKER;

The VECTORMARKER structure holds information about marker settings.

Member | Description
nSize | Size of this structure. Used for versioning.
dwFlags | Flag that determines the brush and pen characteristics to use for the marker. Possible values are:
 | Value | Meaning
 | VECTOR_MARKER_PEN_STYLE | Use the style member of Pen.
 | VECTOR_MARKER_PEN_WIDTH | Use the width member of Pen.
 | VECTOR_MARKER_PEN_COLOR | Use the color member of Pen.
 | VECTOR_MARKER_BRUSH_STYLE | Use the style member of Brush.
 | VECTOR_MARKER_BRUSH_COLOR | Use the color member of Brush.
Pen | VECTORPEN structure that contains information about the pen to use when drawing markers. The actual parameters used depend on dwFlags.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing markers. The actual parameters used depend on dwFlags.

Comments

Markers are used to indicate which objects have been selected in a vector handle.

pVECTORMARKER is a pointer to a VECTORMARKER structure.


VECTORPEN

typedef struct _VECTORPEN
{
L_INT nSize;
union
{
LOGPEN LogPen;
EXTLOGPEN ExtLogPen;
}NewPen;
DWORD elpStyleEntry[7];
L_BOOL bExtPen;
}VECTORPEN, L_FAR *pVECTORPEN;

The VECTORPEN structure holds information about a pen used to draw a vector object.

Member | Description
nSize | Size of this structure. Used for versioning.
NewPen | Union of LOGPEN and EXTLOGPEN structures. The type of structure in this member depends on the values of the bExtPen member. For more information about the LOGPEN and EXTLOGPEN structures, please refer to the Microsoft documentation.
elpStyleEntry | Valid only if bExtPen is TRUE. ExtLogPen allows the user to draw customized hatched lines. Using the elpStyleEntry element defined in ExtLogPen, the user can fill up to 8 dash elements. Please refer to Microsoft documentation regarding the EXTLOGPEN for more information about this.
bExtPen | Boolean flag that indicates the type of pen to use and the type of structure in the NewPen member. Possible values are: TRUE: the vector pen describes a EXTLOGPEN structure. FALSE: the vector pen describes a LOGPEN structure.
 | Value | Meaning
 | TRUE | The vector pen is an ExtLogPen and the NewPen member contains an EXTLOGPEN structure.
 | FALSE | The vector pen is an LogPen and the NewPen member contains a LOGPEN structure.


VECTOROBJECT

typedef struct tagVECTOROBJECT

{
L_INT nSize;
L_INT nType;
L_INT nId;
L_INT nLayerId;
L_INT nGroupId;
L_INT nROP;
L_UINT32 dwFlags;
L_UINT32 dwTag;
} VECTOROBJECT, L_FAR * pVECTOROBJECT;

The VECTOROBJECT structure is an abstract data type that acts as the base of all 2D/3D objects in the toolkit.

Member | Description
nSize | Size of this structure. Used for versioning.
nType | Type of the vector object. Possible values are:
 | Value | Meaning
 | VECTOR_ARC | Arc.
 | VECTOR_CHORD | Chord.
 | VECTOR_CIRCLE | Circle.
 | VECTOR_ELLIPSE | Ellipse.
 | VECTOR_ELLIPTICALARC | Elliptical arc
 | VECTOR_LINE | Line.
 | VECTOR_PIE | Pie section.
 | VECTOR_POLYBEZIER | Poly Bezier curve.
 | VECTOR_POLYDRAW | Polydraw.
 | VECTOR_POLYGON | Polygon.
 | VECTOR_POLYLINE | Polyline.
 | VECTOR_RASTER | Raster.
 | VECTOR_RECTANGLE | Rectangle.
 | VECTOR_STOCK | Stock object from a stock library.
 | VECTOR_TEXT | Text.
 | VECTOR_VERTEX | 3D vertex in space.
 | VECTOR_SPLINE | Spline object.
 | VECTOR_HPOLYBEZIER | Heterogeneous Poly Bezier
nId | Object ID: Reserved for internal use.
nLayerId | Layer ID: Reserved for internal use.
nGroupId | Group ID: Reserved for internal use.
nROP | The object's ROP mode. For more information on valid ROP2 codes, refer to your SDK.

dwFlags | Flag that indicates the status of the object, can be a combination of the following:
 | Value | Meaning
 | VECTOR_OBJECT_SELECTED | The object is currently selected.
 | VECTOR_OBJECT_HIDDEN | The object is currently hidden.
 | VECTOR_OBJECT_COMPOSITE | This object is part of a group.
 | VECTOR_OBJECT_2STAGE_RENDERING | Forces two-stage rendering for objects. This flag is valid only for VECTORCIRCLE, VECTORELLIPSE, VECTORPIE, VECTORTEXT and VECTORPOLYDRAW, if used in any other object type; it will be ignored by the toolkit.
 | VECTOR_OBJECT_CLIP | Sets the object as a clipping object. Valid only for VECTORPOLYDRAW object.
 | VECTOR_POLYDRAW_FILL_WINDING | Use non-zero mode for filling the polydraw, Valid only for VECTORPOLYDRAW object.
 | VECTOR_POLYDRAW_FILL_ALTERNATE | Use odd-even mode for filling the polydraw, Valid only for VECTORPOLYDRAW object.
dwTag | User-defined tag.

Comments

pVECTOROBJECT is a pointer to a VECTOROBJECT structure.


VECTORPIE/VECTORCHORD

typedef struct tagVECTORPIE
{
VECTOROBJECT Object;
VECTORPOINT Point;
VECTORPEN Pen;
VECTORBRUSH Brush;
L_DOUBLE Radius;
L_DOUBLE StartAngle;
L_DOUBLE SweepAngle;
} VECTORPIE, L_FAR * pVECTORPIE, VECTORCHORD, L_FAR * pVECTORCHORD;

The VECTORPIE structure holds information about a vector arc object.

The VECTORCHORD structure holds information about a vector chord object.

Member | Description
Object | Abstract object.
Point | A VECTORPOINT structure that contains the vertex of a vector pie object, about which the pie section or chord sweeps.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector pie or vector chord object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector pie or vector chord object.
Radius | Length of the radius of the vector pie or vector chord object. This value is in logical units.
StartAngle | The angle at which to begin the vector pie or vector chord. Values should be between 0 and 360 degrees. Values less than 0 and greater than 360 will be modified internally.
SweepAngle | The angle through which to sweep the vector pie or vector chord. Values should be between –360 and +360 degrees. Positive angles will be drawn in a counter-clockwise direction from StartAngle. Negative angles will be drawn in a clockwise direction.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_PIE or VECTOR_CHORD.

pVECTORPIE is a pointer to a VECTORPIE structure.

pVECTORCHORD is a pointer to a VECTORCHORD structure.

The diagram below gives a graphical representation of of the Point, Radius, StartAngle and SweepAngle parameters.


VECTORPOINT

typedef struct tagVECTORPOINT
{
L_DOUBLE x;
L_DOUBLE y;
L_DOUBLE z;
L_INT32 lTag;
} VECTORPOINT, L_FAR * pVECTORPOINT;

The VECTORPOINT structure holds information about a point in 3D space.

Member | Description
x | X coordinate of the point.
y | Y coordinate of the point.
z | Z coordinate of the point.
lTag | User-defined data. In the toolkit this member is used for reference count. Reserved for internal use.

Comments

This is the primitive data type in the toolkit.

pVECTORPOINT is a pointer to a VECTORPOINT structure.


VECTORPOLYDRAW

typedef struct tagVECTORPOLYDRAW
{
VECTOROBJECT Object;
VECTORPOINT * Point;
L_INT nPointCount;
L_UCHAR L_FAR *pbyType;
VECTORPEN Pen;
VECTORBRUSH Brush;
} VECTORPOLYDRAW, L_FAR * pVECTORPOLYDRAW;

The VECTORPOLYDRAW structure holds information about a vector polydraw object.

Member | Description
Object | Abstract object.
Point | An array of VECTORPOINT structures that contain the points that define a vector polydraw object in space.
nPointCount | Number of points in the array.
pbyType | Pointer to an array that specifies how each point in the Point array is used. The values given below behave like the PT_MOVETO, PT_LINETO, PT_BEZIERTO and PT_CLOSEFIGURE values under PolyDraw in the Microsoft SDK. For a more detailed explanation, refer to the Microsoft SDK documentation. Possible values are:
 | Value | Meaning
 | VECTOR_PT_MOVETO | Beginning of a disjoint figure. This will be the new current position.
 | VECTOR_PT_LINETO | Draw a line from the current position to this point. This point becomes the new current position.
 | VECTOR_PT_BEZIERTO | Control point or end point for a Bézier curve. These occur in threes. The first two are control points and the third is the end point. For more information, refer to the Microsoft SDK documentation.
 | VECTOR_PT_CLOSEFIGURE | Automatically close the figure after VECTOR_PT_LINETO or VECTOR_PT_BEZIERTO is done. This can be combined with VECTOR_PT_LINETO or VECTOR_PT_BEZIERTO using a bitwise OR.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector polydraw object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector polydraw object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_POLYDRAW.

pVECTORPOLYDRAW is a pointer to a VECTORPOLYDRAW structure.


VECTORPOLYGON

typedef struct tagVECTORCURVECLOSED
{
VECTOROBJECT Object;
VECTORPOINT * Point;
L_INT nPointCount;
VECTORPEN Pen;
VECTORBRUSH Brush;
L_INT nPolyFillMode;
} VECTORCURVECLOSED, L_FAR * pVECTORCURVECLOSED, VECTORPOLYGON, L_FAR * pVECTORPOLYGON;

The VECTORPOLYGON structure holds information about a vector polygon object.

Member | Description
Object | Abstract object.
Point | An array of VECTORPOINT structures that contain the points that define a vector polygon object in space.
nPointCount | Number of points in the array.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector polygon object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector polygon object.
nPolyFillMode | Flag that indicates how to handle complex crossing lines. The following are valid values, which are illustrated below:
 | Value | Meaning
 | VECTOR_POLY_WINDING | [0] All pixels that are inside the resulting exterior lines are in the region.
 | VECTOR_POLY_ALTERNATE | [1] The region includes the area between odd-numbered and even-numbered polygon sides on each scan line.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_POLYGON.

pVECTORPOLYGON is a pointer to a VECTORPOLYGON structure.


VECTORPOLYLINE/VECTORPOLYBEZIER

typedef struct tagVECTORCURVEOPENED
{
VECTOROBJECT Object;
VECTORPOINT * Point;
L_INT nPointCount;
VECTORPEN Pen;
} VECTORCURVEOPENED, L_FAR * pVECTORCURVEOPENED, VECTORPOLYLINE, L_FAR * pVECTORPOLYLINE, VECTORPOLYBEZIER, L_FAR * pVECTORPOLYBEZIER;

The VECTORPOLYLINE structure holds information about a vector polyline object.

The VECTORPOLYBEZIER structure holds information about a vector poly Bezier curve object.

Member | Description
Object | Abstract object.
Point | An array of VECTORPOINT structures that contain the points that define a polyline or polybezier curve in space.
nPointCount | Number of points in the array.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector polyline or polybezier object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_POLYLINE or VECTOR_POLYBEZIER.

pVECTORPOLYLINE is a pointer to a VECTORPOLYLINE structure.

pVECTORPOLYBEZIER is a pointer to a VECTORPOLYBEZIER structure.


VECTORRASTER

typedef struct tagVECTORRASTER
{
VECTOROBJECT Object;
VECTORPOINT Point[2];
VECTORBITMAP Bitmap;
} VECTORRASTER, L_FAR * pVECTORRASTER;

The VECTORRASTER structure holds information about a raster object.

Member | Description
Object | Abstract object.
Point | An array of VECTORPOINT structures that contain the defining points of a bounding rectangle. Point[0] contains the top left position and Point[1] contains the bottom right position.
Bitmap | VECTORBITMAP structure that contains the bitmap image to draw.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_RASTER.

The OpenGL and DirectX engines give optimal performance when working with 3D raster images.

For more information about setting the vector engine, refer to LVectorBase::AttachToWindow or LVectorWindow::SetEngine.

For more information about vector objects, refer to Working with Vector Objects.

pVECTORRASTER is a pointer to a VECTORRASTER structure.


VECTORRECTANGLE

typedef struct tagVECTORRECTANGLE
{
VECTOROBJECT Object;
VECTORPOINT Point[2];
VECTORPEN Pen;
VECTORBRUSH Brush;
} VECTORRECTANGLE, L_FAR * pVECTORRECTANGLE;

The VECTORRECTANGLE structure holds information about a vector rectangle object.

Member | Description
Object | Abstract object.
Point | An array of VECTORPOINT structures that contain the beginning and ending points of the diagonal of a rectangle in space.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector line object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector line object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_RECTANGLE.

pVECTORRECTANGLE is a pointer to a VECTORRECTANGLE structure.


VECTORSCALEDATA

typedef struct tagVECTORSCALEDATA
{
HWND hWnd;
LVectorWindow L_FAR *pVectorWindowClass;
VECTORPOINT ScaleFactor;
} VECTORSCALEDATA, L_FAR * pVECTORSCALEDATA;

Member | Description
hWnd | Handle to the vector window.
pVectorWindowClass | Pointer to an LVectorWindow object.
ScaleFactor | The current scale factor of the vector.


VECTORSPLINE

typedef struct _VECTORPOLYBEZIERSPLINE
{
VECTOROBJECT Object;
VECTORPOINT *Point;
L_INT nPointCount;
VECTORPEN Pen;
L_UINT32 dwFlags;
} VECTORSPLINE, L_FAR *pVECTORSPLINE;

The VECTORSPLINE structure holds information about the spline object.

Member | Description
Object | Abstract object.
Point | Pointer to an array of points which controls the spline’s path depnding on the spline type. The number of points should be: ( puDegree[ 0 ] + puDegree[ 1 ] + … + puDegree[ nSecCount – 1 ] ) + 1
nPointCount | Number of points in the points
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector spline object
dwFlags | Flag that indicates the mode in which to draw the spline. Possible values are:
 | Value | Meaning
 | VECTOR_SPLINE_FITPOINTS | Sets the spline mode to Fit Points. This is the default.
 | VECTOR_SPLINE_CONTROLPOINTS | Sets the spline mode to Control Points.

Comments

The spline can be drawn in two modes:

Fit Points: The spline path MUST pass through each and every point specified.

Control Points: The points are used to control the spline path, but not necessarily pass through all of them.


VECTORSTOCK

typedef struct tagVECTORSTOCK
{
VECTOROBJECT Object;
L_INT nId;
HINSTANCE hInstDLL;
L_CHAR L_FAR * pszDLLName;
VECTORPOINT Point[2];
VECTORPEN Pen;
VECTORBRUSH Brush;
} VECTORSTOCK, L_FAR * pVECTORSTOCK;

The VECTORSTOCK structure holds information about a vector stock object.

Member | Description
Object | Abstract object.
nId | Stock object ID in its DLL. The documentation for the stock object DLL should include valid object IDs.
hInstDLL | Instance handle of the stock object DLL. This can be NULL only if pszDLLName is not NULL.
pszDLLName | Character string that contains the name of the stock object DLL. This can be NULL only if hInstDLL is not NULL.
Point | Array of VECTORPOINT structures that contains the vertices of the bounding parallelogram.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector stock object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector stock object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_STOCK.

Either hInstDLL or pszDLLName can be NULL. They cannot both be NULL. If hInstDLL is not NULL, the toolkit will load the requested object from this DLL handle. If hInstDLL is NULL, the toolkit will assume that pszDLLName indicates the complete path to the requested library.

pVECTORSTOCK is a pointer to a VECTORSTOCK structure.


VECTORTEXT

typedef struct tagVECTORTEXT
{
VECTOROBJECT Object;
VECTORPOINT Point;
L_TCHAR L_FAR * pszText;
L_UINT32 dwFlags;
L_DOUBLE CharHeight;
L_DOUBLE CharWidth;
VECTORPEN Pen;
VECTORBRUSH Brush;
VECTORFONT Font;
} VECTORTEXT, L_FAR * pVECTORTEXT;

The VECTORTEXT structure holds information about a vector text object.

Member | Description
Object | Abstract object.
Point | Insertion point for the text.
pszText | Character string that contains the text to insert.
dwFlags | Flag that indicates how to position the text and how to handle text when hit testing. Possible values are:
 | Value | Meaning
 | VECTOR_TEXT_LEFT | Align text to the left of the insertion point.
 | VECTOR_TEXT_RIGHT | Align text to the right of the insertion point.
 | VECTOR_TEXT_HCENTER | Center text horizontally on the insertion point.
 | VECTOR_TEXT_TOP | Align text to the top of the insertion point.
 | VECTOR_TEXT_BOTTOM | Align text to the bottom of the insertion point.
 | VECTOR_TEXT_VCENTER | Center text vertically on the insertion point.
 | VECTOR_TEXT_HITTESTRECT | Perform hit text on the bounding rectangle, not just the text characters.
CharHeight | Height in physical units of a single character. Note if this parameter is 0, the toolkit will use the height of the font used instead.
CharWidth | Width in physical units of a single character. Note if this parameter is 0, the toolkit will use a suitable width for the given height.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector text object.
Brush | VECTORBRUSH structure that contains information about the brush to use when drawing the vector text object.
Font | VECTORFONT structure that contains information about the font to use when drawing the vector text object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_TEXT.

pVECTORTEXT is a pointer to a VECTORTEXT structure.


VECTORVERTEX

typedef struct tagVECTORVERTEX
{
VECTOROBJECT Object;
VECTORPOINT Point;
VECTORPEN Pen;
} VECTORVERTEX, L_FAR * pVECTORVERTEX;

The VECTORVERTEX structure holds information about a vector vertex object.

Member | Description
Object | Abstract object.
Point | VECTORPOINT structure that contains the location of a vertex in space.
Pen | VECTORPEN structure that contains information about the pen to use when drawing the vector vertex object.

Comments

nSize of the Object member must be the sizeof this structure.

nType of the Object member must be VECTOR_VERTEX.

pVECTORVERTEX is a pointer to a VECTORVERTEX structure.


WINDOWS Structures

BITMAPINFO

This is a Microsoft Windows structure as documented in the Microsoft SDK documentation. For complete documentation on this structure please refer to the Microsoft SDK documentation for BITMAPINFO.

COLORREF

COLORREF is a Windows data type. For further information concerning COLORREF, please refer to the Microsoft SDK documentation.

DWORD

DWORD is a Windows data type, 32 bit unsigned int. For further information concerning DWORD, please refer to the Microsoft SDK documentation.

EXTLOGPEN

EXTLOGPEN is a standard Windows structure. For further information concerning EXTLOGPEN, please refer to the Microsoft SDK documentation or your compiler's documentation.

HANDLE

Handle is a standard Windows structure. For further information concerning HANDLE, please refer to the Microsoft SDK documentation or your compiler's documentation.

HDC

HDC is a standard Windows structure. For further information concerning HDC, please refer to the Microsoft SDK documentation or your compiler's documentation.

HGLOBAL

HGLOBAL is a standard Windows data type. For further information concerning HGLOBAL, please refer to the Microsoft SDK documentation or your compiler's documentation.

HWND

HWND is a standard Windows data type. For further information concerning HWND, please refer to the Microsoft SDK documentation or your compiler's documentation.

LOGBRUSH

LOGBRUSH is a standard Windows structure. For further information concerning LOGBRUSH, please refer to the Microsoft SDK documentation or your compiler's documentation.

LOGPEN

LOGPEN is a standard Windows structure. For further information concerning LOGPEN, please refer to the Microsoft SDK documentation or your compiler's documentation.

LPBYTE

LPBYTE is a standard Windows data type. For further information concerning LPBYTE, please refer to the Microsoft SDK documentation or your compiler's documentation.

LPRECT

LPRECT is a standard Windows structure. For further information concerning LPRECT, please refer to the Microsoft SDK documentation or your compiler's documentation.

LPSTR

LPSTR is a standard Windows data type. For further information concerning LPSTR, please refer to the Microsoft SDK documentation or your compiler's documentation.

OPENFILENAME

This is a Microsoft Windows structure as documented in the Microsoft SDK documentation. For complete documentation on this structure please refer to the Microsoft SDK documentation for OPENFILENAME.


Return Codes

For a list of all possible error codes for LEADTOOLS Vector Class Library, refer to LEADTOOLS Class Library Error Codes in the Main Class Library help file.


LVectorArc::LVectorArc

#include "ltwrappr.h"

L_VOID LVectorArc::LVectorArc(pArc =NULL)

L_VOID LVectorArc::LVectorArc(pObject, pVector =NULL)

pVECTORARC pArc; | /* pointer to a VECTORCARC structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorArc object.

Parameter | Description
pArc | Pointer to a VECTORARC structure that contains information used to create and initialize the new vector arc object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector arc object.
pVector | Pointer to an LVectorBase object with which the newly constructed Vector Arc object will be associated.

Returns

None.

Comments

LVectorArc::LVectorArc(pArc) is a constructor for the LVectorArc object. It takes a valid pVECTORARC pointer and creates an LVectorArc object.

LVectorArc::LVectorArc(pObject, pVector=NULL) creates an LVectorArc object based on the information provided in pObject and associates the newly created LVectorArc object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorArc object using the LVectorArc::LVectorArc(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_ARC
//LVectorBase *pVector is valid
LVectorArc MyVectorArc(pObject, pVectorBase);
if (MyVectorArc.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorArc::~LVectorArc, Class Members

Example

For an example for LVectorArc::LVectorArc(pArc), refer to LVectorArc::LockObject.

This is an example for LVectorArc::LVectorArc(pObject, pVector=NULL):

//This example takes a pVECTOROBJECT and creates an LVectorObject derived class object
// for examining/modifying properties
L_INT ChangeVectorObjectProps(pVECTOROBJECT pObject, LVectorBase *pVectorBase)
{
L_INT nRet = SUCCESS;
if (pObject == NULL)
{
nRet = FAILURE;
}
else
{
switch (pObject->nType)
{
case VECTOR_VERTEX:
{
VECTORVERTEX Vertex;
LVectorVertex VectorVertex(pObject, pVectorBase);
VectorVertex.LockObject(&Vertex);
//...
//... Examine and/or change Vertex properties
//...
VectorVertex.UnlockObject(&Vertex);
}
break;
case VECTOR_LINE:
{
VECTORLINE Line;
LVectorLine VectorLine(pObject, pVectorBase);
VectorLine.LockObject(&Line);
//...
//... Examine and/or change line properties
//...
VectorLine.UnlockObject(&Line);
}
break;
case VECTOR_RECTANGLE :
{
VECTORRECTANGLE Rectangle ;
LVectorRectangle VectorRectangle (pObject, pVectorBase);
VectorRectangle.LockObject(&Rectangle );
//...
//... Examine and/or change rectangle properties
//...
VectorRectangle.UnlockObject(&Rectangle );
}
break;
case VECTOR_POLYLINE :
{
VECTORPOLYLINE Polyline ;
LVectorPolyLine VectorPolyline (pObject, pVectorBase);
VectorPolyline.LockObject(&Polyline);
//...
//... Examine and/or change polyline properties
//...
VectorPolyline.UnlockObject(&Polyline );
}
break;
case VECTOR_POLYBEZIER :
{
VECTORPOLYBEZIER Polybezier ;
LVectorPolyBezier VectorPolybezier (pObject, pVectorBase);
VectorPolybezier.LockObject(&Polybezier );
//...
//... Examine and/or change polybezier properties
//...
VectorPolybezier.UnlockObject(&Polybezier );
}
break;
case VECTOR_POLYGON :
{
VECTORPOLYGON Polygon ;
LVectorPolygon VectorPolygon (pObject, pVectorBase);
VectorPolygon.LockObject(&Polygon );
//...
//... Examine and/or change polygon properties
//...
VectorPolygon.UnlockObject(&Polygon );
}
break;
case VECTOR_ELLIPSE :
{
VECTORELLIPSE Ellipse ;
LVectorEllipse VectorEllipse (pObject, pVectorBase);
VectorEllipse.LockObject(&Ellipse );
//...
//... Examine and/or change ellipse properties
//...
VectorEllipse.UnlockObject(&Ellipse );
}
break;
case VECTOR_CIRCLE :
{
VECTORCIRCLE Circle ;
LVectorCircle VectorCircle (pObject, pVectorBase);
VectorCircle.LockObject(&Circle );
//...
//... Examine and/or change circle properties
//...
VectorCircle.UnlockObject(&Circle );
}
break;
case VECTOR_ARC :
{
VECTORARC Arc ;
LVectorArc VectorArc (pObject, pVectorBase);
VectorArc.LockObject(&Arc );
//...
//... Examine and/or change arc properties
//...
VectorArc.UnlockObject(&Arc );
}
break;
case VECTOR_ELLIPTICALARC :
{
VECTORELLIPTICALARC EllipticalArc ;
LVectorEllipticalArc VectorEllipticalArc (pObject, pVectorBase);
VectorEllipticalArc.LockObject(&EllipticalArc );
//...
//... Examine and/or change elliptical arc properties
//...
VectorEllipticalArc.UnlockObject(&EllipticalArc );
}
break;
case VECTOR_TEXT :
{
VECTORTEXT Text ;
LVectorText VectorText (pObject, pVectorBase);
VectorText.LockObject(&Text );
//...
//... Examine and/or change text properties
//...
VectorText.UnlockObject(&Text );
}
break;
case VECTOR_PIE :
{
VECTORPIE Pie ;
LVectorPie VectorPie (pObject, pVectorBase);
VectorPie.LockObject(&Pie );
//...
//... Examine and/or change pie properties
//...
VectorPie.UnlockObject(&Pie );
}
break;
case VECTOR_CHORD :
{
VECTORCHORD Chord ;
LVectorChord VectorChord (pObject, pVectorBase);
VectorChord.LockObject(&Chord );
//...
//... Examine and/or change chord properties
//...
VectorChord.UnlockObject(&Chord );
}
break;
case VECTOR_POLYDRAW :
{
VECTORPOLYDRAW Polydraw ;
LVectorPolyDraw VectorPolydraw (pObject, pVectorBase);
VectorPolydraw.LockObject(&Polydraw );
//...
//... Examine and/or change Polydraw properties
//...
VectorPolydraw.UnlockObject(&Polydraw );
}
break;

case VECTOR_SPLINE :
{
VECTORSPLINE Spline ;
LVectorSpline VectorSpline (pObject, pVectorBase);
VectorSpline.LockObject(&Spline );
//...
//... Examine and/or change Spline properties
//...
VectorSpline.UnlockObject(&Spline );
}
break;

case VECTOR_HPOLYBEZIER :
{
VECTORHPOLYBEZIER HPolyBezier ;
LVectorHPolyBezier VectorHPolyBezier (pObject, pVectorBase);
VectorHPolyBezier.LockObject(& HPolyBezier );
//...
//... Examine and/or change HPolyBezier properties
//...
VectorHPolyBezier.UnlockObject(& HPolyBezier );
}
break;

case VECTOR_RASTER :
{
VECTORRASTER Raster ;
LVectorRaster VectorRaster (pObject, pVectorBase);
VectorRaster.LockObject(&Raster );
//...
//... Examine and/or change Raster properties
//...
VectorRaster.UnlockObject(&Raster );
}
break;
case VECTOR_STOCK :
{
LVectorStock VectorStock (pObject, pVectorBase);
//...
//...
//...
}
break;
case VECTOR_CLONE :
{
VECTORCLONE Clone ;
LVectorClone VectorClone (pObject, pVectorBase);
VectorClone.LockObject(&Clone );
//...
//... Examine and/or change Clone properties
//...
VectorClone.UnlockObject(&Clone );
}
break;
}
}
return nRet;
}


LVectorArc::~LVectorArc

#include "ltwrappr.h"

virtual L_VOID LVectorArc::~LVectorArc(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorArc class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorArc::LVectorArc, Class Members

Example

For an example, refer to LVectorArc::LockObject.


LVectorArc::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorArc::LockObject(pObject)

pVECTORARC pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORARC structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORARC type and pass the address to this function. After modifying the vector object settings, call LVectorArc::UnlockObject (). LVectorArc::LockObject () and LVectorArc::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorArc::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorArc::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorArc::UnlockObject ().

To change the object information for a class object, call LVectorArc::UnlockObject.

LVectorArc::LockObject and LVectorArc::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorArc::LockObject and LVectorArc::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorArc::UnlockObject
Topics: | Working with Vector Objects

Example

//Example112
// This example will add an arc object to the Active Layer LVectorBase object
L_VOID Example112(HWND hWnd, LVectorBase *pVector)
{
VECTORARC Arc;

Arc.Point.x = 50;
Arc.Point.y = 50;
Arc.Point.z = 0;

Arc.Pen.bExtPen = FALSE;
Arc.Pen.NewPen.LogPen.lopnWidth.x = 2;
Arc.Pen.NewPen.LogPen.lopnWidth.y = 2;
Arc.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

Arc.StartAngle = 45; // Start angle in degrees.
Arc.SweepAngle = 90;
Arc.Radius = 40;

LVectorArc VectorArc(&Arc);
pVector->AddObject(&VectorArc);

//Now change the color to red
MessageBox(NULL, TEXT("Changing color to red"), TEXT(""), MB_OK);

VECTORARC ArcTemp;

VectorArc.LockObject(&ArcTemp);

ArcTemp.Pen.bExtPen = FALSE;
ArcTemp.Pen.NewPen.LogPen.lopnColor = RGB(255, 0, 0);
VectorArc.UnlockObject(&ArcTemp);

//LVectorArc destructor called when VectorArc goes out of scope
}


LVectorArc::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorArc::UnlockObject(pObject)

pVECTORARC pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORARC structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORARC and pass the address to the LVectorArc::LockObject () function. After modifying the vector object settings, call LVectorArc::UnlockObject (). LVectorArc::LockObject () and LVectorArc::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorArc::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorArc::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorArc::UnlockObject ().

To get the current object information for a class object, call LVectorArc::LockObject.

LVectorArc::LockObject and LVectorArc::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorArc::LockObject.


LVectorBase::LVectorBase

#include "ltwrappr.h"

L_VOID LVectorBase::LVectorBase(void)

L_VOID LVectorBase::LVectorBase(pVector)

pVECTORHANDLE pVector;

/* pointer to a LEAD bitmap handle */

Constructs and initializes the member variables of the class object.

Parameter | Description
pVector | Pointer to a vector handle.

Returns

None

Comments

These are the constructors for the LVectorBase class. They construct and initialize the member variables of the class object.

LVectorBase::LVectorBase(void) will initialize the bitmap width, height, and bits per pixel to 0.

LVectorBase::LVectorBase(pVector) constructs an LVectorBase object and allocates a vector from another LEAD vector handle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Elements:

LVectorBase::~LVectorBase, Class Members

Example

This is the example for LVectorBase::LVectorBase():

L_VOID Example1()
{
LVectorBase myVectorBase;
//destructor called when out of scope
}

This is the example for LVectorBase::LVectorBase(pVectorHandle):

L_VOID Example2()
{
L_TCHAR szFileName[_MAX_PATH];
L_UINT uLen;

VECTORHANDLE hVector;
L_VECLOADFILE(TEXT("s:\\temp\\images\\dxf\\test.dxf"), &hVector,NULL, NULL);
LVectorBase myVectorBase(&hVector);
myVectorBase.GetFileName(szFileName, &uLen);
}


LVectorBase::~LVectorBase

#include "ltwrappr.h"

virtual L_VOID LVectorBase::~LVectorBase(void)

Destroys the class object and frees any allocated variables and memory associated with the object.

Returns

None

Comments

This is the destructor for the LVectorBase class. It destroys the class object and frees any allocated variables and memory associated with the object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Elements:

LVectorBase::LVectorBase, Class Members

Example

For an example, refer to LVectorBase::LVectorBase.


LVectorBase::AddGroup

#include "ltwrappr.h"

virtual L_INT LVectorBase::AddGroup(pVectorGroup, dwFlags = VECTOR_FLAGS_RENAME_DUPLICATES)

LVectorGroup *pVectorGroup; | /* pointer to a vector group object */
L_UINT32 dwFlags; | /* flags */

Adds a new empty group to a vector handle.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorGroup | Pointer to the vector group object that specifies the group settings.
dwFlags | Flag that indicates whether or not to rename duplicate group names. Possible values are:
 | Value | Meaning
 | 0 | Don't rename duplicate group names, if found.
 | VECTOR_FLAGS_RENAME_DUPLICATES | Renames duplicate group names if found. The toolkit will add a suffix (0, 1, 2, etc) to the group name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To add a new vector group, do the following:

1. | Declare an LVectorGroupobject.
2. | Call LVectorGroup::GetGroupDesc to retrieve the current group settings.
3. | Change the group settings.
4. | Call LVectorGroup::SetGroupDesc to set the changed group settings.
5. | Pass the address of the LVectorGroup object to LVectorBase::AddGroup.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorGroup::DeleteGroup, LVectorGroup::GetGroupDesc, LVectorGroup::SetGroupDesc, LVectorBase::GetGroupByName, LVectorBase::GetGroupByIndex, LVectorBase::CopyGroup, LVectorGroup::EmptyGroup, LVectorGroup::DeleteGroupClones
Topics: | Working with Vector Groups

Example

// This example will add a new group to a vector handle.
L_VOID Example140(HWND hWnd, LVectorBase *pVector)
{
LVectorGroup VectorGroup;
VECTORGROUPDESC GroupDesc;

VectorGroup.GetGroupDesc(&GroupDesc);
lstrcpy(GroupDesc.szName, TEXT("My New Group"));
VectorGroup.SetGroupDesc(&GroupDesc);

if (SUCCESS != pVector->AddGroup(&VectorGroup, VECTOR_FLAGS_RENAME_DUPLICATES))
{
MessageBox( NULL, TEXT("Could not add group!"), TEXT(""), MB_OK );
}

//...LVectorGroup destructor called when VectorGroup goes out of scope
}


LVectorBase::AddLayer

#include "ltwrappr.h"

virtual L_INT LVectorBase::AddLayer(pVectorLayer, dwFlags=VECTOR_FLAGS_RENAME_DUPLICATE_LAYERS);

LVectorLayer * pVectorLayer; | /* pointer to a vector layer object */
L_UINT32 dwFlags; | /* flags */

Adds a new empty layer to a vector handle.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorLayer | Pointer to an LVectorLayer object that specifies the layer settings.
dwFlags | Flag that indicates whether or not to rename duplicate layer names. Possible values are:
 | Value | Meaning
 | 0 | Don't rename duplicate layer names, if found.
 | VECTOR_FLAGS_RENAME_DUPLICATES | Renames duplicate layer names if found. The toolkit will add a suffix (0, 1, 2, etc) to the layer name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To add a new vector layer, do the following:

1. | Declare an LVectorLayer object.
2. | Call LVectorLayer::GetLayerDesc to retrieve the current layer settings.
3. | Change the layer settings.
4. | Call LVectorLayer::SetLayerDesc to set the changed layer settings.
5. | Pass the address of the LVectorLayer object to LVectorBase::AddLayer.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorLayer::DeleteLayer, LVectorBase::GetLayerByName, LVectorBase::GetLayerByIndex, LVectorBase::CopyLayer, LVectorLayer::EmptyLayer, LVectorBase::SetActiveLayer, LVectorBase::GetActiveLayer
Topics: | Working with Vector Layers

Example

// This example will add a new layer to a vector handle.
L_VOID Example68(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;
VECTORLAYERDESC LayerDesc;

VectorLayer.GetLayerDesc(&LayerDesc);
lstrcpy(LayerDesc.szName, TEXT("Terry's New Layer"));
VectorLayer.SetLayerDesc(&LayerDesc);

if (SUCCESS != pVector->AddLayer(&VectorLayer, VECTOR_FLAGS_RENAME_DUPLICATES))
{
MessageBox( NULL, TEXT("Could not add layer!"), TEXT(""), MB_OK );
}

//...LVectorLayer destructor called when VectorLayer goes out of scope
}


LVectorBase::AddObject

#include "ltwrappr.h"

virtual L_INT LVectorBase::AddObject(pVectorObject);

LVectorObject * pVectorObject;

/* pointer to the vector object to add */

Adds a new vector object to the class object's active vector layer.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorObject | Pointer to an LVectorObject object that references the vector object to add.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Working with Vector Objects

Example

// This example will add a new green vertex to the Active Layer LVectorBase object.
// Once added, the color will be changed to blue
L_VOID Example106(HWND hWnd, LVectorBase *pVector)
{
VECTORVERTEX Vertex;

//Create Vertex Object
Vertex.Point.x = 50;
Vertex.Point.y = 50;
Vertex.Point.z = 10;
Vertex.Pen.bExtPen = FALSE;
Vertex.Pen.nSize = sizeof( VECTORPEN );
Vertex.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Vertex.Pen.NewPen.LogPen.lopnWidth.x = 10;
Vertex.Pen.NewPen.LogPen.lopnWidth.y = 10;
Vertex.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorVertex VectorVertex(&Vertex);

pVector->AddObject(&VectorVertex);

//Now change color to blue
MessageBox(NULL, TEXT("Changing color to red"), TEXT(""), MB_OK);

VECTORVERTEX VertexTemp;

VectorVertex.LockObject(&VertexTemp);

VertexTemp.Pen.bExtPen = FALSE;
VertexTemp.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);
VectorVertex.UnlockObject(&VertexTemp);

//LVectorVertex destructor called when VectorVertex goes out of scope
}


LVectorBase::ApplyTransformation

#include "ltwrappr.h"

virtual L_INT LVectorBase::ApplyTransformation(L_VOID)

Applies the current transformation to the vector image.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will apply current transformation (Rotation, scaling and translation) to the vector image. The vector image objects will be changed.

After a call to this function, rotation, scaling and translation values will be reset.

Not supported in DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetTranslation, LVectorBase::SetRotation, LVectorBase::SetScale, LVectorDialog::DoModalVectorRotate, LVectorDialog::DoModalVectorTranslate, LVectorDialog::DoModalVectorScale
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

//This example opens an image, rotates it, and saves the result as a .dxf file
//The vector is saved as transformed
L_VOID Example55(HWND hWnd)
{
LVectorBase Vector;
RECT rect;

//Load the drawing
Vector.Load(TEXT("s:\\temp\\images\\dxf\\skull.dxf"));

//Attach to window
Vector.AttachToWindow(hWnd);

//Set viewport
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);

//Rotate
VECTORPOINT rotatePoint;
Vector.GetRotation(&rotatePoint);
rotatePoint.x += 30.0F;
rotatePoint.y -= 100.0F;
rotatePoint.z += 50.0F;
Vector.SetRotation(&rotatePoint,NULL,NULL);

//Make transformations apply to save
Vector.ApplyTransformation();

//Save
Vector.SetFileName(TEXT("d:\\image.dxf"));
Vector.Save(FILE_DXF);
}


LVectorBase::AttachToWindow

#include "ltwrappr.h"

virtual L_INT LVectorBase::AttachToWindow(hWnd, nEngine=VECTOR_ENGINE_GDI, dwFlags=VECTOR_ENGINE_DOUBLEBUFFER)

HWND hWnd; | /* window handle */
L_INT nEngine; | /* vector engine */
L_UINT32 dwFlags; | /* flags */

Attaches a vector handle to a window.

Parameter | Description
hWnd | Handle of the window to which the vector handle will be attached.
nEngine | The vector engine to associate with the specified vector handle. Possible values are:
 | Value | Meaning
 | VECTOR_ENGINE_GDI | Use GDI rendering. (No lights and shading).
 | VECTOR_ENGINE_OPENGL | Use OpenGL rendering. (Viewing only, drawings not editable).
dwFlags | Flags that modify the vector engine. Possible values are:
 | Value | Meaning
 | VECTOR_ENGINE_DOUBLEBUFFER | Use double buffering for flicker-free screen updates.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will attach a vector handle to a window handle. All subsequent changes to the vector image will be reflected on the window.

Note: When you copy one vector to another using LVectorBase::Copy, and the source vector is attached to a window, the destination vector will NOT be attached to the same window automatically.

You can draw on the surface of any window using LVectorBase::Paint, but to use double buffering, you must attach the vector handle to a window.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetEngine, LVectorBase::Paint, LVectorBase::Copy
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::Realize(&BitmapBase, bEraseBkgnd=TRUE).


LVectorBase::ConvertFromEMF

#include "ltwrappr.h"

virtual L_INT LVectorBase::ConvertFromEMF(hDC, hEMF)

HDC hDC; | /* handle to a device context */
HENHMETAFILE hEMF; | /* handle to the metafile to be converted */

Converts an enhanced Windows metafile (EMF) into a LEAD Technologies vector handle. When this function is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hDC | Handle to the device context responsible for the conversion.
hEMF | Handle to the EMF to be converted.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function updates information in the vector handle and copies the EMF drawing data into the LEAD bitmap.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::ConvertToEMF, LVectorBase::ConvertToWMF, LVectorBase::ConvertFromWMF
Topics: | Vector Conversion
 | Vector Images: Converting/Changing Metafiles

Example

void Example32( HWND hWnd, L_TCHAR L_FAR *pszFileName, HENHMETAFILE hEMF )
{
LVectorBase Vector;
HDC hDC;

//Convert to LEAD vector
hDC = GetDC( hWnd );
Vector.ConvertFromEMF( hDC, hEMF );
ReleaseDC( hWnd, hDC );

//Save as DXF
Vector.Save( pszFileName,FILE_DXF);
}


LVectorBase::ConvertFromWMF

#include "ltwrappr.h"

virtual L_INT LVectorBase::ConvertFromWMF(hDC, hWMF)

HDC hDC; | /* handle to a device context */
HMETAFILE hWMF; | /* handle to the WMF to be converted */

Converts a Windows metafile (WMF) into a LEAD Technologies vector handle. When this function is completed, there are two copies of the drawing in memory: the WMF and the original LEAD vector. Freeing one will not affect the other.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hDC | Handle to the device context responsible for the conversion.
hWMF | Handle to the WMF to be converted.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function updates information in the vector handle and copies the WMF drawing data into the LEAD bitmap.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::ConvertToWMF, LVectorBase::ConvertToEMF, LVectorBase::ConvertFromEMF
Topics: | Vector Conversion
 | Vector Images: Converting/Changing Metafiles

Example

void Example34( HWND hWnd, L_TCHAR L_FAR *pszFileName, HMETAFILE hWMF )
{
LVectorBase Vector;
HDC hDC;

//Convert to LEAD vector
hDC = GetDC( hWnd );
Vector.ConvertFromWMF( hDC, hWMF );
ReleaseDC( hWnd, hDC );

//Save as DXF
Vector.Save( pszFileName,FILE_DXF);
}


LVectorBase::ConvertToEMF

#include "ltwrappr.h"

virtual L_INT LVectorBase::ConvertToEMF(hDC, phEnhMetaFile, uDPI, pRect = NULL)

HDC hDC; | /* handle to a device context */
HENHMETAFILE *phEnhMetaFile; | /* pointer to a variable to be updated */
L_UINT uDPI; | /* Dots per inch */
const RECT L_FAR *pRect; | / * pointer to a structure */

Converts a LEAD Technologies vector handle into an enhanced Windows metafile (EMF). When this function is completed, there are two copies of the drawing in memory: the EMF and the original LEAD vector. Freeing one will not affect the other.

Parameter | Description
hDC | Handle to the device context responsible for the conversion.
phEnhMetaFile | Pointer to a metafile handle to be updated with the converted vector.
uDPI | Dots per inch which should be used to convert the drawing.
pRect | Pointer to a RECT structure that contains the dimensions, in .01 millimeter units, of the drawing to be stored in the enhanced metafile. If this parameter is NULL, the vector toolkit computes the dimensions of the smallest rectangle that bounds the vector drawing. This parameter should be provided whenever possible.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function allocates an EMF handle and copies the LEAD vector to the EMF.

If this function is called with pRect containing these values:

pRect->left = 0;
pRect->top = 0;
pRect->right = 1000;
pRect->bottom = 1000;

the vector drawing will be converted to an EMF file with logical size 0 to 10 mm in width and height.

This is very helpful when printing. For example, determine the printer’s printable area in millimeters. Divide that value by 100 and pass the resulting value as the right and bottom members of the RECT structure. The resulting EMF will have the same logical size as the printer, resulting in high image quality when printing the EMF file.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::ConvertFromEMF, LVectorBase::ConvertToWMF, LVectorBase::ConvertFromWMF
Topics: | Vector Conversion
 | Vector Images: Converting/Changing Metafiles

Example

HENHMETAFILE Example31( HWND hWnd, L_TCHAR L_FAR *pszFile )
{
LVectorBase Vector;
HENHMETAFILE hEMF;
HDC hDC;

//Load the drawing
Vector.Load(pszFile);

//Convert to EMF
hDC = GetDC( hWnd );
L_INT nRet = Vector.ConvertToEMF(hDC, &hEMF, 96);
ReleaseDC( hWnd, hDC );
return( hEMF );
}


LVectorBase::ConvertToWMF

#include "ltwrappr.h"

virtual L_INT LVectorBase::ConvertToWMF(hDC, phMetaFile, uDPI, pRect = NULL)

HDC hDC; | /* handle to a device context */
HMETAFILE *phMetaFile; | /* pointer to a variable to be updated */
L_UINT uDPI; | /* Dots per inch */
const RECT L_FAR *pRect; | / pointer to a structure */

Converts a LEAD Technologies vector handle into a Windows metafile (WMF). When this function is completed, there are two copies of the drawing in memory: the WMF and the original LEAD vector. Freeing one will not affect the other.

Parameter | Description
hDC | Handle to the device context responsible for the conversion.
phEnhMetaFile | Pointer to a metafile handle to be updated with the converted vector.
uDPI | Dots per inch that should be used to do the conversion.
pRect | Pointer to a RECT structure that contains the dimensions, in .01 millimeter units, of the drawing to be stored in the metafile. If this parameter is NULL, the vector toolkit computes the dimensions of the smallest rectangle that bounds the vector drawing. This parameter should be provided whenever possible.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function allocates a WMF handle and copies the LEAD vector to the WMF.

If this function is called with pRect containing these values:

pRect->left = 0;
pRect->top = 0;
pRect->right = 1000;
pRect->bottom = 1000;

the vector drawing will be converted to an WMF file with logical size 0 to 10 mm. in width and height.

This is very helpful when printing. For example, determine the printer’s printable area in millimeters. Divide that value by 100 and pass the resulting value as the right and bottom members of the RECT structure. The resulting WMF will have the same logical size as the printer, resulting in high image quality when printing the WMF file.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::ConvertFromEMF, LVectorBase::ConvertToEMF, LVectorBase::ConvertFromWMF
Topics: | Vector Conversion
 | Vector Images: Converting/Changing Metafiles

Example

HMETAFILE Example33( HWND hWnd, L_TCHAR L_FAR *pszFile )
{
LVectorBase Vector;
HMETAFILE hWMF;
HDC hDC;

//Load the drawing
Vector.Load(pszFile);

//Convert to EMF
hDC = GetDC( hWnd );
L_INT nRet = Vector.ConvertToWMF(hDC, &hWMF, 96);
ReleaseDC( hWnd, hDC );
return( hWMF );
}


LVectorBase::Copy

#include "ltwrappr.h"

virtual L_INT LVectorBase::Copy(LVectorSrc, dwFlags=0)

LVectorBase& LVectorSrc; | /* the source vector object to be copied */
L_UINT32 dwFlags; | /* copy flags */

Copies a vector.

Parameter | Description
LVectorSrc | The source vector to be copied.
dwFlags | Flag that indicate the characteristics of the copy process. Possible values are:
 | Value | Meaning
 | 0 | Copy the entire vector handle from the source vector to the destination vector.
 | VECTOR_FLAGS_SELECTED_ONLY | Copy only selected objects from the source vector to the destination vector.
 | VECTOR_FLAGS_REPLACE | Empty the destination vector handle before copying.
 | VECTOR_FLAGS_RENAME_DUPLICATES | Renames duplicate layer names if found. This flag is only valid when VECTOR_FLAGS_REPLACE is not specified. The toolkit will add a suffix (0, 1, 2, etc) to the layer name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.
 | VECTOR_FLAGS_COPY_INTO_ACTIVE_LAYER | Copies objects and layers into the active layer of the destination vector.
 | VECTOR_FLAGS_COPY_LAYERS_ONLY | Copies all layers and objects from the source vector to the destination vector. Transformation, camera, viewport and all other properties of the destination vector will not be effected.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call this function to copy a vector. This will copy the vector handle and data, all the other settings will not be changed.

Note: The LVectorSrc parameter is passed by reference, and is a required parameter.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Copying a Vector

Example

L_VOID Example9(HWND hWnd)
{
LVectorBase MyVector, CopyVector;
MyVector.SetFileName(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
MyVector.Load();

CopyVector.Copy(MyVector); //make a copy of the Vector
//...
}


LVectorBase::CopyFromClipboard

#include "ltwrappr.h"

virtual L_INT LVectorBase::CopyFromClipboard(hWnd=NULL, dwFlags=0)

HWND hWnd; | /* handle to the active window */
L_UINT32 dwFlags; | /* copy flags */

Copies vector data from the clipboard to the specified vector handle. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWnd | Handle to the active window.
dwFlags | Flag that indicates the behavior of the copy process. Possible values are:
 | Value | Meaning
 | 0 | Copy the entire vector handle from the source vector to the destination vector.
 | VECTOR_FLAGS_SELECTED_ONLY | Copy only selected objects from the source vector to the destination vector.
 | VECTOR_FLAGS_REPLACE | Empty the destination vector before copying.
 | VECTOR_FLAGS_RENAME_DUPLICATES | Rename duplicate layer names if found. This flag is only valid when VECTOR_FLAGS_REPLACE is not specified. The toolkit will add a suffix (0, 1, 2, etc) to the layer name if duplicated. Checking will be aborted when the suffix value reaches 999 and no unique name can be created.
 | VECTOR_FLAGS_COPY_INTO_ACTIVE_LAYER | Copies objects and layers into the active layer of the destination vector.
 | VECTOR_FLAGS_COPY_LAYERS_ONLY | Copies all layers and objects from the source vector to the destination vector. Transformation, camera, viewport and all other properties of the destination vector will not be effected.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will not remove the vector data from the clipboard.

To determine whether valid vector data is on the clipboard, call LVectorBase::IsClipboardReady.

To copy vector data to the clipboard from a vector handle, call LVectorBase::CopyToClipboard.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::IsClipboardReady, LVectorBase::CopyToClipboard.
Topics: | Using the Clipboard

Example

//This example copies a vector image from the clipboard.
L_VOID Example67(HWND hWnd, LVectorBase *pVector)
{
if (pVector->IsClipboardReady())
{
L_INT nRet;
RECT rect;
nRet = pVector->CopyFromClipboard(hWnd, 0);
GetClientRect(hWnd, &rect);
pVector->SetViewport(&rect);
nRet = pVector->AttachToWindow(hWnd);
}
}


LVectorBase::CopyGroup

#include "ltwrappr.h"

virtual L_INT LVectorBase::CopyGroup(pVectorGroupDst, pVectorGroupSrc, dwFlags = 0)

L_FAR LVectorGroup *pVectorGroupDst; | /* pointer to an LVectorGroup object */
L_FAR LVectorGroup *pVectorGroupSrc; | /* pointer to an LVectorGroup object */
L_UINT32 dwFlags; | /* copy flags */

Copies the contents of one group to another.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorGroupDst | Pointer to an LVectorGroup object that references the destination group.
pVectorGroupSrc | Pointer to an LVectorGroup object that references the source group.
dwFlags | Flag that indicates whether or not to empty the destination group before copying. Possible values are:
 | Value | Meaning
 | 0 | Do not empty the destination group before copying.
 | VECTOR_FLAGS_REPLACE | Empty the destination group before copying.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The destination group can be in the same vector handle as the source group, or it can be in a different vector handle.

An LVectorGroup object can be obtained by calling LVectorBase::EnumGroups, LVectorBase::GetGroupByName or LVectorBase::GetGroupByIndex.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddGroup, LVectorBase::GetGroupByName, LVectorBase::GetGroupByIndex, LVectorGroup::GetGroupDesc
Topics: | Working with Vector Groups

Example

For an example, refer to LVectorBase::GetGroupCount.


LVectorBase::CopyLayer

#include "ltwrappr.h"

virtual L_INT LVectorBase::CopyLayer(pVectorLayerDst, pVectorLayerSrc, dwFlags=0);

L_FAR LVectorLayer * pVectorLayerDst; | /* pointer to the destination layer object */
L_FAR LVectorLayer * pVectorLayerSrc; | /* pointer to the source layer object */
L_UINT32 dwFlags; | /* copy flags */

Copies the contents of one layer to another.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorLayerDst | Pointer to an LVectorLayer object that points to the destination layer. Pass NULL to copy the source vector layer into the active layer.
pVectorLayerSrc | Pointer to an LVectorLayer object that points to the source layer. This parameter cannot be NULL.
dwFlags | Flag that indicates whether or not to empty the destination layer before copying. Possible values are:
 | Value | Meaning
 | 0 | Do not empty the destination layer before copying.
 | VECTOR_FLAGS_REPLACE | Empty the destination layer before copying.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The destination layer can be in the same vector handle as the source layer, or it can be in a different vector handle.

An LVectorLayer object can be obtained by calling LVectorBase::EnumLayers, LVectorBase::GetLayerByName or LVectorBase::GetLayerByIndex.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddLayer, LVectorLayer::GetLayerDesc, LVectorBase::GetLayerByName, LVectorBase::GetLayerByIndex
Topics: | Working with Vector Layers

Example

// This example will copy the first layer (and objects) from a vector into the active layer of pVector.
L_VOID Example98(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;
L_INT nRet;

//Load a source vector
LVectorBase VectorSrc;
VectorSrc.Load(TEXT("square3.dxf"));

//Get first layer of source
nRet = VectorSrc.GetLayerByIndex(0, &VectorLayer);

//Copy layer and objects into pVector active layer
pVector->CopyLayer(NULL, &VectorLayer);
}


LVectorBase::CopyObject

#include "ltwrappr.h"

virtual L_INT LVectorBase::CopyObject(pLayerDst, pObjectDst, pObjectSrc );

virtual L_INT LVectorBase::CopyObject(pObjectSrc);

L_FAR LVectorLayer * pLayerDst; | /* pointer to a vector layer object */
L_FAR LVectorObject * pObjectDst; | /* pointer to a vector object */
L_FAR LVectorObject * pObjectSrc; | /* pointer to a vector object */

Copies a vector object to another vector object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pLayerDst | Pointer to the destination vector layer. Pass NULL to copy the source vector object to the active layer of the destination vector object.
pObjectDst | Pointer to the destination vector object. If this parameter contains a valid address of an LVectorObject object, then pObjectDst will be updated with the newly copied vector object. If this parameter is NULL, the source vector object will still be copied to the destination vector.
pObjectSrc | Pointer to the source vector object. This parameter cannot be NULL. The LVectorObject can be obtained by calling LVectorBase::HitTest, LVectorBase::EnumObjects, LVectorBase::AddObject, or by calling LVectorBase::CopyObject again.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function can be used to do the following:

copy a vector object within the same vector layer.

copy a vector object from one vector layer to another vector layer within the same LVectorBase object.

copy a vector object from a vector layer in one LVectorBase object to a vector layer in another LVectorBase object.

This function creates a new object that is a carbon copy of the source object, but they are not related. The source object can be deleted after the copying process without affecting the newly copied object.

Setting the pLayerDst parameter to NULL will copy the object into the current active layer in the LVectorBase object.

If the pObjectDst parameter is set to NULL, information about the newly added object will not be provided when the function returns.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddObject, LVectorObject::ExplodeObject
Topics: | Working with Vector Objects

Example

This example is for LVectorBase::CopyObject(pLayerDst, pObjectDst, pObjectSrc).

//Example93
// This example copies all objects from active layer of vector source to vector dest (active layer)
// Information is displayed about each copied object
class LMyVectorLayer4: public LVectorLayer
{
public:
LVectorBase *m_pVectorDst;

public:
LMyVectorLayer4() {};
virtual ~LMyVectorLayer4(){};
virtual L_INT EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

L_INT LMyVectorLayer4::EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
L_TCHAR *pszType;
LVectorBase VectorBase(pVector);
LVectorObject VectorObject(pObject, &VectorBase);
LVectorObject ResultObject;

m_pVectorDst->CopyObject(NULL, &ResultObject, &VectorObject);

L_INT nType = ResultObject.GetType();
switch (nType)
{
case VECTOR_VERTEX:
pszType = TEXT("VECTOR_VERTEX");
break;

case VECTOR_LINE:
pszType = TEXT("VECTOR_LINE ");
break;

case VECTOR_RECTANGLE :
pszType = TEXT("VECTOR_RECTANGLE ");
break;

case VECTOR_POLYLINE :
pszType = TEXT("VECTOR_POLYLINE ");
break;

case VECTOR_POLYBEZIER :
pszType = TEXT("VECTOR_POLYBEZIER ");
break;

case VECTOR_POLYGON :
pszType = TEXT("VECTOR_POLYGON ");
break;

case VECTOR_ELLIPSE :
pszType = TEXT("VECTOR_ELLIPSE ");
break;

case VECTOR_CIRCLE :
pszType = TEXT("VECTOR_CIRCLE ");
break;

case VECTOR_ARC :
pszType = TEXT("VECTOR_ARC ");
break;

case VECTOR_TEXT :
pszType = TEXT("VECTOR_TEXT ");
break;

case VECTOR_PIE :
pszType = TEXT("VECTOR_PIE ");
break;

case VECTOR_CHORD :
pszType = TEXT("VECTOR_CHORD ");
break;

case VECTOR_POLYDRAW :
pszType = TEXT("VECTOR_POLYDRAW ");
break;

case VECTOR_RASTER :
pszType = TEXT("VECTOR_RASTER ");
break;

case VECTOR_STOCK :
pszType = TEXT("VECTOR_STOCK ");
break;
}

MessageBox(NULL, pszType, TEXT(""), MB_OK);

VectorBase.SetHandle(NULL, FALSE);
return SUCCESS ;
}

L_VOID Example93(HWND hWnd, LVectorBase *pVectorDst)
{
//Load a source vector
LVectorBase VectorSrc;
VectorSrc.Load (TEXT("square3.dxf"));

//Get the active layer of source
LMyVectorLayer4 VectorLayer;
VectorSrc.GetActiveLayer(&VectorLayer);

//Set the destination vector where objects from source will be copied
VectorLayer.m_pVectorDst = pVectorDst;

//Enumerate all objects in Active layer (and copy to dest vector)
VectorLayer.EnumObjects();
}

This example is for LVectorBase::CopyObject(pObjectSrc).

// This example copies all objects from the active layer of the vector
//source to the destination vector (active layer)
class LMyVectorLayer: public LVectorLayer
{
public:
LVectorBase *m_pVectorDst;

public:
LMyVectorLayer() {};
virtual ~LMyVectorLayer(){};
virtual L_INT EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

L_INT LMyVectorLayer::EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
LVectorBase VectorBase(pVector);
LVectorObject VectorObject(pObject, &VectorBase);
m_pVectorDst->CopyObject(&VectorObject);
VectorBase.SetHandle(NULL, FALSE);
return SUCCESS ;
}

L_VOID Example76(HWND hWnd, LVectorBase *pVectorDst)
{
//Load a source vector
LVectorBase VectorSrc;
VectorSrc.Load(TEXT("square3.dxf"));

//Get the active layer of source
LMyVectorLayer VectorLayer;
VectorSrc.GetActiveLayer(&VectorLayer);

//Set the destination vector where objects from source will be copied
VectorLayer.m_pVectorDst = pVectorDst;

//Enumerate all objects in Active layer (and copy to dest vector)
VectorLayer.EnumObjects();
}


LVectorBase::CopyToClipboard

#include "ltwrappr.h"

virtual L_INT LVectorBase::CopyToClipboard(hWnd=NULL, dwFlags=0)

HWND hWnd; | /* handle to the active window */
L_UINT32 dwFlags; | /* copy flags */

Copies vector data from the class object's associated vector handle to the clipboard.

Parameter | Description
hWnd | Handle to the active window.
dwFlags | Flag that indicates the objects to copy. Possible values are:
 | Value | Meaning
 | 0 | Copy all layers and objects from the source vector to the clipboard.
 | VECTOR_FLAGS_SELECTED_ONLY | Copy only selected objects from the source vector to the clipboard.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function first empties the clipboard, then copies the vector data to it.

To determine whether valid vector data is on the clipboard, call LVectorBase::IsClipboardReady.

To copy vector data from the clipboard to a vector handle, call LVectorBase::CopyFromClipboard.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::IsClipboardReady, LVectorBase::CopyFromClipboard.
Topics: | Using the Clipboard

Example

//This example copies an entire vector image to the clipboard.
L_VOID Example66(HWND hWnd)
{

LVectorBase Vector;
Vector.Load(TEXT("random.dxf"));
Vector.CopyToClipboard(hWnd);
}


LVectorBase::DeleteObject

#include "ltwrappr.h"

virtual L_INT LVectorBase::DeleteObject(dwFlags=0)

L_UINT32 dwFlags;

/* flag that indicates which objects to delete */

Deletes objects from a vector image.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
dwFlags | Flag that indicates which objects to delete. Possible values are:
 | Value | Meaning
 | 0 | Delete all objects.
 | VECTOR_FLAGS_SELECTED_ONLY | Delete only the currently selected objects within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments7

Deletes all or part of the vector image.

Note: When you delete a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind vertices mode set by LVectorBase::SetBindVerticesMode.

Note: In DirectX, you cannot delete objects, therefore this function does nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::DeleteObject
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Modifying Vector Object Characteristics

Example

//This example deletes all objects in a vector.
L_VOID Example122(HWND hWnd, LVectorBase *pVector)
{
LVectorBase Vector;

Vector.Load(TEXT("test.dxf"));
Vector.DeleteObject();
}


LVectorBase::Empty

#include "ltwrappr.h"

virtual L_INT LVectorBase::Empty(L_VOID)

Deletes all layers and objects from the class object's associated vector.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Calling this function will not affect other settings such as camera, transformation, etc.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::IsEmpty, LVectorBase::Copy, LVectorFile::LoadFile, LVectorBase::AddLayer, LVectorBase::AddObject
Topics: | Working with Vector Handles

Example

//This example removes all layers and objects
L_VOID Example61()
{
LVectorBase Vector;
Vector.Load(TEXT("test.dxf"));
L_BOOL bEmpty;
L_TCHAR *pszMsg;

Vector.IsEmpty(&bEmpty);
pszMsg = bEmpty? TEXT("Vector is Empty"): TEXT("Vector has layers/objects");
MessageBox(NULL, pszMsg, NULL, MB_OK);

Vector.Empty();
Vector.IsEmpty(&bEmpty);
pszMsg = bEmpty? TEXT("Vector is Empty"): TEXT("Vector has layers/objects");
MessageBox(NULL, pszMsg, NULL, MB_OK);
}


LVectorBase::EnableAlwaysEndNotification

#include "ltwrappr.h"

virtual L_BOOL LVectorBase::EnableAlwaysEndNotification(bEnable=TRUE)

L_BOOL bEnable;

/* flag that indicates whether to allow the calling of the LVectorBase::EndChanging member function */

Enables or disables the calling of the LVectorBase::EndChanging member function.

Parameter | Description
bEnable | Flag that indicates whether to enable or disable the calling of the LVectorBase::EndChanging member function if the operation on the bitmap failed. Possible values are:
 | Value | Meaning
 | TRUE | The LVectorBase::EndChanging() member function will be called even if the operation function returned an error code.
 | FALSE | The LVectorBase::EndChanging() member function will not be called if the operation function fails.

Returns

The previous setting.

Comments

Call this function to enable or disable the calling of the LVectorBase::EndChanging function if the operation on the bitmap failed. The EndChanging function is normally called only if the operation was successful. Calling EnableAlwaysEndNotification with bEnable = TRUE will cause the EndChanging() member function to be called even if the operation function returned an error code.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::StartChanging, LVectorBase::EndChanging, LVectorBase::EnableChangeNotification, LVectorBase::IsChangeNotificationEnabled, LVectorBase::IsAlwaysEndNotification, Class Members
Topics: | Vector Notification Messages
 | Vector Images: Change Notification

Example

class LMyVector: public LVectorBase
{
private:
L_BOOL m_bChanged;
virtual L_INT StartChanging(L_UINT nChangeType,L_UINT nChangeCategory);
virtual L_VOID EndChanging(L_UINT nChangeType,L_UINT nChangeCategory,L_INT nRetCode);
};

L_INT LMyVector::StartChanging(L_UINT nChangeType,L_UINT nChangeCategory)
{
switch(nChangeType)
{
case NC_VECTOR_ROTATE:
MessageBox(NULL, TEXT("StartChanging: NC_VECTOR_ROTATE"), TEXT(""), MB_OK);
break;

case NC_VECTOR_TRANSLATE:
MessageBox(NULL, TEXT("StartChanging: NC_VECTOR_TRANSLATE"), TEXT(""), MB_OK);
break;

case NC_VECTOR_SCALE:
MessageBox(NULL, TEXT("StartChanging: NC_TRANSFORM_SCALE"), TEXT(""), MB_OK);
break;

/*
case ….:
do other things
*/
}
return(LVectorBase::StartChanging(nChangeType,nChangeCategory));
}

L_VOID LMyVector::EndChanging(L_UINT nChangeType,L_UINT nChangeCategory,L_INT nRetCode)
{
switch(nChangeType)
{
case NC_VECTOR_ROTATE:
MessageBox(NULL, TEXT("EndChanging: NC_VECTOR_ROTATE"), TEXT(""), MB_OK);
if(nRetCode==SUCCESS)
m_bChanged=TRUE;
break;

case NC_VECTOR_TRANSLATE:
MessageBox(NULL, TEXT("EndChanging: NC_VECTOR_TRANSLATE"), TEXT(""), MB_OK);
if(nRetCode==SUCCESS)
m_bChanged=TRUE;
break;

case NC_VECTOR_SCALE:
MessageBox(NULL, TEXT("EndChanging: NC_VECTOR_SCALE"), TEXT(""), MB_OK);
if(nRetCode==SUCCESS)
m_bChanged=TRUE;
break;

/*
case ….:
do other things
*/
}
LVectorBase::EndChanging(nChangeType,nChangeCategory,nRetCode);
}

//L_VOID Example5(HWND hWnd, LMyVector *pMyVector)
L_VOID Example5(HWND hWnd, LVectorBase *pMyVector)
{

if (!pMyVector->IsChangeNotificationEnabled())
{
MessageBox(hWnd, TEXT("ChangeNotification NOT enabled. Enabling..."), TEXT(""), MB_OK);
pMyVector->EnableChangeNotification();
}

if (!pMyVector->IsAlwaysEndNotification())
{
MessageBox(hWnd, TEXT("EndNotification NOT enabled. Enabling..."), TEXT(""), MB_OK);
pMyVector->EnableAlwaysEndNotification();
}

//Change rotation
VECTORPOINT rotatePoint;
pMyVector->GetRotation(&rotatePoint);
rotatePoint.x += 30.0F;
rotatePoint.y -= 20.0F;
rotatePoint.z += 50.0F;
pMyVector->SetRotation(&rotatePoint);

//Change translation
VECTORPOINT translatePoint;
pMyVector->GetTranslation(&translatePoint);
translatePoint.x += 0.5F;
pMyVector->SetTranslation(&translatePoint);

//Change scale
VECTORPOINT scalePoint;
pMyVector->GetScale(&scalePoint);
scalePoint.x *= 0.5F;
scalePoint.y *= 0.5F;
scalePoint.z *= 0.5F;
pMyVector->SetScale(&scalePoint);
}


LVectorBase::EnableChangeNotification

#include "ltwrappr.h"

virtual L_BOOL LVectorBase::EnableChangeNotification(bEnable=TRUE)

L_BOOL bEnable;

/* flag that indicates whether to enable change notifications */

Enables or disables the sending of change notifications.

Parameter | Description
bEnable | Flag that indicates whether to enable or disable the change notifications. Possible values are:
 | Value | Meaning
 | TRUE | Enable the change notifications.
 | FALSE | Disable the change notifications.

Returns

The previous setting.

Comments

Call this function to enable or disable the sending of change notifications. Disabling the change notifications will speed up your code because the notification functions will not be called. However, this will prevent you from having control over the different operations that are performed on the bitmap.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::StartChanging, LVectorBase::EndChanging, LVectorBase::IsChangeNotificationEnabled, LVectorBase::EnableAlwaysEndNotification, LVectorBase::IsAlwaysEndNotification, Class Members
Topics: | Vector Notification Messages
 | Vector Images: Change Notification

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::EnableFileName

#include "ltwrappr.h"

L_BOOL LVectorBase::EnableFileName(bEnableFileName=TRUE)

L_BOOL bEnableFileName;

/* flag that indicates whether to enable the file name */

Enables or disables use of the internal filename.

Parameter | Description
bEnableFileName | Flag that indicates whether to enable the file name. Possible values are:
 | Value | Meaning
 | TRUE | Enable the file name.
 | FALSE | Disable the file name.

Returns

The previous setting.

Comments

Call this function to enable or disable use of the internal filename. Enabling use of the internal filename will cause automatic transferring of the file name when using the LDialog and the LFile classes for loading and saving files.

The internal filename is used in two ways:

1) If use of the internal filename is enabled when using LDialog and LFile classes, then setting or changing the file name in these classes will cause the changed filename to be transferred to the LVectorBase object automatically.

2) If use of the internal filename is not enabled then no automatic transferring of filename will be done the caller is responsible for maintaining the filename for the image.

The default setting is TRUE.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetFileName, LVectorBase::SetFileName, Class Members
Topics: | Vector Images: Getting and Setting General Information

Example

For an example, refer to LVectorBase::IsFileNameEnabled.


LVectorBase::EnableFontMapper

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnableFontMapper (bEnable)

L_BOOL bEnable;

/* flag that indicates whether to enable the font mapper */

Enable a font mapper for the vector handle

Parameter | Description
bUseLights | Flag that indicates whether to enable the font mapper. Possible values are:
 | Value | Meaning
 | TRUE | Enable a font mapper for the vector handle.
 | FALSE | Do not enable a font mapper for the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will enable or disable a font mapper for the vector handle; the user can modify or replace the font before allowing the toolkit to use it.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::IsFontMapperEnabled, LVectorBase::VectorFontMapperCallBack
Topics: | Mapping Fonts

Example

For an example, refer to LVectorBase::IsFontMapperEnabled.


LVectorBase::EndChanging

#include "ltwrappr.h"

virtual L_VOID LVectorBase::EndChanging(nChangeType, nChangeCategory, nRetCode)

L_UINT nChangeType; | /* the type of change */
L_UINT nChangeCategory; | /* the change category */
L_INT nRetCode; | /* the function return code */

This function is called by every function that affects the bitmap.

Parameter | Description
nChangeType | The type of change that was done to the bitmap. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .
nChangeCategory | The change category. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .
nRetCode | The function return code.

Returns

None

Comments

This function is called by every function that affects the vector. You can override this function to be notified when the operation has completed changing the vector. This function is called after the changes to the vector have been made. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::StartChanging, LVectorBase::EnableChangeNotification, LVectorBase::IsChangeNotificationEnabled, LVectorBase::EnableAlwaysEndNotification, LVectorBase::IsAlwaysEndNotification, Class Members
Topics: | Vector Notification Messages
 | Vector Images: Change Notification

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::EnumGroups

#include "lvkrn.h"

virtual L_INT LVectorBase::EnumGroups()

Enumerates all groups inside the class object's associated vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorBase::EnumGroups function calls the LVectorBase::EnumGroupsCallback function as it gets a pointer to each vector group.

To use the LVectorBase::EnumGroupsCallBack function, you must derive a class from LVectorBase and override the LVectorBase::EnumGroupsCallBack member function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnumGroupsCallBack
Topics: | Working with Vector Groups

Example

//Example136
// This example enumerates through all groups in a vector
class LMyVectorBase5: public LVectorBase
{
public:
L_INT m_nGroupCount ;

public:
LMyVectorBase5() {m_nGroupCount=0;};
virtual ~LMyVectorBase5(){};
virtual L_INT EnumGroupsCallBack(pVECTORHANDLE pVector, pVECTORGROUP pGroup);
};

L_INT LMyVectorBase5::EnumGroupsCallBack(pVECTORHANDLE pVector, pVECTORGROUP pGroup)
{
LVectorGroup VectorGroup(pGroup, this);
L_TCHAR szMsg[100];
m_nGroupCount++;

VECTORGROUPDESC GroupDesc;
VectorGroup.GetGroupDesc(&GroupDesc);
wsprintf(szMsg, TEXT("Group\nName[%s]\nSize[%d]"),
GroupDesc.szName,
GroupDesc.nSize
);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
return SUCCESS ;
//...LVectorGroup destructor called when VectorGroup goes out of scope
}

L_VOID Example136(HWND hWnd, LMyVectorBase5 *pMyVector)
{
LMyVectorBase5 MyVector;
L_TCHAR szMsg[100];

pMyVector->m_nGroupCount=0;
pMyVector->EnableCallBack(TRUE);
pMyVector->EnumGroups();
wsprintf(szMsg, TEXT("Total Groups[%d]"), pMyVector->m_nGroupCount);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
}


LVectorBase::EnumGroupsCallBack

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumGroupsCallBack(pVector, pGroup)

pVECTORHANDLE pVector; | /* pointer to a vector handle */
pVECTORGROUP pGroup; | /* pointer to a vector group */

Processes each vector group enumerated by the LVectorBase::EnumGroups function.

Parameter | Description
pVector | Pointer to the vector handle that contains the groups to enumerate.
pGroup | Pointer to the vector group being processed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorBase::EnumGroups function calls the callback function as it gets a pointer to each vector group.

To use LVectorBase::EnumGroupsCallBack, derive a class from LVectorBase and override the EnumGroupsCallBack member function. Note that this callback function does not return an LVectorGroupobject.

To get detailed information about each enumerated group, attach pGroup to an LVectorGroup class object and call LVectorGroup::GetGroupDesc.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions | LVectorBase::EnumGroups
Topics: | Working with Vector Groups

Example

For an example, refer to LVectorBase::EnumGroups.


LVectorBase::EnumLayers

#include "ltwrappr"

virtual L_INT LVectorBase::EnumLayers(L_VOID)

Enumerates all layers inside the class object's associated vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorBase::EnumLayers function calls the LVectorBase::EnumLayersCallBack function as it gets a pointer to each vector layer.

To use the LVectorBase::EnumLayersCallBack, you must derive a class from LVectorBase and override the LVectorBase::EnumLayersCallBack member function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnumLayersCallBack, Class Members
Topics: | Working with Vector Layers

Example

// This example enumerates through all layers in a vector.
class LMyVectorBase4: public LVectorBase
{
public:
L_INT m_nLayerCount ;

public:
LMyVectorBase4() {m_nLayerCount=0;};
virtual ~LMyVectorBase4(){};
virtual L_INT EnumLayersCallBack(pVECTORHANDLE pVector, pVECTORLAYER pLayer);
};

L_INT LMyVectorBase4::EnumLayersCallBack(pVECTORHANDLE pVector, pVECTORLAYER pLayer)
{
LVectorLayer VectorLayer(pLayer, this);
L_TCHAR szMsg[100];
m_nLayerCount++;

VECTORLAYERDESC LayerDesc;
VectorLayer.GetLayerDesc(&LayerDesc);
wsprintf(szMsg, TEXT("Layer\nName[%s]\nSize[%d]\nLocked[%d]\nVisible[%d]"),
LayerDesc.szName,
LayerDesc.nSize,
LayerDesc.bLocked,
LayerDesc.bVisible
);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
return SUCCESS ;
//...LVectorLayer destructor called when VectorLayer goes out of scope
}

L_VOID Example74(HWND hWnd, LMyVectorBase4 *pMyVector)
{
LMyVectorBase4 MyVector;
L_TCHAR szMsg[100];

pMyVector->m_nLayerCount=0;
pMyVector->EnableCallBack(TRUE);
pMyVector->EnumLayers();
wsprintf(szMsg, TEXT("Total Layers[%d]"), pMyVector->m_nLayerCount);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
}


LVectorBase::EnumLayersCallBack

#include "ltwrappr"

virtual L_INT LVectorBase::EnumLayersCallBack(pVector, pLayer)

pVECTORHANDLE pVector; | /* pointer to a vector handle */
pVECTORLAYER pLayer; | /* pointer to a vector layer */

Processes each vector layer enumerated by the LVectorBase::EnumLayers function.

Parameter | Description
pVector | Pointer to the vector handle that contains the layers to enumerate.
pLayer | Pointer to the vector layer being processed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorBase::EnumLayers function calls the callback function as it gets a pointer to each each vector layer.

To use the LVectorBase::EnumLayersCallBack, you must derive a class from LVectorBase and override the LVectorBase::EnumLayersCallBack member function. Note that this callback does not return an LVectorLayer object.

You can attach pLayer to an LVectorLayer class object and call LVectorLayer::GetLayerDesc to get detailed information about each enumerated layer.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::EnumLayers

Example

For an example, refer to LVectorBase::EnumLayers


LVectorBase::EnumObjects

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumObjects(L_VOID)

Enumerates all objects inside the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will enumerate all the objects in the vector.

Note: In DirectX, you cannot enumerate objects, therefore this function will do nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnumVertices
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

For an example, refer to LVectorObject::IsObjectInsideParallelogram.


LVectorBase::EnumObjectsCallBack

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumObjectsCallBack(pVector, pObject)

pVECTORHANDLE pVector; | /* pointer to a vector handle */
pVECTOROBJECT pObject; | /* pointer to a vector Object */

Processes each vector object enumerated by the LVectorBase::EnumObjects function.

Parameter | Description
pVector | Pointer to the vector image containing the objects to enumerate.
pObject | Pointer to the vector object being processed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorBase::EnumObjects function calls your callback function as it gets the handle of each vector object.

To use this function, you must do the following:

1. Derive a class from LVectorBase.

2. Override the L_INT LVectorBase::EnumObjectsCallBack. Function in your class.

3. Before calling LVectorBase::EnumObjects, you must call the member function LBase::EnableCallBack (TRUE).

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnumObjects
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

For an example, refer to LVectorObject::IsObjectInsideParallelogram.


LVectorBase::EnumVertices

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumVertices(L_UINT32 dwFlags=0)

L_UINT32 dwFlags;

/* flags that determine which object's flags to enumerate */

Enumerates all vertices within the vector handle.

Parameter | Description
dwFlags | Flags that determine which object's vertices to enumerate. Possible values are:
 | Value | Meaning
 | 0 | Enumerate the vertices of all objects.
 | VECTOR_FLAGS_SELECTED_ONLY | Enumerate the vertices of selected objects only.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will enumerate all the vertices in the given vector.

Note: In DirectX, you cannot enumerate vertices, therefore this function will do nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnumObjects
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

class LMyVectorBase2: public LVectorBase
{
public:
L_INT m_nObjectCount ;

public:
LMyVectorBase2();
virtual ~LMyVectorBase2() ;
virtual L_INT EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint);
};

LMyVectorBase2::LMyVectorBase2()
{
m_nObjectCount = 0 ;
}

LMyVectorBase2::~LMyVectorBase2()
{
}

L_INT LMyVectorBase2::EnumVerticesCallBack(pVECTORHANDLE pVector, pVECTORPOINT pPoint)
{
m_nObjectCount++ ;
return SUCCESS ;
}

L_VOID Example17(HWND hWnd)
{
L_TCHAR szTemp[100];
LMyVectorBase2 Vector;
Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

//Get the total number of vertices
Vector.m_nObjectCount=0;
Vector.EnableCallBack (TRUE);
Vector.EnumVertices();
wsprintf(szTemp, TEXT("Total Vertices in Vector: %d\n"), Vector.m_nObjectCount);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorBase::EnumVerticesCallBack

#include "ltwrappr.h"

virtual L_INT LVectorBase::EnumVerticesCallBack(pVector, pObject)

pVECTORHANDLE pVector; | /* pointer to a vector handle */
pVECTOROBJECT pObject; | /* pointer to a vector Object */

Processes each vertex enumerated by the LVectorBase::EnumVertices function.

Parameter | Description
pVector | Pointer to the vector image containing the objects to enumerate.
pObject | Pointer to the vector object being processed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorBase::EnumVertices function calls your callback function as it gets the handle of each vector object.

To use this function, you must do the following:

1. Derive a class from LVectorBase.

2. Override the L_INT LVectorBase::EnumVerticesCallBack. Function in your class.

3. Before calling LVectorBase::EnumVertices, you must call the member function LBase::EnableCallBack (TRUE).

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnumVertices
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

For an example, refer to LVectorBase::EnumVertices.


LVectorBase::Event

#include "lvkrn.h"

virtual L_INT LVectorBase::Event(pEvent)

pVECTOREVENT pEvent;

/* pointer to a structure */

Implements a user-defined event.

Parameter | Description
pEvent | Pointer to a VECTOREVENT structure that describes the event that has occurred inside the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function provides a means of grouping numerous operations into one event. This function must be called twice. In the first call to this function the Status member of the VECTOREVENT structure must be set to VECTOR_EVENT_STATUS_BEFORE. This allows any callback currently installed to cancel the operation. The return value for this function will be the return value of the callback function.

The second call to this function is made after the operation(s) have been completed. The Status member of the VECTOREVENT structure must be set to VECTOR_EVENT_STATUS_AFTER to notify the vector toolkit that the operation(s) have been completed successfully.

For information on the types of events the vector handle can generate, refer to the VECTOREVENT structure.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::VectorEventProcCallback
Topics: | Vector Handle Events

Example

For an example, refer to LVectorBase::VectorEventProcCallBack.


LVectorBase::ExplodeObject

#include "ltwrappr.h"

virtual L_INT LVectorBase::ExplodeObject(dwFlags=0)

L_UINT32 dwFlags;

/* flag that indicates how to explode the object */

Explodes all or part of the vector image.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
dwFlags | Flag that indicates which objects to explode. Possible values are:
 | Value | Meaning
 | 0 | Explode all objects.
 | VECTOR_FLAGS_SELECTED_ONLY | Explode only the currently selected objects within the vector handle.
 | VECTOR_FLAGS_EXPLODE_TO_LINES | Explode objects into lines.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Note: In DirectX objects cannot be exploded, therefore this function does nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::ExplodeObject
Topics: | Working with Vector Objects

Example

//This example explodes all objects in a vector.
L_VOID Example122(HWND hWnd, LVectorBase *pVector)
{
LVectorBase Vector;

Vector.Load(TEXT("test.dxf"));
Vector.ExplodeObject();
}


LVectorBase::Free

#include "ltwrappr.h"

virtual L_INT LVectorBase::Free(void)

Frees the memory allocated for the vector data.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call this function to free the memory allocated for the vector data. This function should be called when your program no longer needs the vector data. If the vector was allocated in disk memory, this function deletes the temporary file. If the vector has a palette, it will be deleted. After this function returns, the internal vector handle will be invalidated.

Note: You do not have to call LVectorBase::Free unless you explicitly want to free the memory. The class object will automatically free the vector when it is destroyed.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Modifying Vector Object Characteristics

Example

L_VOID Example7(HWND hWnd)
{
LVectorBase * pVector = new(LVectorBase);

pVector->Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

//do some stuff

//Free the vector
pVector->Free();
}


LVectorBase::GetActiveLayer

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetActiveLayer(pVectorLayer);

LVectorLayer * pVectorLayer;

/* pointer to vector layer object */

Gets the active layer inside the class object's vector.

Parameter | Description
pVectorLayer | Pointer to an LVectorLayer object to be updated with the active layer.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Some functions will use the active layer when NULL is passed for a pLVectorLayer parameter. This makes it easier to work with the toolkit when layers are not needed.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetActiveLayer.
Topics: | Working with Vector Layers

Example

// This example copies all objects from the active layer of the vector source
// to the destination vector (active layer)
class LMyVectorLayer: public LVectorLayer
{
public:
LVectorBase *m_pVectorDst;

public:
LMyVectorLayer() {};
virtual ~LMyVectorLayer(){};
virtual L_INT EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

L_INT LMyVectorLayer::EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
LVectorBase VectorBase(pVector);
LVectorObject VectorObject(pObject, &VectorBase);
m_pVectorDst->CopyObject(&VectorObject);
VectorBase.SetHandle(NULL, FALSE);
return SUCCESS ;
}

L_VOID Example76(HWND hWnd, LVectorBase *pVectorDst)
{
//Load a source vector
LVectorBase VectorSrc;
VectorSrc.Load(TEXT("square3.dxf"));

//Get the active layer of source
LMyVectorLayer VectorLayer;
VectorSrc.GetActiveLayer(&VectorLayer);

//Set the destination vector where objects from source will be copied
VectorLayer.m_pVectorDst = pVectorDst;

//Enumerate all objects in Active layer (and copy to destination vector)
VectorLayer.EnumObjects();
}


LVectorBase::GetAmbientColor

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetAmbientColor(pColor)

L_COLOR L_FAR *pColor;

/* pointer to a variable to be updated */

Gets the ambient (room) light used when drawing a vector image.

Parameter | Description
pColor | Pointer to an L_COLOR variable to be updated with the ambient light.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will only be effective if the use of lights has been enabled using LVectorBase::SetUseLights.

The default ambient light is white (RGB(255, 255, 255)).

This function has no effect in the GDI engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetAmbientColor, LVectorBase::SetUseLights, LVectorBase::GetUseLights, LVectorBase::SetEngine
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::SetAmbientColor.


LVectorBase::GetBackgroundColor

#include "ltwrappr.h"

L_INT LVectorBase::GetBackgroundColor(pColor)

L_COLOR L_FAR *pColor;

/* pointer to a variable to be updated */

Gets the current background color.

Parameter | Description
pColor | Pointer to an L_COLOR variable to be updated with the background color.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function returns the current background color. If LVectorBase::Paint is called with the bEraseBkgnd parameter set t o TRUE, this is the color that is used to erase the background.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetBackgroundColor, LVectorBase::Paint, LVectorBase::AttachToWindow
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

L_VOID Example10(HWND hWnd)
{
L_COLOR color;
L_TCHAR szTemp[100];
LVectorBase Vector;
Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

Vector.GetBackgroundColor(&color);
wsprintf(szTemp, TEXT("Old Background color: %x"), color);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);

Vector.SetBackgroundColor(RGB(100,100,0));
wsprintf(szTemp, TEXT("New Background color: %x"), color);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorBase::GetBindVerticesMode

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetBindVerticesMode(L_VOID)

Gets the current vertices bind mode for a vector handle.

Returns

An L_INT value that represents the Vertices bind mode for the specified vector handle. Possible values are:

Value | Meaning
VECTOR_BIND_VERTICES | Vertices are bound. If changes occur to an object, all other objects sharing vertices with that object will be changed too.
VECTOR_UNBIND_VERTICES | Vertices are not bound. If changes occur to an object, Other objects sharing vertices with that object will not be effected.

Comments

Default mode is VECTOR_BIND_VERTICES.

This function will have no effect in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetBindVerticesMode, LVectorBase::SetScale, LVectorBase::SetRotation, LVectorBase::SetTranslation
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

L_VOID Example19(HWND hWnd)
{
LVectorBase Vector;

Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
if( Vector.GetBindVerticesMode() == VECTOR_BIND_VERTICES )
Vector.SetBindVerticesMode(VECTOR_UNBIND_VERTICES );
else
Vector.SetBindVerticesMode(VECTOR_BIND_VERTICES );
}


LVectorBase::GetCamera

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetCamera(pVectorCamera)

pVECTORCAMERA pVectorCamera;

/* pointer to a structure */

Gets the current camera values.

Parameter | Description
pVectorCamera | Pointer to a VECTORCAMERA structure to be updated with the current camera values.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will get the current viewing camera.

The camera is used with the view port to determine how the drawing will be projected into the destination DC when using LVectorBase::Paint.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetCamera, LVectorBase::Paint
Topics: | Manipulating the Camera
 | Vector Images: Viewing a Vector Image

Example

/* LVectorBase::GetCamera() */
/* LVectorBase::SetCamera() */
//
/* Example14*/
L_VOID Example14(HWND hWnd)
{
VECTORCAMERA camera;
L_TCHAR szTemp[300];
LVectorBase Vector;

Vector.Load(TEXT("test.dxf"));

Vector.GetCamera(&camera);

wsprintf( szTemp,
TEXT("New Camera\nTheta[%f]\nPhi[%f]\nLookAt[%f,%f,%f]\nDistance[%lf]\nPerspective[%s]"),
camera.Theta,
camera.Phi,
camera.LookAt.x,
camera.LookAt.y,
camera.LookAt.z,
camera.Distance,
camera.bPerspective? TEXT("TRUE"): TEXT("FALSE")
);

MessageBox(hWnd, szTemp, TEXT(""), MB_OK);

camera.Theta +=20;
Vector.SetCamera(&camera);

wsprintf( szTemp,
TEXT("New Camera\nTheta[%f]\nPhi[%f]\nLookAt[%f,%f,%f]\nDistance[%lf]\nPerspective[%s]"),
camera.Theta,
camera.Phi,
camera.LookAt.x,
camera.LookAt.y,
camera.LookAt.z,
camera.Distance,
camera.bPerspective? TEXT("TRUE"): TEXT("FALSE")
);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorBase::GetDisplayOptions

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetDisplayOptions(pOptions)

pVECTOR_DISPLAY_OPTIONS pOptions;

/* pointer to the display options structure */

This function retrieves the current display options.

Parameter | Description
pOptions | Pointer to the VECTOR_DISPLAY_OPTIONS structure to be updated with the display options.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetDisplayOptions, LVectorBase::InvertColors
Topics: | Vector Images: Viewing a Vector Image
 | Viewing Vector Images.

Example

void CVectorView::OnPreferencesChangeClipmode()
{
CVectorDoc *pDoc;
VECTOR_DISPLAY_OPTIONS Options;

pDoc = GetDocument( );
pDoc->m_pVectorWindow->GetDisplayOptions( &Options );

Options.nClipMode = m_nNewClipMode;
pDoc->m_pVectorWindow->SetDisplayOptions( &Options );
}


LVectorBase::GetEngine

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetEngine(L_VOID)

Gets the current vector engine.

Returns

The current vector engine. Possible values are:

Value | Meaning
VECTOR_ENGINE_GDI | Use GDI rendering. (No lights and shading).
VECTOR_ENGINE_OPENGL | Use OpenGL rendering.

Comments

Returns the current vector engine.

The default vector engine is the GDI.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetEngine
Topics: | Getting and Setting Global Vector Properties
 | Vector Images: Viewing a Vector Image
 | Vector Images: Getting and Setting General Information

Example

//Example23
L_VOID Example23(HWND hWnd)
{
L_TCHAR L_FAR *lpszTemp;

LVectorBase Vector;
Vector.Load(TEXT("test.dxf"));
Vector.AttachToWindow(hWnd);

L_INT nEngine = Vector.GetEngine();
switch(nEngine)
{
case VECTOR_ENGINE_GDI:
lpszTemp = TEXT("VECTOR_ENGINE_GDI");
break;
case VECTOR_ENGINE_OPENGL:
lpszTemp = TEXT("VECTOR_ENGINE_OPENGL");
break;
}
MessageBox(hWnd, lpszTemp, TEXT(""), MB_OK);
}


LVectorBase::GetFileName

#include "ltwrappr.h"

L_INT LVectorBase::GetFileName(pszBuffer, puBuffSize)

L_TCHAR L_FAR * pszBuffer; | /* buffer to be updated with the file name */
L_UINT L_FAR * puBuffSize; | /* the size of the buffer */

Gets the internal file name used by the vector.

Parameter | Description
pszBuffer | The buffer to be updated with the file name. If you pass NULL then the required size will be returned in puBuffSize.
puBuffSize | Pointer to a variable to be updated with the required size of pszBuffer.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call this function to get the internal file used by the vector.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Getting and Setting General Information

Example

For an example, refer to LVectorBase::IsFileNameEnabled.


LVectorBase::GetGroupByIndex

#include "lvkrn.h"

virtual L_INT LVectorBase::GetGroupByIndex(nIndex, pVectorGroup)

const L_INT nIndex; | /* Index */
LVectorGroup pVectorGroup; | /* pointer to a vector group object */

Gets the group at the specified index in the class object's vector handle.

Parameter | Description
nIndex | Index of the requested group. This index is zero-based. Possible values are between 0 and LVectorBase::GetGroupCount - 1.
pVectorGroup | Pointer to an LVectorGroup object to be updated, if the group is found. If the group is not found, this function will return ERROR_VECTOR_GROUP_NOT_FOUND.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To determine the number of groups in a vector handle, call LVectorBase::GetGroupCount.

To get a group, given the name of the group, use LVectorBase::GetGroupByName.

To get group information for a specific group, call LVectorGroup::GetGroupDesc.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetGroupCount, LVectorBase::GetGroupByName, LVectorGroup::GetGroupDesc
Topics: | Working with Vector Groups

Example

For an example, refer to LVectorDialog::DoModalVectorEditGroup.


LVectorBase::GetGroupByName

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetGroupByName(pszName, pVectorGroup)

const L_TCHAR L_FAR * pszName; | /* group name */
LVectorGroup *pVectorGroup; | /* pointer to a vector group object */

Gets the group with the specified name, in the class object's associated vector handle.

Parameter | Description
pszName | Character string that contains the name of the group to get.
pGroup | Pointer to an LVectorGroup object to be updated with the group handle, if the group is found. If the group is not found, this function will return ERROR_VECTOR_GROUP_NOT_FOUND.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If two or more groups in a vector handle have the same name, this function will get the first group found.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetGroupCount, LVectorBase::GetGroupByIndex, LVectorGroup::GetGroupDesc
Topics: | Working with Vector Groups

Example

// This example will delete all clones of the named group from pVector
L_VOID Example134(HWND hWnd, LVectorBase *pVector)
{
LVectorGroup VectorGroup;
L_INT nRet;
L_TCHAR *pszName = TEXT("TerryGroup1");

// Get the group with the given name
nRet = pVector->GetGroupByName(pszName, &VectorGroup );
if( nRet = SUCCESS )
{
// Delete its clones
nRet = VectorGroup.DeleteGroupClones();
}
}


LVectorBase::GetGroupCount

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetGroupCount()

Returns the number of groups inside the vector handle.

Returns

Number of groups.

Comments

After calling this function, LVectorBase::GetGroupByIndex can be used to iterate through the groups in a vector handle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetGroupByName, LVectorBase::GetGroupByIndex, LVectorGroup::GetGroupDesc
Topics: | Working with Vector Groups

Example

//Example133

// This example will copy the first group (and objects) from a vector into pVector
L_VOID Example133(HWND hWnd, LVectorBase *pVector)
{
L_TCHAR szMsg[100];
LVectorGroup VectorGroup;
L_INT nRet, nCount;

//Load a source vector
LVectorBase VectorSrc;
nRet = VectorSrc.Load(TEXT("d:\\work\\images\\dxf\\group.vec"));

nCount = VectorSrc.GetGroupCount ();
if (nCount > 0)
{
//Get first group of source
nRet = VectorSrc.GetGroupByIndex(0, &VectorGroup);
if (nRet == SUCCESS)
{
//Get the name of the first group.
VECTORGROUPDESC GroupDesc;
VectorGroup.GetGroupDesc(&GroupDesc);
wsprintf(szMsg, TEXT("Group Retrieved\nName[%s]"),GroupDesc.szName);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);

//Create new group in destination vector
LVectorGroup NewVectorGroup(&GroupDesc);
pVector->AddGroup(&NewVectorGroup);

//Copy group and objects into pVector active group
nRet = pVector->CopyGroup(&NewVectorGroup, &VectorGroup);
nRet = pVector->Save(TEXT("d:\\erase2.vec"), FILE_VECTOR_DUMP);
}
}
else
{
MessageBox(hWnd, TEXT("No groups in source"), TEXT(""), MB_OK);
}
}


LVectorBase::GetHandle

#include "ltwrappr.h"

pVECTORHANDLE LVectorBase::GetHandle(void)

Retrieves the internal LEAD vector handle for this LVectorBase class object.

Returns

A pointer to a vector handle.

Comments

Use this function to retrieve the internal LEAD vector handle for this LVectorBase class object. You can use this with any of the low level LEAD API functions that require a pVECTORHANDLE.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetHandle, Class Members
Topics: | Vector Images: Getting and Setting General Information

Example

L_VOID Example4(HWND hWnd)
{
LVectorBase VectorBase1, VectorBase2;

VectorBase1.SetFileName(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
VectorBase1.Load();

//This will make VectorBase2 use the vector in VectorBase1
VectorBase2.SetHandle(VectorBase1.GetHandle());
}


LVectorBase::GetHitTest

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetHitTest(pHitTest)

pVECTORHITTEST pHitTest;

/* pointer to a structure */

Gets the current hit test settings.

Parameter | Description
pHitTest | Pointer to a VECTORHITTEST structure to be updated with the current hit test settings.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The hit test settings determine the behavior of the hit test. The hit test itself is performed by calling LVectorBase::HitTest.

The hit test settings can be changed by calling LVectorBase::SetHitTest.

For more information on possible hit test settings, refer to the VECTORHITTEST structure.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetHitTest, LVectorBase::HitTest
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorBase::HitTest


LVectorBase::GetLayerByIndex

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetLayerByIndex(nIndex, pVectorLayer)

const L_INT nIndex; | /* layer index */
LVectorLayer * pVectorLayer; | /* pointer to a vector layer object */

Gets the layer at the specified index in the class object's vector handle.

Parameter | Description
nIndex | Index of the requested layer. This index is zero-based. Possible values are between 0 and LVectorBase::GetLayerCount - 1.
pVectorLayer | Pointer to an LVectorLayer object to be updated, if the layer is found. If the layer is not found, this function will return ERROR_VECTOR_LAYER_NOT_FOUND.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To determine the number of layers in a vector handle, call LVectorBase::GetLayerCount.

To get a layer, given the name of the layer, use LVectorBase::GetLayerByName.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetLayerCount, LVectorBase::GetLayerByName
Topics: | Working with Vector Layers

Example

// This example will get a layer by index.
L_VOID Example70(HWND hWnd, LVectorBase *pVector)
{
//LVectorBase Vector;
//Vector.Load("test.dxf");
LVectorLayer VectorLayer;
L_TCHAR szMsg[100];

//Get the first layer
L_INT nRet = pVector->GetLayerByIndex(0, &VectorLayer);
if (nRet == SUCCESS)
{
VECTORLAYERDESC LayerDesc;
VectorLayer.GetLayerDesc(&LayerDesc);
wsprintf(szMsg, TEXT("Layer Retrieved\nName[%s]\nSize[%d]\nLocked[%d]\nVisible[%d]"),
LayerDesc.szName,
LayerDesc.nSize,
LayerDesc.bLocked,
LayerDesc.bVisible
);
}
else
{
wsprintf(szMsg, TEXT("Layer Not Found"));
}
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
}


LVectorBase::GetLayerByName

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetLayerByName(pszName, pVectorLayer)

const L_TCHAR L_FAR *pszName; | /* layer name */
LVectorLayer * pVectorLayer; | /* pointer to a vector layer object */

Gets the layer with the specified name, in the class object's associated vector handle.

Parameter | Description
pszName | Character string that contains the name of the layer to get.
pVectorLayer | Pointer to an LVectorLayer object structure to be updated with the layer handle, if the layer is found. If the layer is not found, this function will return ERROR_VECTOR_LAYER_NOT_FOUND.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If two or more layers in a vector handle have the same name, this function will get the first layer found.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetLayerCount, LVectorBase::GetLayerByIndex
Topics: | Working with Vector Layers

Example

// This example will get a layer by name.
L_VOID Example69(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;
L_TCHAR szMsg[100];

//Get the layer called "Sphere3"
L_INT nRet = pVector->GetLayerByName(TEXT("Sphere3"), &VectorLayer);
if (nRet == SUCCESS)
{
VECTORLAYERDESC LayerDesc;
VectorLayer.GetLayerDesc(&LayerDesc);
wsprintf(szMsg, TEXT("Layer Retrieved\nName[%s]\nSize[%d]\nLocked[%d]\nVisible[%d]"),
LayerDesc.szName,
LayerDesc.nSize,
LayerDesc.bLocked,
LayerDesc.bVisible
);
}
else
{
wsprintf(szMsg, TEXT("Layer Not Found"));
}
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
}


LVectorBase::GetLayerCount

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetLayerCount(L_VOID)

Returns the number of layers inside the class object's associated vector handle.

Returns

L_INT Number of layers.

Comments

After calling this function, LVectorBase::GetLayerByIndex can be used to iterate through the layers in a vector handle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetLayerByName, LVectorBase::GetLayerByIndex
Topics: | Working with Vector Layers

Example

// This example gets the total number of layers and displays each layer.
L_VOID Example71(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;
L_TCHAR szMsg[100];
L_INT32 nCount, i;

nCount = pVector->GetLayerCount();
for (i=0; i<nCount; i++)
{
pVector->GetLayerByIndex(i,&VectorLayer);
VECTORLAYERDESC LayerDesc;
VectorLayer.GetLayerDesc(&LayerDesc);
wsprintf(szMsg, TEXT("Layer Retrieved\nName[%s]\nSize[%d]\nLocked[%d]\nVisible[%d]"),
LayerDesc.szName,
LayerDesc.nSize,
LayerDesc.bLocked,
LayerDesc.bVisible
);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
}
}


LVectorBase::GetMarker

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetMarker (pMarker)

pVECTORMARKER pMarker;

/* pointer to a structure */

Gets the current marker settings.

Parameter | Description
Pmarker | Pointer to a VECTORMARKER structure to be updated with the current marker settings.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The marker is used to indicate those objects within the vector handle that are selected.

For more information on available marker settings, refer to the VECTORMARKER structure.

To modify the marker settings, get the current settings by calling LVectorBase::GetMarker, set the new settings in the structure pointed to by pMarker, and call LVectorBase::SetMarker.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetMarker.
Topics: | Working with Vector Handles

Example

For an example, refer to LVectorBase::SetMarker.


LVectorBase::GetObjectParallelogram

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetObjectParallelogram(pMin, pMax, dwFlags=0)

pVECTORPOINT pMin; | /* pointer to a vector point */
pVECTORPOINT pMax; | /* pointer to a vector point */
L_UINT32 dwFlags; | /* flag that indicates which parallelogram to get*/

Gets the parallelogram that contains the specified object(s).

Parameter | Description
pMin | Pointer to a VECTORPOINT structure to be updated with the minimum point of the bounding parallelogram of the specified object.
pMax | Pointer to a VECTORPOINT structure to be updated with the maximum point of the bounding parallelogram of the specified object.
dwFlags | Flag that indicates which parallelogram to use when updating the pMin and pMax parameters. Possible values are:
 | Value | Meaning
 | 0 | pMin and pMax will be updated with the parallelogram containing all objects within the vector handle.
 | VECTOR_FLAGS_SELECTED_ONLY | pMin and pMax will be updated with the parallelogram containing all selected objects within the vector handle.
 | VECTOR_FLAGS_TRANSFORMED | Apply current transformation on pMin and pMax before returning.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Obtains the bounding parallelogram of a single object, several selected objects, or all objects within the vector handle.

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SelectObject, LVectorBase::IsObjectSelected, LVectorBase::GetObjectRect
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

//Example15
L_VOID Example15(HWND hWnd, LVectorBase *pVector)
{
//This example obtains drawing physical extents
VECTORPOINT LeftTop, RightBottom;
POINT LeftTop2D, RightBottom2D;

// Get drawing logical extents
pVector->GetObjectParallelogram(&LeftTop, &RightBottom);

// Convert to physical to get the rect where the drawing will painted
pVector->LogicalToPhysical(&LeftTop2D, &LeftTop );
pVector->LogicalToPhysical( &RightBottom2D, &RightBottom );
}


LVectorBase::GetObjectRect

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetObjectRect(pRect, dwFlags=0)

RECT L_FAR *pRect; | /* pointer to a RECT structure */
L_UINT32 dwFlags; | /* flag that indicates which object(s) to use */

Gets the physical bounding rectangle for the specified object(s).

Parameter | Description
pRect | Pointer to a RECT structure to be updated with the bounding rectangle of the specified object(s).
dwFlags | Flag that indicates which rectangle to use when updating the pRect parameter. Possible values are:
 | Value | Meaning
 | 0 | pRect will be updated with the rectangle containing all objects within the vector handle.
 | VECTOR_FLAGS_SELECTED_ONLY | pRect will be updated with the rectangle containing all selected objects within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Obtains the physical bounding rectangle of a single object, all selected objects, or all objects within the specified vector handle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SelectObject, LVectorBase::IsObjectSelected, LVectorBase::GetObjectRect, LVectorBase::HitTest
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

//LVectorBasee::GetObjectRect()
//Shows the physical extent of the all objects inside drawing
void Example27(HWND hWnd)
{
RECT rect;
L_TCHAR szBuffer[100];
LVectorBase Vector;

Vector.Load(TEXT("test.dxf"));
Vector.AttachToWindow(hWnd);
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);

// Get the rectangle of entire object
Vector.GetObjectRect(&rect);

wsprintf( szBuffer, TEXT("%d, %d, %d, %d"),
rect.left, rect.top, rect.right, rect.bottom );
MessageBox( NULL, szBuffer, TEXT("Selected Objects Physical Extent"), 0 );
}


LVectorBase::GetOrigin

#include "ltwrappr.h"

virtual L_INT LVector::GetOrigin(pOrigin)

pVECTORPOINT pOrigin;

/* pointer to a vector point */

Gets the origin point for the class object's associated vector.

Parameter | Description
pOrigin | Pointer to a VECTORPOINT structure to be updated with the origin point.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The origin of a vector drawing may change whenever new objects are added. To insure that the drawing is centered around its origin, call LVectorBase::SetOrigin(NULL) after adding objects.

The origin point may be set using LVectorBase::SetOrigin.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetOrigin.
Topics: | Working with Vector Handles

Example

For an example, refer to LVectorBase::SetOrigin .


LVectorBase::GetPalette

#include "ltwrappr.h"

virtual HPALETTE LVectorBase::GetPalette(L_VOID)

Returns the palette associated with the specified vector handle.

Returns

Returns the handle to the logical palette

Comments

You can use this palette to allow proper drawing of vector image colors in a palletized system.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetPalette, LVectorBase::Paint
Topics: | Vector Images: Getting and Setting General Information

Example

L_VOID Example20(HWND hWnd, LVectorBase &Vector)
{
HDC hdc;
PAINTSTRUCT ps;
RECT rect;
HPALETTE hOldPalette, hPal;

hdc = BeginPaint (hWnd, &ps) ;

GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);
if (Vector.IsAllocated())
{
// Create the palette that we will use to paint
hPal = Vector.GetPalette();
if( hPal )
{
hOldPalette = ::SelectPalette( hdc, hPal, TRUE );
::RealizePalette( hdc );
}
Vector.Paint(hdc, TRUE);

if (hOldPalette)
{
::SelectPalette (hdc, hOldPalette, FALSE);
DeleteObject(hPal);
}
}
EndPaint (hWnd, &ps) ;
}


LVectorBase::GetPan

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetPan(pPan)

POINT L_FAR *pPan;

/* pointer to a structure */

Gets the current pan values.

Parameter | Description
pPan | Pointer to a POINT structure to be updated with the current pan values.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will get the current physical pan values. These pan values are in pixels. This function can be used to scroll the VECTOR image.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetPan, LVectorBase::SetViewport, LVectorBase::GetViewport
Topics: | Panning Vector Images
 | Vector Images: Viewing a Vector Image

Example

L_VOID Example14(HWND hWnd)
{
POINT panPoint;
L_TCHAR szTemp[100];
LVectorBase Vector;

Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
Vector.GetPan(&panPoint);
wsprintf( szTemp,
TEXT("Old Pan (%d,%d)"),
panPoint.x,
panPoint.y);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);

panPoint.x += 10;
Vector.SetPan(&panPoint);
wsprintf( szTemp,
TEXT("New Pan (%d,%d)"),
panPoint.x,
panPoint.y);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorBase::GetParallelogram

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetParallelogram(pMin, pMax);

pVECTORPOINT pMin; | /* pointer to a vector point */
pVECTORPOINT pMax; | /* pointer to a vector point */

Gets the parallelogram of the class object's associated vector handle drawing.

Parameter | Description
pMin | Pointer to a VECTORPOINT structure to be updated with the minimum point of the bounding parallelogram of the specified vector handle.
pMax | Pointer to a VECTORPOINT structure to be updated with the maximum point of the bounding parallelogram of the specified vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

You can set the parallelogram with LVectorBase:;SetParallelogram.

This function will have no effect in the OpenGL and DirectX engines.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetParallelogram.
Topics: | Working with Vector Handles

Example

For an example, refer to LVectorBase::SetParallelogram.


LVectorBase::GetPolygonMode

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetPolygonMode(L_VOID)

Gets the current polygon drawing mode.

Returns

The current polygon drawing mode. Possible values are:

Value | Meaning
VECTOR_POLYGON_POINT | Draw only the edge points on polygons and lines.
VECTOR_POLYGON_LINE | Draw as a wire-frame.
VECTOR_POLYGON_FILL | Draw solid polygons.
VECTOR_POLYGON_FILL_RASTER_ALWAYS | Draw solid polygons and always draw raster objects.

Comments

This function is not supported in the GDI engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetPolygonMode, LVectorBase::SetEngine
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

void Example28(LVectorBase &Vector)
{
L_INT nMode; /* Current polygon mode */

nMode = Vector.GetPolygonMode();

switch( nMode )
{
case VECTOR_POLYGON_POINT:
Vector.SetPolygonMode(VECTOR_POLYGON_LINE );
break;

case VECTOR_POLYGON_LINE :
Vector.SetPolygonMode(VECTOR_POLYGON_FILL );
break;

case VECTOR_POLYGON_FILL :
Vector.SetPolygonMode(VECTOR_POLYGON_FILL_RASTER_ALWAYS );
break;

case VECTOR_POLYGON_FILL_RASTER_ALWAYS :
Vector.SetPolygonMode(VECTOR_POLYGON_POINT );
break;
}
}


LVectorBase::GetRotation

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetRotation(pRotation)

pVECTORPOINT pRotation;

/* pointer to a vector point */

Gets the current rotation values.

Parameter | Description
pRotation | Pointer to a VECTORPOINT structure to be updated with the current rotation values. The rotation values are in degrees.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The rotation values retrieved are those set using LVectorBase::SetRotation, with pObject set to NULL and bSelectedOnly set to FALSE.

The default rotation angle values are 0.0, 0.0, and 0.0 for the X, Y and Z axes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetRotation, LVectorBase::SetScale, LVectorBase::GetScale, LVectorBase::SetTranslation, LVectorBase::GetTranslation, LVectorBase::SetBindVerticesMode, LVectorBase::GetBindVerticesMode
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::GetScale

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetScale(pScale)

pVECTORPOINT pScale;

/* pointer to a vector point */

Gets the current scale values.

Parameter | Description
pScale | Pointer to a VECTORPOINT structure to be updated with the current scale values.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The scale values retrieved are those set using LVectorBase::SetScale, with pObject set to NULL and bSelectedOnly set to FALSE.

A scale value of 1.0 represents a scale factor of 100%; a scale value of 0.5 represents a scale factor of 50%; a scale value of 2.0 represents a scale factor of 200%, etc.

The default scale values are 1.0, 1.0, and 1.0 for the X, Y, and Z axes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetScale, LVectorBase::SetRotation, LVectorBase::GetRotation, LVectorBase::SetTranslation, LVectorBase::GetTranslation, LVectorBase::SetBindVerticesMode, LVectorBase::GetBindVerticesMode
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::GetTranslation

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetTranslation(pTranslation)

pVECTORPOINT pTranslation;

/* pointer to a vector point */

Gets the current translation values.

Parameter | Description
pTranslation | Pointer to a VECTORPOINT structure to be updated with the current translation values. The translation values are in logical units.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The translation values retrieved are those set using LVectorBase::SetTranslation, with pObject set to NULL and bSelectedOnly set to FALSE.

The default translation values are 0.0, 0.0, and 0.0 for the X, Y and Z axes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetTranslation, LVectorBase::SetScale, LVectorBase::GetScale, LVectorBase::SetRotation, LVectorBase::GetRotation, LVectorBase::SetBindVerticesMode, LVectorBase::GetBindVerticesMode
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::GetUseLights

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetUseLights(L_VOID)

Gets the use lights status for the specified vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If the use of lights is disabled, ambient light will have no effect on how the image is drawn.

This function has not effect in GDI engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetUseLights, LVectorBase::SetAmbientColor, LVectorBase::GetAmbientColor
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

void Example29(LVectorBase &Vector)
{
switch (Vector.GetUseLights())
{
case 1:
Vector.SetUseLights(FALSE);
case 0:
Vector.SetUseLights(TRUE);
default:
;//error
}
}


LVectorBase::GetViewMode

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetViewMode(L_VOID)

Gets the current view mode.

Returns

The current view mode. Possible values are:

Value | Meaning
VECTOR_VIEWMODE_FIT | Fit the drawing on the view port, keeping the aspect ratio.
VECTOR_VIEWMODE_SNAP | Snap the drawing into the view port.

Comments

This function will get the view mode used when drawing the vector handle.

The view mode is used with the view port to determine the resulting physical drawing extents.

Not supported in DirectX.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetViewMode, LVectorBase::Paint
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

L_VOID Example11(HWND hWnd)
{
L_TCHAR szTemp[100];
L_INT nMode;
LVectorBase Vector;
Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

nMode = Vector.GetViewMode();

switch(nMode)
{
case VECTOR_VIEWMODE_FIT:
wsprintf(szTemp, TEXT("Old ViewMode: VECTOR_VIEWMODE_FIT"));
break;
case VECTOR_VIEWMODE_SNAP:
wsprintf(szTemp, TEXT("Old ViewMode: VECTOR_VIEWMODE_SNAP"));
break;
}
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);

Vector.SetViewMode(VECTOR_VIEWMODE_SNAP);
wsprintf(szTemp, TEXT("New ViewMode: VECTOR_VIEWMODE_SNAP"));
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorBase::GetViewport

#include "ltwrappr.h"

virtual L_INT LVectorBase::GetViewport(pViewport)

RECT L_FAR *pViewport;

/* pointer to a structure */

Gets the current view port.

Parameter | Description
pViewport | Pointer to a RECT structure to be updated with the current view port data.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Use this function to get the view port associated with the vector handle.

If the vector is attached to a window, you must call this function when processing WM_SIZE messages, since the VECTOR library needs to know when the window size has changed (DirectX), or when the double buffer mode is selected in the current VECTOR engine.

This function and LVectorBase::SetCamera are required to complete the projection process from the vector image onto a 2D surface.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetViewport, LVectorBase::SetPan, LVectorBase::GetPan
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

L_VOID Example12(HWND hWnd)
{
RECT viewportRect;
L_TCHAR szTemp[100];

LVectorBase Vector;
Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

Vector.GetViewport(&viewportRect);
wsprintf(szTemp,
TEXT("Old View Port (%d,%d) (%d,%d)"),
viewportRect.left,
viewportRect.top,
viewportRect.right,
viewportRect.bottom);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);

viewportRect.left = 0;
viewportRect.top = 0;
viewportRect.right = 200;
viewportRect.bottom = 200;
Vector.SetViewport(&viewportRect);
wsprintf(szTemp,
TEXT("New View Port (%d,%d) (%d,%d)"),
viewportRect.left,
viewportRect.top,
viewportRect.right,
viewportRect.bottom);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorBase::HitTest

#include "ltwrappr.h"

virtual L_INT LVectorBase::HitTest(pPoint, ppVectorObject)

const POINT L_FAR *pPoint; | /* pointer to a POINT structure */
pVECTOROBJECT L_FAR *ppVectorObject; | /* pointer to a structure */

Gets the vector object under the specified 2D point.

Parameter | Description
pPoint | Pointer to a POINT structure that contains the point to test.
ppVectorObject | Pointer to a VECTOROBJECTstructure to be updated with the object present at the specified location.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will get the first object under the specified physical point.

Camera, view port, rotation, translation and scaling are all considered when determining whether or not an object is under the specified point.

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::SelectObject, LVectorBase::IsObjectSelected, LVectorBase::DeleteObject

Example

//Example24
//This example will delete the object under a given 2D point
void Example24(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorBase Vector;
LVectorObject VectorObject;
VECTORHITTEST HitTest;
L_TCHAR szMsg[200];

//Get current Hit Test settings
Vector.GetHitTest(&HitTest);

wsprintf(szMsg, TEXT("Old Hit Test Settings\nDistance[%d]\ndwFlags[%d]"), HitTest.nDistance, HitTest.dwFlags);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);

HitTest.nDistance = 8;
Vector.SetHitTest(&HitTest);
wsprintf(szMsg, TEXT("New Hit Test Settings\nDistance[%d]\ndwFlags[%d]"), HitTest.nDistance, HitTest.dwFlags);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);

// Get object under that point
L_INT nRet = pVector->HitTest(pPoint, &VectorObject);

//Is there an object under that point? If yes, delete it
if (nRet == SUCCESS)
{
MessageBox(NULL, TEXT("Deleting Object..."), TEXT(""), MB_OK);
VectorObject.DeleteObject();
}

//LVectorObject destructor called when VectorObject goes out of scope...
}


LVectorBase::Initialize

This function has been removed.


LVectorBase::InvertColors

#include "ltwrappr.h"

virtual L_INT LVectorBase::InvertColors()

Inverts the colors in the vector object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetDisplayOptions, LVectorBase::SetDisplayOptions
Topics: | Vector Images: Viewing a Vector Image
 | Viewing Vector Images

Example

void CVectorView::OnPreferencesInvertcolors()
{
CVectorDoc *pDoc;

pDoc = GetDocument( );
pDoc->m_pVectorWindow->InvertColors( );

InvalidateRect( NULL );
}


LVectorBase::Is3D

#include "ltwrappr.h"

virtual L_INT LVectorBase::Is3D(pbIs3D)

L_BOOL L_FAR pbIs3D;

/* pointer to a variable to be updated */

Determines whether or not the specified vector handle contains 3D objects.

Parameter | Description
pbIs3D | Pointer to a variable to be updated with a value that indicates whether the vector contains 3D objects or 2D objects. Possible values are:
 | Value | Meaning
 | TRUE | The referenced data contains a three dimensional object.
 | FALSE | The referenced data contains a two dimensional object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call this function to determine whether or not the vector handle contains any 3D objects.

A vector handle is considered to be "3D" if it has one or more objects stretching within the Z-axis.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Topics:

Vector Images: Getting and Setting General Information

Example

L_VOID Example6(HWND hWnd)

{

LVectorBase Vector;

Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

L_BOOL bIs3D;
Vector.Is3D(&bIs3D);
if (bIs3D)
MessageBox(hWnd, TEXT("Vector is 3D"), TEXT(""), MB_OK);
}


LVectorBase::IsAllocated

#include "ltwrappr.h"

L_BOOL LVectorBase::IsAllocated(void)

Determines whether this class object has an allocated vector.

Returns

TRUE | The vector is allocated.
FALSE | The vector is not allocated.

Comments

Use this function to check whether this class object has an allocated vector.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Getting and Setting General Information

Example

L_VOID Example8(HWND hWnd)
{
LVectorBase * pVector = new(LVectorBase);

//This does not allocate the vector--just initializes VECTORHANDLE fields
if (pVector->IsAllocated())
MessageBox(hWnd, TEXT("Vector allocated"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("Vector NOT allocated"), TEXT(""), MB_OK);
//...
}


LVectorBase::IsAlwaysEndNotification

#include "ltwrappr.h"

virtual L_BOOL LVectorBase::IsAlwaysEndNotification(void)

Determines whether the calling of the LVectorBase::EndChanging member function is enabled or disabled for failed bitmap operations.

Returns

TRUE | The calling of the LVectorBase::EndChanging member function is enabled on operation failure.
FALSE | The calling of the LVectorBase::EndChanging member function is disabled on operation failure.

Comments

Call this function to check if the calling of the LVectorBase::EndChanging member function is enable or disable for failed bitmap operations.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::StartChanging, LVectorBase::EndChanging, LVectorBase::EnableChangeNotification, LVectorBase::IsChangeNotificationEnabled, LVectorBase::EnableAlwaysEndNotification, Class Members
Topics: | Vector Notification Messages
 | Vector Images: Change Notification

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::IsChangeNotificationEnabled

#include "ltwrappr.h"

virtual L_BOOL LVectorBase::IsChangeNotificationEnabled(void)

Determines whether the change notifications are enabled or disabled.

Returns

TRUE | Change notifications are enabled.
FALSE | Change notifications are disabled.

Comments

Call this function to check if the change notifications are enabled or disabled for the class object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::StartChanging, LVectorBase::EndChanging, LVectorBase::EnableChangeNotification, LVectorBase::EnableAlwaysEndNotification, LVectorBase::IsAlwaysEndNotification, Class Members
Topics: | Vector Notification Messages
 | Vector Images: Change Notification

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::IsClipboardReady

#include "ltwrappr.h"

virtual L_BOOL LVectorBase::IsClipboardReady(L_VOID)

Determines whether the Windows clipboard contains vector data that can be copied using the LVectorBase::CopyFromClipboard function.

Returns

Value | Meaning
TRUE | The clipboard contains vector data that can be copied.
FALSE | The clipboard does not contain vector data that can be copied.

Comments

To copy vector data to the clipboard, call LVectorBase::CopyToClipboard.

To copy vector data to a vector handle, from the clipboard, call LVectorBase::CopyFromClipboard.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::CopyFromClipboard, LVectorBase::CopyToClipboard.
Topics: | Using the Clipboard

Example

For an example, refer to LVectorBase::CopyFromClipboard.


LVectorBase::IsEmpty

#include "ltwrappr.h"

virtual L_INT LVectorBase::IsEmpty(pbEmpty)

L_BOOL L_FAR * pbEmpty;

/* pointer to a variable to be updated */

Determines whether the class object's associated vector is empty.

Parameter | Description
pbEmpty | Pointer to a variable to be updated with a value that indicates whether the vector is empty. Possible values are:
 | Value | Meaning
 | TRUE | The class object's associated vector is empty.
 | FALSE | The class object's associated vector is not empty.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

A vector image is considered empty when it has no objects.

An empty vector image can still have empty layers.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::Empty
Topics: | Working with Vector Handles

Example

For an example, refer to LVectorBase::Empty.


LVectorBase::IsFileNameEnabled

#include "ltwrappr.h"

L_BOOL LVectorBase::IsFileNameEnabled(void);

Determines whether the use of the internal file name is enabled or disabled.

Returns

TRUE | The file name is enabled.
FALSE | The file name is not enabled.

Comments

Call this function to check if the use of the internal file name is enabled or disabled.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnableFileName, Class Members
Topics: | Vector Images: Getting and Setting General Information

Example

L_VOID Example3(HWND hWnd)
{
L_TCHAR szFileName[_MAX_PATH];
L_UINT uLen;

LVectorBase myVectorBase;

myVectorBase.SetFileName(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
if (myVectorBase.IsFileNameEnabled())
MessageBox(hWnd, TEXT("FileName is enabled"), TEXT(""), MB_OK);
else
{
MessageBox(hWnd, TEXT("FileName NOT enabled.\nEnabling..."), TEXT(""), MB_OK);
myVectorBase.EnableFileName();
}
myVectorBase.Load();

//Get the file name--it is "test.dxf"
myVectorBase.GetFileName(szFileName, &uLen);
}


LVectorBase::IsFontMapperEnabled

#include "ltwrappr.h"

virtual L_INT LVectorBase::IsFontMapperEnabled (pbEnable)

L_BOOL L_FAR * pbEnable;

/* pointer to a variable */

Gets a value that indicates whether a Font Mapper is enabled.

Parameter | Description
pbEnable | Pointer to a variable to be updated with a value that indicates whether a Font Mapper is enabled. Possible values are:
 | Value | Meaning
 | TRUE | Font Mapper is enabled
 | FALSE | Font Mapper is not enabled.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function gets a value that indicates whether a Font Mapper is enabled or not in the vector handle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnableFontMapper, LVectorBase::VectorFontMapperCallBack
Topics | Mapping Fonts

Example:

class LMyVectorBase2: public LVectorBase
{
public:
LMyVectorBase2();
virtual ~LMyVectorBase2() ;
virtual L_INT VectorFontMapperCallBack (pVECTORHANDLE pVector, LPLOGFONT pLogFont);
};

LMyVectorBase2::LMyVectorBase2()
{

}

LMyVectorBase2::~LMyVectorBase2()
{
}

L_INT LMyVectorBase2:: VectorFontMapperCallBack (pVECTORHANDLE pVector, LPLOGFONT pLogFont)
{

lstrcpy(pLogFont->lfFaceName, TEXT("Time New Roman"));
return SUCCESS ;
}

L_VOID ExampleFontMapper(HWND hWnd)
{

LMyVectorBase2 Vector;

L_BOOL bEnable;

Vector.IsFontMapperEnabled(&bEnable);

if ( !bEnable )

Vector.EnableFontMapper(TRUE);

else

{

MessageBox(hWnd, TEXT("The Font Mapper is or ready Enabled "), TEXT(""), MB_OK);

}
}


LVectorBase::IsLocked

#include "ltwrappr.h"

virtual L_INT LVectorBase::IsLocked(pbLocked)

L_BOOL L_FAR * pbLocked;

/* pointer to a variable to be updated */

Determines whether or not the class object's associated vector is locked.

Parameter | Description
pbLocked | Pointer to a variable to be updated with a value that indicates whether the class object's associated vector is locked. Possible values are:
 | Value | Meaning
 | TRUE | The class object's associated vector is locked.
 | FALSE | The class object's associated vector is not locked.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Locking a vector handle has precedence over locking layers within the vector handle. Therefore, if a vector handle is locked, the layers within that vector handle cannot be edited, even if the layers are not locked.

OpenGL and DirectX engines lock the vector handle automatically.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetLocked
Topics: | Working with Vector Handles

Example

//This example toggles the locked state of the vector.
L_VOID Example62(HWND hWnd, LVectorBase *pVector)
{
L_BOOL bLocked;

pVector->IsLocked(&bLocked);
pVector-> SetLocked(!bLocked);
}


LVectorBase::IsObjectHidden

#include "ltwrappr.h"

virtual L_INT LVectorBase::IsObjectHidden(pbHidden)

L_BOOL L_FAR *pbHidden;

/* pointer to a variable */

Gets a value that indicates whether or not a hidden object exists in the vector handle.

Parameter | Description
pbHidden | Pointer to a variable to be updated with a value that indicates whether or not a hidden vector object exists within the vector handle associated with the class object. Possible values are:
 | Value | Meaning
 | TRUE | At least one hidden vector object exists within the vector handle.
 | FALSE | No objects within the vector handle are hidden.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::IsObjectHidden, Class Members
Topics | Vector Images: Getting and Setting General Information
 | Manipulating Objects or Vertices within a Vector Image

Example

//LVectorBase::IsObjectHidden()
//This example displays a message if any object is hidden in the vector
L_VOID Example123(HWND hWnd, LVectorBase *pVector)
{
L_BOOL bHidden;

pVector->IsObjectHidden(&bHidden );
if (bHidden )
MessageBox(hWnd, TEXT("At least one vector object is hidden\n"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("No vector objects are hidden\n"), TEXT(""), MB_OK);
}


LVectorBase::IsObjectInsideParallelogram

#include "ltwrappr.h"

virtual L_INT LVectorBase::IsObjectInsideParallelogram(pLeftTop, pRightBottom, bInside, dwFlags=0)

const pVECTORPOINT pLeftTop; | /* pointer to a vector point */
const pVECTORPOINT pRightBottom; | /* pointer to a vector point */
L_BOOL L_FAR *bInside; | /* pointer to a variable */
L_UINT32 dwFlags; | /* flags */

Determines whether the specified object(s) is(are) within the specified parallelogram.

Parameter | Description
pLeftTop | Pointer to a VECTORPOINT structure that contains the top left point of a parallelogram.
pRightBottom | Pointer to a VECTORPOINT structure that contains the bottom right point of a parallelogram.
bInside | Pointer to a variable to be updated with a value that indicates whether the object is inside the specified parallelogram. Possible values are:
 | Value | Meaning
 | TRUE | The specified object is within the specified parallelogram.
 | FALSE | The specified object is not within the specified parallelogram.

dwFlags | Flag that indicates which object(s) to test. This flag is valid only if pObject is NULL. If pObject is not NULL, this parameter is ignored. Possible values are:
 | Value | Meaning
 | 0 | Test all objects in the vector handle to determine whether they are in the specified parallelogram.
 | VECTOR_FLAGS_SELECTED_ONLY | Test only the selected objects within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function determines whether the specified object(s) exists within the parallelogram specified by pLeftTop and pRightBottom. The parallelogram is given in logical units.

For this function, the current view port, pan position, camera, rotation, translation and scale do not effect the actual image position in 3D space.

Not supported in DirectX.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::IsObjectInsideRect, LVectorBase::GetObjectParallelogram, LVectorBase::GetObjectRect, LVectorObject::IsObjectInsideParallelogram
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

//This example displays tests if all vector objects are inside a parallelogram.
L_VOID Example120(HWND hWnd, LVectorBase *pVector)
{
LVectorBase Vector;
VECTORPOINT min, max;
L_BOOL bInside;

Vector.Load(TEXT("test.dxf"));

Vector.GetParallelogram(&min, &max);
//The vector should be inside of the parallelogram
Vector.IsObjectInsideParallelogram(&min, &max, &bInside);
if (bInside)
MessageBox(hWnd, TEXT("IsObjectInsideParallelogram() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsObjectInsideParallelogram() returns FALSE"), TEXT(""), MB_OK);

//Now reduce the size of the parallelogram--the vector is no longer inside
max.x = (max.x - min.x) / 2;
Vector.IsObjectInsideParallelogram(&min, &max, &bInside);
if (bInside)
MessageBox(hWnd, TEXT("IsObjectInsideParallelogram() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsObjectInsideParallelogram() returns FALSE"), TEXT(""), MB_OK);
}


LVectorBase::IsObjectInsideRect

#include "ltwrappr.h"

virtual L_INT LVectorBase::IsObjectInsideRect(pRect, bInside, dwFlags=0)

const RECT L_FAR *pRect; | /* pointer to a RECT structure */
L_BOOL L_FAR *bInside; | /* pointer to a variable */
L_UINT32 dwFlags; | /* flags */

Determines whether the specified object(s) is (are) within the specified rectangle.

Parameter | Description
pRect | Pointer to a RECT structure that contains information about a bounding rectangle.
bInside | Pointer to a variable to be updated with a value that indicates whether the object is inside the specified parallelogram. Possible values are:
 | Value | Meaning
 | TRUE | The specified object(s) is(are) within the specified parallelogram.
 | FALSE | The specified object(s) is(are) not within the specified parallelogram.

dwFlags | Flag that indicates which object(s) to test. This flag is valid only if pObject is NULL. If pObject is not NULL, this parameter is ignored. Possible values are:
 | Value | Meaning
 | 0 | Test all objects in the vector handle to determine whether they are in the specified rectangle.
 | VECTOR_FLAGS_SELECTED_ONLY | Test only the selected objects within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The rectangle is given in screen (physical) coordinates.

The current view port, pan position, camera, scale, translation and rotation values are all considered when determining whether the object is within the rectangle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::IsObjectInsideParallelogram, LVectorBase::GetObjectParallelogram, LVectorBase::GetObjectRect, LVectorObject::IsObjectInsideRect
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

//This example displays tests if all vector objects are inside a rectangle.
L_VOID Example121(HWND hWnd, LVectorBase *pVector)
{
LVectorBase Vector;
RECT rcBounds;
L_BOOL bInside;

Vector.Load(TEXT("test.dxf"));

//Define a rectangle
rcBounds.left =0;
rcBounds.top =0;
rcBounds.right =50;
rcBounds.bottom =50;

Vector.IsObjectInsideRect(&rcBounds, &bInside);
if (bInside)
MessageBox(hWnd, TEXT("IsObjectInsideRect() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsObjectInsideRect() returns FALSE"), TEXT(""), MB_OK);
}


LVectorBase::IsObjectSelected

#include "ltwrappr.h"

virtual L_INT LVectorBase::IsObjectSelected(pbSelected)

L_BOOL L_FAR *pbSelected;

/* pointer to a variable */

Gets a value that indicates whether or not a selected object exists in the vector handle.

Parameter | Description
pbSelected | Pointer to a variable to be updated with a value that indicates whether or not object is selected within the class object. Possible values are:
 | Value | Meaning
 | TRUE | At least one object in the vector handle is selected.
 | FALSE | No objects in the vector handle are selected.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::IsObjectSelected
Topics: | Vector Images: Getting and Setting General Information

Example

//LVectorBase::IsObjectSelected()
//This example displays a message if any object is selected in the vector
L_VOID Example123(HWND hWnd, LVectorBase *pVector)
{
L_BOOL bSelected;

pVector->IsObjectSelected (&bSelected);
if (bSelected)
MessageBox(hWnd, TEXT("At least one vector object is selected\n"), TEXT(""),
 MB_OK);
else
MessageBox(hWnd, TEXT("No vector objects are selected\n"), TEXT(""), MB_OK);
}


LVectorBase::Load

#include "ltwrappr.h"

virtual L_INT LVectorBase::Load(pszFile, pLoadOptions=NULL, pFileInfo=NULL)

virtual L_INT LVectorBase::Load(pLoadOptions=NULL, pFileInfo=NULL)

L_TCHAR L_FAR * pszFile; | /* name of the file to load */
pLOADFILEOPTION pLoadOptions; | /* pointer to a structure */
pFILEINFO pFileInfo; | /* pointer to a structure */

Loads a vector image from disk into the class object. The image file can be in any supported vector image file format.

Parameter | Description
pszFile | Character string containing the name of the file to load.
pLoadOptions | Pointer to a LOADFILEOPTION structure that contains information on loading the file.
pFileInfo | Pointer to a FILEINFO structure. This structure may contain file information used in loading an image, or it may be updated with information about the file being loaded.
 | If nothing is known about the file, pass NULL for this parameter, or declare a variable of type FILEINFO and set the FILEINFO.Flags to 0, then pass the address of the FILEINFO structure in this parameter. In this case, if the address of a FILEINFO structure is passed, the FILEINFO structure will be updated with the results of LFile::GetInfo
 | If only the file type is known, set pFileInfo.Format to the file type and set pFileInfo.Flags to FILEINFO_ONLYFORMATVALID. This can also be done if LFile::GetInfo has been called previously, but values that affect the size of the image loaded have been changed (for example, by calling LFileSettings::SetPCDResolution or LFileSettings::SetWMFResolution ). In this case the FILEINFO structure pointed to by pFileInfo will be updated with the results of LFile::GetInfo
 | If LFile::GetInfo has been called prior to calling this function, and no changes have been made to the contents of the structure filled by LFile::GetInfo , then the address of the filled FILEINFO structure can be passed for this parameter. In this case, the FILEINFO.Flags member should be set to FILEINFO_INFOVALID. The LFile::GetInfo function will set the FILEINFO.Flags to FILEINFO_INFOVALID. In this case the load will be faster since this function does not have to query the file filters for the file type.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

For supported vector formats, refer to Formats of Vector Input Files.

Before calling this function, you may need to get or set file information. Refer to Getting and Setting File Information .

The function will initialize the vector handle and allocate the storage necessary to hold the image.

The class object will free the vector when it is destroyed. If you wish to free the vector, use LVectorBase::Free.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::Save, LVectorBase::SetFileName, Class Members
Topics: | Vector Loading, Saving and Copying
 | Vector Images: Loading and Saving Vector Files

Example

For an example for both forms of LVectorBase::Load(), refer to LVectorBase::IsFileNameEnabled.


LVectorBase::LogicalToPhysical

#include "ltwrappr.h"

virtual L_INT LVectorBase::LogicalToPhysical(pDst, pSrc)

POINT L_FAR *pDst; | /* pointer to a POINT structure */
const pVECTORPOINT pSrc; | /* pointer to a VECTORPOINT structure */

Converts a 3D VECTORPOINT into a Windows 2D POINT.

Parameter | Description
pDst | Pointer to a POINT structure to be updated with the physical 2 dimensional point converted from the 3 dimensional vector point in pSrc.
pSrc | Pointer to a VECTRPOINT structure that contains a 3 dimensional point to be converted into a 2 dimensional point.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Converts a given logical point in the vector drawing (with X, Y, Z coordinates), into a physical 2D point.

Conversion will be based on the current view port and camera set in the VECTORHANDLE.

Not supported in DirectX.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::GetObjectParallelogram, LVectorBase::GetObjectRect

Example

L_VOID Example15(HWND hWnd)
{
//This example will obtains drawing physical extents
VECTORPOINT LeftTop, RightBottom;
POINT LeftTop2D, RightBottom2D;
LVectorBase Vector;

Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

// Get drawing logical extents
Vector.GetObjectParallelogram(NULL, FALSE, &LeftTop, &RightBottom );

// Convert to physical to get the rect where the drawing will be painted
Vector.LogicalToPhysical(&LeftTop2D, &LeftTop );
Vector.LogicalToPhysical( &RightBottom2D, &RightBottom );
}


LVectorBase::Paint

#include "ltwrappr.h"

virtual L_INT LVectorBase::Paint(hDC, bEraseBkgnd)

HDC hDC; | /* device context */
L_BOOL bEraseBkgnd; | /* flag that indicates whether to erase the background */

Draws the specified vector into a given device context.

Parameter | Description
hDC | Device context.
bEraseBkgnd | Flag that indicates whether or not to erase the background rectangle when rendering the vector. Possible values are:
 | Value | Meaning
 | TRUE | The background rectangle will be erased when the vector image is rendered to the device context.
 | FALSE | The background rectangle will not be erased.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If hDC is NULL, this function will assume that the vector is already attached to a window, and will draw the vector image to the window DC.

The background color used to erase the rectangle where the vector image is rendered can be set with LVectorBase::SetBackgroundColor.

If LVectorBase::Paint is called in response to a WM_PAINT message, hDC should be the paint DC obtained from BeginPaint.

This function will use current camera and current viewport of the vector handle to do the necessary projection into the surface of the DC.

Note: For the OpenGL engine, the background color will always be used to erase all of the image before drawing, regardless of the view port.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::Realize, LVectorBase::AttachToWindow, LVectorBase::SetCamera, LVectorBase::SetViewport, LVectorBase::SetBackgroundColor
Topics: | Vector Images: Viewing a Vector Image

Example

L_VOID Example20(HWND hWnd, LVectorBase &Vector)
{
HDC hdc;
PAINTSTRUCT ps;
RECT rect;
HPALETTE hOldPalette, hPal;

hdc = BeginPaint (hWnd, &ps) ;

GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);
if (Vector.IsAllocated())
{
// Create the palette that we will use to paint
hPal = Vector.GetPalette();
if( hPal )
{
hOldPalette = ::SelectPalette( hdc, hPal, TRUE );
::RealizePalette( hdc );
}
Vector.Paint(hdc, TRUE);

if (hOldPalette)
{
::SelectPalette (hdc, hOldPalette, FALSE);
DeleteObject(hPal);
}
}
EndPaint (hWnd, &ps) ;
}


LVectorBase::Realize

#include "ltwrappr.h"

virtual L_INT LVectorBase::Realize(pBitmap, bEraseBkgnd=TRUE)

virtual L_INT LVectorBase::Realize(&BitmapBase, bEraseBkgnd=TRUE)

pBITMAPHANDLE pBitmap; | /* pointer to a bitmap handle */
LBitmapBase &BitmapBase; | /* pointer to an LBitmapBase object */
L_BOOL bEraseBkgnd; | /* flag that indicates whether to erase the background */

Draws the specified vector into the specified LEAD bitmap handle.

Parameter | Description
pBitmap | Pointer to a bitmap handle, into which the vector will be drawn.
BitmapBase | Pointer to an LBitmapBase object that references the vector to be drawn into pBitmap.
bEraseBkgnd | Flag that indicates whether or not to erase the background rectangle when realizing the vector to the bitmap. Possible values are:
 | Value | Meaning
 | TRUE | The background rectangle will be erased when the vector image is realized to the bitmap.
 | FALSE | The background rectangle will not be erased.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function draws the specified vector into the specified bitmap handle.

The bitmap handle should be allocated before calling this function.

If hDC is NULL, this function will assume that the vector is already attached to a window, and will draw it to the window DC.

The background color used to erase the rectangle where the vector image is to be rendered can be set with LVectorBase::SetBackgroundColor.

This function will use the current camera and current view port of the vector handle to do the necessary projection onto the surface of the DC.

Note: For the OpenGL engine, the background color will always be used to erase the entire image before drawing, regardless of the view port.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::Paint, LVectorBase::AttachToWindow, LVectorBase::SetCamera, LVectorBase::SetViewport, LVectorBase::SetBackgroundColor
Topics: | Vector Images: Realizing a Vector to a Bitmap

Example

This is an example for LVectorBase::Realize(pBitmap, bEraseBkgnd=TRUE)

//LVectorBase::Realize( pBITMAPHANDLE pBitmap, L_BOOL bEraseBkgnd = TRUE);
//Example21
L_VOID Example21(HWND hWnd)
{
BITMAPHANDLE bitmapHandle;
RECT rect;
LVectorBase Vector;

Vector.Load(TEXT("test.dxf"));
Vector.AttachToWindow(hWnd);

L_INITBITMAP(&bitmapHandle, sizeof(BITMAPHANDLE), 400,400,24);
L_ALLOCATEBITMAP(&bitmapHandle, TYPE_CONV);
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);
Vector.Realize(&bitmapHandle,TRUE);
L_SAVEBITMAP(TEXT("d:\\erase.cmp"), &bitmapHandle, FILE_CMP, 24, 2, NULL);
}

This is an example for LVectorBase::Realize(&BitmapBase, bEraseBkgnd=TRUE):

//Example22

L_VOID Example22(HWND hWnd)
{
RECT rect;
LBitmapBase BitmapBase(400,400,24);
LVectorBase Vector;

Vector.Load(TEXT("test.dxf"));
Vector.AttachToWindow(hWnd);
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);
Vector.Realize(BitmapBase,TRUE);
BitmapBase.SetFileName(TEXT("d:\\erase.cmp"));
BitmapBase.Save(FILE_CMP,24,2);
}


LVectorBase::Reset

#include "ltwrappr.h"

virtual L_VOID LVectorBase::Reset(uFlags = VECTOR_RESET_ALL)

L_UINT uFlags;

/* reset flag */

Resets the vector to the default display settings.

Parameter | Description
uFlags | Flag that indicates which values to reset. Possible values are:
 | Value | Meaning
 | VECTOR_RESET_ROTATE | Reset the rotation values to the default settings.
 | VECTOR_RESET_SCALE | Reset the scale values to the default settings.
 | VECTOR_RESET_TRANSLATE | Reset the translation values to the default settings.
 | VECTOR_RESET_CAMERA | Reset the camera values to the default settings.
 | VECTOR_RESET_PARALLELOGRAM | Reset the parallelogram values to the default settings.
 | VECTOR_RESET_ORIGIN | Reset the origin values to the default settings.
 | VECTOR_RESET_PAN | Reset the pan values to the default settings.
 | VECTOR_RESET_ALL | Reset all the values to the default settings. This is the equivalent of combining all the above flags using the OR operator.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorWindow::Reset, Class Members
Topics: | Manipulating the Camera
 | Panning Vector Images
 | Rotating, Translating, Scaling Vector Images
 | Viewing Vector Images

Example

// LVectorBase::Reset()
// This examples resets a vector to the default display settings
L_VOID ResetVectorWindowTest(LVectorBase &Vector)
{
Vector.Reset();
}


LVectorBase::Save

#include "ltwrappr.h"

virtual L_INT LVectorBase::Save(pszFile, nFormat, pSaveOptions=NULL)

virtual L_INT LVectorBase::Save(nFormat, pSaveOptions=NULL)

L_TCHAR L_FAR * pszFile; | /* output file name */
L_INT nFormat; | /* output file format */
pSAVEFILEOPTION pSaveOptions; | /* pointer to a structure */

Saves the class object's vector image to a file in any of the supported compressed or uncompressed formats.

Parameter | Description
pszFile | Character string containing the output file name.
nFormat | Output file format. For valid values, refer to Formats of Output Files .
pSaveOptions | Pointer to a SAVEFILEOPTION structure that contains information for saving the file.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The image will be saved to the file specified by the last call to LVectorBase::SetFileName or to the file last loaded by LVectorBase::Load.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::Load, Class Members
Topics: | Vector Loading, Saving and Copying
 | Vector Images: Loading and Saving Vector Files

Example

For an example for LVectorBase::Save(pszFile, nFormat, pSaveOptions=NULL), refer to LVectorBase::ConvertFromEMF.

This is an example for LVectorBase::Save(nFormat, pSaveOptions=NULL):

L_VOID Example52(HWND hWnd)
{
LVectorBase Vector;
RECT rect;

//Load the drawing
Vector.Load(TEXT("s:\\temp\\images\\dxf\\skull.dxf"));

//Attach to window
Vector.AttachToWindow(hWnd);

//Set viewport
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);

//Rotate
VECTORPOINT rotatePoint;
Vector.GetRotation(&rotatePoint);
rotatePoint.x += 30.0F;
rotatePoint.y -= 100.0F;
rotatePoint.z += 50.0F;
Vector.SetRotation(&rotatePoint,NULL,NULL);

//Save
Vector.SetFileName(TEXT("d:\\image.wmf"));
Vector.Save(FILE_WMF);
}


LVectorBase::SelectObject

This function has been removed. To achieve the same functionality, use LVectorObject::SelectObject.


LVectorBase::SetActiveLayer

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetActiveLayer(pVectorLayer);

LVectorLayer * pVectorLayer;

/* pointer to a vector layer object */

Sets the active layer in the class object's associated vector. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorLayer | Pointer to the LVectorLayer object that references the layer to set as the active layer.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Some functions use the active layer when NULL is passed for a pLVectorLayer parameter. This makes it easier to work with the toolkit when layers are not needed.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetActiveLayer.
Topics: | Working with Vector Layers

Example

// This example adds a new layer, and makes it the active layer.
//Example72
L_VOID Example72(HWND hWnd, LVectorBase *pVector)
{
VECTORLAYERDESC Desc;
LVectorLayer Layer;

Layer.GetLayerDesc(&Desc);
lstrcpy(Desc.szName, TEXT("Tom's new layer"));
Layer.SetLayerDesc(&Desc);

pVector-> AddLayer(&Layer);
pVector->SetActiveLayer(&Layer);
}


LVectorBase::SetAmbientColor

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetAmbientColor(color)

L_COLOR color;

/* the new ambient color */

Sets the ambient (room) light used when drawing a vector image.

Parameter | Description
color | The RGB value of the ambient light to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will only be effective if the use of lights has been enabled using LVectorBase::SetUseLights.

The default ambient light is white (RGB(255, 255, 255)).

This function has no effect in the GDI engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetAmbientColor, LVectorBase::SetUseLights, LVectorBase::GetUseLights, LVectorBase::SetEngine
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

void Example30(LVectorBase &Vector)
{
L_COLOR OldColor; // Current ambient light
L_COLOR NewColor; // New ambient light

//Get current ambient light
L_INT nRet = Vector.GetAmbientColor(&OldColor);

//Increase the color, wrapping around if greater than 255
NewColor = RGB( (GetRValue( OldColor ) + 10) % 255,
(GetGValue( OldColor ) + 10) % 255,
(GetBValue( OldColor ) + 10) % 255 );

//Set new ambient color
Vector.SetAmbientColor(NewColor );
}


LVectorBase::SetBackgroundColor

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetBackgroundColor(color=0)

L_COLOR color;

/* the background color */

Sets the current background color.

Parameter | Description
color | The background color to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If LVectorBase::Paint is called, with bEraseBkgnd set to TRUE, this color will be used to erase the background.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetBackgroundColor, LVectorBase::Paint, LVectorBase::AttachToWindow
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::GetBackgroundColor.


LVectorBase::SetBindVerticesMode

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetBindVerticesMode(nMode)

L_INT nMode;

/* binding mode to set */

Sets the vertices bind mode for a vector handle.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
nMode | The vertices binding mode. Possible values are:
 | Value | Meaning
 | VECTOR_BIND_VERTICES | Vertices are bound. If changes occur to an object, all other objects sharing vertices with that object will be changed too.
 | VECTOR_UNBIND_VERTICES | Vertices are not bound. If changes occur to an object, Other objects sharing vertices with that object will not be effected.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function sets a value that determines whether or not the vertices of an object are bound to each other.

If VECTOR_BIND_VERTICES mode is selected, objects share vertices. Therefore, if one object changes, other objects sharing vertices with that object will change too.

If VECTOR_UNBIND_VERTICES mode is selected, objects have their own individual vertices. Therefore, if one object changes, no other objects will be effected.

This function will have no effect in the DirectX engine.

Default mode is VECTOR_BIND_VERTICES.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetBindVerticesMode, LVectorBase::SetScale, LVectorBase::SetRotation, LVectorBase::SetTranslation
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorBase::GetBindVerticesMode.


LVectorBase::SetCamera

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetCamera(pVectorCamera)

const pVECTORCAMERA pVectorCamera;

/* pointer to a structure */

Sets the new camera.

Parameter | Description
pCamera | Pointer to a VECTORCAMERA structure that contains the new camera values. If this is NULL, the default camera values will be used.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will set the current viewing camera.

The camera is used with the view port to determine how the drawing will be projected into the destination DC when using LVectorBase::Paint.

If pVectorCamera is NULL, the default camera will be set. The default camera is defined as a top view camera.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetCamera, LVectorBase::Paint
Topics: | Manipulating the Camera
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::GetCamera.


LVectorBase::SetDisplayOptions

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetDisplayOptions(pOptions)

const pVECTOR_DISPLAY_OPTIONS pOptions;

/* pointer to a display options structure */

Sets the display options in the vector handle.

Parameter | Description
pOptions | Pointer to a VECTOR_DISPLAY_OPTIONS structure that contains the display options to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The display options determine how the toolkit will draw objects on the screen

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetDisplayOptions, LVectorBase::InvertColors
Topics: | Vector Images: Viewing a Vector Image
 | Viewing Vector Images

Example

For an example, refer to LVectorBase::GetDisplayOptions


LVectorBase::SetEngine

This function has been removed. To achieve the same functionality, use LVectorBase::AttachToWindow.


LVectorBase::SetFileName

#include "ltwrappr.h"

L_VOID LVectorBase::SetFileName(pszFileName)

L_TCHAR L_FAR * pszFileName;

/* the file name */

Sets the internal file used by the class object for loading and saving images on disk.

Parameter | Description
pszFileName | Character string containing the name of the file to be associated with the class object.

Returns

None.

Comments

Call this function to set the internal file used by the class object for loading and saving images on disk.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Getting and Setting General Information

Example

For an example, refer to LVectorBase::IsFileNameEnabled.


LVectorBase::SetHandle

#include "ltwrappr.h"

L_INT LVectorBase::SetHandle(pVectorHandle, bFreePrev=TRUE)

pVECTORHANDLE pVectorHandle; | /* pointer to a LEAD vector handle */
L_BOOL bFreePrev; | /* flag that indicates whether to free the previous bitmap */

Attaches a new LEAD vector handle to the LVectorBase class object.

Parameter | Description
pVectorHandle | Pointer to a LEAD vector handle that describes the vector to be attached to this object. This pointer will be invalidated if the function is successful, you can pass NULL if you only want to detach the current vector handle from the object.
bFreePrev | Flag that indicates whether to free the previous vector handle before attaching the new one. Possible values are:
 | Value | Meaning
 | TRUE | Free the previous vector handle before attaching the new one.
 | FALSE | Do not free the previous vector handle before attaching the new one.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Use this function to attach a new LEAD vector handle to this LVectorBase class object. This function will call the LVectorBase::StartChanging and LVectorBase::EndChanging member functions before and after setting the vector handle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetHandle, LVectorBase::StartChanging, LVectorBase::EndChanging, Class Members
Topics: | Vector Images: Getting and Setting General Information

Example

For an example, refer to LVectorBase::GetHandle.


LVectorBase::SetHitTest

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetHitTest(pHitTest)

const pVECTORHITTEST pHitTest;

/* pointer to a structure */

Sets the new hit test settings.

Parameter | Description
pHitTest | Pointer to a VECTORHITTESTVECTORHITTEST structure that contains the new hit test settings.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The hit test settings determine the behavior of the hit test. The hit test itself is performed by calling LVectorBase::HitTest.

To get the current hit test settings, call LVectorBase::GetHitTest.

For more information on possible hit test settings, refer to the VECTORHITTEST structure.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetHitTest, LVectorBase::HitTest
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorBase::HitTest.


LVectorBase::SetLocked

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetLocked(bLock)

L_BOOL bLock;

/* flag */

Locks or unlocks the class object's associated vector.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
bLock | Flag that indicates whether to lock or unlock the class object's associated vector. Possible values are:
 | Value | Meaning
 | TRUE | Lock the class object's associated vector.
 | FALSE | Unlock the class object's associated vector.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Locking a vector handle has precedence over locking layers within the vector handle. Therefore, if a vector handle is locked, the layers within that vector handle cannot be edited, even if the layers are not locked.

OpenGL and DirectX engines lock the vector handle automatically.

To lock a layer, set the bLocked member of a VECTORLAYERDESC structure to TRUE and update the layer information using the LVectorLayer::SetLayerDesc function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::IsLocked
Topics: | Working with Vector Handles

Example

For an example, refer to LVectorBase::IsLocked.


LVectorBase::SetMarker

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetMarker(pMarker)

const pVECTORMARKER pMarker;

/* pointer to a structure */

Sets the new marker settings.

Parameter | Description
pMarker | Pointer to a VECTORMARKER structure that contains the marker settings to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The marker is used to indicate those objects within the vector handle that are selected.

For more information on available marker settings, refer to the VECTORMARKER structure.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetMarker.
Topics: | Working with Vector Handles

Example

//This example will toggle the use of pen and brush color red and blue for markers.
L_VOID Example65(HWND hWnd, LVectorBase *pVector)
{
VECTORMARKER Marker;

// Get marker settings
pVector->GetMarker(&Marker );

// Toggle pen and brush color between red and blue
if( Marker.Pen.NewPen.LogPen.lopnColor == RGB( 0xFF, 0x00, 0x00 ) )
{
Marker.Pen.NewPen.LogPen.lopnColor = RGB( 0x00, 0x00, 0xFF );
Marker.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( 0x00, 0x00, 0xFF );
}
else
{
Marker.Pen.NewPen.LogPen.lopnColor = RGB( 0xFF, 0x00, 0x00 );
Marker.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( 0xFF, 0x00, 0x00 );
}

Marker.dwFlags = Marker.dwFlags | VECTOR_MARKER_PEN_COLOR | VECTOR_MARKER_BRUSH_COLOR;

// Set new marker
pVector->SetMarker (&Marker );
}


LVectorBase::SetObjectAttributes

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetObjectAttributes(pnROP, pPen, pBrush, pFont, dwFlags=0)

const L_INT * pnROP; | /* ROP code */
const pVECTORPEN pPen; | /* pen characteristics */
const pVECTORBRUSH pBrush; | /* brush characteristics */
const pVECTORFONT pFont; | /* font characteristics */
L_UINT32 dwFlags; | /* flags */

Sets the attributes of the class object's associated vector objects. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pnROP | Pointer to a variable that contains the ROP code to set. For more information on valid ROP2 codes, refer to your SDK..
pPen | Pointer to a VECTORPEN structure that contains the pen characteristics to set.
pBrush | Pointer to a VECTORBRUSH structure that contains the brush characteristics to set.
pFont | Pointer to a VECTORFONT structure that contains the font to set.
dwFlags | Flag that indicates the objects for which to set the attributes. Possible values are:
 | Value | Meaning
 | 0 | Set the attributes for any object, selected or not.
 | VECTOR_FLAGS_SELECTED_ONLY | Set the attributes only for selected objects.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorObject::SetObjectAttributes, LVectorObject::GetObjectAttributes

Example

// This example will display and change the color of the pen to red for all vector objects in pVector.
L_VOID Example105(HWND hWnd, LVectorBase *pVector)
{
VECTORPEN VectorPen;

VectorPen.nSize = sizeof(VECTORPEN);

VectorPen .bExtPen = FALSE;
VectorPen.NewPen.LogPen.lopnStyle = PS_SOLID;
VectorPen.NewPen.LogPen.lopnWidth.x = 1;
VectorPen.NewPen.LogPen.lopnWidth.y = 1;
VectorPen.NewPen.LogPen.lopnColor = RGB(255,0,0);

VECTORBRUSH VectorBrush;

VectorBrush.nSize = sizeof(VECTORBRUSH);

VectorBrush .VectorBrushStyle = VECTORBRUSH_STANDARD;
VectorBrush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,255,0);
VectorBrush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;
pVector->SetObjectAttributes(NULL, &VectorPen, &VectorBrush, NULL);
}


LVectorBase::SetOrigin

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetOrigin(pOrigin=NULL)

const pVECTORPOINT pOrigin;

/* pointer to a vector point */

Sets the new origin for the class object's associated vector.

Parameter | Description
pOrigin | Pointer to a VECTORPOINT structure that contains the new origin. If this parameter is NULL, the new origin will be calculated based on the objects currently in the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The origin of a vector drawing may change whenever new objects are added. To insure that the drawing is centered around its origin, call LVectorBase::SetOrigin(NULL) after adding objects.

The origin may be retrieved using LVectorBase::GetOrigin.

LVectorBase::ApplyTransformation must be called to make the new origin take effect; if you don’t your changes will not be saved.

Note for OpenGL and DirectX, this function has no effect.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetOrigin, LVectorBase::ApplyTransformation
Topics: | Working with Vector Handles

Example

//This example moves the vector origin.
L_VOID Example63(HWND hWnd, LVectorBase *pVector)
{
VECTORPOINT pointOrigin;

pVector->GetOrigin (&pointOrigin);
pointOrigin.x +=1;
pVector->SetOrigin(&pointOrigin);
}


LVectorBase::SetPalette

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetPalette(hPalette)

HPALETTE hPalette;

/* handle to a palette */

Sets the palette handle associated with the vector.

Parameter | Description
hPalette | Handle to the new palette to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function makes a copy of hPalette, so you can delete the object if you don't need it anymore.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetPalette, LVectorBase::Paint
Topics: | Vector Images: Getting and Setting General Information

Example

L_VOID Example35( HWND hWnd)
{
LVectorBase Vector1, Vector2;
HPALETTE hPalette1, hPalette2;
HDC hDC=GetDC(0);

Vector1.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
Vector2.Load(TEXT("s:\\temp\\images\\dxf\\skull.dxf"));

hPalette1 = Vector1.GetPalette();
hPalette2 = L_DUPPALETTE(hPalette1);

Vector2.SetPalette(hPalette2);

ReleaseDC(0,hDC);
}


LVectorBase::SetPan

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetPan(pPan)

const POINT L_FAR *pPan;

/* pointer to a structure */

Sets the new pan values.

Parameter | Description
pPan | Pointer to a POINT structure that contains the new pan coordinates.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will set the physical pan values. These pan values are in pixels. This function can be used to scroll the vector image.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetPan, LVectorBase::SetViewport, LVectorBase::GetViewport
Topics: | Panning Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::GetPan.


LVectorBase::SetParallelogram

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetParallelogram(pMin, pMax);

const pVECTORPOINT pMin; | /* pointer to a vector point */
const pVECTORPOINT pMax; | /* pointer to a vector point */

Sets the parallelogram of the class object's associated vector handle drawing.

Parameter | Description
pMin | Pointer to the minimum parallelogram point. If pMin or pMax is NULL, the toolkit will calculate the values based on the minimum parallelogram needed to hold all the objects inside the vector drawing.
pMax | Pointer to the maximum parallelogram point. If pMin or pMax is NULL, the toolkit will calculate the values based on the minimum parallelogram needed to hold all the objects inside the vector drawing.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

After adding objects to a vector handle, the logical size of the image might change, this function will calculate new boundaries of the drawing.

This function will have no effect in the OpenGL and DirectX engines.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetParallelogram, LVectorBase::SetScale, LVectorBase::SetRotation, LVectorBase::SetTranslation
Topics: | Working with Vector Handles

Example

//This example Gets the vector parallelogram and then changes it.
L_VOID Example64(HWND hWnd, LVectorBase *pVector)
{
VECTORPOINT pointMin, pointMax;
L_TCHAR szMsg[100];

pVector->GetParallelogram(&pointMin, &pointMax);
wsprintf( szMsg, TEXT("%lf,%lf,%lf to %lf,%lf,%lf"),
pointMin.x,
pointMin.y,
pointMin.z,
pointMax.x,
pointMax.y,
pointMax.z );
MessageBox( NULL, szMsg, TEXT("Old Parallelogram"), MB_OK );

pointMax.x /= 2;
pointMax.y /= 2;
pointMax.z /= 2;
pVector->SetParallelogram(&pointMin, &pointMax);
wsprintf( szMsg, TEXT("%lf,%lf,%lf to %lf,%lf,%lf"),
pointMin.x,
pointMin.y,
pointMin.z,
pointMax.x,
pointMax.y,
pointMax.z );
MessageBox( NULL, szMsg, TEXT("New Parallelogram"), MB_OK );
}


LVectorBase::SetPolygonMode

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetPolygonMode(nMode=VECTOR_POLYGON_LINE)

L_INT nMode;

/* polygon drawing mode */

Sets the current polygon drawing mode.

Parameter | Description
nMode | The polygon drawing mode to set. Possible values are:
 | Value | Meaning
 | VECTOR_POLYGON_POINT | Draw only the edges points on polygons and lines.
 | VECTOR_POLYGON_LINE | Draw as a wire-frame.
 | VECTOR_POLYGON_FILL | Draw solid polygons.
 | VECTOR_POLYGON_FILL_RASTER_ALWAYS | Draw solid polygons and always draw raster objects.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetPolygonMode, LVectorBase::SetEngine
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::GetPolygonMode.


LVectorBase::SetRotation

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetRotation(pRotation, pOrigin=NULL, dwFlags=0)

const pVECTORPOINT pRotation; | /* pointer to a vector point */
const pVECTORPOINT pOrigin; | /* pointer to a vector point */
L_UINT32 dwFlags; | /* flag that indicates which objects to rotate */

Rotates all or part of the specified vectored image

Parameter | Description
pRotation | Pointer to a VECTORPOINT structure that contains the rotation values for each axis. The rotation values are in degrees.
pOrigin | Pointer to a VECTORPOINT structure that contains the center of rotation. If pOrigin is NULL, the center of rotation is the accumulative center of the objects to be rotated.
dwFlags | Flag that indicates which objects to rotate. Possible values are:
 | Value | Meaning
 | 0 | Rotate all objects.
 | VECTOR_FLAGS_SELECTED_ONLY | Rotate only the currently selected objects within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Rotates all or part of the specified vector image based on the rotation values in pRotation.

The rotation values may be retrieved using LVectorBase::GetRotation.

Note: When you rotate a certain object, it may or may not affect other unselected objects sharing vertices with the selected object. This depends on the current bind vertices mode set by LVectorBase::SetBindVerticesMode.

Note for DirectX:, You cannot select objects or enumerate them.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorObject::SetRotation

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::SetScale

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetScale(pScale, pOrigin=NULL, dwFlags=0))

const pVECTORPOINT pScale; | /* pointer to a vector point */
const pVECTORPOINT pOrigin; | /* pointer to a vector point */
L_UINT32 dwFlags; | /* flag that indicates which objects to scale */

Scales all or part of the specified vectored image.

Parameter | Description
pScale | Pointer to a VECTORPOINT structure that contains the scale values for each axis. The translation values are in logical units.
pOrigin | Pointer to a VECTORPOINT structure that contains the scale center. If pObject is not NULL, scaling occurs around this point. If pOrigin is NULL, the scale center is the accumulative center of the objects to be rotated.
dwFlags | Flag that indicates which objects to scale. Possible values are:
 | Value | Meaning
 | 0 | Scale all objects.
 | VECTOR_FLAGS_SELECTED_ONLY | Scale only the currently selected objects within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Scales all or part of the specified vectored image based on the scale values in pScale.

pScale contains a scale value for each axis. A scale value of 1.0 represents a scale factor of 100%; a scale value of 0.5 represents a scale factor of 50%; a scale value of 2.0 represents a scale factor of 200%, etc.

The scale values may be retrieved using LVectorBase::GetScale.

Note: When you scale a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind-vertices mode set by LVectorBase::SetBindVerticesMode.

Note for DirectX:, You cannot select objects or enumerate them.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetScale, LVectorBase::SetRotation, LVectorBase::GetRotation, LVectorBase::SetTranslation, LVectorBase::GetTranslation, LVectorBase::SetBindVerticesMode, LVectorBase::GetBindVerticesMode
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::SetTranslation

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetTranslation(pTranslation, dwFlags=0)

const pVECTORPOINT pTranslation; | /* pointer to a vector point */
L_UINT32 dwFlags; | /* flags that indicate which objects to translate */

Translates all or part of the specified vector image.

Parameter | Description
pTranslation | Pointer to a VECTORPOINT structure that contains the translation values for each axis. The translation values are in logical units.
dwFlags | Flag that indicates which objects to translate. Possible values are:
 | Value | Meaning
 | 0 | Translate all objects.
 | VECTOR_FLAGS_SELECTED_ONLY | Translate only the currently selected objects within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Translates all or part of the specified vector image based on the translation values in pTranslation.

The translation values may be retrieved using LVectorBase::GetTranslation.

Note: When you translate a certain object, it may or may not effect other unselected objects sharing vertices with the selected object. This depends on the current bind-vertices mode set by LVectorBase::SetBindVerticesMode.

Note for DirectX:, You cannot select objects or enumerate them.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetTranslation, LVectorBase::SetTranslation, LVectorBase::SetScale, LVectorBase::GetScale, LVectorBase::SetRotation, LVectorBase::GetRotation, LVectorBase::SetBindVerticesMode, LVectorBase::GetBindVerticesMode
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::SetUseLights

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetUseLights(bUseLights=TRUE)

L_BOOL bUseLights;

/* flag that indicates whether to enable or disable the use of lights */

Enables or disables using lights when drawing a vector handle.

Parameter | Description
bUseLights | Flag that indicates whether or not to use lights when drawing the vector handle. Possible values are:
 | Value | Meaning
 | TRUE | Use lights when drawing a vector handle.
 | FALSE | Do not use lights when drawing a vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If the use of lights is disabled, ambient light will have no effect on how the image is drawn.

This function has no effect in the GDI engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetUseLights, LVectorBase::SetAmbientColor, LVectorBase::GetAmbientColor
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::GetUseLights.


LVectorBase::SetViewMode

#include "ltwrappr.h"

virtual L_INTL LVectorBase::SetViewMode(nMode=VECTOR_VIEWMODE_FIT)

L_INT nMode;

/* the view mode to set */

Sets the view mode.

Parameter | Description
nMode | The view mode to set. Possible values are:
 | Value | Meaning
 | VECTOR_VIEWMODE_FIT | Fit the drawing on the view-port, keeping the aspect ratio.
 | VECTOR_VIEWMODE_SNAP | Snap the drawing into the view- port.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will set the view mode used when drawing the vector handle.

The view mode is used with the view port to determine the resulting physical drawing extents.

Not supported in DirectX.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetViewMode, LVectorBase::Paint
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example refer to LVectorBase::GetViewMode.


LVectorBase::SetViewport

#include "ltwrappr.h"

virtual L_INT LVectorBase::SetViewport(pViewport)

const RECT L_FAR *pViewport;

/* pointer to a structure */

Sets the current view port.

Parameter | Description
pViewport | Pointer to a RECT structure that contains data on the new view port.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Use this function to set the view port associated with a vector.

If the vector is attached to a window, you must call this function when processing WM_SIZE messages, since the VECTOR library needs to know when the window size has changed (DirectX), or when the double buffer mode is selected in the current VECTOR engine.

This function, along with LVectorBase::SetCamera are required to complete the projection process from a vector image onto a 2D surface.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetViewport, LVectorBase::SetPan, LVectorBase::GetPan
Topics: | Viewing a Vector Images
 | Vector Images: Viewing a Vector Image

Example

For an example, refer to LVectorBase::GetViewport.


LVectorBase::StartChanging

#include "ltwrappr.h"

virtual L_INT LVectorBase::StartChanging(nChangeType, nChangeCategory)

L_UINT nChangeType; | /* type of change */
L_UINT nChangeCategory; | /* the change category */

This function is called by every function that affects the vector.

Parameter | Description
nChangeType | The type of change to be done to the vector. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .
nChangeCategory | The change category. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .

Returns

SUCCESS | Continue the operation without interrupting it.
< 1 | An error occurred. Refer to Return Codes. This will halt the operation and stop it.

Comments

This function is called by every function that affects the vector. You can override this function to have control over the different operations that are done to the vector. This function is called before doing any changes to the vector. If you want to cancel the operation, you can return an error code that is less than SUCCESS. If you return SUCCESS, the operation will continue executing. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EndChanging, LVectorBase::EnableChangeNotification, LVectorBase::IsChangeNotificationEnabled, LVectorBase::EnableAlwaysEndNotification, LVectorBase::IsAlwaysEndNotification, Class Members
Topics: | Vector Notification Messages
 | Vector Images: Change Notification

Example

For an example, refer to LVectorBase::EnableAlwaysEndNotification.


LVectorBase::VectorEventProcCallBack

#include "ltwrappr.h"

virtual L_INT LVectorBase::VectorEventProcCallBack(pVector, uLevel, pEvent, pUserData)

pVECTORHANDLE pVector; | /* pointer to a vector handle */
L_UINT uLevel; | /* event level */
pVECTOREVENT pEvent; | /* pointer to a vector event */
L_VOID L_FAR * pUserData; | /* pointer to additional parameters */

Processes each event that occurs inside the vector handle.

Parameter | Description
pVector | Pointer to the vector handle in which the event occurred.
uLevel | Level of the event that occurred. For a top-level event, this value is 0. For a second level event this value is 1, etc. For an example, refer to the Comments section below.
pEvent | Pointer to a VECTOREVENT structure that describes the event that occurred in the vector handle.
pUserData | A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function.
 | Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To use this function you must derive a class from LVectorBase and override the VectorEventProcCallBack function.

To understand event levels, consider this example:

Assume the clipboard contains a vector handle with 1 layer and 2 objects inside this layer.

Now you execute LVectorBase::CopyFromClipboard, the toolkit may fire these events in the following sequence:

pEvent->uType | pEvent->Status | uLevel | Comment
VECTOR_EVENT_COPYFROMCLIPBOARD | VECTOR_EVENT_BEFORE | 0 | LVectorBase::CopyFromClipboard is about to execute.
VECTOR_EVENT_ADDLAYER | VECTOR_EVENT_BEFORE | 1 | LVectorBase::AddLayer is about to execute.
VECTOR_EVENT_ADDOBJECT | VECTOR_EVENT_BEFORE | 2 | LVectorBase::AddObject for first object is about to execute.
VECTOR_EVENT_ADDOBJECT | VECTOR_EVENT_AFTER | 2 | LVectorBase::AddObject for first object has been completed.
VECTOR_EVENT_ADDOBJECT | VECTOR_EVENT_BEFORE | 2 | LVectorBase::AddObject for second object is about to execute.
VECTOR_EVENT_ADDOBJECT | VECTOR_EVENT_AFTER | 2 | LVectorBase::AddObject for second object has been completed.
VECTOR_EVENT_ADDLAYER | VECTOR_EVENT_AFTER | 1 | LVectorBase::AddLayer has been completed.
VECTOR_EVENT_COPYFROMCLIPBOARD | VECTOR_EVENT_AFTER | 0 | LVectorBase::CopyFromClipboard has been completed.

Your callback can monitor all these operations and cancels whatever operation you want.

See Also

Functions: | LVectorBase::Event
Topics: | Vector Handle Events

Example

// This example defines a new event consisting of a rotate, translate and a scale.
// A message is displayed in the Event callback before the event and after the event.
// LVectorBase::Event()
// VectorEventProcCallBack
#define MY_CUSTOM_EVENT (VECTOR_EVENT_USER+1)
class LMyVector2: public LVectorBase
{
protected:
L_INT LMyVector2::VectorEventProcCallBack(
pVECTORHANDLE pVector,
L_UINT uLevel,
pVECTOREVENT pEvent,
L_VOID L_FAR *pUserData
);
};

L_INT LMyVector2::VectorEventProcCallBack(
pVECTORHANDLE pVector,
L_UINT uLevel,
pVECTOREVENT pEvent,
L_VOID L_FAR *pUserData
)
{
L_TCHAR *pszMsg= TEXT("");

if (pEvent->uType == MY_CUSTOM_EVENT)
{
switch (pEvent->Status)
{
case VECTOR_EVENT_STATUS_BEFORE:
pszMsg = TEXT("Before MY_CUSTOM_EVENT");
break;

case VECTOR_EVENT_STATUS_AFTER:
pszMsg = TEXT("After MY_CUSTOM_EVENT");
break;
}
MessageBox(NULL, pszMsg, TEXT(""), MB_OK);

}
return LVectorBase::VectorEventProcCallBack(pVector, uLevel, pEvent, pUserData);
}

void VectorEventTest( LVectorBase *pVector)
{
L_INT nRet = SUCCESS;
VECTOREVENT Event;
VECTORPOINT Point;

// Fire our new event, giving all event callbacks in the vector handle a chance to cancel our operation
memset( &Event, 0, sizeof( Event ) );
Event.nSize = sizeof( Event );
Event.uType = MY_CUSTOM_EVENT;

Event.Status = VECTOR_EVENT_STATUS_BEFORE;
nRet = pVector->Event(&Event);
if( nRet != SUCCESS )
{
//a callback has returned something other than success, we should cancel
return;
}

// do the operation, for example, rotate, translate and scale

Point.x = 10.0; Point.y = 20.0; Point.z = 30.0;
pVector->SetRotation( &Point);

Point.x = 4.0; Point.y = 4.0; Point.z = 4.0;
pVector->SetTranslation(&Point );

Point.x = 0.5; Point.y = 0.5; Point.z = 0.5;
pVector->SetScale(&Point );

// notify the vector handle that the operation is done
Event.Status = VECTOR_EVENT_STATUS_AFTER;
pVector->Event(&Event );
}


LVectorBase:: VectorFontMapperCallBack

#include "ltwrappr.h"

virtual L_INT LVectorBase::VectorFontMapperCallBack (pVector, pLogFont)

pVECTORHANDLE pVector; | /* pointer to a vector handle */
LPLOGFONT pLogFont; | /* pointer to a Log Font */

Processes each new font that is added to the resource list of the vector object.

Parameter | Description
pVector | Pointer to the vector image containing the objects to enumerate.
pLogFont | Pointer to a Log Font being processed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorBase::EnableFontMapper function calls your callback function as it gets the LogFont of each Text Object in the vector handle.

To use this function, you must do the following:

1. Derive a class from LVectorBase.

2. Override the L_INT LVectorBase::VectorFontMapperCallBack function in your class.

3. Call LVectorBase::EnableFontMapper, you must set bEnable = TRUE

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::EnableFontMapper, LVectorBase::IsFontMapperEnabled
Topics: | Mapping Fonts

Example

For an example, refer to LVectorBase::IsFontMapperEnabled.


LVectorBase::ZoomRect

#include "ltwrappr.h"

L_INT LVectorBase::ZoomRect (pRect)

const RECT L_FAR * pRect;

/* pointer to a RECT structure */

Sets the current zoom rectangle inside a vector handle.

Parameter | Description
pRect | Pointer to a RECT structure that contains data on the new zoom rectangle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Use this function to set the desired zoom rectangle inside the current view port associated with a vector handle.

Please note that you will have to update the window to see the results of this function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::SetViewport, LVectorBase::GetViewPort, LVectorBase::SetPan, LVectorBase::GetPan
Topics: | Viewing Vector Images
 | Vector Images: Viewing a Vector Image

Example

/* This example will use ZoomRect to zoom to a desired area inside the vector handle */

void Zoom ( LVectorBase *pVector, RECT *pRect )
{
pVector->ZoomRect(pRect );
}


LVectorChord::LVectorChord

#include "ltwrappr.h"

L_VOID LVectorChord::LVectorChord(pChord = NULL)

L_VOID LVectorChord::LVectorChord(pObject, pVector =NULL)

pVECTORCHORD pChord; | /* pointer to a VECTORPIE/VECTORCHORD structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorChord object.

Parameter | Description
pChord | Pointer to a VECTORCHORD structure that contains information used to create and initialize the new vector chord object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector chord object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector chord object will be associated.

Returns

None

Comments

LVectorChord::LVectorChord(pChord) is a constructor for the LVectorChord object. It takes a valid pVECTORCHORD pointer and creates an LVectorChord object.

LVectorChord::LVectorChord(pObject, pVector=NULL) creates an LVectorChord object based on the information provided in pObject and associates the newly created LVectorChord object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorChord object using the LVectorChord::LVectorChord(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_CHORD
//LVectorBase *pVector is valid
LVectorChord MyVectorChord(pObject, pVectorBase);
if (MyVectorChord.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorChord::~LVectorChord, Class Members

Example

For an example for LVectorChord::LVectorChord(pChord), refer to LVectorChord::LockObject.

For an example for LVectorChord::LVectorChord(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorChord::~LVectorChord

#include "ltwrappr.h"

virtual L_VOID LVectorChord::~LVectorChord(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorChord class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorChord::LVectorChord, Class Members

Example

For an example, refer to LVectorChord::LockObject.


LVectorChord::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorChord::LockObject(pObject)

pVECTORCHORD pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORCHORD structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORCHORD type and pass the address to this function. After modifying the vector object settings, call LVectorChord::UnlockObject (). LVectorChord::LockObject () and LVectorChord::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorChord::UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorChord::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorChord::UnlockObject ().

To change the object information for a class object, call LVectorChord::UnlockObject.

LVectorChord::LockObject and LVectorChord::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorChord::LockObject and LVectorChord::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorChord::UnlockObject
Topics: | Working with Vector Objects

Example

//Example115
// This example will add a new green chord to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example115(HWND hWnd, LVectorBase *pVector)
{
VECTORCHORD Chord;

Chord.Point.x = 50;
Chord.Point.y = 50;
Chord.Point.z = 0;

Chord .Pen. bExtPen = FALSE;
Chord.Pen.nSize = sizeof( VECTORPEN );
Chord.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Chord.Pen.NewPen.LogPen.lopnWidth.x = 1;
Chord.Pen.NewPen.LogPen.lopnWidth.y = 1;
Chord.Pen.NewPen.LogPen.lopnColor = RGB(255,255,0);

Chord.Brush.nSize = sizeof(VECTORBRUSH);

Chord.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD; Chord.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,255,0);
Chord.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

Chord.Radius = 30;
Chord.StartAngle = 45;
Chord.SweepAngle = 145;

LVectorChord VectorChord(&Chord);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorChord);

//Now change color to blue
MessageBox(NULL, TEXT("Changing pen color to blue"), TEXT(""), MB_OK);

VECTORCHORD ChordTemp;

VectorChord.LockObject(&ChordTemp);

ChordTemp.Pen. bExtPen = FALSE;

ChordTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorChord.UnlockObject(&ChordTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorChord destructor called when VectorChord goes out of scope
}


LVectorChord::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorChord::UnlockObject(pObject)

pVECTORCHORD pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORCHORD structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORCHORD and pass the address to the LVectorChord::LockObject() function. After modifying the vector object settings, call LVectorChord::UnlockObject (). LVectorChord::LockObject () and LVectorChord::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorChord::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorChord::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorChord::UnlockObject ().

To get the current object information for a class object, call LVectorChord::LockObject.

LVectorChord::LockObject and LVectorChord::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorChord::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorChord::LockObject.


LVectorCircle::LVectorCircle

#include "ltwrappr.h"

L_VOID LVectorCircle::LVectorCircle(pCircle = NULL)

L_VOID LVectorCircle::LVectorCircle(pObject, pVector =NULL)

pVECTORCIRCLE pCircle; | /* pointer to a VECTORCIRCLE structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorCircle object.

Parameter | Description
pCircle | Pointer to a VECTORCIRCLE structure that contains information used to create and initialize the new vector circle object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector circle object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector circle object will be associated.

Returns

None

Comments

LVectorCircle::LVectorCircle(pCircle) is a constructor for the LVectorCircle object. It takes a valid pVECTORCIRCLE pointer and creates an LVectorCircle object.

LVectorCircle::LVectorCircle(pObject, pVector=NULL) creates an LVectorCircle object based on the information provided in pObject and associates the newly created LVectorCircle object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorCircle object using the LVectorCircle::LVectorCircle(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_CIRCLE
//LVectorBase *pVector is valid
LVectorCircle MyVectorCircle(pObject, pVectorBase);
if (MyVectorCircle.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorCircle::~LVectorCircle, Class Members

Example

For an example for LVectorCircle::LVectorCircle(pCircle), refer to LVectorCircle::LockObject.

For an example for LVectorCircle::LVectorCircle(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorCircle::~LVectorCircle

#include "ltwrappr.h"

virtual L_VOID LVectorCircle::~LVectorCircle(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorCircle class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorCircle::LVectorCircle, Class Members

Example

For an example, refer to LVectorCircle::LockObject.


LVectorCircle::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorCircle::LockObject(pObject)

pVECTORCIRCLE pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORCIRCLE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORCIRCLE type and pass the address to this function. After modifying the vector object settings, call LVectorCircle::UnlockObject (). LVectorCircle::LockObject () and LVectorCircle::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorCircle::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorCircle::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorCircle::UnlockObject ().

To change the object information for a class object, call LVectorCircle::UnlockObject.

LVectorCircle::LockObject and LVectorCircle::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorCircle::LockObject and LVectorCircle::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorCircle::UnlockObject
Topics: | Working with Vector Objects

Example

//Example111
// This example will add a new green circle to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example111(HWND hWnd, LVectorBase *pVector)
{
VECTORCIRCLE Circle;

Circle.Point.x = 50;
Circle.Point.y = 50;
Circle.Point.z = 0;

Circle.Pen. bExtPen = FALSE;
Circle.Pen.nSize = sizeof( VECTORPEN );
Circle.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Circle.Pen.NewPen.LogPen.lopnWidth.x = 2;
Circle.Pen.NewPen.LogPen.lopnWidth.y = 2;
Circle.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

Circle.Brush.nSize = sizeof(VECTORBRUSH);

Circle.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Circle.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,255,0);
Circle.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

Circle.Radius = 40;

LVectorCircle VectorCircle(&Circle);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer (&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorCircle);

//Now change color to blue
MessageBox(NULL, TEXT("Changing pen color to blue"), TEXT(""), MB_OK);

VECTORCIRCLE CircleTemp;

VectorCircle.LockObject(&CircleTemp);

CircleTemp.Pen.bExtPen = FALSE;

CircleTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorCircle.UnlockObject(&CircleTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorCircle destructor called when VectorCircle goes out of scope
}


LVectorCircle::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorCircle::UnlockObject(pObject)

pVECTORCIRCLE pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORCIRCLE structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORCIRCLE and pass the address to the LVectorCircle::LockObject () function. After modifying the vector object settings, call LVectorCircle::UnlockObject (). LVectorCircle::LockObject () and LVectorCircle::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorCircle::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorCircle::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorCircle::UnlockObject ().

To get the current object information for a class object, call LVectorCircle::LockObject.

LVectorCircle::LockObject and LVectorCircle::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorCircle::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorCircle::LockObject.


LVectorClone::LVectorClone

#include "ltwrappr.h"

L_VOID LVectorClone::LVectorClone(pClone =NULL)

pVECTORCLONE pClone;

/* pointer to a VECTORCLONE structure */

Constructs and initializes the different member variables of the LVectorClone object.

Parameter | Description
pClone | Pointer to a VECTORCLONE structure that contains information used to create and initialize the new vector clone object.

Returns

None

Comments

LVectorClone::LVectorClone(pClone) is a constructor for the LVectorClone object. It takes a valid pVECTORCLONE pointer and creates an LVectorClone object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorClone::~LVectorClone, Class Members

Example

For an example, refer to LVectorClone::SetGroup.


LVectorClone::~LVectorClone

#include "ltwrappr.h"

virtual L_VOID LVectorClone::~LVectorClone(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorClone class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorClone::LVectorClone, Class Members

Example

For an example, refer to LVectorClone::SetGroup.


LVectorClone::LockObject

virtual L_INT LVectorClone::LockObject(pClone)

pVECTORCLONE pClone;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pClone | Pointer to a VECTORCLONE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORCLONE type and pass the address to this function. After modifying the vector object settings, call LVectorClone::UnlockObject (). LVectorClone::LockObject() and LVectorClone::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorClone::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, the Object member cannot be changed using LVectorClone::UnlockObject ().

To change the object information for a class object, call LVectorClone::UnlockObject.

LVectorClone::LockObject and LVectorClone::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorClone::LockObject and LVectorClone::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorClone::UnlockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorClone::SetGroup.


LVectorClone::SetGroup

#include "ltwrappr.h"

virtual L_INT LVectorClone::SetGroup(pVectorGroup)

L_FAR LVectorGroup *pVectorGroup;

/* pointer to a vector group object */

Associates a vector group with a vector clone.

Parameter | Description
pVectorGroup | Pointer to an LVectorGroup object to be associated with the clone object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

A vector clone object must be associated with a vector group before it can be added to an LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Working with Vector Objects

Example

//Example148
// This example will add a three square to a LVectorBase object and to a LVectorGroup object
// A "clone" vector object will be created from the group, and displayed with purple hatched brush
L_VOID CreateRectangle(
LVectorBase *pVector,
LVectorGroup *pGroup,
VECTORPOINT point0,
VECTORPOINT point1,
COLORREF crPen,
COLORREF crBrush)
{
VECTORRECTANGLE Rectangle;
Rectangle.Point[0] = point0;
Rectangle.Point[1] = point1;

Rectangle.Brush.nSize = sizeof(VECTORBRUSH);

Rectangle.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Rectangle.Brush.BrushType.StandardBrush.LogBrush.lbColor = crBrush;
Rectangle.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

Rectangle.Pen.nSize = sizeof( VECTORPEN );

Rectangle.Pen.bExtPen = FALSE;
Rectangle.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Rectangle.Pen.NewPen.LogPen.lopnWidth.x = 2;
Rectangle.Pen.NewPen.LogPen.lopnWidth.y = 2;
Rectangle.Pen.NewPen.LogPen.lopnColor = crPen;

LVectorRectangle VectorRectangle(&Rectangle);
pVector->AddObject(&VectorRectangle);
pGroup->AddObject(&VectorRectangle);
}

L_VOID Example148(HWND hWnd, LVectorBase *pVector)
{
//Create a new group
LVectorGroup VectorGroup;
VECTORGROUPDESC GroupDesc;
VECTORPOINT point0, point1;
COLORREF color;

VectorGroup.GetGroupDesc(&GroupDesc);
lstrcpy(GroupDesc.szName, TEXT("My New Group"));
VectorGroup.SetGroupDesc(&GroupDesc);

pVector->AddGroup(&VectorGroup);

//Create three rectangle objects and add to the group
//Add first rectangle
point0.x = 10; point0.y = 10; point0.z = 10;
point1.x = 30; point1.y = 30; point1.z = 10;
color = RGB(255,0,0);
CreateRectangle(pVector, &VectorGroup, point0, point1, color, color);

//Add second rectangle
point0.x = 30; point0.y = 30; point0.z = 10;
point1.x = 50; point1.y = 50; point1.z = 10;
color = RGB(0,255,0);
CreateRectangle(pVector, &VectorGroup, point0, point1, color, color);

//Add third rectangle
point0.x = 50; point0.y = 50; point0.z = 10;
point1.x = 70; point1.y = 70; point1.z = 10;
color = RGB(0,0,255);
CreateRectangle(pVector, &VectorGroup, point0, point1, color, color);

//Create a clone of the group
VECTORCLONE Clone;
LVectorClone VectorClone;
VectorClone.SetGroup(&VectorGroup);

VectorClone.LockObject(&Clone);

Clone.dwFlags = VECTOR_CLONE_USE_PEN | VECTOR_CLONE_USE_BRUSH;

Clone.Pen.bExtPen = FALSE;
Clone.Pen.NewPen.LogPen.lopnColor = RGB(0,0,0);
Clone.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(255,0,255);
Clone.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_HATCHED;
Clone.Point.x = 40;
Clone.Point.y = 40;
Clone.Point.z = 40;
Clone.Rotation.x = 0;
Clone.Rotation.y = 0;
Clone.Rotation.z = 45;

VectorClone.UnlockObject(&Clone);
pVector->AddObject(&VectorClone );

//~LVectorClone() destructor gets called when VectorClone object goes out of scope
}


LVectorClone::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorClone::UnlockObject(pClone)

pVECTORCLONE pClone;

/* pointer to a vector object */

Sets the object information of the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pClone | Pointer to a VECTORCLONE structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORCLONE and pass the address to the LVectorClone::LockObject () function. After modifying the vector object settings, call LVectorClone::UnlockObject (). LVectorClone::LockObject () and LVectorClone::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorClone::UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, the VECTORCLONE.Object member cannot be changed using LVectorClone::UnlockObject().

To get the current object information for a class object, call LVectorClone::LockObject.

LVectorClone::LockObject and LVectorClone::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorClone::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorClone::SetGroup.


LVectorDialog::LVectorDialog

#include "ltwrappr.h"

L_VOID LVectorDialog::LVectorDialog(void)

L_VOID LVectorDialog::LVectorDialog(pLVector)

LVectorBase L_FAR *pLVector;

/* pointer to an LVectorBase object */

Constructs and initializes the member variables of the class object.

Parameter | Description
pLVector | Pointer to an LVectorBase object that references the vector.

Returns

None

Comments

These are the constructors for the LVectorDialog class. They construct and initialize the member variables of the class object.

LVectorDialog::LVectorDialog(void) is the default constructor.

LVectorDialog::LVectorDialog(pLVector) constructs an LVectorDialog object and allocates a vector from another LEAD vector handle.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorDialog::~LVectorDialog, Class Members

Example

For an example of LVectorDialog::LVectorDialog(void), refer to LVectorDialog::IsValid.

This is an example for LVectorDialog::LVectorDialog(pLVector):

//Example38
L_VOID Example38(HWND hWnd)
{
VECTORPOINT rotatePoint = {90,0,0,0};
VECTORPOINT originPoint = {0,0,0,0};

LVectorBase Vector;
Vector.Load(TEXT("test.dxf"));

LVectorDialog VectorDlg(&Vector);

VectorDlg.EnableAutoProcess();
VectorDlg.DoModalVectorRotate(hWnd, &rotatePoint, &originPoint);

//Get a pointer to the vector (refers to Vector)
LVectorBase *pVector = VectorDlg.GetVector();

//Do something with pointer ...

//destructor called when out of scope
}


LVectorDialog::~LVectorDialog

#include "ltwrappr.h"

virtual L_VOID LVectorDialog::~LVectorDialog(void)

Destroys the class object and frees any allocated variables and memory associated with the object.

Returns

None

Comments

This is the destructor for the LVectorDialog class. It destroys the class object and frees any allocated variables and memory associated with the object.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorDialog::LVectorDialog, Class Members

Example

For an example, refer to LVectorDialog::LVectorDialog.


LVectorDialog::DoModalVector3DOptions

This function has been removed. To achieve the same functionality, use LVectorDialog::DoModalVectorRender.


LVectorDialog::DoModalVectorCamera

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorCamera(hWndParent=NULL, pCamera=NULL))

HWND hWndParent; | /* handle of the window that owns the dialog */
pVECTORCAMERA pCamera; | /* pointer to a VECTORCAMERA structure */

Brings up the Vector Camera dialog.

Parameter | Description
hWnd | Handle of the window that owns the dialog.
pCamera | Pointer to a VECTORCAMERA structure that contains camera values. The values present in pCamera when the function is called are used to initialize the dialog. If this parameter is NULL when the function is called, the values used to initialize the dialog will come from the vector handle. When this function returns, this parameter is updated with the values entered through the dialog.

Returns

SUCCESS | The function was successful.
ERROR_DLG_CANCELED | User clicked the Cancel button.

Comments

Object selection has no effect on the camera.

The following functions are used to get or set the vector camera:

LVectorDialog::GetCamera

LVectorDialog::SetCamera

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorScale, LVectorDialog::DoModalVectorTranslate, LVectorDialog::DoModalVectorRotate, LVectorDialog::DoModalVector3DOptions
Topics: | Vector Images: Viewing a Vector Image
 | Vector Common Dialogs

Example

//This example displays the VectorCamera dialog and displays entered values.
L_VOID Example42(HWND hWnd, LVectorBase *pVector)
{
L_TCHAR szTemp[200];

LVectorDialog VectorDlg(pVector);
VECTORCAMERA camera;

//keep current settings, but change bPerspective to TRUE
pVector->GetCamera(&camera);

camera.bPerspective = TRUE;

VectorDlg.EnablePreview();
VectorDlg.EnableAutoProcess();
VectorDlg.DoModalVectorCamera(hWnd, &camera);

wsprintf( szTemp,
TEXT("Camera\nTheta[%lf]\nPhi[%lf]\nLookAt[%lf,%lf,%lf]\nDistance[%lf]\nPerspective[%s]"),
camera.Theta,
camera.Phi,
camera.LookAt.x,
camera.LookAt.y,
camera.LookAt.z,
camera.Distance,
camera.bPerspective?TEXT("TRUE"):TEXT("FALSE")
);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorDialog::DoModalVectorEditAllGroups

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorEditAllGroups(hWndParent=NULL);

HWND hWndParent;

/* window handle */

Brings up the Vector Edit Groups dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorNewGroup, LVectorDialog::DoModalVectorEditGroup
Topics: | Vector Images: Vector Dialogs

Example

//Example127
// This example will call the DoModalVectorEditAllGroups() dialog
L_VOID Example127(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector(pVector);
VectorDlg.EnablePreview();
VectorDlg.EnableAutoProcess();

VectorDlg.DoModalVectorEditAllGroups(hWnd);
}


LVectorDialog::DoModalVectorEditAllLayers

#include "ltwrappr.h"

virtual L_INT EXT_FUNCTION LVectorDialog::DoModalVectorEditAllLayers (hWndParent=NULL)

HWND hWndParent;

/* window handle */

Brings up the Vector Edit Layers dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorNewLayer, LVectorDialog::DoModalVectorEditLayer, Class Members
Topics: | Vector CommonDialogs

Example

L_VOID Example85(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector (pVector);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess ();

VectorDlg.DoModalVectorEditAllLayers (hWnd);
}


LVectorDialog::DoModalVectorEditGroup

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorEditGroup(hWndParent, pVectorGroup)

HWND hWndParent; | /* window handle */
LVectorGroup *pVectorGroup; | /* pointer to a vector group */

Brings up the Vector Edit Group dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWnd | Handle of the window that owns the dialog.
pVectorGroup | Pointer to an LVectorGroup object that references the group to be edited.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorEditAllGroups, LVectorDialog::DoModalVectorNewGroup
Topics: | Vector Images: Vector Dialogs

Example

//Example129
// This example will call the DoModalVectorEditGroup() dialog, and return the selected values
L_VOID Example129(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector(pVector);
VectorDlg.EnablePreview();
VectorDlg.EnableAutoProcess();

LVectorGroup VectorGroup;

pVector->GetGroupByIndex(0, &VectorGroup);
L_INT nRet = VectorDlg.DoModalVectorEditGroup(hWnd, &VectorGroup);
if (nRet == SUCCESS)
{
L_TCHAR szMsg[200];
VECTORGROUPDESC Desc;
VectorGroup.GetGroupDesc(&Desc);
wsprintf(szMsg, TEXT("New Group\nName[%s]"),Desc.szName);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorDialog::DoModalVectorEditLayer

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorEditLayer(hWndParent, pVectorLayer, pbActiveLayer=NULL)

HWND hWndParent; | /* window handle */
LVectorLayer * pVectorLayer; | /* pointer to a vector layer object */
L_BOOL L_FAR * pbActiveLayer; | /* pointer to the active later flag */

Brings up the Vector Edit Layer dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pVectorLayer | Pointer to an LVectorLayer object that references the layer to be edited.
pbActiveLayer | Pointer to an L_BOOL variable that indicates whether or not to use the active layer. The value present in the variable when the function is called is used to initialize the dialog. If this parameter is NULL when the function is called, a value obtained from the pVectorLayer and parameter and the LVectorBase object associated with the dialog will be used to initialize the dialog. When this function returns, if this parameter is not NULL, the variable will be updated with the value entered through the dialog.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorNewLayer.
Topics: | Vector CommonDialogs

Example

L_VOID Example87(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector (pVector);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess ();

L_BOOL bActiveLayer = TRUE;
LVectorLayer VectorLayer;

pVector->GetActiveLayer (&VectorLayer);

L_INT nRet = VectorDlg.DoModalVectorEditLayer(hWnd, &VectorLayer, &bActiveLayer);
if (nRet == SUCCESS)
{
L_TCHAR szMsg[200];
VECTORLAYERDESC Desc;
VectorLayer.GetLayerDesc (&Desc);

wsprintf(szMsg, TEXT("Layer\nName[%s]\nVisible[%d]\nLocked[%d]"),
Desc.szName,
Desc.bVisible,
Desc.bLocked
);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorDialog::DoModalVectorEditObject

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorEditObject(hWndParent, pVectorObject);

HWND hWndParent; | /* window handle */
LVectorObject * pVectorObject; | /* pointer to a vector object */

Brings up the Edit Object dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pVectorObject | Pointer to the vector object to be edited. This parameter must contain a valid pointer to an LVectorObject object. This parameter cannot be NULL.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorNewObject, Class Members
Topics: | Vector CommonDialogs

Example

// This example will bring up the Edit Object dialog box for an object returned by HitTest.
L_VOID Example90(HWND hWnd, LVectorBase *pVectorBase, LPPOINT pPoint)
{
LVectorObject MyObject;
L_INT nRet;

nRet = pVectorBase->HitTest (pPoint, &MyObject);
if (nRet == SUCCESS)
{
LVectorDialog VectorDlg(pVectorBase);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess();

VectorDlg.DoModalVectorEditObject(hWnd, &MyObject);
}
}


LVectorDialog::DoModalVectorHitTest

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorHitTest(hWndParent=NULL, pHitTest=NULL)

HWND hWndParent; | /* window handle */
pVECTORHITTEST pHitTest; | /* hit test options */

Brings up the Vector Hit Test Options dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pHitTest | Pointer to a VECTORHITTEST structure that contains hit test options. The values present in the structure when the function is called are used to initialize the dialog. If this parameter is NULL when the function is called, the values used to initialize the dialog will come from the vector handle. When this function returns, if this parameter is not NULL, the structure pointed to by pHitTest is updated with the values entered through the dialog.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To get the current hit test settings use LVectorBase::GetHitTest.

Hit test settings can also be set by calling LVectorBase::SetHitTest.

The hit test can be performed by calling LVectorBase::HitTest.

Required DLLs and Libraries

LVKRN
LVDLG

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetHitTest, LVectorBase::SetHitTest, LVectorBase::HitTest, Class Members
Topics: | Vector CommonDialogs

Example

L_VOID Example84(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;
VECTORHITTEST HitTest;

VectorDlg.SetVector(pVector);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess ();

L_TCHAR szMsg[200], *pszFlags1=TEXT(""), *pszFlags2=TEXT("");

HitTest.nDistance = 10;
HitTest.nSize = sizeof(VECTORHITTEST);
HitTest.dwFlags = VECTOR_HITTEST_CLOSEDFIGURES;

VectorDlg.DoModalVectorHitTest(hWnd, &HitTest);

if (HitTest.dwFlags & VECTOR_HITTEST_CLOSEDFIGURES)
pszFlags1 = TEXT("VECTOR_HITTEST_CLOSEDFIGURES");

if (HitTest.dwFlags & VECTOR_HITTEST_IGNORESELECTED)
pszFlags2 = TEXT("VECTOR_HITTEST_IGNORESELECTED");

wsprintf(szMsg, TEXT("Distance[%d]\ndwFlags[%s %s]"), HitTest.nDistance, pszFlags1, pszFlags2);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}


LVectorDialog::DoModalVectorNewGroup

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorNewGroup(hWndParent, pVectorGroup)

HWND hWndParent; | /* window handle */
LVectorGroup *pVectorGroup; | /* pointer to a vector group */

Brings up the Vector New Group dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pVectorGroup | Pointer to an LVectorGroup object. If this parameter is not NULL, the object pointed to by pVectorGroup will be updated with the newly added group object. If this parameter is NULL, the dialog is initialized using default values. When the function returns, pVectorGroup will not be updated with the newly added group, since pVectorGroup is NULL.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalEditAllGroups, LVectorDialog::DoModalEditGroup.
Topics: | Vector Images: Vector Dialogs

Example

//Example128
// This example will call the DoModalVectorNewGroup() dialog, and return the selected values.
// Will not allow creation of duplicate groups
L_VOID Example128(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector(pVector);
VectorDlg.EnableAutoProcess();

if (VectorDlg.IsNoDuplicateEnabled() == FALSE)
{
MessageBox(hWnd, TEXT("Setting the 'No Duplicate Flag'"), TEXT(""), MB_OK);
}
VectorDlg.EnableNoDuplicate();

LVectorGroup VectorGroup;
L_INT nRet = VectorDlg.DoModalVectorNewGroup(hWnd, &VectorGroup);
if (nRet == SUCCESS)
{
L_TCHAR szMsg[200];
VECTORGROUPDESC Desc;
VectorGroup.GetGroupDesc(&Desc);

wsprintf(szMsg, TEXT("New Group\nName[%s]"),Desc.szName);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorDialog::DoModalVectorNewLayer

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorNewLayer(hWndParent=NULL, pVectorLayer=NULL, pbActiveLayer=NULL)

HWND hWndParent; | /* window handle */
LVectorLayer * pVectorLayer; | /* pointer to a vector layer object */
L_BOOL L_FAR *pbActiveLayer; | /* pointer to the active layer flag */

Brings up the Vector New Layer dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pVectorLayer | Pointer to an LVectorLayer object. If this parameter is not NULL, the object pointed to by pVectorLayer will be updated with the newly added layer structure. If this parameter is NULL, the dialog is initialized using default values. When the function returns, pVectorLayer will not be updated with the newly added layer, since pVectorLayer is NULL.
pbActiveLayer | Pointer to an L_BOOL variable that indicates whether or not to use the active layer. The value present in the variable, when the function is called, is used to initialize the dialog. If this parameter is NULL when the function is called, a default value (TRUE) is used to initialize the dialog. When this function returns, if this parameter is not NULL, the variable will be updated with the value entered through the dialog.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorEditLayer, Class Members
Topics: | Vector CommonDialogs

Example

// This example will call the DoModalVectorNewLayer() dialog, and return the selected values.
// It will not allow creation of duplicate layers.
L_VOID Example86(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector (pVector);
VectorDlg.EnableAutoProcess ();

VectorDlg.EnableNoDuplicate ();

L_BOOL bActiveLayer = TRUE;
LVectorLayer VectorLayer;

L_INT nRet = VectorDlg.DoModalVectorNewLayer(hWnd, &VectorLayer, &bActiveLayer);
if (nRet == SUCCESS)
{
L_TCHAR szMsg[200];
VECTORLAYERDESC Desc;
VectorLayer.GetLayerDesc (&Desc);

wsprintf(szMsg, TEXT("New Layer\nName[%s]\nVisible[%d]\nLocked[%d]"),
Desc.szName,
Desc.bVisible,
Desc.bLocked
);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorDialog::DoModalVectorNewObject

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorNewObject(hWndParent, nType, pVectorLayer, pVectorObject);

virtual L_INT LVectorDialog::DoModalVectorNewObject(hWndParent, pVectorLayer, pVectorObject);

HWND hWndParent; | /* window handle */
L_INT nType; | /* object type */
LVectorLayer * pVectorLayer; | /* pointer to a vector layer object */
LVectorObject * pVectorObject; | /* pointer to the new vector object */

Brings up the New Object dialog. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pVectorLayer | Pointer to the destination vector layer. If this parameter is NULL, the object will be added to the active layer.
nType | Object type. Possible values are:
 | Value | Meaning
 | VECTOR_VERTEX | 3D vertex in space.
 | VECTOR_LINE | Line.
 | VECTOR_RECTANGLE | Rectangle.
 | VECTOR_POLYLINE | Polyline.
 | VECTOR_POLYBEZIER | Poly Bezier curve.
 | VECTOR_POLYGON | Polygon.
 | VECTOR_ELLIPSE | Ellipse.
 | VECTOR_CIRCLE | Circle.
 | VECTOR_ARC | Arc.
 | VECTOR_TEXT | Text.
 | VECTOR_PIE | Pie section.
 | VECTOR_CHORD | Chord.
 | VECTOR_POLYDRAW | Polydraw.
 | VECTOR_RASTER | Raster.
 | VECTOR_STOCK | Stock object from a stock library.
pVectorObject | Pointer to an LVectorObject object to be updated with the object information of the newly added vector object. For more information, refer to the Comments section below.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

For LVectorDialog::DoModalVectorNewObject(hWndParent, nType, pVectorLayer, pVectorObject):

If pVectorObject == NULL then the object is added to the vector, but no object information is provided in pVectorObject (since it is NULL). The object type of the dialog is determined by nType

If pVectorObject != NULL then pVectorObject is updated with the object information entered through the dialog.

For LVectorDialog::DoModalVectorNewObject(hWndParent, pVectorLayer, pVectorObject):

If pVectorObject == NULL then the function returns an error. (WRPERR_INVALID_PARAMETERS).

If pVectorObject != NULL then the dialog is initialized using the data present in pVectorObject. When the function returns, pVectorObject is updated with the object information entered through the dialog..

Note: To get or set specific properties using LVectorObject::LockObject and LVectorObject::UnlockObject, the type of objectc pointed to by pVectorObject must be the same as the object type given in nType. For example, if nType is VECTOR_LINE, then pVectorObject must point to an LVectorLine object.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorEditObject, Class Members
Topics: | Vector CommonDialogs

Example

// This example will call the DoModalVectorNewObject() dialog to create a line object in active layer.
// Line parameters are passed to initialize the dialog.
L_VOID Example88(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector (pVector);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess ();

VECTORLINE Line;
Line.Pen.nSize = sizeof(VECTORPEN);

Line.Pen .bExtPen = FALSE;
Line.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Line.Pen.NewPen.LogPen.lopnWidth.x = 10;
Line.Pen.NewPen.LogPen.lopnWidth.y = 10;
Line.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);

Line.Point[ 0 ].x = 50.0;
Line.Point[ 0 ].y = 50.0;
Line.Point[ 0 ].z = 0.0;

Line.Point[ 1 ].x = 70.0;
Line.Point[ 1 ].y = 50.0;
Line.Point[ 1 ].z = 0.0;

LVectorLine VectorLine(&Line);

L_INT nRet = VectorDlg.DoModalVectorNewObject(hWnd, NULL, &VectorLine);
if (nRet == SUCCESS)
{
L_TCHAR szMsg[200];

//Get the line descriptor
VectorLine.LockObject(&Line);
VectorLine.UnlockObject (&Line);

wsprintf(szMsg, TEXT("Line Color[%x]\nLine Points (%d,%d,%d) - (%d,%d,%d)"),
Line.Pen.NewPen.LogPen.lopnColor,
(int)Line.Point[0].x,
(int)Line.Point[0].y,
(int)Line.Point[0].z,
(int)Line.Point[1].x,
(int)Line.Point[1].y,
(int)Line.Point[1].z);

MessageBox(hWnd, szMsg,TEXT(""), MB_OK);
}

}

// This example will call the DoModalNewObject() dialog to create a line object in active layer.
// Line parameters are defaulted.

L_VOID Example89(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector (pVector);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess ();

L_INT nRet = VectorDlg.DoModalVectorNewObject(hWnd, VECTOR_LINE, NULL, NULL);
}


LVectorDialog::DoModalVectorRender

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorRender(hWndParent=NULL, pbUseLights=NULL, pColorAmbient=NULL, pnPolygonMode=NULL)

HWND hWndParent; | /* window handle */
L_BOOL L_FAR *pbUseLights; | /* flag that indicates whether to use lights */
COLORREF L_FAR *pColorAmbient; | /* ambient color */
L_INT L_FAR *pnPolygonMode; | /* polygon draw mode */

Brings up the Vector Render Options dialog.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pbUseLights | Pointer to an L_BOOL variable that indicates whether or not to use lights. The value present in the L_BOOL variable when the function is called is used to initialize the dialog. If this parameter is NULL when the function is called, the value used to initialize the dialog will come from the vector handle. When this function returns, if this parameter is not NULL, the variable pointed to by pbUseLights is updated with the value entered through the dialog.
pColorAmbient | Pointer to a COLORREF variable that contains an ambient color. The value present in the COLORREF variable when the function is called is used to initialize the dialog. If this parameter is NULL when the function is called, the value used to initialize the dialog will come from the vector handle. When this function returns, if this parameter is not NULL, the variable pointed to by pColorAmbient is updated with the value entered through the dialog.
pnPolygonMode | Pointer to an L_INT variable that contains a polygon mode value. The value present in the variable when the function is called is used to initialize the dialog. If this parameter is NULL when the function is called, the value used to initialize the dialog will come from the vector handle. When this function returns, if this parameter is not NULL, the variable pointed to by pnPolygonMode is updated with the value entered through the dialog. For a list of possible polygon mode values, refer to LVectorDialog::GetPolygonMode or LVectorDialog::SetPolygonMode.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function lets you change the current light use, the ambient color, and the polygon draw mode. Updating the variables is not affected by whether or not an object is selected.

If the GDI engine is being used, the bUseLights and pColorAmbient variables are not used.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::GetUseLights, LVectorDialog::SetUseLights, LVectorDialog::GetPolygonMode, LVectorDialog::SetPolygonMode.
Topics: | Vector CommonDialogs

Example

L_VOID Example82(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector (pVector);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess();

L_BOOL bUseLights = TRUE;
COLORREF ColorAmbient = RGB(100,200,50);
L_INT nPolygonMode = VECTOR_POLYGON_POINT;
L_TCHAR szMsg[200], *pszPolygonMode;

VectorDlg.DoModalVectorRender(hWnd, &bUseLights, &ColorAmbient, &nPolygonMode);
switch(nPolygonMode)
{
case VECTOR_POLYGON_POINT:
pszPolygonMode = TEXT("VECTOR_POLYGON_POINT");
break;
case VECTOR_POLYGON_LINE:
pszPolygonMode = TEXT("VECTOR_POLYGON_LINE");
break;
case VECTOR_POLYGON_FILL:
pszPolygonMode = TEXT("VECTOR_POLYGON_FILL");
break;
}
wsprintf(szMsg, TEXT("bUseLights[%d]\nColorAmbient[%x,%x,%x]\nPolygonMode[%s]"),
bUseLights,
GetRValue(ColorAmbient),
GetGValue(ColorAmbient),
GetBValue(ColorAmbient),
pszPolygonMode
);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}


LVectorDialog::DoModalVectorRotate

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DlgRotate(hWndParent=NULL, pRotation=NULL, pOrigin=NULL)

HWND hWndParent; | /* window handle */
pVECTORPOINT pRotation | /* pointer to a VECTORPOINT structure */
const pVECTORPOINT pOrigin; | /* pointer to a VECTORPOINT structure */

Brings up the Vector Rotation dialog.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pRotation | Pointer to a VECTORPOINT structure that contains rotation values. The values present in pRotation when the function is called are used to initialize the dialog. If this parameter is NULL when the function is called, the values used to initialize the dialog will come from the vector handle. When this function returns, this parameter is updated with the values entered through the dialog.
pOrigin | Pointer to a VECTORPOINT structure that contains the origin of the rotation. (The point about which the rotation occurs.) If pOrigin is not NULL, rotation occurs around this point. If pOrigin is NULL, the center of rotation is the accumulative center of the objects to be rotated.

Returns

SUCCESS | The function was successful.
ERROR_DLG_CANCELED | User clicked the Cancel button.

Comments

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be rotated in the dialog.

If there are selected objects inside the source vector handle, only those objects will be rotated in the dialog.

The following functions are used to get or set the rotation values:

LVectorDialog::GetRotation

LVectorDialog::SetRotation

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorScale, LVectorDialog::DoModalVectorTranslate, LVectorDialog::DoModalVector, LVectorDialog::DoModalVector3DOptions
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Vector Common Dialogs

Example

//Example36
L_VOID Example36(HWND hWnd)
{
L_TCHAR szTemp[100];
VECTORPOINT rotatePoint = {90,0,0,0};
VECTORPOINT originPoint = {0,0,0,0};
LVectorBase Vector;
LVectorDialog VectorDlg;

Vector.Load(TEXT("test.dxf"));

VectorDlg.SetVector(&Vector);

VectorDlg.EnablePreview();
VectorDlg.EnableAutoProcess();

//Set initial rotate values
rotatePoint.x = 90;
rotatePoint.y = 0;
rotatePoint.z = 0;

VectorDlg.DoModalVectorRotate(hWnd, &rotatePoint, &originPoint);
wsprintf(szTemp,
TEXT("Rotation(%d, %d, %d)"),
(int)rotatePoint.x,
(int)rotatePoint.y,
(int)rotatePoint.z );
MessageBox(hWnd, szTemp,TEXT(""), MB_OK);
}


LVectorDialog::DoModalVectorScale

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorScale(hWndParent=NULL, pScale=NULL, pOrigin=NULL)

HWND hWndParent; | /* handle of the window that owns the dialog */
pVECTORPOINT pScale; | /* pointer to a VECTORPOINT structure */
const pVECTORPOINT pOrigin; | /* pointer to a VECTORPOINT structure */

Brings up the Vector Scale dialog.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pScale | Pointer to a VECTORPOINT structure that contains scale values. The values present in pScale when the function is called are used to initialize the dialog. If this parameter is NULL when the function is called, the values used to initialize the dialog will come from the vector handle. When this function returns, this parameter is updated with the values entered through the dialog.
pOrigin | Pointer to a VECTORPOINT structure that contains the origin of the scale. (The point about which the scaling occurs.) If pOrigin is not NULL, scaling occurs around this point. If pOrigin is NULL, the center of scaling is the accumulative center of the objects to be scaled.

Returns

SUCCESS | The function was successful.
ERROR_DLG_CANCELED | User clicked the Cancel button.

Comments

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be scaled in the dialog.

If there are selected objects inside the source vector handle, only those objects will be scaled in the dialog.

The following functions are used to get or set the scaling values:

LVectorDialog::GetScale

LVectorDialog::SetScale

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorRotate, LVectorDialog::DoModalVectorTranslate, LVectorDialog::DoModalVectorCamera, LVectorDialog::DoModalVector3DOptions
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Vector Common Dialogs

Example

//Example40
L_VOID Example40(HWND hWnd)
{
VECTORPOINT scalePoint = {2,2,2,0};
VECTORPOINT originPoint= {0,0,0,0};
LVectorBase Vector;
LVectorDialog VectorDlg;
L_TCHAR szTemp[100];

Vector.Load(TEXT("test.dxf"));

VectorDlg.SetVector(&Vector);

VectorDlg.EnablePreview();
VectorDlg.EnableAutoProcess();

//double the scale
VectorDlg.DoModalVectorScale(hWnd, &scalePoint, &originPoint);
wsprintf(szTemp,
TEXT("Scale(%d, %d, %d)"),
(int)scalePoint.x,
(int)scalePoint.y,
(int)scalePoint.z );
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorDialog::DoModalVectorTranslate

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorTranslate(hWndParent=NULL, pTranslation=NULL)

HWND hWndParent; | /* handle of the window that owns the dialog */
pVECTORPOINT pTranslation; | /* pointer to a VECTORPOINT structure */

Brings up the Vector Translation dialog.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pTranslation | Pointer to a VECTORPOINT structure that contains translation values. The values present in pTranslation when the function is called are used to initialize the dialog. If this parameter is NULL when the function is called, the values used to initialize the dialog will come from the vector handle. When this function returns, this parameter is updated with the values entered through the dialog.

Returns

SUCCESS | The function was successful.
ERROR_DLG_CANCELED | User clicked the Cancel button.

Comments

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be translated in the dialog.

If there are selected objects inside the source vector handle, only those objects will be translated in the dialog.

The following functions are used to get or set the translation values:

LVectorDialog::GetTranslation

LVectorDialog::SetTranslation

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::DoModalVectorScale, LVectorDialog::DoModalVectorRotate, LVectorDialog::DoModalVectorCamera, LVectorDialog::DoModalVector3DOptions
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Vector Common Dialogs

Example

L_VOID Example41(HWND hWnd)
{
VECTORPOINT translatePoint;
LVectorBase Vector;
Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));

Vector.VectorDialog()->SetVector(&Vector);

Vector.VectorDialog()->EnablePreview();
Vector.VectorDialog()->EnableAutoProcess();

//set initial translation
translatePoint.x = 10;
translatePoint.y = 20;
translatePoint.z = 30;
Vector.SetTranslation(&translatePoint);

Vector.VectorDialog()->DoModalVectorTranslate(hWnd);
Vector.GetTranslation(&translatePoint);
{
L_TCHAR szTemp[100];
wsprintf(szTemp,
TEXT("translate(%d, %d, %d)"),
(int)translatePoint.x,
(int)translatePoint.y,
(int)translatePoint.z );
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}
}


LVectorDialog::DoModalVectorViewMode

#include "ltwrappr.h"

virtual L_INT LVectorDialog::DoModalVectorViewMode(hWndParent=NULL, pnViewMode=NULL);

HWND hWndParent; | /* window handle */
L_INT L_FAR *pnViewMode; | /* view mode */

Brings up the Vector View Mode dialog.

Parameter | Description
hWndParent | Handle of the window that owns the dialog.
pnViewMode | Pointer to an L_INT variable that contains a view mode value. The value present in the L_INT variable when the function is called is used to initialize the dialog. If this parameter is NULL when the function is called, the value used to initialize the dialog will come from the vector handle. When this function returns, if this parameter is not NULL, the variable pointed to by pnViewMode is updated with the value entered through the dialog.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector CommonDialogs

Example

L_VOID Example83(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;
L_INT nViewMode = VECTOR_VIEWMODE_SNAP;

VectorDlg.SetVector(pVector);
VectorDlg.EnablePreview();
VectorDlg.EnableAutoProcess();

L_BOOL bUseLights = TRUE;
COLORREF ColorAmbient = RGB(100,200,50);
L_INT nPolygonMode = VECTOR_POLYGON_POINT;
L_TCHAR szMsg[200], *pszViewMode;

VectorDlg.DoModalVectorViewMode(hWnd, &nViewMode);
switch(nViewMode)
{
case VECTOR_VIEWMODE_FIT:
pszViewMode = TEXT("VECTOR_VIEWMODE_FIT");
break;
case VECTOR_VIEWMODE_SNAP:
pszViewMode = TEXT("VECTOR_VIEWMODE_SNAP");
break;
}
wsprintf(szMsg, TEXT("ViewMode[%s]"), pszViewMode);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}


LVectorDialog::EnableAutoProcess

#include "ltwrappr.h"

L_BOOL LVectorDialog::EnableAutoProcess(bAuto=TRUE)

L_BOOL bAuto;

/* flag that indicates whether to enable auto processing */

Enables or disables auto processing.

Parameter | Description
bAuto | Flag that indicates whether to enable auto processing. Possible values are:
 | Value | Meaning
 | TRUE | Enable auto processing.
 | FALSE | Disable auto processing.

Returns

The previous state of EnableAutoProcess.

Comments

If auto-processing is enabled, the dialog will attempt to process the LVectorBase object associated with it when you display a dialog that supports auto-processing.

Before auto-processing can be performed by a dialog other than FileOpen, the class object must have a valid LVectorBase object associated with it. See LVectorDialog::SetVector for more information.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::LVectorDialog, Class Members
Topics: | Vector Images: Viewing a Vector Image
 | Vector Common Dialogs

Example

For an example, refer to LVectorDialog::DoModalVectorRotate.


LVectorDialog::EnableHelp

#include "ltwrappr.h"

L_BOOL LVectorDialog::EnableHelp(bHelpEnabled = TRUE)

L_BOOL bHelpEnabled;

/* flag for enabling help support */

Enables or disables the help support in the vector common dialogs.

Parameter | Description
bHelpEnabled | Flag that indicates whether to activate the help support. Possible values are:
 | Value | Meaning
 | TRUE | Enable the help support.
 | FALSE | Disable the help support.

Returns

TRUE | Help support was enabled.
FALSE | Help support was disabled.

Comments

If the help is enabled, the callback function LVectorDialog::VectorHelpCallback will be called every time the end-user requests help about one of the vector dialogs by using either the context-sensitive help or by pressing the help button.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::IsHelpEnabled, LVectorDialog::VectorHelpCallback
Topics: | Vector Images: Vector Dialogs
 | Help Support

Example

For an example, refer to LVectorDialog::VectorHelpCallback.


LVectorDialog::EnableNoDuplicate

#include "ltwrappr.h"

L_BOOL LVectorDialog::EnableNoDuplicate(bNoDuplicate=TRUE)

L_BOOL bNoDuplicate;

/* duplication flag */

Sets a flag that indicates whether to allow duplicate layer names within the same vector.

Parameter | Description
bNoDuplicate | Flag that indicates whether to process allow duplicate layer names in a vector. Possible values are:
 | Value | Meaning
 | TRUE | Do not allow duplicate layer names in a vector.
 | FALSE | Allow duplicate layer names in a vector.

Returns

TRUE | The previous setting was TRUE.
FALSE | The previous setting was FALSE.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::EnableSelectedOnly , Class Members
Topics: | Vector Common Dialogs

Example

For an example, refer to LVectorDialog::DoModalVectorNewLayer.


LVectorDialog::EnablePreview

#include "ltwrappr.h"

L_BOOL LVectorDialog::EnablePreview(bEnablePreview=TRUE)

L_BOOL bEnablePreview;

/* flag that indicates whether to enable showing a preview */

Enables or disables preview showing for the dialogs.

Parameter | Description
bEnablePreview | Flag that indicates whether to enable showing the preview. Possible values are:
 | Value | Meaning
 | TRUE | Enable showing the preview.
 | FALSE | Disable showing the preview.

Returns

The previous state for EnablePreview.

Comments

When the preview is enabled, dialogs that support image preview will display a thumbnail view of the image that allows the user to preview the operation before dismissing the dialog box.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::LVectorDialog, LVectorDialog::EnableAutoProcess, Class Members
Topics: | Vector Images: Viewing a Vector Image
 | Vector Common Dialogs

Example

For an example, refer to LVectorDialog::DoModalVectorRotate.


LVectorDialog::EnableSelectedOnly

#include "ltwrappr.h"

L_BOOL LVectorDialog::EnableSelectedOnly(bSelectedOnly=TRUE)

L_BOOL bSelectedOnly;

/* selection flag */

Sets a flag that indicates whether to process only selected objects or all objects.

Parameter | Description
bSelectedOnly | Flag that indicates whether to process only selected objects or all objects. Possible values are:
 | Value | Meaning
 | TRUE | Process only selected objects.
 | FALSE | Process all objects.

Returns

TRUE | The previous setting was TRUE.
FALSE | The previous setting was FALSE.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::EnableNoDuplicate, Class Members
Topics: | Vector CommonDialogs

Example

// This example selects object under pPoint, displays the rotate dialog,
// and only rotates selected objects
L_VOID Example92(LVectorBase *pVector, LPPOINT pPoint)
{
L_INT nRet;
LVectorObject VectorObject;

nRet = pVector->HitTest (pPoint, &VectorObject);
if (nRet == SUCCESS)
{
VectorObject.SelectObject ();
LVectorDialog VectorDlg(pVector);
VectorDlg.EnablePreview ();
VectorDlg.EnableAutoProcess ();
VectorDlg.EnableSelectedOnly ();
VectorDlg.DoModalVectorRotate();
}
}


LVectorDialog::GetCamera

This function has been removed.


LVectorDialog::GetColorAmbient

This function has been removed.


LVectorDialog::GetPolygonMode

This function has been removed.


LVectorDialog::GetRotation

This function has been removed.


LVectorDialog::GetScale

This function has been removed.


LVectorDialog::GetString

#include "ltwrappr.h"

static L_INT LVectorDialog::GetString(uString, pString)

L_UINT32 uString; | /* index of a string */
L_TCHAR L_FAR * pString; | /* pointer to the variable to be updated */

Gets the current string for the specified index.

Parameter | Description
uString | Index into a list of strings. For a list of the strings, refer to Dialog Strings.
pString | Pointer to the buffer to be updated with the current string.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Before calling this function, call LVectorDialog::GetStringLen to get the length of the text you want to retrieve.

Use LVectorDialog::SetString to modify the automated menu item.

Before calling this function, you must declare a variable as a pointer to a character string. Then, pass the variable in the pString parameter. This function will update the variable with the character string at the given index.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::GetStringLen, LVectorDialog::SetString, Class Members
Topics: | Vector CommonDialogs

Example

// This example will set a custom font and string for the rotate dialog.

# include "Windowsx.h"

L_VOID Example91(LVectorBase *pVector, HWND hWnd)
{
HFONT hMyFont=NULL;
HDC hDC;
L_TCHAR L_FAR* pszString=NULL;
L_UINT uLen;
L_TCHAR szNewCaption[] = TEXT("My New Rotate Caption");

LVectorDialog VectorDlg(pVector);

hDC = GetDC(hWnd);

hMyFont = CreateFont( -MulDiv( 8, GetDeviceCaps(hDC, LOGPIXELSY), 72),
0, 0, 0,
FW_BOLD, FALSE, FALSE, FALSE,
DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS,
DEFAULT_QUALITY, DEFAULT_PITCH,
TEXT("Bones") );
VectorDlg.SetFont( hMyFont );

//get the default caption string
VectorDlg.GetStringLen( VECTOR_DLGSTR_TRANSFORM_ROTATE_CAPTION, &uLen );
pszString = (L_TCHAR L_FAR*) GlobalAllocPtr( GHND, uLen * sizeof( L_TCHAR ) 1 ); //+1 for NULL
VectorDlg.GetString ( VECTOR_DLGSTR_TRANSFORM_ROTATE_CAPTION, pszString );

// display default caption string
MessageBox(hWnd, pszString, TEXT("Default Vector Dialog Rotate Caption"), MB_OK );
GlobalFreePtr( pszString );

// change caption string
VectorDlg.SetString( VECTOR_DLGSTR_TRANSFORM_ROTATE_CAPTION, szNewCaption );

// now, display the dialog to see our changes
VectorDlg.EnablePreview();
VectorDlg.EnableAutoProcess();
VectorDlg.DoModalVectorRotate();
VectorDlg.SetFont ( NULL );
::DeleteObject( hMyFont );
ReleaseDC(hWnd, hDC);
}


LVectorDialog::GetStringLen

#include "ltwrappr.h"

static L_INT LVectorDialog::GetStringLen(uString, puLen)

L_UINT32 uString; | /* index of a string */
L_UINT L_FAR * puLen; | /* pointer to the variable to be updated */

Gets the length of the string at the specified index.

Parameter | Description
uString | Index into a list of strings. For a list of the strings, refer to Dialog Strings.
puLen | Pointer to an unsigned integer variable to be updated with the length of the item's current character string.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Once you know the length of the string at the specified index, retrieve the text by calling LVectorDialog::GetString.

Use LVectorDialog::SetString to modify the text.

Before calling this function, you must declare an unsigned integer variable. Then, pass the address of the variable in the puLen parameter. This function will update the variable with the length of the automation item's character string.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::GetString, LVectorDialog::SetString, Class Members
Topics: | Vector CommonDialogs

Example

For an example, refer to LVectorDialog::GetString.


LVectorDialog::GetTranslation

This function has been removed.


LVectorDialog::GetUseLights

This function has been removed.


LVectorDialog::GetVector

#include "ltwrappr.h"

LVectorBase L_FAR * LVectorDialog::GetVector(L_VOID)

Gets the LVectorBase object used by the dialogs for auto processing.

Returns

A pointer to the vector object used by the dialogs.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::LVectorDialog, LVectorDialog::EnableAutoProcess, LVectorDialog::SetVector, Class Members
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Vector Common Dialogs

Example

For an example, refer to LVectorDialog::LVectorDialog.


LVectorDialog::IsAutoProcessEnabled

#include "ltwrappr.h"

L_BOOL LVectorDialog::IsAutoProcessEnabled(L_VOID)const

Determines whether auto processing is enabled or disabled.

Returns

TRUE | Auto processing is enabled.
FALSE | Auto processing is disabled.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::LVectorDialog, LVectorDialog::EnableAutoProcess, Class Members
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Vector Common Dialogs

Example

L_VOID Example39(HWND hWnd)
{
LVectorBase Vector;
LVectorDialog VectorDlg;

Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
VectorDlg.SetVector(&Vector);

if (VectorDlg.IsPreviewEnabled())
MessageBox(hWnd, TEXT("IsPreviewEnabled() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsPreviewEnabled() returns FALSE"), TEXT(""), MB_OK);

if (VectorDlg.IsAutoProcessEnabled())
MessageBox(hWnd, TEXT("IsAutoProcessEnabled() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsAutoProcessEnabled() returns FALSE"), TEXT(""), MB_OK);
}


LVectorDialog::IsHelpEnabled

#include "ltwrappr.h"

L_BOOL LVectorDialog::IsHelpEnabled()

Retrieves the status of the help support.

Returns

TRUE | Help support is enabled.
FALSE | Help support is disabled.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::EnableHelp, LVectorDialog::VectorHelpCallback
Topics: | Vector Images: Vector Dialogs
 | Help Support

Example

For an example, refer to LVectorDialog::VectorHelpCallback.


LVectorDialog::IsNoDuplicateEnabled

#include "ltwrappr.h"

virtual L_BOOL LVectorDialog::IsNoDuplicateEnabled() const;

Indicates whether to allow duplicate layer names within the same vector.

Returns

TRUE | Do not allow duplicate layer names in a vector.
FALSE | Allow duplicate layer names in a vector.

Comments

This function returns the value of the internal setting that indicates whether to allow duplicate layer names within the same vector.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::EnableNoDuplicate, Class Members
Topics: | Vector Images: Vector Dialogs

Example

//Example86
// This example will call the DoModalVectorNewLayer() dialog, and return the selected values
// Will not allow creation of duplicate layers
L_VOID Example86(HWND hWnd, LVectorBase *pVector)
{
LVectorDialog VectorDlg;

VectorDlg.SetVector(pVector);
VectorDlg.EnableAutoProcess();

if (VectorDlg.IsNoDuplicateEnabled() == FALSE)
{
MessageBox(hWnd, TEXT("Setting the 'No Duplicate Flag'"), TEXT(""), MB_OK);
}
VectorDlg.EnableNoDuplicate();

L_BOOL bActiveLayer = TRUE;
LVectorLayer VectorLayer;

L_INT nRet = VectorDlg.DoModalVectorNewLayer(hWnd, &VectorLayer, &bActiveLayer);
if (nRet == SUCCESS)
{
L_TCHAR szMsg[200];
VECTORLAYERDESC Desc;
VectorLayer.GetLayerDesc(&Desc);

wsprintf(szMsg, TEXT("New Layer\nName[%s]\nVisible[%d]\nLocked[%d]"),
Desc.szName,
Desc.bVisible,
Desc.bLocked
);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorDialog::IsPreviewEnabled

#include "ltwrappr.h"

L_BOOL LVectorDialog::IsPreviewEnabled(L_VOID) const

Determines whether the dialog preview is enabled or disabled.

Returns

TRUE | Showing the preview is enabled.
FALSE | Showing the preview is disabled.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::LVectorDialog, Class Members
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Vector Common Dialogs

Example

For an example, refer to LVectorDialog::IsAutoProcessEnabled.


LVectorDialog::IsValid

#include "ltwrappr.h"

L_BOOL LVectorDialog::IsValid(L_VOID)

Determines whether the LVectorDialog object is valid.

Returns

TRUE | There is a pointer to a valid bitmap object.
FALSE | There is not a pointer to a valid bitmap object.

Comments

Call this function to check if the class object has been associated with a valid LVectorBase object.

Before you can use some of the LVectorDialog functions, a vector must be associated with the class object. Until you have associated a valid vector object with the LVectorDialog object, this function will return false.

In particular, you cannot perform auto-processing without a valid bitmap.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorDialog::LVectorDialog, LVectorDialog::SetVector, Class Members

Example

L_VOID Example37(HWND hWnd)
{
LVectorBase Vector;
LVectorDialog VectorDlg;

//Dialog is invalid unless associated with a vector
if (VectorDlg.IsValid ())
MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);

Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
VectorDlg.SetVector(&Vector);

//Now dialog is valid
if (VectorDlg.IsValid())
MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);

//destructor called when out of scope
}


LVectorDialog::SetCamera

This function has been removed.


LVectorDialog::SetColorAmbient

This function has been removed.


LVectorDialog::SetFont

#include "ltwrappr.h"

static HFONT LVectorDialog::SetFont(hFont)

HFONT hFont;

/* handle to the selected font */

Sets the font for the dialogs to use.

Parameter | Description
hFont | Handle to the selected font.

Returns

!NULL | The previous font.
NULL | An error occurred.

Comments

The default font is HELV size 8.

Call this function with hFont set to NULL to use the default font.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::GetStringLen, LVectorDialog::GetString, LVectorDialog::SetString, Class Members
Topics: | Vector CommonDialogs

Example

For an example, refer to LVectorDialog::GetString.


LVectorDialog::SetPolygonMode

This function has been removed.


LVectorDialog::SetRotation

This function has been removed.


LVectorDialog::SetScale

This function has been removed.


LVectorDialog::SetString

#include "ltwrappr.h"

static L_INT LVectorDialog::SetString(uString, pString)

L_UINT32 uString; | /* index of a string */
L_TCHAR L_FAR * pString; | /* character string that contains the string to set */

Sets the new string for the specified index.

Parameter | Description
uString | Index into a list of strings. For a list of the strings, refer to Dialog Strings.
pString | Character string that contains the new string to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To retrieve the character string for a specified index, use LVectorDialog::GetStringLen to determine the length of the string and to allocate a buffer of appropriate size. Then call LVectorDialog::GetString to retrieve the string.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::GetStringLen, LVectorDialog::GetString, Class Members
Topics: | Vector CommonDialogs

Example

For an example, refer to LVectorDialog::GetString.


LVectorDialog::SetTranslation

This function has been removed.


LVectorDialog::SetUseLights

This function has been removed.


LVectorDialog::SetVector

#include "ltwrappr.h"

L_VOID LVectorDialog::SetVector(pVector)

LVectorBase L_FAR * pVector;

/* pointer to an LVectorBase object */

Sets an LVectorBase object (or any object derived from LVectorBase) to be used by the dialog functions.

Parameter | Description
pVector | Pointer to the vector object to be used by the dialogs.

Returns

None

Comments

In particular, you cannot perform autoprocessing with the dialog without a valid vector.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::LVectorDialog, Class Members
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Vector Common Dialogs

Example

For an example, refer to LVectorDialog::DoModalVectorRotate.


LVectorDialog::VectorHelpCallback

#include "ltwrappr.h"

L_VOID LVectorDialog::VectorHelpCallback(uDlgID, hElement, nCtlID)

L_UINT32 uDlgID; | /* vector common dialog id */
HWND hElement; | /* window handle */
L_INT nCtlID; | /* id of the control */

The callback function that will be called to provide the appropriate help information, based on the vector dialog from which help was requested.

Parameter | Description
uDlgID | Id of the vector common dialog which made the help request. Possible values are:
 | Constant | Meaning
 | LVDLG_HELP_ALLGROUPS | Help command message coming from LVectorDialog::DoModalVectorEditAllGroups.
 | LVDLG_HELP_ALLLAYERS | Help command message coming from LVectorDialog::DoModalVectorEditAllLayers.
 | LVDLG_HELP_GROUP | Help command message coming from LVectorDialog::DoModalVectorEditGroup.
 | LVDLG_HELP_LAYER | Help command message coming from LVectorDialog::DoModalVectorEditLayer.
 | LVDLG_HELP_HITTEST | Help command message coming from LVectorDialog::DoModalVectorHitTest.
 | LVDLG_HELP_RENDER | Help command message coming from LVectorDialog::DoModalVectorRender.
 | LVDLG_HELP_ROTATE | Help command message coming from LVectorDialog::DoModalVectorRotate.
 | LVDLG_HELP_SCALE | Help command message coming from LVectorDialog::DoModalVectorScale.
 | LVDLG_HELP_TRANSLATE | Help command message coming from LVectorDialog::DoModalVectorTranslate.
 | LVDLG_HELP_CAMERA | Help command message coming from LVectorDialog::DoModalVectorCamera.
 | LVDLG_HELP_VIEWMODE | Help command message coming from LVectorDialog::DoModalVectorViewMode.
 | LVDLG_HELP_GENERAL | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_PEN | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_BRUSH | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_VERTEX | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_LINE | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_RECTANGLE | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_CIRCLE | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_ELLIPSE | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_POLYLINE | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_POLYGON | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_POLYDRAW | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_POLYBEZIER | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_ARC | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_ELLIPTICALARC | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_PIE | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_TEXT | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_RASTER | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
 | LVDLG_HELP_CLONE | Help command message coming from LVectorDialog::DoModalVectorEditObject or LVectorDialog::DoModalVectorNewObject.
hElement | Window handle of the dialog control which is requesting help information. if the handle is NULL, this means that the control which is requesting help information is the help button of the dialog.
nCtlID | ID of the dialog control which is requesting help information, IDs can be one of the following (defined in lvdlgres.h):
 | Transform dialog
 | LVDLG_IDD_TRANSFORM
 | LVDLG_IDC_TRANSFORM_BUTTON_XUP
 | LVDLG_IDC_TRANSFORM_EDIT_X
 | LVDLG_IDC_TRANSFORM_BUTTON_XDOWN
 | LVDLG_IDC_TRANSFORM_BUTTON_YUP
 | LVDLG_IDC_TRANSFORM_EDIT_Y
 | LVDLG_IDC_TRANSFORM_BUTTON_YDOWN
 | LVDLG_IDC_TRANSFORM_BUTTON_ZUP
 | LVDLG_IDC_TRANSFORM_EDIT_Z
 | LVDLG_IDC_TRANSFORM_BUTTON_ZDOWN
 | LVDLG_IDC_TRANSFORM_CHECK_ALL
 | LVDLG_IDC_TRANSFORM_BUTTON_RESET
 | LVDLG_IDC_TRANSFORM_STATIC_PREVIEW
 | LVDLG_IDC_TRANSFORM_CHECK_PREVIEW
 | LVDLG_IDC_TRANSFORM_UPDATE
 | LVDLG_IDC_TRANSFORM_BUTTON_HELP
 | Render dialog
 | LVDLG_IDD_RENDER
 | LVDLG_IDC_RENDER_FRAME_LIGHTS
 | LVDLG_IDC_RENDER_CHECK_USELIGHTS
 | LVDLG_IDC_RENDER_BUTTON_AMBIENT
 | LVDLG_IDC_RENDER_FRAME_POLYGONMODE
 | LVDLG_IDC_RENDER_RADIO_POINT
 | LVDLG_IDC_RENDER_RADIO_LINE
 | LVDLG_IDC_RENDER_RADIO_FILL
 | LVDLG_IDC_RENDER_RADIO_FILL_RASTER_ALWAYS
 | LVDLG_IDC_RENDER_CHECK_PREVIEW
 | LVDLG_IDC_RENDER_STATIC_PREVIEW
 | LVDLG_IDC_RENDER_BUTTON_HELP
 | View mode dialog
 | LVDLG_IDD_VIEWMODE
 | LVDLG_IDC_VIEWMODE_FRAME_VIEWMODE
 | LVDLG_IDC_VIEWMODE_RADIO_FIT
 | LVDLG_IDC_VIEWMODE_RADIO_SNAP
 | LVDLG_IDC_VIEWMODE_CHECK_PREVIEW
 | LVDLG_IDC_VIEWMODE_STATIC_PREVIEW
 | LVDLG_IDC_VIEWMODE_BUTTON_HELP
 | Hit test dialog
 | LVDLG_IDD_HITTEST
 | LVDLG_IDC_HITTEST_FRAME_DISTANCE
 | LVDLG_IDC_HITTEST_EDIT_DISTANCE
 | LVDLG_IDC_HITTEST_SPIN_DISTANCE
 | LVDLG_IDC_HITTEST_FRAME_OPTIONS
 | LVDLG_IDC_HITTEST_CHECK_CLOSEDFIGURES
 | LVDLG_IDC_HITTEST_CHECK_IGNORESELECTED
 | LVDLG_IDC_HITTEST_BUTTON_HELP
 | All layers dialog
 | LVDLG_IDD_ALLLAYERS
 | LVDLG_IDC_ALLLAYERS_LIST_LAYERS
 | LVDLG_IDC_ALLLAYERS_BUTTON_NEW
 | LVDLG_IDC_ALLLAYERS_BUTTON_EDIT
 | LVDLG_IDC_ALLLAYERS_BUTTON_DELETE
 | LVDLG_IDC_ALLLAYERS_YES
 | LVDLG_IDC_ALLLAYERS_NO
 | LVDLG_IDC_ALLLAYERS_NAME
 | LVDLG_IDC_ALLLAYERS_ACTIVE
 | LVDLG_IDC_ALLLAYERS_VISIBLE
 | LVDLG_IDC_ALLLAYERS_LOCKED
 | LVDLG_IDC_ALLLAYERS_BUTTON_HELP
 | Layer dialog
 | LVDLG_IDD_LAYER
 | LVDLG_IDC_LAYER_FRAME_NAME
 | LVDLG_IDC_LAYER_EDIT_NAME
 | LVDLG_IDC_LAYER_CHECK_ACTIVE
 | LVDLG_IDC_LAYER_CHECK_VISIBLE
 | LVDLG_IDC_LAYER_CHECK_LOCKED
 | LVDLG_IDC_LAYER_BUTTON_HELP
 | All groups dialog
 | LVDLG_IDD_ALLGROUPS
 | LVDLG_IDC_ALLGROUPS_BUTTON_NEW
 | LVDLG_IDC_ALLGROUPS_LIST_GROUPS
 | LVDLG_IDC_ALLGROUPS_BUTTON_EDIT
 | LVDLG_IDC_ALLGROUPS_BUTTON_DELETE
 | LVDLG_IDC_ALLGROUPS_BUTTON_HELP
 | Group dialog
 | LVDLG_IDD_GROUP
 | LVDLG_IDC_GROUP_FRAME_NAME
 | LVDLG_IDC_GROUP_EDIT_NAME
 | LVDLG_IDC_GROUP_BUTTON_HELP
 | General dialog
 | LVDLG_IDD_GENERAL
 | LVDLG_IDC_GENERAL_FRAME_SELECTION
 | LVDLG_IDC_GENERAL_CHECK_SELECTION
 | LVDLG_IDC_GENERAL_FRAME_RASTEROPERATION
 | LVDLG_IDC_GENERAL_COMBO_ROP
 | LVDLG_IDC_GENERAL_FRAME_CLIPPING
 | Pen dialog
 | LVDLG_IDD_PEN
 | LVDLG_IDC_PEN_FRAME_STYLE
 | LVDLG_IDC_PEN_COMBO_STYLE
 | LVDLG_IDC_PEN_FRAME_WIDTH
 | LVDLG_IDC_PEN_EDIT_WIDTH
 | LVDLG_IDC_PEN_SPIN_WIDTH
 | LVDLG_IDC_PEN_FRAME_COLOR
 | LVDLG_IDC_PEN_STATIC_COLOR
 | LVDLG_IDC_PEN_BUTTON_COLOR
 | Brush dialog
 | LVDLG_IDD_BRUSH
 | LVDLG_IDC_BRUSH_FRAME_STYLE
 | LVDLG_IDC_BRUSH_COMBO_STYLE
 | LVDLG_IDC_BRUSH_FRAME_HATCH
 | LVDLG_IDC_BRUSH_COMBO_HATCH
 | LVDLG_IDC_BRUSH_FRAME_COLOR
 | LVDLG_IDC_BRUSH_STATIC_COLOR
 | LVDLG_IDC_BRUSH_BUTTON_COLOR
 | LVDLG_IDC_BRUSH_CHECK_ODDEVEN
 | Vertex dialog
 | LVDLG_IDD_VERTEX
 | LVDLG_IDC_VERTEX_FRAME_LOCATION
 | LVDLG_IDC_VERTEX_EDIT_X
 | LVDLG_IDC_VERTEX_EDIT_Y
 | LVDLG_IDC_VERTEX_EDIT_Z
 | Line dialog
 | LVDLG_IDD_LINE
 | LVDLG_IDC_LINE_FRAME_STARTPOINT
 | LVDLG_IDC_LINE_EDIT_START_X
 | LVDLG_IDC_LINE_EDIT_START_Y
 | LVDLG_IDC_LINE_EDIT_START_Z
 | LVDLG_IDC_LINE_FRAME_ENDPOINT
 | LVDLG_IDC_LINE_EDIT_END_X
 | LVDLG_IDC_LINE_EDIT_END_Y
 | LVDLG_IDC_LINE_EDIT_END_Z
 | Rectangle dialog
 | LVDLG_IDD_RECTANGLE
 | LVDLG_IDC_RECTANGLE_FRAME_STARTPOINT
 | LVDLG_IDC_RECTANGLE_EDIT_START_X
 | LVDLG_IDC_RECTANGLE_EDIT_START_Y
 | LVDLG_IDC_RECTANGLE_EDIT_START_Z
 | LVDLG_IDC_RECTANGLE_FRAME_ENDPOINT
 | LVDLG_IDC_RECTANGLE_EDIT_END_X
 | LVDLG_IDC_RECTANGLE_EDIT_END_Y
 | LVDLG_IDC_RECTANGLE_EDIT_END_Z
 | Polyline dialog
 | LVDLG_IDD_POLYLINE
 | LVDLG_IDC_POLYLINE_FRAME_POINTS
 | LVDLG_IDC_POLYLINE_EDIT_X
 | LVDLG_IDC_POLYLINE_EDIT_Y
 | LVDLG_IDC_POLYLINE_EDIT_Z
 | LVDLG_IDC_POLYLINE_BUTTON_FIRST
 | LVDLG_IDC_POLYLINE_BUTTON_PREVIOUS
 | LVDLG_IDC_POLYLINE_BUTTON_NEXT
 | LVDLG_IDC_POLYLINE_BUTTON_LAST
 | LVDLG_IDC_POLYLINE_STATIC_POINT
 | LVDLG_IDC_POLYLINE_BUTTON_NEW
 | LVDLG_IDC_POLYLINE_BUTTON_DELETE
 | Polybezier dialog
 | LVDLG_IDD_POLYBEZIER
 | LVDLG_IDC_POLYBEZIER_FRAME_POINTS
 | LVDLG_IDC_POLYBEZIER_EDIT_X
 | LVDLG_IDC_POLYBEZIER_EDIT_Y
 | LVDLG_IDC_POLYBEZIER_EDIT_Z
 | LVDLG_IDC_POLYBEZIER_BUTTON_FIRST
 | LVDLG_IDC_POLYBEZIER_BUTTON_PREVIOUS
 | LVDLG_IDC_POLYBEZIER_BUTTON_NEXT
 | LVDLG_IDC_POLYBEZIER_BUTTON_LAST
 | LVDLG_IDC_POLYBEZIER_STATIC_POINT
 | LVDLG_IDC_POLYBEZIER_BUTTON_NEW
 | LVDLG_IDC_POLYBEZIER_BUTTON_DELETE
 | Polygon dialog
 | LVDLG_IDD_POLYGON
 | LVDLG_IDC_POLYGON_FRAME_POINTS
 | LVDLG_IDC_POLYGON_EDIT_X
 | LVDLG_IDC_POLYGON_EDIT_Y
 | LVDLG_IDC_POLYGON_EDIT_Z
 | LVDLG_IDC_POLYGON_BUTTON_FIRST
 | LVDLG_IDC_POLYGON_BUTTON_PREVIOUS
 | LVDLG_IDC_POLYGON_BUTTON_NEXT
 | LVDLG_IDC_POLYGON_BUTTON_LAST
 | LVDLG_IDC_POLYGON_BUTTON_NEW
 | LVDLG_IDC_POLYGON_BUTTON_DELETE
 | LVDLG_IDC_POLYGON_STATIC_POINT
 | LVDLG_IDC_POLYGON_FRAME_FILLMODE
 | LVDLG_IDC_POLYGON_RADIO_ALTERNATE
 | LVDLG_IDC_POLYGON_RADIO_WINDING
 | Ellipse dialog
 | LVDLG_IDD_ELLIPSE
 | LVDLG_IDC_ELLIPSE_FRAME_CENTER
 | LVDLG_IDC_ELLIPSE_EDIT_X
 | LVDLG_IDC_ELLIPSE_EDIT_Y
 | LVDLG_IDC_ELLIPSE_EDIT_Z
 | LVDLG_IDC_ELLIPSE_FRAME_RADIUS
 | LVDLG_IDC_ELLIPSE_EDIT_RADIUSX
 | LVDLG_IDC_ELLIPSE_EDIT_RADIUSY
 | Circle dialog
 | LVDLG_IDD_CIRCLE
 | LVDLG_IDC_CIRCLE_FRAME_CENTER
 | LVDLG_IDC_CIRCLE_EDIT_X
 | LVDLG_IDC_CIRCLE_EDIT_Y
 | LVDLG_IDC_CIRCLE_EDIT_Z
 | LVDLG_IDC_CIRCLE_FRAME_RADIUS
 | LVDLG_IDC_CIRCLE_EDIT_RADIUS
 | Arc dialog
 | LVDLG_IDD_ARC
 | LVDLG_IDC_ARC_FRAME_CENTER
 | LVDLG_IDC_ARC_EDIT_X
 | LVDLG_IDC_ARC_EDIT_Y
 | LVDLG_IDC_ARC_EDIT_Z
 | LVDLG_IDC_ARC_FRAME_RADIUS
 | LVDLG_IDC_ARC_EDIT_RADIUS
 | LVDLG_IDC_ARC_FRAME_ANGLES
 | LVDLG_IDC_ARC_EDIT_START
 | LVDLG_IDC_ARC_STATIC_START
 | LVDLG_IDC_ARC_EDIT_SWEEP
 | LVDLG_IDC_ARC_STATIC_SWEEP
 | Text dialog
 | LVDLG_IDD_TEXT
 | LVDLG_IDC_TEXT_FRAME_POINT
 | LVDLG_IDC_TEXT_EDIT_X
 | LVDLG_IDC_TEXT_EDIT_Y
 | LVDLG_IDC_TEXT_EDIT_Z
 | LVDLG_IDC_TEXT_FRAME_HORIZONTAL
 | LVDLG_IDC_TEXT_FRAME_VERTICAL
 | LVDLG_IDC_TEXT_COMBO_HORIZONTAL
 | LVDLG_IDC_TEXT_COMBO_VERTICAL
 | LVDLG_IDC_TEXT_CHECK_HITTESTRECTANGLE
 | LVDLG_IDC_TEXT_FRAME_TEXT
 | LVDLG_IDC_TEXT_EDIT_TEXT
 | LVDLG_IDC_TEXT_FRAME_FONT
 | LVDLG_IDC_TEXT_BUTTON_FONT
 | LVDLG_IDC_TEXT_EDIT_CHARHEIGHT
 | LVDLG_IDC_TEXT_EDIT_CHARWIDTH
 | LVDLG_IDC_TEXT_STATIC_CHARWIDTH
 | LVDLG_IDC_TEXT_STATIC_CHARHEIGHT
 | LVDLG_IDC_TEXT_CHECK_FORCELINECURVE
 | Pie dialog
 | LVDLG_IDD_PIE
 | LVDLG_IDC_PIE_FRAME_CENTER
 | LVDLG_IDC_PIE_EDIT_X
 | LVDLG_IDC_PIE_EDIT_Y
 | LVDLG_IDC_PIE_EDIT_Z
 | LVDLG_IDC_PIE_FRAME_RADIUS
 | LVDLG_IDC_PIE_EDIT_RADIUS
 | LVDLG_IDC_PIE_FRAME_ANGLES
 | LVDLG_IDC_PIE_STATIC_START
 | LVDLG_IDC_PIE_EDIT_START
 | LVDLG_IDC_PIE_STATIC_SWEEP
 | LVDLG_IDC_PIE_EDIT_SWEEP
 | Polydraw dialog
 | LVDLG_IDD_POLYDRAW
 | LVDLG_IDC_POLYDRAW_FRAME_POINTS
 | LVDLG_IDC_POLYDRAW_EDIT_X
 | LVDLG_IDC_POLYDRAW_EDIT_Y
 | LVDLG_IDC_POLYDRAW_EDIT_Z
 | LVDLG_IDC_POLYDRAW_BUTTON_FIRST
 | LVDLG_IDC_POLYDRAW_BUTTON_PREVIOUS
 | LVDLG_IDC_POLYDRAW_BUTTON_NEXT
 | LVDLG_IDC_POLYDRAW_BUTTON_LAST
 | LVDLG_IDC_POLYDRAW_STATIC_POINT
 | LVDLG_IDC_POLYDRAW_BUTTON_NEW
 | LVDLG_IDC_POLYDRAW_BUTTON_DELETE
 | LVDLG_IDC_POLYDRAW_FRAME_TYPE
 | LVDLG_IDC_POLYDRAW_CHECK_CLOSEFIGURE
 | LVDLG_IDC_POLYDRAW_COMBO_TYPE
 | Raster dialog
 | LVDLG_IDD_RASTER
 | LVDLG_IDC_RASTER_FRAME_POINT1
 | LVDLG_IDC_RASTER_EDIT_POINT1_X
 | LVDLG_IDC_RASTER_EDIT_POINT1_Y
 | LVDLG_IDC_RASTER_EDIT_POINT1_Z
 | LVDLG_IDC_RASTER_FRAME_POINT2
 | LVDLG_IDC_RASTER_EDIT_POINT2_X
 | LVDLG_IDC_RASTER_EDIT_POINT2_Y
 | LVDLG_IDC_RASTER_EDIT_POINT2_Z
 | LVDLG_IDC_RASTER_FRAME_BITMAP
 | LVDLG_IDC_RASTER_STATIC_PREVIEW
 | LVDLG_IDC_RASTER_BUTTON_BITMAP
 | Clone dialog
 | LVDLG_IDD_CLONE
 | LVDLG_IDC_CLONE_FRAME_POINT
 | LVDLG_IDC_CLONE_EDIT_X
 | LVDLG_IDC_CLONE_EDIT_Y
 | LVDLG_IDC_CLONE_EDIT_Z
 | LVDLG_IDC_CLONE_FRAME_SCALE
 | LVDLG_IDC_CLONE_EDIT_SCALEX
 | LVDLG_IDC_CLONE_EDIT_SCALEY
 | LVDLG_IDC_CLONE_EDIT_SCALEZ
 | LVDLG_IDC_CLONE_FRAME_ROTATION
 | LVDLG_IDC_CLONE_EDIT_ROTATIONX
 | LVDLG_IDC_CLONE_EDIT_ROTATIONY
 | LVDLG_IDC_CLONE_EDIT_ROTATIONZ
 | LVDLG_IDC_CLONE_FRAME_ATTRIBUTES
 | LVDLG_IDC_CLONE_CHECK_USEPEN
 | LVDLG_IDC_CLONE_CHECK_USEBRUSH
 | LVDLG_IDC_CLONE_CHECK_USEPOINTASORIGIN
 | LVDLG_IDC_CLONE_FRAME_GROUP
 | LVDLG_IDC_CLONE_LIST_GROUP
 | Elliptical arc dialog
 | LVDLG_IDD_ELLIPTICALARC
 | LVDLG_IDC_ELLIPTICALARC_FRAME_CENTER
 | LVDLG_IDC_ELLIPTICALARC_EDIT_X
 | LVDLG_IDC_ELLIPTICALARC_EDIT_Y
 | LVDLG_IDC_ELLIPTICALARC_EDIT_Z
 | LVDLG_IDC_ELLIPTICALARC_FRAME_ANGLES
 | LVDLG_IDC_ELLIPTICALARC_STATIC_START
 | LVDLG_IDC_ELLIPTICALARC_EDIT_START
 | LVDLG_IDC_ELLIPTICALARC_STATIC_SWEEP
 | LVDLG_IDC_ELLIPTICALARC_EDIT_SWEEP
 | LVDLG_IDC_ELLIPTICALARC_FRAME_RADIUS
 | LVDLG_IDC_ELLIPTICALARC_EDIT_RADIUSX
 | LVDLG_IDC_ELLIPTICALARC_EDIT_RADIUSY

Returns

None.

Comments

Override this function if you wish to provide help information for individual dialogs. The exact nature of the help provided is up to you, but must be outlined in this function.

This function will be called only if the callback functions are enabled, to enable callback functions for the LVectorDialog object Call LBase::EnableCallBack (TRUE). You must also enable the Help button by calling LVectorDialog::EnableHelp before displaying the dialog box.

Required DLLs and Libraries

LVKRN
LVDLG
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorDialog::IsHelpEnabled, LVectorDialog::EnableHelp
Topics: | Vector Images: Vector Dialogs
 | Help Support

Example

class MyVectorDialog : public LVectorDialog
{
protected:
L_VOID VectorHelpCallback( L_UINT32 uDlgID, HWND hElement, L_INT nCtlID );
};

L_VOID MyVectorDialog::VectorHelpCallback( L_UINT32 uDlgID, HWND hElement, L_INT nCtlID )
{
L_TCHAR szBuffer[ 255 ] = TEXT("No information");
L_TCHAR szTitle[ 255 ] = TEXT("");

UNREFERENCED_PARAMETER( hElement );

switch( uDlgID )
{
case LVDLG_HELP_SCALE: /* Scale Dialog */
lstrcpy( szTitle, TEXT("Scale"));
switch( nCtlID )
{
case LVDLG_IDC_TRANSFORM_BUTTON_XUP:
lstrcpy( szBuffer, TEXT("Button X Up"));
break;
}
break;

case LVDLG_HELP_PEN: /* Scale Dialog */
lstrcpy( szTitle, TEXT("pen"));
switch( nCtlID )
{
case LVDLG_IDC_PEN_FRAME_STYLE:
case LVDLG_IDC_PEN_COMBO_STYLE:
lstrcpy( szBuffer, TEXT("Pen Style"));
break;

case LVDLG_IDC_PEN_FRAME_WIDTH:
case LVDLG_IDC_PEN_EDIT_WIDTH:
case LVDLG_IDC_PEN_SPIN_WIDTH:
lstrcpy( szBuffer, TEXT("Pen Width"));
break;

case LVDLG_IDC_PEN_FRAME_COLOR:
case LVDLG_IDC_PEN_BUTTON_COLOR:
lstrcpy( szBuffer, TEXT("Tasty colors...."));
break;
}
break;
};

MessageBox( NULL, szBuffer, szTitle, MB_OK | MB_ICONINFORMATION );
}

L_VOID ShowMyDialog( )
{
MyVectorDialog VectorDialog;
LVectorBase Vector;

Vector.Load(TEXT("test.dxf"));

VectorDialog.SetVector( &Vector );

VectorDialog.EnablePreview( );
VectorDialog.EnableAutoProcess( );

if( VectorDialog.IsHelpEnabled( ) == FALSE )
{
VectorDialog.EnableHelp( );
}

VectorDialog.DoModalVectorScale( );
}


LVectorEllipse::LVectorEllipse

#include "ltwrappr.h"

L_VOID LVectorEllipse::LVectorEllipse(pEllipse = NULL)

L_VOID LVectorEllipse::LVectorEllipse(pObject, pVector =NULL)

pVECTORELLIPSE pEllipse; | /* pointer to a VECTORELLIPSE structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorEllipse object.

Parameter | Description
pEllipse | Pointer to a VECTORELLIPSE structure that contains information used to create and initialize the new vector ellipse object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector ellipse object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector ellipse object will be associated.

Returns

None.

Comments

LVectorEllipse::LVectorEllipse(pEllipse) is a constructor for the LVectorEllipse object. It takes a valid pVECTORELLIPSE pointer and creates an LVectorEllipse object.

LVectorEllipse::LVectorEllipse(pObject, pVector=NULL) creates an LVectorEllipse object based on the information provided in pObject and associates the newly created LVectorEllipse object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorEllipse object using the LVectorEllipse::LVectorEllipse(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_ELLIPSE
//LVectorBase *pVector is valid
LVectorEllipse MyVectorEllipse(pObject, pVectorBase);
if (MyVectorEllipse.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorEllipse::~LVectorEllipse, Class Members

Example

For an example for LVectorEllipse::LVectorEllipse(pEllipse), refer to LVectorEllipse::LockObject.

For an example for LVectorEllipse::LVectorEllipse(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorEllipse::~LVectorEllipse

#include "ltwrappr.h"

virtual L_VOID LVectorEllipse::~LVectorEllipse(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorEllipse class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorEllipse::LVectorEllipse, Class Members

Example

For an example, refer to LVectorEllipse::LockObject.


LVectorEllipse::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorEllipse::LockObject(pObject)

pVECTORELLIPSE pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORELLIPSE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORELLIPSE type and pass the address to this function. After modifying the vector object settings, call LVectorEllipse::UnlockObject (). LVectorEllipse::LockObject () and LVectorEllipse::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorEllipse::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorEllipse::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorEllipse::UnlockObject ().

To change the object information for a class object, call LVectorEllipse::UnlockObject.

LVectorEllipse::LockObject and LVectorEllipse::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorEllipse::LockObject and LVectorEllipse::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorEllipse::UnlockObject
Topics: | Working with Vector Objects

Example

//Example110
// This example will add a new green ellipse to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example110(HWND hWnd, LVectorBase *pVector)
{
VECTORELLIPSE Ellipse;

Ellipse.Point.x = 50;
Ellipse.Point.y = 50;
Ellipse.Point.z = 0;

Ellipse.Pen.bExtPen = FALSE;
Ellipse.Pen.nSize = sizeof( VECTORPEN );
Ellipse.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Ellipse.Pen.NewPen.LogPen.lopnWidth.x = 2;
Ellipse.Pen.NewPen.LogPen.lopnWidth.y = 2;
Ellipse.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

Ellipse.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;

Ellipse.Brush.nSize = sizeof(VECTORBRUSH);
Ellipse.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,255,0);
Ellipse.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

Ellipse.xRadius = 40;
Ellipse.yRadius = 25;

LVectorEllipse VectorEllipse(&Ellipse);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorEllipse);

//Now change color to blue
MessageBox(NULL, TEXT("Changing pen color to blue"), TEXT(""), MB_OK);

VECTORELLIPSE EllipseTemp;

VectorEllipse.LockObject(&EllipseTemp);

EllipseTemp.Pen.bExtPen = FALSE;
EllipseTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorEllipse.UnlockObject(&EllipseTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorEllipse destructor called when VectorEllipse goes out of scope
}


LVectorEllipse::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorEllipse::UnlockObject(pObject)

pVECTORELLIPSE pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORELLIPSE structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORELLIPSE and pass the address to the LVectorEllipse::LockObject () function. After modifying the vector object settings, call LVectorEllipse::UnlockObject (). LVectorEllipse::LockObject () and LVectorEllipse::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorEllipse::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorEllipse::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorEllipse::UnlockObject ().

To get the current object information for a class object, call LVectorEllipse::LockObject.

LVectorEllipse::LockObject and LVectorEllipse::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorEllipse::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorEllipse::LockObject.


LVectorEllipticalArc::LVectorEllipticalArc

#include "ltwrappr.h"

L_VOID LVectorEllipticalArc::LVectorEllipticalArc(pEllipticalArc =NULL)

L_VOID LVectorEllipticalArc::LVectorEllipticalArc (pObject, pVector =NULL)

pVECTORELLIPTICALARC pEllipticalArc; | /* pointer to a VECTORELLIPTICALARC structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorEllipticalArc object.

Parameter | Description
pEllipticalArc | Pointer to a VECTORELLIPTICALARC structure that contains information used to create and initialize the new vector elliptical arc object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector elliptical arc object.
pVector | Pointer to an LVectorBase object with which the newly constructed Vector Elliptical Arc object will be associated.

Returns

None

Comments

LVectorEllipticalArc::LVectorEllipticalArc(pEllipticalArc) is a constructor for the LVectorEllipticalArc object. It takes a valid pVECTORELLIPTICALARC pointer and creates an LVectorEllipticalArc object.

LVectorEllipticalArc::LVectorEllipticalArc(pObject, pVector=NULL) creates an LVectorEllipticalArc object based on the information provided in pObject and associates the newly created LVectorEllipticalArc object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorEllipticalArc object using the LVectorEllipticalArc::LVectorEllipticalArc(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_ELLIPTICALARC
//LVectorBase *pVector is valid
LVectorEllipticalArc MyVectorEllipticalArc(pObject, pVectorBase);
if (MyVectorEllipticalArc.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorEllipticalArc::~LVectorEllipticalArc, Class Members

Example

For an example for LVectorEllipticalArc::LVectorEllipticalArc(pEllipticalArc), refer to LVectorEllipticalArc::LockObject.

For an example for LVectorEllipticalArc::LVectorEllipticalArc(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorEllipticalArc::~LVectorEllipticalArc

#include "ltwrappr.h"

virtual L_VOID LVectorEllipticalArc::~LVectorEllipticalArc(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorEllipticalArc class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorEllipticalArc::LVectorEllipticalArc, Class Members

Example

For an example, refer to LVectorEllipticalArc::LockObject.


LVectorEllipticalArc::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorEllipticalArc::LockObject(pObject)

pVECTORELLIPTICALARC pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORELLIPTICALARC structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORELLIPTICALARC type and pass the address to this function. After modifying the vector object settings, call LVectorEllipticalArc::UnlockObject (). LVectorEllipticalArc::LockObject () and LVectorEllipticalArc::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorEllipticalArc::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorEllipticalArc::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorEllipticalArc::UnlockObject ().

To change the object information for a class object, call LVectorEllipticalArc::UnlockObject.

LVectorEllipticalArc::LockObject and LVectorEllipticalArc::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_ELLIPTICALARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorEllipticalArc::LockObject and LVectorEllipticalArc::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorEllipticalArc::UnlockObject, Class Members
Topics: | Working with Vector Objects

Example

//Example112
// This example will add an elliptical arc object to the Active Layer LVectorBase object.

L_VOID Example112(HWND hWnd, LVectorBase *pVector)
{
VECTORELLIPTICALARC EllipticalArc;

//Create Elliptical Arc Object
EllipticalArc.Point.x = 50;
EllipticalArc.Point.y = 50;
EllipticalArc.Point.z = 0;

EllipticalArc.xRadius = 10;
EllipticalArc.yRadius = 20;
EllipticalArc.StartAngle = 45;
EllipticalArc.SweepAngle = 90;

EllipticalArc.Pen.bExtPen = FALSE;
EllipticalArc.Pen.nSize = sizeof( VECTORPEN );
EllipticalArc.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
EllipticalArc.Pen.NewPen.LogPen.lopnWidth.x = 10;
EllipticalArc.Pen.NewPen.LogPen.lopnWidth.y = 10;
EllipticalArc.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorEllipticalArc VectorEllipticalArc(&EllipticalArc);

pVector->AddObject(&VectorEllipticalArc);

//Now change color to blue
MessageBox(NULL, TEXT("Changing color to red"), TEXT(""), MB_OK);

VECTORELLIPTICALARC EllipticalArcTemp;

VectorEllipticalArc.LockObject(&EllipticalArcTemp);

EllipticalArcTemp.Pen.bExtPen = FALSE;
EllipticalArcTemp.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);
VectorEllipticalArc.UnlockObject(&EllipticalArcTemp);

//LVectorEllipticalArc destructor called when VectorEllipticalArc goes out of scope
}


LVectorEllipticalArc::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorEllipticalArc::UnlockObject(pObject)

pVECTORELLIPTICALARC pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORELLIPTICALARC structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORELLIPTICALARC and pass the address to the LVectorEllipticalArc::LockObject () function. After modifying the vector object settings, call LVectorEllipticalArc::UnlockObject (). LVectorEllipticalArc::LockObject () and LVectorEllipticalArc::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorEllipticalArc::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorEllipticalArc::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorEllipticalArc::UnlockObject ().

To get the current object information for a class object, call LVectorEllipticalArc::LockObject.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorEllipticalArc::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorEllipticalArc::LockObject.


LVectorFile::LVectorFile

#include "ltwrappr.h"

L_VOID LVectorFile::LVectorFile(L_VOID)

L_VOID LVectorFile::LVectorFile(pLVector)

L_VOID LVectorFile::LVectorFile(pLVector, pFileName)

LVectorBase L_FAR * pLVector; | /* pointer to a LEAD vector object */
L_TCHAR L_FAR * pFileName; | /* file name */

Constructs and initializes the member variables of the class object.

Parameter | Description
pLVector | Pointer to a LEAD vector object, used to initialize the LVectorFile object.
pFileName | Character string that contains the name of the file.

Returns

None

Comments

LVectorFile::LVectorFile() is a constructor for the LVectorFile class.

LVectorFile::LVectorFile(pLVector) also sets the vector for the class object.

LVectorFile::LVectorFile(pLVector, pFileName) also sets the vector for the class object and the filename to associate with the object.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorFile::~LVectorFile, Class Members

Example

This is an example for LVectorFile::LVectorFile():

L_VOID Example45(HWND hWnd)
{
RECT rect;

LVectorBase Vector;
LVectorFile VectorFile;

VectorFile.SetVector(&Vector);
VectorFile.SetFileName(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
VectorFile.LoadFile();

Vector.AttachToWindow(hWnd);
GetClientRect(hWnd, &rect);
Vector.SetViewport(&rect);

VectorFile.SetFileName(TEXT("d:\\image3.wmf"));
VectorFile.SaveFile(FILE_WMF);
}

This is an example for LVectorFile::LVectorFile(pLVector):

L_VOID Example44(HWND hWnd)
{
LVectorBase Vector;

LVectorFile VectorFile(&Vector);

//LVectorFile object is invalid until object and filename habe been associated
if (VectorFile.IsValid())
MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);

VectorFile.SetFileName(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
VectorFile.LoadFile();

//LVectorFile object is invalid unless a file has been loaded
if (VectorFile.IsValid())
MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);

//destructor called when out of scope
}

This is an example for LVectorFile::LVectorFile(pLVector, pFileName):

L_VOID Example46(HWND hWnd)
{
LVectorBase Vector;
LVectorFile VectorFile(&Vector, TEXT("s:\\temp\\images\\dxf\\test.dxf"));

VectorFile.LoadFile();

//Get pointer to internal file name
MessageBox(hWnd, VectorFile.GetFileName(), TEXT(""), MB_OK);

//Get copy of internal file name
L_TCHAR szTemp[100];
L_UINT uBuffSize;
VectorFile.GetFileName(szTemp, &uBuffSize);
MessageBox(hWnd, szTemp, TEXT(""), MB_OK);
}


LVectorFile::~LVectorFile

#include "ltwrappr.h"

virtual L_VOID LVectorFile::~LVectorFile(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorFile class.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorFile::LVectorFile(pLVector).


LVectorFile::FeedLoad

#include "ltwrappr.h"

virtual L_INT LVectorFile::FeedLoad(pLBuffer)

LBuffer L_FAR * pLBuffer;

/* pointer to a LEAD buffer object*/

Supplies image data to the file-load process from a buffer that you provide.

Parameter | Description
pLBuffer | Pointer to an LBuffer object that contains the image data to load.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Use this function with the LVectorFile::StartFeedLoad and LVectorFile::StopFeedLoad functions. For a description of how the functions relate to each other, refer to LVectorFile::StartFeedLoad.

This function cannot be used in combination with the Redirect input / output functions .

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Loading, Saving and Copying
 | Vector Images: Loading and Saving Vector Files

Example

For an example, refer to LVectorFile::StartFeedLoad.


LVectorFile::GetFileName

#include "ltwrappr.h"

const L_TCHAR L_FAR * LVectorFile::GetFileName(L_VOID)

L_INT LVectorFile::GetFileName(pBuffer, puBuffSize)

L_TCHAR L_FAR * pBuffer; | /* character string to be updated */
L_UINT L_FAR * puBuffSize; | /* size of pBuffer */

LVectorFile::GetFileName() gets a pointer to the internal file name.

LVectorFile::GetFileName(pBuffer, puBuffSize) gets a copy of the internal file name.

Parameter | Description
pBuffer | Character string that will be updated with the internal file name.
uBuffSize | Pointer to a variable to be updated with the size of pBuffer.

Returns

LVectorFile::GetFileName returns a pointer to the internal file name. You should not attempt to free this pointer.

LVectorFile::GetFileName(pBuffer, uBuffSize) returns the following:

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Functions: | Vector Loading, Saving and Copying
 | Vector Images: Loading and Saving Vector Files

Example

For an example, refer to LVectorFile::LVectorFile(pLVector, pFileName).


LVectorFile::IsValid

#include "ltwrappr.h"

L_BOOL LVectorFile::IsValid(L_VOID)

Determines whether the LVectorFile object is ready to be used.

Returns

TRUE | The LVectorFile object is ready to be used.
FALSE | The LVectorFile object is not ready to be used.

Comments

Before you can use some of the file functions, a vector and a filename must be associated with the class object. Until you have associated a vector and a filename with the LVectorFile object, the object is considered invalid.

The function will return TRUE only if both the filename and the vector have been set and are valid.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorFile::LVectorFile(pLVector).


LVectorFile::LoadFile

#include "ltwrappr.h"

virtual L_INT LVectorFile::LoadFile(pLoadFileOptions=NULL, pFileInfo=NULL)

pLOADFILEOPTION pLoadFileOption; | /* pointer to a structure */
pFILEINFO pFileInfo; | /* pointer to a structure */

Loads an image file into the class object's associated vector. The file can be in any supported vector file format.

Parameter | Description
pLoadFileOptions | Pointer to a LOADFILEOPTION structure that contains information about loading the vector.
pFileInfo | Pointer to a FILEINFO structure. This structure may contain file information used in loading an image, or it may be updated with information about the file being loaded.
 | If nothing is known about the file, pass NULL for this parameter, or declare a variable of type FILEINFO and set the FILEINFO.Flags to 0, then pass the address of the FILEINFO structure in this parameter. In this case, if the address of a FILEINFO structure is passed, the FILEINFO structure will be updated with the results of LFile::GetInfo .
 | If only the file type is known, set pFileInfo.Format to the file type and set pFileInfo.Flags to FILEINFO_ONLYFORMATVALID. This can also be done if LFile::GetInfo has been called previously, but values that affect the size of the image loaded have been changed (for example, by calling LFileSettings::SetPCDResolution or LFileSettings::SetWMFResolution ). In this case the FILEINFO structure pointed to by pFileInfo will be updated with the results of LFile::GetInfo
 | If LFile::GetInfo has been called prior to calling this function, and no changes have been made to the contents of the structure filled by LFile::GetInfo , then the address of the filled FILEINFO structure can be passed for this parameter. In this case, the FILEINFO.Flags member should be set to FILEINFO_INFOVALID. The LFile::GetInfo function will set the FILEINFO.Flags to FILEINFO_INFOVALID. In this case the load will be faster since this function does not have to query the file filters for the file type.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Note: More options are available in the LOADFILEOPTION structure.

For supported formats, refer to Vector Input File Formats.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Loading and Saving Vector Files
 | Vector Loading, Saving and Copying

Example

For an example, refer to LVectorFile::LVectorFile().


LVectorFile::SaveFile

#include "ltwrappr.h"

virtual L_INT LVectorFile::SaveFile(nFormat, pSaveFileOption=NULL)

L_INT nFormat; | /* output file format */
pSAVEFILEOPTION pSaveFileOption; | /* pointer to a structure */

Creates a file in any of the supported compressed or uncompressed formats.

Parameter | Description
nFormat | Output file format. For valid values, refer to Formats of Output Files .
pSaveFileOption | Pointer to a SAVEFILEOPTION structure that contains information about saving the file.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Note: More options are available in the SAVEFILEOPTION structure.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Loading and Saving Vector Files
 | Vector Loading, Saving and Copying

Example

For an example, refer to LVectorFile::LVectorFile().


LVectorFile::SetFileName

#include "ltwrappr.h"

L_VOID LVectorFile::SetFileName(pFileName)

L_TCHAR L_FAR * pFileName;

/* file name */

Sets the internal file used by the class object for loading and saving images on disk.

Parameter | Description
pFileName | Character string that contains the name of the file used by the class object for loading and saving images on disk.

Returns

None

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Loading and Saving Vector Files
 | Vector Loading, Saving and Copying

Example

For an example, refer to LVectorFile::LVectorFile(pLVector).


LVectorFile::SetVector

#include "ltwrappr.h"

L_VOID LVectorFile::SetVector(pVector)

LVectorBase L_FAR * pVector;

/* pointer to a vector object */

Sets the vector object to be used by the file functions.

Parameter | Description
pVector | Pointer to the vector object to set.

Returns

None

Comments

Before you can use some of the file functions, a vector must be associated with the class object. Until you have associated a vector with the LVectorFile object, the object is considered invalid.

If the filename of the LVectorBase object is enabled, then the vector filename will be transferred to the class object.

For more information, see LVectorFile::IsValid.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Loading and Saving Vector Files
 | Vector Loading, Saving and Copying

Example

For an example, refer to LVectorFile::LVectorFile().


LVectorFile::StartFeedLoad

#include "ltwrappr.h"

virtual L_INT LVectorFile::StartFeedLoad(pLoadFileOption=NULL, pFileInfo=NULL)

pLOADFILEOPTION pLoadFileOption; | /* pointer to a structure */
pFILEINFO pFileInfo; | /* pointer to a structure */

Initializes a file-load process in which you control the input stream. You must call the LVectorFile::FeedLoad function to supply buffered data, and you must call LVectorFile::StopFeedLoad when the loading is complete.

Parameter | Description
pLoadFileOption | Pointer to a structure that contains information that determines the behavior of LVectorFile::FeedLoad
pFileInfo | Pointer to a FILEINFO structure. This structure may contain file information used in loading an image, or it may be updated with information about the file being loaded.
 | If nothing is known about the file, pass NULL for this parameter, or declare a variable of type FILEINFO and set the FILEINFO.Flags to 0, then pass the address of the FILEINFO structure in this parameter. In this case, if the address of a FILEINFO structure is passed, the FILEINFO structure will be updated with the results of LFile::GetInfo .
 | If only the file type is known, set pFileInfo.Format to the file type and set pFileInfo.Flags to FILEINFO_ONLYFORMATVALID. This can also be done if LFile::GetInfo has been called previously, but values that affect the size of the image loaded have been changed (for example, by calling LFileSettings::SetPCDResolution or LFileSettings::SetWMFResolution ). In this case the FILEINFO structure pointed to by pFileInfo will be updated with the results of LFile::GetInfo .
 | If LFile::GetInfo has been called prior to calling this function, and no changes have been made to the contents of the structure filled by LFile::GetInfo , then the address of the filled FILEINFO structure can be passed for this parameter. In this case, the FILEINFO.Flags member should be set to FILEINFO_INFOVALID. The LFile::GetInfo function will set the FILEINFO.Flags to FILEINFO_INFOVALID. In this case the load will be faster since this function does not have to query the file filters for the file type.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This file-load process is useful when receiving transmitted images, such as those on the Internet. It works the same way as the LVectorFile::LoadFile function, except that your code supplies the image data. The file-load process works as follows:

1. | You call the LVectorFile::StartFeedLoad function to initialize the file-load process and identify the process with a handle (phLoad).
2. | You create a buffer, and each time you fill it with information, you call the LVectorFile::FeedLoad function, 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 LVectorFile::LoadFile function. It allocates and begins loading the bitmap, according to the flags that you specify in the LVectorFile::StartFeedLoad function.
 | 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 make the first call to the callback function whenever this information is available.
4. | To end the file-load process, you call the LVectorFile::StopFeedLoad function, which cleans up the process. If you call this function 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.

This function cannot be used in combination with the Redirect input / output functions .

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Loading and Saving Vector Files
 | Vector Loading, Saving and Copying

Example

#define MAX_SIZE 1024
L_VOID Example47(HWND hWnd)
{
HFILE hf;
L_INT nRead;
L_UCHAR cBuf[MAX_SIZE]; // Buffer for receiving data
LVectorBase Vector;
LVectorFile VectorFile(&Vector, TEXT("s:\\temp\\images\\dxf\\test.dxf"));

VectorFile.StartFeedLoad();

hf = (HFILE)_tfopen (TEXT("s:\\temp\\images\\dxf\\POL008.DXF"), OF_READ);

for (;;)
{
nRead = (L_INT) _lread (hf, cBuf, MAX_SIZE);
if (nRead==0)
break;

// Supply image data from cBuf to the file-load process
LBuffer ImageBuffer(cBuf,MAX_SIZE) ;
VectorFile.FeedLoad ( &ImageBuffer);
}
VectorFile.StopFeedLoad();

//Do something with the file
}


LVectorFile::StopFeedLoad

#include "ltwrappr.h"

virtual L_INT LVectorFile::StopFeedLoad(L_VOID)

Ends a file-load process in which you control the input stream. This cleans up all the variables and buffers allocated by the LVectorFile::StartFeedLoad and LVectorFile::FeedLoad functions and resets all internal variables to their default settings.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

You must call this function to complete a file load that was started with LVectorFile::StartFeedLoad. If you call this function 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 functions relate to each other, refer to LVectorFile::StartFeedLoad.

This function cannot be used in combination with the Redirect input / output functions .

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Images: Loading and Saving Vector Files
 | Vector Loading, Saving and Copying

Example

For an example, refer to LVectorFile::StartFeedLoad.


LVectorGroup::LVectorGroup

#include "ltwrappr.h"

L_VOID LVectorGroup::LVectorGroup(pGroup, pVector=NULL)

L_VOID LVectorGroup::LVectorGroup(pVector)

L_VOID LVectorGroup::LVectorGroup(pGroupDesc=NULL, pVector=NULL)

pVECTORGROUP pGroup; | /* pointer to a VECTORGROUP structure */
LVectorBase L_FAR * pVector; | /* pointer to an LVectorBase object */
pVECTORGROUPDESC pGroupDesc; | /* pointer to a VECTORGROUP structure */

Constructs and initializes the different member variables of the LVectorGroup object.

Parameter | Description
pGroup | Pointer to a VECTORGROUP structure that contains information used to create and initialize the new vector group.
pVector | Pointer to an LVectorBase object. The newly created vector group will be associated with this LVectorBase object.
pGroupDesc | Pointer to a VECTORGROUPDESC structure that contains information used to create and initialize the new vector group.

Returns

None

Comments

LVectorGroup::LVectorGroup(pGroup, pVector=NULL) is a constructor for the LVectorGroup object. It takes a valid pVECTORGROUP pointer and creates an LVectorGroup object. This constructor should mainly be used with the LVectorBase::EnumGroups function, which returns a valid pVECTORGROUP pointer in its LVectorBase::EnumGroupsCallBack member function.

LVectorGroup::LVectorGroup(pVector) creates a valid LVectorGroup object that is associated with the specified LVectorBase object.

LVectorGroup::LVectorGroup(pGroupDesc=NULL, pVector=NULL) creates an LVectorGroup object based on the information provided in pGroupDesc and associates the newly created LVectorGroup object with the specified LVectorBase object.

To use the LVectorGroup::LVectorGroup(pGroupDesc=NULL, pVector=NULL) constructor, optionally declare a variable of type VECTORGROUPDESC, fill the structure and pass its address to this constructor. To associate the newly created vector group with an LVectorBase object, pass a valid pointer to an LVectorBase object as the second parameter. If the second parameter is NULL, then the LVectorGroup object is not yet associated with an LVectorBase object. The following functions automatically associate an LVectorGroup object with an LVectorBase object: LVectorBase::AddGroup, LVectorBase::GetGroupByName and LVectorBase::GetGroupByIndex. The LVectorGroup::SetVector also associates an LVectorGroup object with an LVectorBase object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorGroup::~LVectorGroup, LVectorBase::AddGroup, LVectorBase::GetGroupByName, LVectorBase::GetGroupByIndex, LVectorGroup::SetVector, Class Members

Example

This is an example for LVectorGroup::LVectorGroup(pVector):

//Example140
L_VOID Example140(HWND hWnd, LVectorBase *pVector)
{
LVectorGroup VectorGroup(pVector);

//...Do something with the vector group

//...LVectorGroup destructor called when VectorGroup goes out of scope
}

For an example for LVectorGroup::LVectorGroup(pGroupDesc=NULL, pVector=NULL), refer to LVectorBase::AddGroup.

For an example for LVectorGroup::LVectorGroup(pGroup, pVector=NULL), refer to LVectorBase::EnumGroups.


LVectorGroup::~LVectorGroup

#include "ltwrappr.h"

virtual L_VOID LVectorGroup::~LVectorGroup(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorGroup class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorGroup::LVectorGroup, Class Members

Example

For an example, refer to LVectorBase::AddGroup.


LVectorGroup::AddObject

#include "ltwrappr.h"

virtual L_INT LVectorGroup::AddObject(pVectorObject)

LVectorObject * pVectorObject;

/* pointer to the vector object to add */

Adds a new vector object to a class object's group.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorObject | Pointer to an LVectorObject object that references the vector object to add.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To use this function, declare an object from one of the classes derived from LVectorObject and pass the address of this object as the first parameter. The classes derived from LVectorObject are:

LVectorArc

LVectorChord

LVectorCircle

LVectorClone

LVectorEllipse

LVectorLine

LVectorPie

LVectorPolybezier

LVectorPolydraw

LVectorPolygon

LVectorPolyline

LVectorRaster

LVectorRectangle

LVectorStock

LVectorText

LVectorVertex

LVectorSpline

LVectorHPolyBezier

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Working with Vector Objects

Example

//Example137
// This example will add a new red line to the first Group in an LVectorBase object
L_VOID Example137(HWND hWnd, LVectorBase *pVector)
{
VECTORLINE Line;
int nRet;

//Create Line Object
Line.Point[ 0 ].x = 50.0;
Line.Point[ 0 ].y = 50.0;
Line.Point[ 0 ].z = 0.0;

Line.Point[ 1 ].x = 70.0;
Line.Point[ 1 ].y = 50.0;
Line.Point[ 1 ].z = 0.0;

Line.Pen.nSize = sizeof( VECTORPEN );

Line.Pen.bExtPen = FALSE;
Line.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Line.Pen.NewPen.LogPen.lopnWidth.x = 10;
Line.Pen.NewPen.LogPen.lopnWidth.y = 10;
Line.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);

LVectorLine VectorLine(&Line);

// add to current group
LVectorGroup VectorGroup;

nRet = pVector->GetGroupByIndex(0, &VectorGroup);
if (nRet == SUCCESS)
{
VectorGroup.AddObject(&VectorLine );
}

//LVectorLine destructor called when VectorLine goes out of scope
}


LVectorGroup::DeleteGroup

#include "ltwrappr.h"

virtual L_INT LVectorGroup::DeleteGroup()

Deletes the class object's associated group. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Deleting a group also deletes all objects within the group.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddGroup, LVectorGroup::EmptyGroup.
Topics: | Working with Vector Groups

Example

// This example will delete the second group in a vector.
L_VOID Example131(HWND hWnd, LVectorBase *pVector)
{
LVectorGroup VectorGroup;

L_INT nRet = pVector->GetGroupByIndex(1, &VectorGroup);
if (nRet == SUCCESS)
{
VectorGroup.DeleteGroup();
}
else
{
MessageBox(hWnd, TEXT("Vector has less than two groups"), TEXT(""), MB_OK);
}
}


LVectorGroup::DeleteGroupClones

#include "ltwrappr.h"

virtual L_INT LVectorGroup::DeleteGroupClones(dwFlags = 0)

L_UINT32 dwFlags;

/* flags */

Deletes all clones of the class object's associated group. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
dwFlags | Can be a combination of the following:
 | Value | Meaning
 | 0 | Delete all clones.
 | VECTOR_FLAGS_SELECTED_ONLY | Delete only the currently selected clones within the vector handle.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddGroup, LVectorGroup::EmptyGroup.
Topics: | Working with Vector Groups

Example

For an example, refer to LVectorBase::GetGroupByName.


LVectorGroup::EmptyGroup

#include "ltwrappr.h"

virtual L_INT LVectorGroup::EmptyGroup()

Empties the class object's associated group. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The associated group is emptied by deleting all objects within that group.

To delete a group, call LVectorGroup::DeleteGroup.

After calling this function, all clone objects of this group will reflect the change immediately.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddGroup, LVectorGroup::DeleteGroup, LVectorBase::CopyGroup, LVectorGroup::DeleteGroupClones, LVectorBase::GetGroupByIndex, LVectorBase::GetGroupByName
Topics: | Working with Vector Groups

Example

//Example132
// This example will empty all objects from the second group (index 1)
L_VOID Example132(HWND hWnd, LVectorBase *pVector)
{
LVectorGroup VectorGroup;

L_INT nRet = pVector->GetGroupByIndex(1, &VectorGroup);
if (nRet == SUCCESS)
{
VectorGroup.EmptyGroup();
}
else
{
MessageBox(hWnd, TEXT("Vector has less than two groups"), TEXT(""), MB_OK);
}
}


LVectorGroup::EnumObjects

#include "ltwrappr.h"

virtual L_INT LVectorGroup::EnumObjects (dwFlags)

L_UINT32 dwFlags;

/* flags */

Enumerates all objects inside the vector group object.

Parameter | Description
dwFlags | Flag that indicates which objects to enumerate. Possible values are:
 | Value | Meaning
 | 0 | Enumerate all objects in the group.
 | VECTOR_FLAGS_SELECTED_ONLY | Enumerate only selected objects in the group.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Note: In DirectX and OpenGL engines, you cannot enumerate objects, therefore this function will do nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorGroup::EnumObjectsCallBack, LVectorBase::EnumVertices
Topics: | Working with Vector Groups

Example

//Example139
// This example displays the total number of objects in each group in a vector.
class LMyVectorGroup1: public LVectorGroup
{
public:
L_INT m_nObjectCount ;

public:
LMyVectorGroup1() {m_nObjectCount=0;};
virtual ~LMyVectorGroup1(){};
virtual L_INT EnumObjectsCallBack( pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

L_INT LMyVectorGroup1::EnumObjectsCallBack( pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
m_nObjectCount++;
return SUCCESS;
}

L_VOID Example139(HWND hWnd, LVectorBase *pVector)
{
L_INT i;

for (i=0; i<pVector->GetGroupCount(); i++)
{
LMyVectorGroup1 VectorGroup;
L_TCHAR szMsg[200];

pVector->GetGroupByIndex(i, &VectorGroup);

VectorGroup.m_nObjectCount = 0;
VectorGroup.EnableCallBack(TRUE);
VectorGroup.EnumObjects();
wsprintf(szMsg, TEXT("Group[%d]: Total Objects[%d]"), i, VectorGroup.m_nObjectCount);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorGroup::EnumObjectsCallBack

#include "ltwrappr.h"

virtual L_INT LVectorGroup::EnumObjectsCallBack(pVector, pObject)

pVECTORHANDLE pVector; | /* pointer to a vector handle */
pVECTOROBJECT pObject; | /* pointer to a vector group */

Processes each vector object enumerated by the LVectorGroup::EnumObjects function.

Parameter | Description
pVector | Pointer to the class object's associated vector handle, which contains the objects to enumerate.
pObject | Pointer to the vector object being processed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorGroup::EnumObjects function calls this function as it gets a pointer to each vector object.

To use this function, derive a class from LVectorGroup and override the EnumObjectsCallBack member function. Note that LVectorGroup::EnumObjectsCallBack does not return an LVectorObject object.

To get detailed information about each vector object, attach the pVECTOROBJECT pObject to an LVectorObject class object and call LVectorObject::LockObject and LVectorObject::UnlockObject.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorGroup::EnumObjects, Class Members
Topics: | Working with Vector Groups

Example

For an example, refer to LVectorGroup::EnumObjects.


LVectorGroup::GetGroupDesc

#include "ltwrappr.h"

virtual L_INT LVectorGroup::GetGroupDesc(pGroupDesc = NULL)

pVECTORGROUPDESC pGroupDesc;

/* pointer to a structure */

Gets group information for the class object's associated group.

Parameter | Description
pGroupDesc | Pointer to a VECTORGROUPDESC structure to be updated with the group information if the group is found.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function updates the m_Desc member variable of the LVectorGroup object.

This function can be used in conjunction with LVectorGroup::SetGroupDesc to change group properties. LVectorGroup::GetGroupDesc and LVectorGroup::SetGroupDesc should be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddGroup, LVectorBase::GetGroupByIndex, LVectorBase::GetGroupByName, LVectorBase::GetGroupCount
Topics: | Working with Vector Groups

Example

For an example, refer to LVectorBase::AddGroup.


LVectorGroup::SetGroupDesc

#include "ltwrappr.h"

virtual L_INT LVectorGroup::SetGroupDesc(pGroupDesc)

const pVECTORGROUPDESC pGroupDesc;

/* pointer to a structure */

Updates a vector group with new information. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pGroupDesc | Pointer to a VECTORGROUPDESC structure that contains the new group information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

For more information on the group information that can be set, refer to the VECTORGROUPDESC structure.

To get the group information for a specific group, use the LVectorGroup::GetGroupDesc function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorGroup::GetGroupDesc
Topics: | Working with Vector Groups

Example

For an example, refer to LVectorBase::AddGroup.


LVectorGroup::SetVector

#include "ltwrappr.h"

L_VOID LVectorGroup::SetVector(pVector)

LVectorBase L_FAR * pVector;

/* pointer to an LVectorBase object */

Sets an LVectorBase object, or any object derived from LVectorBase, to be used by the Vector Group functions.

Parameter | Description
pVector | Pointer to the LVectorBase object to be used by the Vector Groups functions.

Returns

None

Comments

This function is mainly used internally. Functions that use an LVectorGroup object automatically set the vector.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorGroup::LVectorGroup, , Class Members
Topics: | Working with Vector Groups

Example

//Example141
L_VOID Example141(HWND hWnd, LVectorBase *pVector)
{
LVectorGroup VectorGroup;

//Associate the LVectorGroup with an LVectorBase
//Note that most functions that use an LVectorGroup do this automatically
VectorGroup.SetVector(pVector);

//...Do something with the vector group

//...LVectorGroup destructor called when VectorGroup goes out of scope
}


LVectorHPolyBezier::LVectorHPolyBezier

#include "ltwrappr.h"

L_VOID LVectorHPolyBezier::LVectorHPolyBezier(pHPolyBezier = NULL)

L_VOID LVectorHPolyBezier::LVectorHPolyBezier(pObject, pVector =NULL)

pVECTORHPOLYBEZIER pHPolyBezier; | /* pointer to a VECTORHPOLYBEZIER structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorHPolyBezier object.

Parameter | Description
pHPolyBezier | Pointer to a VECTORHPOLYBEZIER structure that contains information used to create and initialize the new vector line object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector HPolyBezier object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector HPolyBezier object will be associated.

Returns

None.

Comments

LVectorHPolyBezier::LVectorHPolyBezier(pHPolyBezier) is a constructor for the LVectorHPolyBezier object. It takes a valid pVECTORHPOLYBEZIER pointer and creates an LVectorHPolyBezier object.

LVectorHPolyBezier::LVectorHPolyBezier(pObject, pVector=NULL) creates an LVectorHPolyBezier object based on the information provided in pObject and associates the newly created LVectorHPolyBezier object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorHPolyBezier object using the LVectorHPolyBezier::LVectorHPolyBezier(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_HPOLYBEZIER
//LVectorBase *pVector is valid
LVectorHPolyBezier MyVectorHPolyBezier(pObject, pVectorBase);
if (MyVectorHPolyBezier.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorHPolyBezier::~LVectorHPolyBezier, Class Members

Example

For an example for LVectorHPolyBezier::LVectorHPolyBezier(pHPolyBezier), refer to LVectorHPolyBezier::LockObject.

For an example for LVectorHPolyBezier::LVectorHPolyBezier(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorHPolyBezier::~LVectorHPolyBezier

#include "ltwrappr.h"

virtual L_VOID LVectorHPolyBezier::~LVectorHPolyBezier(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorHPolyBezier class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorHPolyBezier::LVectorHPolyBezier, Class Members

Example

For an example, refer to LVectorHPolyBezier::LockObject.


LVectorHPolyBezier::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorHPolyBezier::LockObject(pObject)

pVECTORHPOLYBEZIER pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORHPOLYBEZIER structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORHPOLYBEZIER type and pass the address to this function. After modifying the vector object settings, call LVectorHPolyBezier::UnlockObject (). LVectorHPolyBezier::LockObject () and LVectorHPolyBezier::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorHPolyBezier::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorHPolyBezier::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorHPolyBezier::UnlockObject ().

To change the object information for a class object, call LVectorHPolyBezier::UnlockObject.

LVectorHPolyBezier::LockObject and LVectorHPolyBezier::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorHPolyBezier::LockObject and LVectorHPolyBezier::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorHPolyBezier::UnlockObject
Topics: | Working with Vector Objects

Example

//Example108
// This example will add a new green bezier curve to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example108(HWND hWnd, LVectorBase *pVector)
{
VECTORHPOLYBEZIER HPolyBezier;

L_UINT uDegree;

//Create HPolyBezier Object
VECTORPOINT Points[4] =
{
30, 30, 0, 0,
30, 50, 0, 0,
40, 60, 0, 0,
10, 30, 0, 0,
};
HPolyBezier.nSecCount = 1;

uDegree = 3 ;

HPolyBezier.puDegree = &uDegree;
HPolyBezier.Point = Points;

HPolyBezier.Pen.nSize = sizeof( VECTORPEN );

HPolyBezier.Pen.bExtPen = FALSE;
HPolyBezier.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
HPolyBezier.Pen.NewPen.LogPen.lopnWidth.x = 10;
HPolyBezier.Pen.NewPen.LogPen.lopnWidth.y = 10;
HPolyBezier.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorHPolyBezier VectorHPolyBezier(&HPolyBezier);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorHPolyBezier);

//Now change color to blue
MessageBox(NULL, TEXT("Changing color to blue"), TEXT(""), MB_OK);

VECTORHPOLYBEZIER HPolyBezierTemp;

VectorHPolyBezier.LockObject(&HPolyBezierTemp);

HPolyBezierTemp.Pen.bExtPen = FALSE;
HPolyBezierTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorHPolyBezier.UnlockObject(&HPolyBezierTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorHPolyBezier destructor called when VectorHPolyBezier goes out of scope
}


LVectorHPolyBezier::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorHPolyBezier::UnlockObject(pObject)

pVECTORHPOLYBEZIER pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORHPOLYBEZIER structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORHPOLYBEZIER and pass the address to the LVectorHPolyBezier::LockObject () function. After modifying the vector object settings, call LVectorHPolyBezier::UnlockObject (). LVectorHPolyBezier::LockObject () and LVectorHPolyBezier::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorHPolyBezier::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorHPolyBezier::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorHPolyBezier::UnlockObject ().

To get the current object information for a class object, call LVectorHPolyBezier::LockObject.

LVectorHPolyBezier::LockObject and LVectorHPolyBezier::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorHPolyBezier::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorHPolyBezier::LockObject.


LVectorLayer::LVectorLayer

#include "ltwrappr.h"

L_VOID LVectorLayer::LVectorLayer(pLayer, pVector=NULL)

L_VOID LVectorLayer::LVectorLayer(pVector)

L_VOID LVectorLayer::LVectorLayer(pLayerDesc=NULL, pVector=NULL)

pVECTORLAYER pLayer; | /* pointer to a VECTORLAYER structure */
LVectorBase L_FAR * pVector; | /* pointer to an LVectorBase object */
pVECTORLAYERDESC pLayer; | /* pointer to a VECTORLAYER structure */

Constructs and initializes the different member variables of the LVectorLayer object.

Parameter | Description
pLayer | Pointer to a VECTORLAYER structure that contains information used to create and initialize the new vector layer.
pVector | Pointer to an LVectorBase object. The newly created vector layer will be associated with this LVectorBase object.
pLayerDesc | Pointer to a VECTORLAYERDESC structure that contains information used to create and initialize the new vector layer.

Returns

None

Comments

LVectorLayer::LVectorLayer(pLayer, pVector=NULL) is a constructor for the LVectorLayer object. It takes a valid pVECTORLAYER pointer and creates an LVectorLayer object. This constructor should mainly be used with the LVectorBase::EnumLayers function, which returns a valid pVECTORLAYER pointer in its LVectorBase::EnumLayersCallBack member function.

LVectorLayer::LVectorLayer(pVector) creates a valid LVectorLayer object that is associated with the specified LVectorBase object.

LVectorLayer::LVectorLayer(pLayerDesc=NULL, pVector=NULL) creates an LVectorLayer object based on the information provided in pLayerDesc and associates the newly created LVectorLayer object with the specified LVectorBase object.

To use the LVectorLayer::LVectorLayer(pLayerDesc=NULL, pVector=NULL) constructor, optionally declare a variable of type VECTORLAYERDESC, fill the structure and pass its address to this constructor. To associate the newly created vector layer with an LVectorBase object, pass a valid pointer to an LVectorBase object as the second parameter. If the second parameter is NULL, then the LVectorLayer object is not yet associated with an LVectorBase object. The following functions automatically associate an LVectorLayer object with an LVectorBase object: LVectorBase::AddLayer, LVectorBase::GetLayerByName, LVectorBase::GetLayerByIndex, LVectorBase::SetActiveLayer, and LVectorBase::GetActiveLayer. The LVectorLayer::SetVector also associates an LVectorLayer object with an LVectorBase object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorLayer::~LVectorLayer, LVectorBase::AddLayer, LVectorBase::GetLayerByName, LVectorBase::GetLayerByIndex, LVectorBase::SetActiveLayer, LVectorBase::GetActiveLayer, LVectorLayer::SetVector, Class Members

Example

This is an example for LVectorLayer::LVectorLayer(pVector):

// This example enumerates through all layers in a vector.
class LMyVectorBase4: public LVectorBase
{
public:
L_INT m_nLayerCount ;

public:
LMyVectorBase4() {m_nLayerCount=0;};
virtual ~LMyVectorBase4(){};
virtual L_INT EnumLayersCallBack(pVECTORHANDLE pVector, pVECTORLAYER pLayer);
};

L_INT LMyVectorBase4::EnumLayersCallBack(pVECTORHANDLE pVector, pVECTORLAYER pLayer)
{
LVectorLayer VectorLayer(pLayer, this);
L_TCHAR szMsg[100];
m_nLayerCount++;

VECTORLAYERDESC LayerDesc;
VectorLayer.GetLayerDesc(&LayerDesc);
wsprintf(szMsg, TEXT("Layer\nName[%s]\nSize[%d]\nLocked[%d]\nVisible[%d]"),
LayerDesc.szName,
LayerDesc.nSize,
LayerDesc.bLocked,
LayerDesc.bVisible
);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
return SUCCESS ;
//...LVectorLayer destructor called when VectorLayer goes out of scope
}

L_VOID Example74(HWND hWnd, LMyVectorBase4 *pMyVector)
{
LMyVectorBase4 MyVector;
L_TCHAR szMsg[100];

pMyVector->m_nLayerCount=0;
pMyVector->EnumLayers();
wsprintf(szMsg, TEXT("Total Layers[%d]"), pMyVector->m_nLayerCount);
MessageBox(NULL, szMsg, TEXT(""), MB_OK);
}

This is an example for LVectorLayer::LVectorLayer(pVector):

//Example95
L_VOID Example95(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer(pVector);

//Assoicate the LVectorLayer with an LVectorBase
//Note that most functions that use an LVectorLayer do this automatically
VectorLayer.SetVector(pVector);

//...Do something with the vector layer

//...LVectorLayer destructor is called when VectorLayer goes out of scope.
}

This is an example for LVectorLayer::LVectorLayer(pLayerDesc=NULL, pVector=NULL):

// This example will add a new layer to a vector handle.
L_VOID Example68(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;
VECTORLAYERDESC LayerDesc;

VectorLayer.GetLayerDesc(&LayerDesc);
lstrcpy(LayerDesc.szName, TEXT("Terry's New Layer"));
VectorLayer.SetLayerDesc(&LayerDesc);

if (SUCCESS != pVector->AddLayer(&VectorLayer, VECTOR_FLAGS_RENAME_DUPLICATES))
{
MessageBox( NULL, TEXT("Could not add layer!"), TEXT(""), MB_OK );
}

//...LVectorLayer destructor is called when VectorLayer goes out of scope.
}

This is also an example for LVectorLayer::LVectorLayer(pLayerDesc=NULL, pVector=NULL):

// This example demonstrates the use of the LVectorLayer constructor

L_VOID Example94(HWND hWnd, LVectorBase *pVector)
{
VECTORLAYERDESC LayerDesc;

LayerDesc.bLocked = FALSE;
LayerDesc.bVisible = TRUE;
LayerDesc.dwTag = 1;
LayerDesc.nSize = sizeof(VECTORLAYERDESC);
lstrcpy(LayerDesc.szName, TEXT("My New Layer"));

LVectorLayer VectorLayer(&LayerDesc);

if (SUCCESS != pVector->AddLayer (&VectorLayer, VECTOR_FLAGS_RENAME_DUPLICATES))
{
MessageBox( NULL, TEXT("Could not add layer!"), TEXT(""), MB_OK );
}

//...LVectorLayer destructor is called when VectorLayer goes out of scope.
}


LVectorLayer::~LVectorLayer

#include "ltwrappr.h"

virtual L_VOID LVectorLayer::~LVectorLayer(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorLayer class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorLayer::LVectorLayer, Class Members

Example

For an example, refer to LVectorLayer::LVectorLayer.


LVectorLayer::AddObject

#include "ltwrappr.h"

virtual L_INT LVectorBase::AddObject(pVectorObject);

LVectorObject * pVectorObject;

/* pointer to the vector object to add */

Adds a new vector object to the class object's layer. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pVectorObject | Pointer to an LVectorObject object that references the vector object to add.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To use this function, declare an object from one of the classes derived from LVectorObject and pass the address of this object as the first argument. The classes derived from LVectorObject are:

LVectorArc

LVectorChord

LVectorCircle

LVectorClone

LVectorEllipse

LVectorLine

LVectorPie

LVectorPolybezier

LVectorPolydraw

LVectorPolygon

LVectorPolyline

LVectorRaster

LVectorRectangle

LVectorStock

LVectorText

LVectorVertex

LVectorSpline

LVectorHPolyBezier

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Working with Vector Objects

Example

// This example will add a new red line to the Active Layer LVectorBase object.
L_VOID Example75(HWND hWnd, LVectorBase *pVector)
{
VECTORLINE Line;

//Create Line Object
Line.Point[ 0 ].x = 50.0;
Line.Point[ 0 ].y = 50.0;
Line.Point[ 0 ].z = 0.0;

Line.Point[ 1 ].x = 70.0;
Line.Point[ 1 ].y = 50.0;
Line.Point[ 1 ].z = 0.0;

Line.Pen.nSize = sizeof( VECTORPEN );

Line.Pen.bExtPen = FALSE;
Line.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Line.Pen.NewPen.LogPen.lopnWidth.x = 10;
Line.Pen.NewPen.LogPen.lopnWidth.y = 10;
Line.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);

LVectorLine VectorLine(&Line);

// add to current active layer
LVectorLayer VectorLayer;

pVector->GetActiveLayer(&VectorLayer);

VectorLayer.AddObject(&VectorLine );

//LVectorLine destructor called when VectorLine goes out of scope
}


LVectorLayer::DeleteLayer

#include "ltwrappr.h"

virtual L_INT LVectorLayer::DeleteLayer(L_VOID)

Deletes the class object's associated layer. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Deleting a layer also deletes all objects within the layer.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddLayer, LVectorLayer::EmptyLayer.
Topics: | Working with Vector Layers

Example

// This example will delete the second layer in a vector.
L_VOID Example96(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetLayerByIndex(1, &VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.DeleteLayer();
}
else
{
MessageBox(hWnd, TEXT("Vector has less than two layers"), TEXT(""), MB_OK);
}
}


LVectorLayer::EmptyLayer

#include "ltwrappr.h"

virtual L_INT LVectorLayer::EmptyLayer(L_VOID)

Empties the class object's associated layer. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The layer is emptied by deleting all objects within that layer.

To delete a layer, call LVectorLayer::DeleteLayer

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddLayer, LVectorLayer::DeleteLayer, LVectorBase::CopyLayer, LVectorLayer::AddObject, LVectorBase::CopyObject, LVectorBase::GetLayerByIndex, LVectorBase::GetLayerByName
Topics: | Working with Vector Layers

Example

// This example will empty all objects from the second layer (index 1).
L_VOID Example97(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetLayerByIndex(1, &VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.EmptyLayer();
}
else
{
MessageBox(hWnd, TEXT("Vector has less than two layers"), TEXT(""), MB_OK);
}
}


LVectorLayer::EnumObjects

#include "ltwrappr.h"

virtual L_INT LVectorLayer::EnumObjects(dwFlags)

L_UINT32 dwFlags;

/* flags */

Enumerates all objects inside the vector layer object.

Parameter | Description
dwFlags | Flag that indicates which objects to enumerate. Possible values are:
 | Value | Meaning
 | 0 | Enumerate all objects in the layer.
 | VECTOR_FLAGS_SELECTED_ONLY | Enumerate only selected objects in the layer.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Note: In DirectX and OpenGL engines, you cannot enumerate objects, therefore this function will do nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorLayer::EnumObjectsCallBack, LVectorBase::EnumVertices
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorLayer::EnumObjectsCallBack.


LVectorLayer::EnumObjectsCallBack

#include "ltwrappr.h"

virtual L_INT LVectorLayer::EnumObjectscallBack(pVector, pObject)

pVECTORHANDLE pVector; | /* pointer to the class object's associated vector handle */
pVECTOROBJECT pObject; | /* pointer to a vector object */

Processes each vector object enumerated by the LVectorLayer::EnumObjects function.

Parameter | Description
pVector | Pointer to the class object's associated vector image that contains the objects to enumerate.
pObject | Pointer to the vector object being processed.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The LVectorLayer::EnumObjects function calls this function as it gets a pointer to each vector object.

To use this function, derive a class from LVectorLayer and override the EnumObjectsCallBack member function. Note that LVectorLayer::EnumObjectsCallBack does not return an LVectorObject object.

You can attach the pVECTOROBJECT pObject to an LVectorObject class object and call LVectorObject::LockObject and LVectorObject::UnlockObject to get detailed information about each vector object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorLayer::EnumObjects, Class Members

Example

//Example76
// This example copies all objects from active layer of vector source to vector dest (active layer)
class LMyVectorLayer: public LVectorLayer
{
public:
LVectorBase *m_pVectorDst;

public:
LMyVectorLayer() {};
virtual ~LMyVectorLayer(){};
virtual L_INT EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

L_INT LMyVectorLayer::EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
LVectorBase VectorBase(pVector);
LVectorObject VectorObject(pObject, &VectorBase);
m_pVectorDst->CopyObject(&VectorObject);
VectorBase.SetHandle(NULL, FALSE);
return SUCCESS ;
}

L_VOID Example76(HWND hWnd, LVectorBase *pVectorDst)
{
//Load a source vector
LVectorBase VectorSrc;
VectorSrc.Load(TEXT("square3.dxf"));

//Get the active layer of source
LMyVectorLayer VectorLayer;
VectorSrc.GetActiveLayer(&VectorLayer);

//Set the destination vector where objects from source will be copied
VectorLayer.m_pVectorDst = pVectorDst;

//Enumerate all objects in Active layer (and copy to dest vector)
VectorLayer.EnumObjects();
}


LVectorLayer::GetLayerDesc

#include "ltwrappr.h"

virtual L_INT LVectorLayer::GetLayerDesc(pLayerDesc=NULL)

pVECTORLAYERDESC pLayerDesc;

/* pointer to a structure */

Gets layer information on the class object's associated layer.

Parameter | Description
pLayerDesc | Pointer to a VECTORLAYERDESC structure to be updated with the layer information if the layer is found.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function updates the m_Desc member variable of the LVectorLayer object.

This function can be used in conjunction with LVectorLayer::SetLayerDesc to change layer properties.

LVectorLayer::GetLayerDesc and LVectorLayer::SetLayerDesc should be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::AddLayer, LVectorBase::GetLayerByIndex, LVectorBase::GetLayerByName, LVectorBase::GetLayerCount
Topics: | Working with Vector Layers

Example

// This example will add a new layer to a vector handle.
L_VOID Example68(HWND hWnd, LVectorBase *pVector)
{
LVectorLayer VectorLayer;
VECTORLAYERDESC LayerDesc;

VectorLayer.GetLayerDesc(&LayerDesc);
lstrcpy(LayerDesc.szName, TEXT("Terry's New Layer"));
VectorLayer.SetLayerDesc(&LayerDesc);

if (SUCCESS != pVector->AddLayer(&VectorLayer, VECTOR_FLAGS_RENAME_DUPLICATES))
{
MessageBox( NULL, TEXT("Could not add layer!"), TEXT(""), MB_OK );
}

//...LVectorLayer destructor called when VectorLayer goes out of scope
}


LVectorLayer::SetLayerDesc

#include "ltwrappr.h"

virtual L_INT LVectorLayer::SetLayerDesc(pLayerDesc)

pVECTORLAYERDESC pLayerDesc;

/* pointer to a structure */

Updates a vector layer with new information. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pLayerDesc | Pointer to a VECTORLAYERDESC structure that contains the new layer information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

To get the layer information for a specific layer, use the LVectorLayer::GetLayerDesc function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorLayer::GetLayerDesc
Topics: | Working with Vector Layers

Example

For an example, refer to LVectorLayer::GetLayerDesc.


LVectorLayer::SetVector

#include "ltwrappr.h"

L_VOID LVectorLayer::SetVector(pVector)

LVectorBase L_FAR * pVector;

/* pointer to an LVectorBase object */

Sets an LVectorBase object (or any object derived from LVectorBase) to be used by the VectorLayer functions.

Parameter | Description
pVector | Pointer to the vector object to be used by the vector layers.

Returns

None

Comments

This function is mainly used internally. Functions that use an LVectorLayer object do this automatically.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorLayer::LVectorLayer, Class Members
Topics: | Working with Vector Layers

Example

For an example, refer to LVectorLayer::LVectorLayer.


LVectorLine::LVectorLine

#include "ltwrappr.h"

L_VOID LVectorLine::LVectorLine(pLine = NULL)

L_VOID LVectorLine::LVectorLine(pObject, pVector =NULL)

pVECTORLINE pLine; | /* pointer to a VECTORLINE structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorLine object.

Parameter | Description
pLine | Pointer to a VECTORLINE structure that contains information used to create and initialize the new vector line object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector line object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector line object will be associated.

Returns

None.

Comments

LVectorLine::LVectorLine(pLine) is a constructor for the LVectorLine object. It takes a valid pVECTORLINE pointer and creates an LVectorLine object.

LVectorLine::LVectorLine(pObject, pVector=NULL) creates an LVectorLine object based on the information provided in pObject and associates the newly created LVectorLine object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorLine object using the LVectorLine::LVectorLine(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_LINE
//LVectorBase *pVector is valid
LVectorLine MyVectorLine(pObject, pVectorBase);
if (MyVectorLine.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorLine::~LVectorLine, Class Members

Example

For an example for LVectorLine::LVectorLine(pLine), refer to LVectorLayer::AddObject.

For an example for LVectorLine::LVectorLine(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorLine::~LVectorLine

#include "ltwrappr.h"

virtual L_VOID LVectorLine::~LVectorLine(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorLine class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorLine::LVectorLine, Class Members

Example

For an example, refer to LVectorLayer::AddObject.


LVectorLine::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorLine::LockObject(pObject)

pVECTORLINE pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORLINE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORLINE type and pass the address to this function. After modifying the vector object settings, call LVectorLine::UnlockObject (). LVectorLine::LockObject () and LVectorLine::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorLine::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorLine::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorLine::UnlockObject ().

To change the object information for a class object, call LVectorLine::UnlockObject.

LVectorLine::LockObject and LVectorLine::LockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorLine::LockObject and LVectorLine::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorLine::UnlockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorLayer::AddObject.


LVectorLine::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorLine::UnlockObject(pObject)

pVECTORLINE pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORLINE structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORLINE and pass the address to the LVectorLine::LockObject () function. After modifying the vector object settings, call LVectorLine::UnlockObject (). LVectorLine::LockObject LVectorLine::LockObject () and LVectorLine::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorLine::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorLine::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorLine::UnlockObject ().

To get the current object information for a class object, call LVectorLine::LockObject.

LVectorLine::LockObject and LVectorLine::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorLine::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorLayer::AddObject.


LVectorMemoryFile::LVectorMemoryFile

#include "ltwrappr.h"

L_VOID LVectorMemoryFile::LVectorMemoryFile(L_VOID)

L_VOID LVectorMemoryFile::LVectorMemoryFile(pVector)

LVectorBase L_FAR * pVector;

/* pointer to a vector object */

Constructs and initializes the different variables of the class object.

Parameter | Description
pVector | Pointer to a LEAD vector object, used to initialize the LVectorMemoryFile object.

Returns

None

Comments

LVectorMemoryFile::LVectorMemoryFile() is a constructor for the LVectorMemoryFile class.

LVectorMemoryFile::LVectorMemoryFile(pVector) initializes the member variables using the pVector parameter.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorMemoryFile::~LVectorMemoryFile, Class Members

Example

This is an example for LVectorMemoryFile::LVectorMemoryFile():

L_VOID Example49(HWND hWnd)
{
LBuffer Buffer;

LVectorMemoryFile VectorMemoryFile;
LVectorBase Vector;

//Invalid until a vector is associated with the VectorMemoryFile object
if (VectorMemoryFile.IsValid())
MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);

VectorMemoryFile.SetVector(&Vector);

//Now the VectorMemoryFile object is valid
if (VectorMemoryFile.IsValid())
MessageBox(hWnd, TEXT("IsValid() returns TRUE"), TEXT(""), MB_OK);
else
MessageBox(hWnd, TEXT("IsValid() returns FALSE"), TEXT(""), MB_OK);

//destructor called when out of scope
}

For an example for LVectorMemoryFile::LVectorMemoryFile(pVector), refer to LVectorMemoryFile::LoadMemory.


LVectorMemoryFile::~LVectorMemoryFile

#include "ltwrappr.h"

L_VOID virtual LVectorMemoryFile::~LVectorMemoryFile(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorMemoryFile class.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorMemoryFile::LVectorMemoryFile().


LVectorMemoryFile::IsValid

#include "ltwrappr.h"

L_BOOL LVectorMemoryFile::IsValid(L_VOID)

Determines whether the vector memory file object is ready to be used.

Returns

TRUE | The LVectorMemoryFile object is ready to be used.
FALSE | The LVectorMemoryFile object is not ready to be used.

Comments

Before you can use some of the vector memory file functions, a vector must be associated with the class object. Until you have associated a vector with the LVectorMemoryFile object, the object is considered invalid.

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorMemoryFile::LVectorMemoryFile().


LVectorMemoryFile::LoadMemory

#include "ltwrappr.h"

virtual L_INT LVectorMemoryFile::LoadMemory(LMemoryBuffer, pLoadFileOption=NULL, pFileInfo=NULL)

LBuffer & LMemoryBuffer; | /* an LBuffer object */
pLOADFILEOPTION pLoadFileOption; | /* pointer to a structure */
pFILEINFO pFileInfo; | /* pointer to a structure */

Loads any supported vector file from memory.

Parameter | Description
LMemoryBuffer | A LEAD buffer into which the file in memory will be loaded.
pLoadFileOption | Pointer to a LOADFILEOPTION structure that contains information about loading the file from memory.
pFileInfo | Pointer to a FILEINFO structure. This structure may contain file information used in loading an image, or it may be updated with information about the file being loaded.
 | If nothing is known about the file, pass NULL for this parameter, or declare a variable of type FILEINFO and set the FILEINFO.Flags to 0, then pass the address of the FILEINFO structure in this parameter. In this case, if the address of a FILEINFO structure is passed, the FILEINFO structure will be updated with the results of LFile::GetInfo .
 | If only the file type is known, set pFileInfo.Format to the file type and set pFileInfo.Flags to FILEINFO_ONLYFORMATVALID. This can also be done if LFile::GetInfo has been called previously, but values that affect the size of the image loaded have been changed (for example, by calling LFileSettings::SetPCDResolution or LFileSettings::SetWMFResolution ). In this case the FILEINFO structure pointed to by pFileInfo will be updated with the results of LFile::GetInfo .
 | If LFile::GetInfo has been called prior to calling this function, and no changes have been made to the contents of the structure filled by LFile::GetInfo , then the address of the filled FILEINFO structure can be passed for this parameter. In this case, the FILEINFO.Flags member should be set to FILEINFO_INFOVALID. The LFile::GetInfo function will set the FILEINFO.Flags to FILEINFO_INFOVALID. In this case the load will be faster since this function does not have to query the file filters for the file type.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Note: More options are available in the LOADFILEOPTION structure.

The LMemoryBuffer parameter is passed by reference, and is a required parameter.

This function cannot be used in combination with the Redirect input / output functions .

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Loading, Saving and Copying
 | Vector Images: Loading and Saving Vector Files

Example

L_VOID Example48(HWND hWnd)
{
int nRet;
LBuffer Buffer;

LVectorBase Vector;

//Load an image
Vector.VectorFile()->SetFileName(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
Vector.VectorFile()->LoadFile();

//Save to memory buffer
LVectorMemoryFile VectorMemoryFile(&Vector);
VectorMemoryFile.SaveMemory(&Buffer,FILE_DXF);

//Erase the original vector image
VECTORHANDLE emptyVector;
Vector.SetHandle(&emptyVector, TRUE);

//Load image from a second memory object memory
LVectorMemoryFile VectorMemoryFile2(&Vector);
VectorMemoryFile2.LoadMemory(Buffer);

//attach to window
nRet = Vector.AttachToWindow(hWnd);
}


LVectorMemoryFile::SaveMemory

#include "ltwrappr.h"

virtual L_INT LVectorMemoryFile::SaveMemory(pLMemoryBuffer, nFormat, pSaveFileOption=NULL)

LBuffer L_FAR * pLMemoryBuffer; | /* pointer to an LBuffer object */
L_INT nFormat; | /* output file format */
pSAVEFILEOPTION pSaveFileOption; | /* pointer to a structure */

Saves the class object's associated vector to a file in memory. The output can be in any of the supported compressed or uncompressed file formats.

Parameter | Description
pLMemoryBuffer | Pointer to an LBuffer object into which the bitmap in memory will be saved. After successful completion of this function, the object pointed to by pLMemoryBuffer will contain the output file.
nFormat | Output file format. For valid values, refer to Formats of Output Files .
pSaveFileOption | Pointer to a SAVEFILEOPTION structure that contains information for saving the vector.

Returns

None

Comments

To use this function, do the following:

1. | Declare an LBuffer object. You can then pass its address in this function, which will allocate the memory, save the bitmap, and unlock the memory.
2. | Declare a long integer (L_UINT32) variable for the file-size. You can then pass its address in this function, which will update its value with the size of the file.
3. | Call this function to save the bitmap in the specified LBuffer object.

Note: More options are available in the SAVEFILEOPTION structure.

This function cannot be used in combination with the Redirect input / output functions .

Required DLLs and Libraries

LVKRN
LTFIL

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | Class Members
Topics: | Vector Loading, Saving and Copying
 | Vector Images: Loading and Saving Vector Files

Example

For an example, refer to LVectorMemoryFile::LoadMemory.


LVectorObject::LVectorObject

#include "ltwrappr.h"

L_VOID LVectorObject::LVectorObject(L_VOID)

L_VOID LVectorObject::LVectorObject(pObject, pVector=NULL)

pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase L_FAR * pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorObject object.

Parameter | Description
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector layer.
pVector | Pointer to an LVectorBase object. The newly created vector layer will be associated with this LVectorBase object.

Returns

None.

Comments

LVectorObject::LVectorObject(L_VOID) is a constructor for the LVectorObject object. This constructor should be used when it is not required to know the specific properties of the vector object. For example, this constructor could be used to create LVectorObject objects used with the following functions:

LVectorObject::DeleteObject

LVectorObject::SelectObject

LVectorObject::IsObjectSelected

LVectorObject::ExplodeObject

LVectorDialog::DoModalVectorEditObject

LVectorObject::LVectorObject(pObject, pVector=NULL) creates an LVectorObject object based on the information provided in pObject and associates the newly created LVectorObject object with the specified LVectorBase object. This constructor should be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBackmember function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorObject::~LVectorObject, LVectorObject::DeleteObject, LVectorObject::SelectObject, LVectorObject::IsObjectSelected, LVectorObject::ExplodeObject, LVectorDialog::DoModalVectorEditObject, Class Members

Example

For an example of LVectorObject::LVectorObject(L_VOID), refer to LVectorBase::HitTest.

For an example of LVectorObject::LVectorObject(pObject, pVector=NULL) refer to LVectorObject::IsObjectInsideParallelogram.


LVectorObject::~LVectorObject

#include "ltwrappr.h"

virtual L_VOID LVectorObject::~LVectorObject(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorObject class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorObject::LVectorObject, Class Members

Example

For an example, refer to LVectorBase::HitTest.


LVectorObject::AddHyperlink

#include "ltwrappr.h"

L_INT LVectorObject::AddHyperlink(pTarget)

pVECTORLINKDESC pTarget;

/* target information */

Adds a new item to the target list for the specified hyperlinked vector object.

Parameter | Description
pTarget | Pointer to a VECTORLINKDESC that determines how the toolkit will handle the hyperlink.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Hyperlinked vector objects cause some action to take place when the end-user clicks on them. Each of these objects maintains a list of targets. That is, clicking on a hyperlinked vector object may cause several different things to occur. Depending on the target(s) and how the user specifies handling the target(s), the vector toolkit will act in response to the end-user's actions on that target.

A hyperlink must be added to a vector object using this function before it can be changed using the LVectorObject::SetHyperlink function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetHyperlink, LVectorObject::GetHyperlink, LVectorObject::GetHyperlinkCount, LVectorObject::GotoHyperlink
Topics: | Vector Images: Hyperlink Object
 | Hyperlink Objects

Example

L_INT AddTargetObject( LVectorObject *pVecObj, pVECTOROBJECT pTarget )
{
L_INT nRet;
VECTORLINKDESC Link;

Link.bObject = TRUE;

Link.tar.vectorobject.target = *pTarget;
Link.tar.vectorobject.handling = VECTORLINKHANDLING_CURRENTWINDOW;

nRet = pVecObj->AddHyperlink( &Link );
if( SUCCESS != nRet )
{
return nRet;
}

return pVecObj->GetHyperlinkCount( );
}


LVectorObject::DeleteObject

#include "ltwrappr.h"

virtual L_INT LVectorObject::DeleteObject(L_VOID)

Deletes objects from a vector image. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Deletes the class object.

Note: In DirectX, you cannot delete objects, therefore this function does nothing.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SelectObject, LVectorObject::IsObjectSelected, LVectorBase::HitTest
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorBase::HitTest.


LVectorObject::ExplodeObject

#include "ltwrappr.h"

L_INT LVectorObject::ExplodeObject(dwFlags)

L_UINT32 dwFlags;

/* flag that indicates how to explode the object */

Explodes a vector object or objects to smaller parts. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
dwFlags | Flag that indicates which objects to explode. Possible values are:
 | Value | Meaning
 | 0 | Explode all objects.
 | VECTOR_FLAGS_EXPLODE_TO_LINES | Explode objects into lines.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If the VECTOR_FLAGS_EXPLODE_TO_LINES flag is not specified, then not all objects can be exploded, for example an attempt to explode a VECTOR_LINE has no effect and returns SUCCESS.

Below is a list of object types and the objects into which they explode:

Object type | After LVectorObject::ExplodeObject
VECTOR_ARC | Same.
VECTOR_CHORD | Same.
VECTOR_CIRCLE | Same.
VECTOR_ELLIPSE | Same.
VECTOR_ELLIPTICALARC | Same.
VECTOR_LINE | Same.
VECTOR_PIE | Same.
VECTOR_POLYBEZIER | Same.
VECTOR_POLYDRAW | Same.
VECTOR_POLYGON | Same.
VECTOR_POLYLINE | nPointCount of VECTOR_LINE's.
VECTOR_RASTER | Same.
VECTOR_RECTANGLE | 4 VECTOR_LINE's.
VECTOR_TEXT | Same.
VECTOR_VERTEX | Same.

Note that exploding an object can convert the object into a different type. For example, exploding a VECTOR_RECTANGLE will result in four VECTOR_LINE objects. The original vector object no longer exists. Therefore, exploding a valid LVectorRectangle object invalidates the LVectorRectangle object.

To deteremine the validity of an object, call LVectorObject::IsValid.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::IsValid
Topics: | Working with Vector Objects

Example

// This example will
// 1. Create new image of one polyline
// 2. Explode the polyline
// 3. Enumerate the new objects
class LMyVectorLayer2: public LVectorLayer
{
public:
LVectorBase *m_pVectorDst;

public:
LMyVectorLayer2() {};
virtual ~LMyVectorLayer2(){};
virtual L_INT EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

L_INT LMyVectorLayer2::EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
L_TCHAR *pszMsg = TEXT("");

switch (pObject->nType)
{
case VECTOR_LINE:
pszMsg = TEXT("Vector Line");
break;

case VECTOR_RECTANGLE :
pszMsg = TEXT("Vector Rectangle");
break;

case VECTOR_POLYLINE:
pszMsg = TEXT("Vector Polyline");
break;
}
MessageBox(NULL, pszMsg, TEXT(""), MB_OK);
return SUCCESS ;
}

//LVectorObject::ExplodeObject()
//LVectorObject::IsValid()
//
//Example81
// This example will
// 1. Create new image of one polyline
// 2. Explode the polyline
// 3. Enumerate the new objects
L_VOID Example81(HWND hWnd, LVectorBase *pVector)
{
LMyVectorLayer2 VectorLayer;
VECTORLAYERDESC LayerDesc;

//Create and add a new layer
VectorLayer.GetLayerDesc(&LayerDesc);
lstrcpy(LayerDesc.szName, TEXT("Layer One"));
VectorLayer.SetLayerDesc(&LayerDesc);

pVector->AddLayer(&VectorLayer);

//Create a polyline object
VECTORPOLYLINE PolyLine;
VECTORPOINT Points[4] = { 50, 50, 0, 0,
80, 50, 0, 0,
80, 80, 0, 0,
50, 80, 0, 0
};

PolyLine.nPointCount = 4;
PolyLine.Point = Points;

PolyLine.Pen.nSize = sizeof( VECTORPEN );

PolyLine.Pen.bExtPen = FALSE;
PolyLine.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
PolyLine.Pen.NewPen.LogPen.lopnWidth.x = 10;
PolyLine.Pen.NewPen.LogPen.lopnWidth.y = 10;
PolyLine.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorPolyLine VectorPolyLine(&PolyLine);

//Add polyline to layer
VectorLayer.AddObject(&VectorPolyLine);

//Enumerate objects--should get one polyline
VectorLayer.EnumObjects();

//Enumerate objects--should get three lines
VectorLayer.EnumObjects();
}


LVectorObject::GetDescription

#include "ltwrappr.h"

L_UINT32 LVectorObject::GetDescription(pBuffer, uSize)

L_TCHAR * pBuffer; | /* pointer to a buffer */
L_UINT32 uSize; | /* size of pBuffer */

Retrieves the description string for the specified vector object.

Parameter | Description
pBuffer | Pointer to a buffer to be updated with the object description string.
uSize | Size of the buffer allocated for pBuffer.

Returns

If pBuffer is NULL, it will return the size of the buffer required for the description string. If pBuffer is not NULL, it will return the number of bytes actually written to the buffer.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetDescription
Topics: | Vector Images: Obtaining Object Information
 | Working with Vector Objects

Example

L_INT ModifyDescription( LVectorObject *pVecObj )
{
L_INT nRet;
L_UINT32 uSize;
L_TCHAR *pszDesc;

nRet = SUCCESS;
uSize = pVecObj->GetDescription( NULL, 0 );
if( uSize > 0 )
{
pszDesc = (L_TCHAR *)malloc( sizeof( L_TCHAR ) * uSize );
if( NULL == pszDesc )
{
return ERROR_NO_MEMORY;
}

pVecObj->GetDescription( pszDesc, sizeof( L_TCHAR ) * uSize );

if( uSize > 4 )
{
pszDesc[ 0 ] = 'T';
pszDesc[ 1 ] = 'E';
pszDesc[ 2 ] = 'S';
pszDesc[ 3 ] = 'T';

nRet = pVecObj->SetDescription( pszDesc );
}

free( pszDesc );
}
return nRet;
}


LVectorObject::GetHyperlink

#include "ltwrappr.h"

L_INT LVectorObject::GetHyperlink(uIndex, pTarget)

L_UINT32 uIndex; | /* index in the target list */
pVECTORLINKDESC pTarget; | /* pointer to structure that will receive the hyperlink target information */

Gets information about one of the targets in the target list of a hyperlinked vector object.

Parameter | Description
uIndex | Index in the target list.
pTarget | Pointer to a VECTORLINKDESC structure to be updated with the hyperlink target information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function returns an error if the object was not a hyperlinked vector object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::AddHyperlink, LVectorObject::SetHyperlink, LVectorObject::GetHyperlinkCount, LVectorObject::GotoHyperlink
Topics: | Vector Images: Hyperlink Object
 | Hyperlink Objects

Example

L_INT ReplaceRectsWithImage( LVectorObject *pVecObj )
{
L_INT nRet;
L_UINT i;
L_UINT uCount;
VECTORLINKDESC Link;
nRet = SUCCESS;
uCount = pVecObj->GetHyperlinkCount( );
for( i = 0 ; i < uCount && SUCCESS == nRet ; i++ )
{
nRet = pVecObj->GetHyperlink( i, &Link );

if( SUCCESS == nRet && TRUE == Link.bObject && VECTOR_RECTANGLE == Link.tar.vectorobject.target.nType )
{
Link.bObject = FALSE;

lstrcpy( Link.tar.fileobject.target.szPath, TEXT("c:\\my documents\\shakira.jpg") );
Link.tar.fileobject.hwndParent = NULL;

nRet = pVecObj->SetHyperlink( i, &Link );
}
}
return nRet;
}


LVectorObject::GetHyperlinkCount

#include "ltwrappr.h"

L_UINT32 LVectorObject::GetHyperlinkCount()

Returns the number of targets in the target list for the specified hyperlinked vector object.

Returns

0 < | Number of targets in the target list of the specified hyperlinked vector object.
0 | The object is not a hyperlinked vector object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::AddHyperlink, LVectorObject::SetHyperlink, LVectorObject::GetHyperlink, LVectorObject::GotoHyperlink
Topics: | Vector Images: Hyperlink Object
 | Hyperlink Objects

Example

For an example, refer to LVectorObject::AddHyperlink or LVectorObject::GetHyperlink.


LVectorObject::GetObjectAttributes

#include "ltwrappr.h"

virtual L_INT LVectorObject::GetObjectAttributes(pnROP, pPen, pBrush, pFont)

L_INT * pnROP; | /* ROP code */
pVECTORPEN pPen; | /* pen characteristics */
pVECTORBRUSH pBrush; | /* brush characteristics */
pVECTORFONT pFont; | /* font characteristics */

Sets the attributes of the class object.

Parameter | Description
pnROP | Pointer to a variable to be updated with the class object's ROP code. For more information on valid ROP2 codes, refer to your SDK..
pPen | Pointer to a VECTORPEN structure to be updated with the characteristics of the pen to use when drawing the class object.
pBrush | Pointer to a VECTORBRUSH structure to be updated with the characteristics of the brush to use when drawing the class object.
pFont | Pointer to a VECTORFONT structure to be updated with the characteristics of the font used by the class object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetObjectAttributes
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorObject::SetObjectAttributes.


LVectorObject::GetObjectParallelogram

#include "ltwrappr.h"

virtual L_INT LVectorObject::GetObjectParallelogram(pMin, pMax)

pVECTORPOINT pMin; | /* pointer to a VECTORPOINT structure */
pVECTORPOINT pMax; | /* pointer to a VECTORPOINT structure */

Gets the parallelogram that contains the class object.

Parameter | Description
pMin | Pointer to a VECTORPOINT structure to be updated with the minimum coordinate of the bounding parallelogram of the class object.
pMax | Pointer to a VECTORPOINT structure to be updated with the maximum coordinate of the bounding parallelogram of the class object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SelectObject, LVectorObject::IsObjectSelected, LVectorObject::GetObjectRect
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

// This example will get the extent of a vector object under pPoint.
L_VOID Example99(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorObject VectorObject;

L_INT nRet = pVector->HitTest(pPoint, &VectorObject);
if (nRet==SUCCESS)
{
VECTORPOINT pointMin, pointMax;
L_TCHAR szMsg[200];
VectorObject.GetObjectParallelogram(&pointMin, &pointMax);
wsprintf(szMsg, TEXT("GetObjectParallelogram pointMin[%lf,%lf] pointMax[%lf,%lf]"),
pointMin.x,
pointMin.y,
pointMax.x,
pointMax.y);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorObject::GetObjectRect

#include "ltwrappr.h"

virtual L_INT LVectorObject::GetObjectRect(pRect)

RECT L_FAR *pRect;

/* pointer to a RECT structure */

Gets the physical bounding rectangle for the class object.

Parameter | Description
pRect | Pointer to a RECT structure to be updated with the bounding rectangle of the class object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SelectObject, LVectorObject::IsObjectSelected, LVectorObject::GetObjectRect, LVectorBase::HitTest
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

//Example100
// This example will get the extents of a vector object under pPoint.
L_VOID Example100(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorObject VectorObject;

L_INT nRet = pVector->HitTest(pPoint, &VectorObject);
if (nRet==SUCCESS)
{
RECT boundingRect;
L_TCHAR szMsg[200];
VectorObject.GetObjectRect(&boundingRect);
wsprintf(szMsg, TEXT("GetObjectRect boundingRect[%d,%d] [%d,%d]"),
boundingRect.left,
boundingRect.top,
boundingRect.right,
boundingRect.bottom
);
MessageBox(hWnd, szMsg, TEXT(""), MB_OK);
}
}


LVectorObject::GetTooltip

#include "ltwrappr.h"

L_UINT32 LVectorObject::GetTooltip(pBuffer, uSize)

L_TCHAR * pBuffer; | /* pointer to a buffer */
L_UINT32 uSize; | /* size of pBuffer */

Retrieves the tooltip of a vector object.

Parameter | Description
pBuffer | Pointer to a buffer to be updated with the specified object's tooltip.
uSize | Size of the buffer allocated for pBuffer.

Returns

If pBuffer is NULL, it will return the size of the buffer required for the tooltip string. If pBuffer is not NULL, it will return the number of bytes actually written to the buffer.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetTooltip, LVectorObject::ShowTooltip, LVectorObject::HideTooltip
Topics: | Vector Images: Tooltips
 | Working with the Tooltips

Example

L_INT ShowMyTooltip( LVectorObject *pVecObj, L_BOOL bShow )
{
L_INT nRet;
L_UINT32 uSize;
L_TCHAR *pszTip;
VECTORTOOLTIPDESC TooltipDesc;

nRet = SUCCESS;
uSize = pVecObj->GetTooltip( NULL, 0 );

pszTip = (L_TCHAR *)malloc( sizeof( L_TCHAR ) * uSize );
if( NULL == pszTip )
return ERROR_NO_MEMORY;

nRet = SUCCESS;
pVecObj->GetTooltip( pszTip, uSize );
if( lstrcmp( pszTip, TEXT("test")) == 0 )
{
/* replace the tooltip */
nRet = pVecObj->SetTooltip(TEXT("Final"));
if( SUCCESS == nRet )
{
if( bShow )
{
ZeroMemory( &TooltipDesc, sizeof( TooltipDesc ) );
TooltipDesc.Point.x = 10;
TooltipDesc.Point.y = 10;
TooltipDesc.Pen.lopnColor = RGB( 0, 0, 0xFF );
TooltipDesc.Pen.lopnWidth.x = 1;

TooltipDesc.Brush.lbColor = RGB( 0xED, 0xF3, 0xBB );

lstrcpy( TooltipDesc.Font.lfFaceName, TEXT("Helvetica"));
TooltipDesc.Font.lfHeight = 5;

nRet = pVecObj->ShowTooltip( &TooltipDesc );
}
else
{
nRet = pVecObj->HideTooltip( );
}
}
}
free( pszTip );
return nRet;
}


LVectorObject::GetType

#include "ltwrappr.h"

virtual L_INT LVectorObject::GetType(L_VOID)

Returns the type of the class object.

Returns

The type of the class object. Possible values are:

Value | Meaning
VECTOR_ARC | Arc.
VECTOR_CHORD | Chord.
VECTOR_CIRCLE | Circle.
VECTOR_ELLIPSE | Ellipse.
VECTOR_ELLIPTICALARC | Elliptical arc
VECTOR_LINE | Line.
VECTOR_PIE | Pie section.
VECTOR_POLYBEZIER | Poly Bezier curve.
VECTOR_POLYDRAW | Polydraw.
VECTOR_POLYGON | Polygon.
VECTOR_POLYLINE | Polyline.
VECTOR_RASTER | Raster.
VECTOR_RECTANGLE | Rectangle.
VECTOR_STOCK | Stock object from a stock library.
VECTOR_TEXT | Text.
VECTOR_VERTEX | 3D vertex in space.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::LockObject, LVectorObject::UnlockObject, LVectorObject::ExplodeObject, LVectorObject::SetRotation
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorBase::CopyObject(pLayerDst, pObjectDst, pObjectSrc).


LVectorObject::GetViewContext

#include "ltwrappr.h"

L_INT LVectorObject::GetViewContext(pMin, pMax)

pVECTORPOINT pMin; | /* pointer to a VECTORPOINT structure */
pVECTORPOINT pMax; | /* pointer to a VECTORPOINT structure */

Retrieves the minimum and maximum points of an object’s view context space.

Parameter | Description
pMin | Pointer to a VECTORPOINT structure to be updated with the minimum point of the view context space.
pMax | Pointer to a VECTORPOINT structure to be updated with the maximum point of the view context space.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function fails if the object doesn’t have a preset view context.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetViewContext, LVectorObject::RemoveViewContext
Topics: | Vector Images: Obtaining Object Information
 | Working with theView Context

Example

L_INT ChangeViewContext( LVectorObject *pVecObj, pVECTORPOINT pMin, pVECTORPOINT pMax )
{
L_INT nRet;
VECTORPOINT Min;
VECTORPOINT Max;

nRet = pVecObj->GetViewContext( &Min, &Max );
if( SUCCESS != nRet )
{
nRet = pVecObj->SetViewContext( pMin, pMax );

*pMin = Min;
*pMax = Max;
}

if( SUCCESS != nRet )
{
pVecObj->RemoveViewContext( );
}

return nRet;
}


LVectorObject::GotoHyperlink

#include "ltwrappr.h"

L_INT LVectorObject::GotoHyperlink(uIndex)

L_UINT32 uIndex;

/* index to an item in the target list */

Activates the specified target from the target list of the hyperlinked vector object.

Parameter | Description
uIndex | Index to an item in the target list. The target specified by this index will be used and activated.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function fails if the object is not a hyperlinked vector object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::AddHyperlink, LVectorObject::SetHyperlink, LVectorObject::GetHyperlink, LVectorObject::GetHyperlinkCount
Topics: | Vector Images: Hyperlink Object
 | Hyperlink Objects

Example

L_INT JumpToLink( LVectorObject *pVecObj )
{
return pVecObj->GotoHyperlink( 0 );
}


LVectorObject::HideObject

#include "ltwrappr.h"

virtual L_INT LVectorObject::HideObject(bHide=TRUE)

L_BOOL bHide;

/* flag that indicates whether to hide or show an object */

Hides or shows an object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
bHide | Flag that indicates whether to hide or show the class object. Possible values are:
 | Value | Meaning
 | TRUE | Hide the class object.
 | FALSE | Show the class object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Hides or shows a class object.

This function is not supported in the DirectX engine.

Please note that you will have to update the window to see the results of this function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::IsObjectHidden, Class Members
Topics: | Working with Vector Objects
 | Vector Images: Modifying Vector Object Characteristics

Example

//This example will toggle the hide property of the given object
void Example26(HWND hWnd, LVectorBase *pVector, LVectorObject *pObject )
{
L_BOOL bHidden;

pObject->IsObjectHidden( &bHidden );
pObject->HideObject( !bHidden );
}


LVectorObject::HideTooltip

#include "ltwrappr.h"

L_INT LVectorObject::HideTooltip()

Hides the tooltip of an object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetTooltip, LVectorObject::ShowTooltip, LVectorObject::GetTooltip
Topics: | Vector Images: Tooltips
 | Working with the Tooltips

Example

For an example, refer to LVectorObject::GetTooltip


LVectorObject::IsObjectHidden

#include "ltwrappr.h"

L_INT LVectorObject::IsObjectHidden(pbHidden)

L_BOOL L_FAR *pbHidden;

/* pointer to a variable */

Returns a value that indicates whether the class object is hidden.

Parameter | Description
pbHidden | Pointer to a variable to be updated with a value that indicates whether or not the class object is hidden. Possible values are:
 | Value | Meaning
 | TRUE | The class object is hidden.
 | FALSE | The class object is not hidden.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::HideObject, Class Members
Topics | Vector Images: Obtaining Object Information
 | Working with Vector Objects

Example

//This example will check if the given vector object is hidden or not
void Example26(HWND hWnd, LVectorBase *pVector, LVectorObject *pObject )
{
L_BOOL bHidden;

if( pObject->IsObjectHidden( &bHidden ) )
MessageBox( NULL, TEXT("Object is hidden"), TEXT("Test"), MB_OK );
else
MessageBox( NULL, TEXT("Object is not hidden"), TEXT("Test"), MB_OK );
}


LVectorObject::IsObjectInsideParallelogram

#include "ltwrappr.h"

virtual L_INT LVectorObject::IsObjectInsideParallelogram(pLeftTop, pRightBottom, bInside)

const pVECTORPOINT pLeftTop; | /* pointer to a vector point */
const pVECTORPOINT pRightBottom; | /* pointer to a vector point */
L_BOOL L_FAR *bInside; | /* pointer to a variable */

Determines whether the class object is within the specified parallelogram.

Parameter | Description
pLeftTop | Pointer to a VECTORPOINT structure that contains the top left point of a parallelogram.
pRightBottom | Pointer to a VECTORPOINT structure that contains the bottom right point of a parallelogram.
bInside | Pointer to a variable to be updated with a value that indicates whether the class object is inside the specified parallelogram. Possible values are:
 | Value | Meaning
 | TRUE | The class object is within the specified parallelogram.
 | FALSE | The class object is not within the specified parallelogram.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function determines whether the class object exists within the parallelogram specified by pLeftTop and pRightBottom. The parallelogram is given in logical units.

For this function, the current view port, pan position, camera, rotation, translation and scale do not effect the actual image position in 3D space.

Not supported in DirectX.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::IsObjectInsideRect, LVectorObject::GetObjectParallelogram, LVectorObject::GetObjectRect
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

//This example selects all vertices inside a given parallelogram.
class LMyVectorBase: public LVectorBase
{
public:
L_INT m_nObjectCount ;
VECTORPOINT m_LeftTop, m_RightBottom;

public:
LMyVectorBase();
virtual ~LMyVectorBase() ;
virtual L_INT EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

LMyVectorBase::LMyVectorBase()
{
m_nObjectCount = 0 ;
}

LMyVectorBase::~LMyVectorBase()
{
}

L_INT LMyVectorBase::EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
L_BOOL bInside;
LVectorBase VectorBase(pVector);
LVectorObject VectorObject(pObject, &VectorBase);

//Select object if inside parallelogram

VectorObject.IsObjectInsideParallelogram(&m_LeftTop,&m_RightBottom,&bInside);
if (bInside)
VectorObject.SelectObject();
return SUCCESS ;
}

L_VOID Example16(HWND hWnd)
{
LMyVectorBase Vector;
Vector.Load(TEXT("test.dxf"));

//Define a 3D parallelogram
Vector.m_LeftTop.x=0;
Vector.m_LeftTop.y=0;
Vector.m_LeftTop.z=0;

Vector.m_RightBottom.x=50;
Vector.m_RightBottom.y=50;
Vector.m_RightBottom.z=50;
}


LVectorObject::IsObjectInsideRect

#include "ltwrappr.h"

virtual L_INT LVectorObject::IsObjectInsideRect(pRect, bInside)

const RECT L_FAR *pRect; | /* pointer to a RECT structure */
L_BOOL L_FAR *bInside; | /* pointer to a variable */

Determines whether the specified object is within the specified rectangle.

Parameter | Description
pRect | Pointer to a RECT structure that contains information about a bounding rectangle.
bInside | Pointer to a variable to be updated with a value that indicates whether the object is inside the specified parallelogram. Possible values are:
 | Value | Meaning
 | TRUE | The specified object is within the specified parallelogram.
 | FALSE | The specified object is not within the specified parallelogram.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The rectangle is given in screen (physical) coordinates.

The current view port, pan position, camera, scale, translation and rotation values are all considered when determining whether the object is within the rectangle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::IsObjectInsideParallelogram, LVectorBase::GetObjectParallelogram, LVectorBase::GetObjectRect
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Obtaining Object Information

Example

//This example selects all vertices inside a given rectangle.
class LMyVectorBase3: public LVectorBase
{
public:
RECT m_Rect;

public:
LMyVectorBase3();
virtual ~LMyVectorBase3() ;
virtual L_INT EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject);
};

LMyVectorBase3::LMyVectorBase3()
{
}

LMyVectorBase3::~LMyVectorBase3()
{
}

L_INT LMyVectorBase3::EnumObjectsCallBack(pVECTORHANDLE pVector, pVECTOROBJECT pObject)
{
L_BOOL bInside;

LVectorBase VectorBase(pVector);
LVectorObject VectorObject(pObject, &VectorBase);

//Select object if inside parallelogram
VectorObject.IsObjectInsideRect(&m_Rect,&bInside);
if (bInside)
VectorObject.SelectObject();
return SUCCESS ;
}

L_VOID Example18(HWND hWnd)
{
LMyVectorBase3 Vector;
Vector.Load(TEXT("test.dxf"));

//Define a 3D parallelogram
Vector.m_Rect.left =0;
Vector.m_Rect.top=0;
Vector.m_Rect.right=50;
Vector.m_Rect.bottom = 50;

//Select all objects inside this rectangle
Vector.EnumObjects();
}


LVectorObject::IsObjectSelected

#include "ltwrappr.h"

L_INT LVectorObject::IsObjectSelected(pbSelected)

L_BOOL L_FAR *pbSelected;

/* pointer to a variable */

Gets a value that indicates whether or not the class object is selected.

Parameter | Description
pbSelected | Pointer to a variable to be updated with a value that indicates whether or not the class object is selected. Possible values are:
 | Value | Meaning
 | TRUE | The class object is selected.
 | FALSE | The class object is not selected.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SelectObject, LVectorObject::DeleteObject, LVectorBase::HitTest
Topics: | Vector Images: Getting and Setting General Information

Example

//This example will toggle the selection state of the object under a given 2D point.
void Example26(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorObject VectorObject; /* Object under point */

// Get object under that point
L_INT nRet = pVector->HitTest(pPoint, &VectorObject);

//Is there an object under that point? If yes, select it
if (nRet == SUCCESS)
{
L_BOOL bSelected;

VectorObject.IsObjectSelected(&bSelected);
VectorObject.SelectObject(!bSelected);
}
}


LVectorObject::IsValid

#include "ltwrappr.h"

L_BOOL LVectorObject::IsValid(L_VOID)

Determines whether the LVectorObject class object is valid.

Returns

Value | Meaning
TRUE | The LVectorObject class object is valid.
FALSE | The LVectorObject class object is not valid.

Comments

An LVectorObject is invalid if it is created using the LVectorObject::LVectorObject() constructor. It remains invalid until it is added to a vector layer, using LVectorLayer::AddObject, or it is passed to LVectorBase::HitTest.

A valid LVectorObject object will become invalid when it is exploded, using LVectorObject::ExplodeObject.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::HitTest, LVectorObject::ExplodeObject, Class Members

Example

For an example, refer to LVectorObject::ExplodeObject.


LVectorObject::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorObject::LockObject(pObject)

pVECTOROBJECT pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTOROBJECT structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the appropriate VECTORXXXX type and pass the address to this function. After modifying the vector object settings, call LVectorObject::UnlockObject(). LVectorObject::LockObject() and LVectorObject::UnlockObject() should always be called in pairs. A more useful form of this method is available in any of the LVectorObject derived classes.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorObject::UnlockObject(). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorObject::UnlockObject().

To change the object information for a class object, call LVectorObject::UnlockObject.

LVectorObject::LockObject and LVectorObject::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorObject::LockObject and LVectorObject::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::UnlockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorObject::UnLockObject.


LVectorObject::RemoveViewContext

#include "ltwrappr.h"

L_INT LVectorObject::RemoveViewContext()

Removes a preset view context from the specified vector object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetViewContext, LVectorObject::GetViewContext
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Working with the View Context

Example

For an example, refer to LVectorObject::GetViewContext


LVectorObject::SelectObject

#include "ltwrappr.h"

virtual L_INT LVectorObject::SelectObject(bSelect=TRUE)

L_BOOL bSelect;

/* flag that indicates whether to select or unselect */

Selects or unselects an object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
bSelect | Flag that indicates whether to select or unselect the specified object. Possible values are:
 | Value | Meaning
 | TRUE | Select the specified object.
 | FALSE | Unselect the specified object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Selects or unselects the class object.

This function is not supported in the DirectX engine.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::IsObjectSelected, LVectorObject::DeleteObject, LVectorBase::HitTest
Topics: | Manipulating Objects or Vertices within a Vector Image
 | Vector Images: Modifying Vector Object Characteristics

Example

For an example, refer to LVectorObject::IsObjectSelected.


LVectorObject::SetDescription

#include "ltwrappr.h"

L_INT LVectorObject::SetDescription(pszTarget)

L_TCHAR * pszTarget;

/* object description */

Sets the description for an object.

Parameter | Description
pszTarget | Character string that contains the object description. Pass NULL if there is no description.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::GetDescription
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Working with Vector Objects

Example

For an example, refer to LVectorObject::GetDescription


LVectorObject::SetHyperlink

#include "ltwrappr.h"

L_INT LVectorObject::SetHyperlink(uIndex, pTarget)

L_UINT32 uIndex; /* index to the target item that will be set */

pVECTORLINKDESC pTarget;

/* new target information that will be used */

Sets a target in the target list of the specified vector object's hyperlink.

Parameter | Description
uIndex | Index to the target item that will be set.
pTarget | Pointer to a VECTORLINKDESC structure that contains the information on the new target to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

A hyperlink must be added to a vector object using the LVectorObject::AddHyperlink function before it can be changed using the LVectorObject::SetHyperlink function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::AddHyperlink, LVectorObject::GetHyperlink, LVectorObject::GetHyperlinkCount, LVectorObject::GotoHyperlink
Topics: | Vector Images: Hyperlink Object
 | Hyperlink Objects

Example

For an example, refer to LVectorObject::GetHyperlink


LVectorObject::SetObjectAttributes

#include "ltwrappr.h"

virtual L_INT LVectorObject::SetObjectAttributes(pnROP, pPen, pBrush, pFont)

const L_INT * pnROP; | /* ROP code */
const pVECTORPEN pPen; | /* pen characteristics */
const pVECTORBRUSH pBrush; | /* brush characteristics */
const pVECTORFONT pFont; | /* font characteristics */

Sets the attributes of the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pnROP | Pointer to a variable that contains the ROP code to set. For more information on valid ROP2 codes, refer to your SDK..
pPen | Pointer to a VECTORPEN structure that contains the pen characteristics to set.
pBrush | Pointer to a VECTORBRUSH structure that contains the brush characteristics to set.
pFont | Pointer to a VECTORFONT structure that contains the font to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::GetObjectAttributes
Topics: | Working with Vector Objects

Example

// This example will display and change the color of the pen to red of a vector object under pPoint.
L_VOID Example104(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorObject VectorObject;

L_INT nRet = pVector->HitTest (pPoint, &VectorObject);
if (nRet==SUCCESS)
{
VECTORPEN VectorPen;
L_TCHAR szMsg[200];

VectorObject.GetObjectAttributes(NULL, &VectorPen, NULL, NULL);
wsprintf(szMsg, TEXT("Object Pen Color [%x] -- changing to RED"), VectorPen.NewPen.LogPen.lopnColor);

VectorPen.bExtPen = FALSE;
VectorPen.NewPen.LogPen.lopnColor = RGB(255,0,0);
VectorObject.SetObjectAttributes(NULL, &VectorPen, NULL, NULL);
}
}


LVectorObject::SetRotation

#include "ltwrappr.h"

virtual L_INT LVectorObject::SetRotation(pRotation, pOrigin=NULL)

const pVECTORPOINT pRotation; | /* pointer to a vector point */
const pVECTORPOINT pOrigin; | /* pointer to a vector point */

Rotates the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pRotation | Pointer to a VECTORPOINT structure that contains the rotation values for each axis. The rotation values are in degrees.
pOrigin | Pointer to a VECTORPOINT structure that contains the center of rotation If pOrigin is NULL, the center of the class object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Rotates the class object based on the rotation values in pRotation.

The rotation values may be retrieved using LVectorBase::GetRotation.

Note for DirectX:, You cannot select objects or enumerate them.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorObject::LockObject and LVectorObject::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetScale, LVectorObject::SetTranslation
Topics: | Working with Vector Objects

Example

// This example will rotate a vector object under pPoint.
L_VOID Example102(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorObject VectorObject;
L_INT nRet;

nRet = pVector->HitTest(pPoint, &VectorObject);
if (nRet==SUCCESS)
{
VECTORPOINT pointRotate;
pointRotate.x = 0;
pointRotate.y = 0;
pointRotate.z = 90;

VectorObject.SetRotation(&pointRotate);
}
}

// This example will add a rectangle to the Active Layer LVectorBase object.
// Once added, the rectangle will be rotated twice.
// Rotating the first time 90 degrees, the object type remains type VECTOR_RECTANGLE.
// Rotating the second time 45 degrees, the object type changes to a VECTOR_POLYDRAW.
L_VOID Example107(HWND hWnd, LVectorBase *pVector)
{
VECTORRECTANGLE Rectangle;
L_INT nRet;
//Create Rectangle Object
Rectangle.Point[0].x = 30;
Rectangle.Point[0].y = 30;
Rectangle.Point[0].z = 10;

Rectangle.Point[1].x = 80;
Rectangle.Point[1].y = 50;
Rectangle.Point[1].z = 10;

Rectangle.Brush.nSize = sizeof(VECTORBRUSH);

Rectangle.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Rectangle.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,128,0);
Rectangle.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

Rectangle.Pen.nSize = sizeof( VECTORPEN );

Rectangle.Pen.bExtPen = FALSE;
Rectangle.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Rectangle.Pen.NewPen.LogPen.lopnWidth.x = 2;
Rectangle.Pen.NewPen.LogPen.lopnWidth.y = 2;
Rectangle.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);

LVectorRectangle VectorRectangle(&Rectangle);

pVector->AddObject(&VectorRectangle);

//Rotate 90 degrees along the Z-Axis--it stays a VECTOR_RECTANGLE
MessageBox(NULL, TEXT("Rotating 90 degrees along the Z-axis"), TEXT(""), MB_OK);

VECTORPOINT pointRotation;
pointRotation.x = 0;
pointRotation.y = 0;
pointRotation.z = 90;
VectorRectangle.SetRotation(&pointRotation);

VECTORRECTANGLE RectangleTemp;
nRet = VectorRectangle.LockObject(&RectangleTemp);
if (nRet == SUCCESS)
{
RectangleTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorRectangle.UnlockObject(&RectangleTemp);
}

//Rotate rectangle 45 degrees--it becomes an VECTOR_POLYDRAW object
pointRotation.x = 0;
pointRotation.y = 0;
pointRotation.z = 45;

//Cannot call LockObject/UnlockObject here, but can still change properties
//Object type is still a Rectangle

//Change color with SetObjectAttributes()
VECTORBRUSH brush;

brush.VectorBrushStyle = VECTORBRUSH_STANDARD;

brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(128,128,0);
}


LVectorObject::SetScale

#include "ltwrappr.h"

virtual L_INT LVectorObject::SetScale(pScale, pOrigin)

const pVECTORPOINT pScale; | /* pointer to a vector point */
const pVECTORPOINT pOrigin; | /* pointer to a vector point */

Scales the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pScale | Pointer to a VECTORPOINT structure that contains the scale values for each axis. The translation values are in logical units.
pOrigin | Pointer to a VECTORPOINT structure that contains the scale center. If pObject is not NULL, scaling occurs around this point. If pOrigin is NULL, the scale center is the center of the class object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Scales the class object based on the scale values in pScale.

pScale contains a scale value for each axis. A scale value of 1.0 represents a scale factor of 100%; a scale value of 0.5 represents a scale factor of 50%; a scale value of 2.0 represents a scale factor of 200%, etc.

Note for DirectX:, You cannot select objects or enumerate them.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetRotation, LVectorObject::SetTranslation
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

// This example will scale a vector object under pPoint.
L_VOID Example103(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorObject VectorObject;

L_INT nRet = pVector->HitTest(pPoint, &VectorObject);
if (nRet==SUCCESS)
{
VECTORPOINT pointScale;
pointScale.x = 0.5;
pointScale.y = 0.5;
pointScale.z = 0.5;

VectorObject.SetScale(&pointScale);
}
}


LVectorObject::SetTooltip

#include "ltwrappr.h"

L_INT LVectorObject::SetTooltip(pszTooltip)

L_TCHAR * pszTooltip;

/* object tool tip */

Sets the object’s tooltip.

Parameter | Description
pszTooltip | Pointer to a NULL terminated string which contains the tool tip.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::ShowTooltip, LVectorObject::HideTooltip, LVectorObject::GetTooltip
Topics: | Vector Images: Tooltips
 | Working with the Tooltips

Example

For an example, refer to LVectorObject::GetTooltip


LVectorObject::SetTranslation

#include "ltwrappr.h"

virtual L_INT LVectorObject::SetTranslation(pTranslation)

const pVECTORPOINT pTranslation;

/* pointer to a vector point */

Translates the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pTranslation | Pointer to a VECTORPOINT structure that contains the translation values for each axis. The translation values are in logical units.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Translates the class object based on the translation values in pTranslation.

The translation values may be retrieved using LVectorBase::GetTranslation.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::GetTranslation, LVectorObject::SetScale, LVectorObject::SetRotation,
Topics: | Rotating, Translating, Scaling Vector Images
 | Vector Images: Modifying Vector Object Characteristics

Example

// This example will translate a vector object under pPoint.
L_VOID Example101(HWND hWnd, LVectorBase *pVector, LPPOINT pPoint)
{
LVectorObject VectorObject;

L_INT nRet = pVector->HitTest(pPoint, &VectorObject);
if (nRet==SUCCESS)
{
VECTORPOINT pointTranslate;
pointTranslate.x = +1;
pointTranslate.y = 0;
pointTranslate.z = 0;

VectorObject.SetTranslation(&pointTranslate);
}
}


LVectorObject::SetViewContext

#include "ltwrappr.h"

L_INT LVectorObject::SetViewContext(pMin, pMax)

const pVECTORPOINT pMin; | /* pointer to a structure */
const pVECTORPOINT pMax; | /* pointer to a structure */

Sets the view context space for an object.

Parameter | Description
pMin | Pointer to a VECTORPOINT structure that contains the minimum point of the view context space to set.
pMax | Pointer to a VECTORPOINT structure that contains the maximum point of the view context space to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

View context space is a vector space that is assigned to a specific object. Whenever that object is being viewed on the screen as a target object, this view context space will be used as the area that will be displayed instead of showing the object only. This is used mainly in setting the dimensions of an object that will be displayed by the toolkit when the same object is a target of a hyperlink.

To make sure that the view context is understood correctly an example will be needed:

After the end-user clicks on the hyperlink, which has the blue rectangle above as its target, the view is changed from the first figure to the second one, taking the view context space into consideration.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::GetViewContext, LVectorObject::RemoveViewContext
Topics: | Vector Images: Modifying Vector Object Characteristics
 | Working with the View Context

Example

For an example, refer to LVectorObject::GetViewContext


LVectorObject::ShowTooltip

#include "ltwrappr.h"

L_INT LVectorObject::ShowTooltip(pTooltipDesc)

pVECTORTOOLTIPDESC pTooltipDesc;

/* pointer to a VECTORTOOLTIPDESC structure */

Shows a tooltip for an object.

Parameter | Description
pTooltipDesc | Pointer to a VECTORTOOLTIPDESC structure which contains information about how the tooltip should look.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::SetTooltip, LVectorObject::HideTooltip, LVectorObject::GetTooltip
Topics: | Vector Images: Tooltips
 | Working with the Tooltips

Example

For an example, refer to LVectorObject::GetTooltip


LVectorObject::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorObject::UnlockObject(pObject)

pVECTOROBJECT pObject;

/* pointer to a vector object */

Sets the object information of the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTOROBJECT structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTOROBJECT and pass the address to the LVectorObject::LockObject() method. After modifying the vector object settings, call LVectorObject::UnlockObject(). LVectorObject::LockObject() and LVectorObject::UnlockObject() should always be called in pairs. A more useful form of this method is available in any of the LVectorObject derived classes.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorObject::UnlockObject(). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorObject::UnlockObject().

To get the current object information for a class object, call LVectorObject::LockObject.

LVectorObject::LockObject and LVectorObject::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorObject::LockObject
Topics: | Working with Vector Objects

Example

// This example will add a new green polyline to the Active Layer LVectorBase object.
L_VOID Example79(HWND hWnd, LVectorBase *pVector)
{
VECTORPOLYLINE PolyLine;
LVectorPolyLine VectorPolyLine;

VectorPolyLine.LockObject(&PolyLine);

//Change default properties
PolyLine.nPointCount = 4;
VECTORPOINT Points[4] = {
50, 50, 0, 0,
80, 50, 0, 0,
80, 80, 0, 0,
50, 80, 0, 0
};
PolyLine.Point = Points;

PolyLine.Pen.bExtPen = FALSE;
PolyLine.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

VectorPolyLine.UnlockObject(&PolyLine);
pVector->AddObject(&VectorPolyLine );
}

// This example will add a rectangle to the Active Layer LVectorBase object.
// Once added, the rectangle will be rotated twice.
// Rotating the first time 90 degrees, the object type stays as VECTOR_RECTANGLE.
// Rotating the second time 45 degrees, the object type changes to a VECTOR_POLYDRAW.
L_VOID Example107(HWND hWnd, LVectorBase *pVector)
{
VECTORRECTANGLE Rectangle;
L_INT nRet;
L_TCHAR *pszType;

//Create Rectangle Object
Rectangle.Point[0].x = 30;
Rectangle.Point[0].y = 30;
Rectangle.Point[0].z = 10;

Rectangle.Point[1].x = 80;
Rectangle.Point[1].y = 50;
Rectangle.Point[1].z = 10;

Rectangle.Brush.nSize = sizeof(VECTORBRUSH);

Rectangle.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Rectangle.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,128,0);
Rectangle.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

Rectangle.Pen.nSize = sizeof( VECTORPEN );

Rectangle.Pen.bExtPen = FALSE;
Rectangle.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Rectangle.Pen.NewPen.LogPen.lopnWidth.x = 2;
Rectangle.Pen.NewPen.LogPen.lopnWidth.y = 2;
Rectangle.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);

LVectorRectangle VectorRectangle(&Rectangle);

pVector->AddObject(&VectorRectangle);

//Rotate 90 degrees along the Z-Axis--it stays a VECTOR_RECTANGLE
MessageBox(NULL, TEXT("Rotating 90 degrees along the Z-axis"), TEXT(""), MB_OK);

VECTORPOINT pointRotation;
pointRotation.x = 0;
pointRotation.y = 0;
pointRotation.z = 90;

VECTORRECTANGLE RectangleTemp;
nRet = VectorRectangle.LockObject(&RectangleTemp);
if (nRet == SUCCESS)
{
RectangleTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorRectangle.UnlockObject(&RectangleTemp);
}

//Rotate rectangle 45 degrees--it becomes an VECTOR_POLYDRAW object
pointRotation.x = 0;
pointRotation.y = 0;
pointRotation.z = 45;
VectorRectangle.SetRotation(&pointRotation);

//Cannot call LockObject/UnlockObject here, but can still change properties
//Object type is still a Rectangle
pszType = VectorRectangle.IsTypeValid() ?
TEXT("Valid Type--can call LockObject()/UnlockObject() and SetObjectAttributes() to change object properties") :
TEXT("Invalid Type--can call SetObjectAttributes() to change object properties");
MessageBox(NULL, pszType, TEXT(""), MB_OK);

//Change color with SetObjectAttributes()
VECTORBRUSH brush;

brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(128,128,0);

}


LVectorPie::LVectorPie

#include "ltwrappr.h"

L_VOID LVectorPie::LVectorPie(pPie = NULL)

L_VOID LVectorPie::LVectorPie(pObject, pVector =NULL)

pVECTORPIE pPie; | /* pointer to a VECTORPIE structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorPie object.

Parameter | Description
pPie | Pointer to a VECTORPIE structure that contains information used to create and initialize the new vector line object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector pie object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector pie object will be associated.

Returns

None.

Comments

LVectorPie::LVectorPie(pPie) is a constructor for the LVectorPie object. It takes a valid pVECTORPIE pointer and creates an LVectorPie object.

LVectorPie::LVectorPie(pObject, pVector=NULL) creates an LVectorPie object based on the information provided in pObject and associates the newly created LVectorPie object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorPie object using the LVectorPie::LVectorPie(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_PIE
//LVectorBase *pVector is valid
LVectorPie MyVectorPie(pObject, pVectorBase);
if (MyVectorPie.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPie::~LVectorPie, Class Members

Example

For an example for LVectorPie::LVectorPie(pPie), refer to LVectorPie::LockObject.

For an example for LVectorPie::LVectorPie(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorPie::~LVectorPie

#include "ltwrappr.h"

virtual L_VOID LVectorPie::~LVectorPie(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorPie class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPie::LVectorPie, Class Members

Example

For an example, refer to LVectorPie::LockObject.


LVectorPie::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorPie::LockObject(pObject)

pVECTORPIE pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORPIE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORPIE type and pass the address to this function. After modifying the vector object settings, call LVectorPie::UnlockObject (). LVectorPie::LockObject () and LVectorPie::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPie::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPie::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPie::UnlockObject ().

To change the object information for a class object, call LVectorPie::UnlockObject.

LVectorPie::LockObject and LVectorPie::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorPie::LockObject and LVectorPie::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPie::UnlockObject
Topics: | Working with Vector Objects

Example

//Example114
// This example will add a vector pie object to the Active Layer LVectorBase object
L_VOID Example114(HWND hWnd, LVectorBase *pVector)
{
VECTORPIE Pie;
LVectorPie VectorPie;

VectorPie.LockObject(&Pie);

Pie.Point.x = 50;
Pie.Point.y = 50;
Pie.Point.z = 0;

Pie.Pen.bExtPen = FALSE;
Pie.Pen.NewPen.LogPen.lopnColor = RGB(255,255,0);

Pie.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Pie.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,255,0);

Pie.Radius = 30;
Pie.StartAngle = 45;
Pie.SweepAngle = 145;

VectorPie.UnlockObject(&Pie);

pVector->AddObject(&VectorPie);

//LVectorPie destructor called when VectorPie goes out of scope
}


LVectorPie::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorPie::UnlockObject(pObject)

pVECTORPIE pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORPIE structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORPIE and pass the address to the LVectorPie::LockObject () function. After modifying the vector object settings, call LVectorPie::UnlockObject (). LVectorPie::LockObject () and LVectorPie::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPie::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPie::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPie::UnlockObject ().

To get the current object information for a class object, call LVectorPie::LockObject.

LVectorPie::LockObject and LVectorPie::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPie::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorPie::LockObject.


LVectorPolyBezier::LVectorPolyBezier

#include "ltwrappr.h"

L_VOID LVectorPolyBezier::LVectorPolyBezier(pPolyBezier = NULL)

L_VOID LVectorPolyBezier::LVectorPolyBezier(pObject, pVector =NULL)

pVECTORPOLYBEZIER pPolyBezier; | /* pointer to a VECTORPOLYBEZIER structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorPolyBezier object.

Parameter | Description
pPolyBezier | Pointer to a VECTORPOLYBEZIER structure that contains information used to create and initialize the new vector line object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector polybezier object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector polybezier object will be associated.

Returns

None.

Comments

LVectorPolyBezier::LVectorPolyBezier(pPolyBezier) is a constructor for the LVectorPolyBezier object. It takes a valid pVECTORPOLYBEZIER pointer and creates an LVectorPolyBezier object.

LVectorPolyBezier::LVectorPolyBezier(pObject, pVector=NULL) creates an LVectorPolyBezier object based on the information provided in pObject and associates the newly created LVectorPolyBezier object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorPolyBezier object using the LVectorPolyBezier::LVectorPolyBezier(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_POLYBEZIER
//LVectorBase *pVector is valid
LVectorPolyBezier MyVectorPolyBezier(pObject, pVectorBase);
if (MyVectorPolyBezier.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolyBezier::~LVectorPolyBezier, Class Members

Example

For an example for LVectorPolyBezier::LVectorPolyBezier(pPolyBezier), refer to LVectorPolyBezier::LockObject.

For an example for LVectorPolyBezier::LVectorPolyBezier(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorPolyBezier::~LVectorPolyBezier

#include "ltwrappr.h"

virtual L_VOID LVectorPolyBezier::~LVectorPolyBezier(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorPolyBezier class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolyBezier::LVectorPolyBezier, Class Members

Example

For an example, refer to LVectorPolyBezier::LockObject.


LVectorPolybezier::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolybezier::LockObject(pObject)

pVECTORPOLYBEZIER pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORPOLYBEZIER structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORPOLYBEZIER type and pass the address to this function. After modifying the vector object settings, call LVectorPolybezier::UnlockObject (). LVectorPolybezier::LockObject () and LVectorPolybezier::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolybezier::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolybezier::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolybezier::UnlockObject ().

To change the object information for a class object, call LVectorPolybezier::UnlockObject.

LVectorPolybezier::LockObject and LVectorPolybezier::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorPolybezier::LockObject and LVectorPolybezier::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolybezier::UnlockObject
Topics: | Working with Vector Objects

Example

//Example108
// This example will add a new green bezier curve to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example108(HWND hWnd, LVectorBase *pVector)
{
VECTORPOLYBEZIER PolyBezier;

//Create PolyBezier Object
VECTORPOINT Points[4] =
{
30, 30, 10, 0,
30, 50, 10, 0,
40, 60, 10, 0,
10, 30, 10, 0,
};
PolyBezier.nPointCount = 4;
PolyBezier.Point = Points;

PolyBezier.Pen. bExtPen = FALSE;
PolyBezier.Pen.nSize = sizeof( VECTORPEN );
PolyBezier.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
PolyBezier.Pen.NewPen.LogPen.lopnWidth.x = 10;
PolyBezier.Pen.NewPen.LogPen.lopnWidth.y = 10;
PolyBezier.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorPolyBezier VectorPolyBezier(&PolyBezier);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorPolyBezier);

//Now change color to blue
MessageBox(NULL, TEXT("Changing color to blue"), TEXT(""), MB_OK);

VECTORPOLYBEZIER PolyBezierTemp;

VectorPolyBezier.LockObject(&PolyBezierTemp);

PolyBezierTemp.Pen. bExtPen = FALSE;
PolyBezierTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorPolyBezier.UnlockObject(&PolyBezierTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorPolyBezier destructor called when VectorPolyBezier goes out of scope
}


LVectorPolybezier::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolybezier::UnlockObject(pObject)

pVECTORPOLYBEZIER pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORPOLYBEZIER structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORPOLYBEZIER and pass the address to the LVectorPolybezier::LockObject () function. After modifying the vector object settings, call LVectorPolybezier::UnlockObject (). LVectorPolybezier::LockObject () and LVectorPolybezier::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolybezier::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolybezier::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolybezier::UnlockObject ().

To get the current object information for a class object, call LVectorPolybezier::LockObject.

LVectorPolybezier::LockObject and LVectorPolybezier::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolybezier::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorPolyBezier::LockObject.


LVectorPolyDraw::LVectorPolyDraw

#include "ltwrappr.h"

L_VOID LVectorPolyDraw::LVectorPolyDraw(pPolyDraw = NULL)

L_VOID LVectorPolyDraw::LVectorPolyDraw(pObject, pVector =NULL)

pVECTORPOLYDRAW pPolyDraw; | /* pointer to a VECTORPOLYDRAW structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorPolyDraw object.

Parameter | Description
pPolyDraw | Pointer to a VECTORPOLYDRAW structure that contains information used to create and initialize the new vector polydraw object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector polydraw object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector polydraw object will be associated.

Returns

None

Comments

LVectorPolyDraw::LVectorPolyDraw(pPolyDraw) is a constructor for the LVectorPolyDraw object. It takes a valid pVECTORPOLYDRAW pointer and creates an LVectorPolyDraw object.

LVectorPolyDraw::LVectorPolyDraw(pObject, pVector=NULL) creates an LVectorPolyDraw object based on the information provided in pObject and associates the newly created LVectorPolyDraw object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorPolyDraw object using the LVectorPolyDraw::LVectorPolyDraw(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_POLYDRAW
//LVectorBase *pVector is valid
LVectorPolyDraw MyVectorPolyDraw(pObject, pVectorBase);
if (MyVectorPolyDraw.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolyDraw::~LVectorPolyDraw, Class Members

Example

For an example for LVectorPolyDraw::LVectorPolyDraw(pPolyDraw), refer to LVectorPolyDraw::LockObject.

For an example for LVectorPolyDraw::LVectorPolyDraw(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorPolyDraw::~LVectorPolyDraw

#include "ltwrappr.h"

virtual L_VOID LVectorPolyDraw::~LVectorPolyDraw(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorPolyDraw class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolyDraw::LVectorPolyDraw, Class Members

Example

For an example, refer to LVectorPolyDraw::LockObject.


LVectorPolydraw::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolydraw::LockObject(pObject)

pVECTORPOLYDRAW pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORPOLYDRAW structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORPOLYDRAW type and pass the address to this function. After modifying the vector object settings, call LVectorPolydraw::UnlockObject (). LVectorPolydraw::LockObject () and LVectorPolydraw::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolydraw::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolydraw::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolydraw::UnlockObject ().

To change the object information for a class object, call LVectorPolydraw::UnlockObject.

LVectorPolydraw::LockObject and LVectorPolydraw::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorPolydraw::LockObject and LVectorPolydraw::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolydraw::UnlockObject
Topics: | Working with Vector Objects

Example

// This example will add a new green PolyDraw to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example116(HWND hWnd, LVectorBase *pVector)
{
VECTORPOLYDRAW PolyDraw;
VECTORPOINT Points[8] =
{
30, 30, 0, 0,
50, 30, 0, 0,
50, 50, 0, 0,
30, 50, 0, 0,
70, 30, 0, 0,
90, 30, 0, 0,
90, 50, 0, 0,
70, 50, 0, 0
};

PolyDraw.Point = Points;
PolyDraw.nPointCount = 8;

L_UCHAR byType[8] =
{
VECTOR_PT_MOVETO,
VECTOR_PT_LINETO,
VECTOR_PT_LINETO,
VECTOR_PT_LINETO,
VECTOR_PT_MOVETO,
VECTOR_PT_LINETO,
VECTOR_PT_LINETO,
VECTOR_PT_LINETO
};

PolyDraw.pbyType = byType;

PolyDraw.Pen. bExtPen = FALSE;
PolyDraw.Pen.nSize = sizeof( VECTORPEN );
PolyDraw.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
PolyDraw.Pen.NewPen.LogPen.lopnWidth.x = 1;
PolyDraw.Pen.NewPen.LogPen.lopnWidth.y = 1;
PolyDraw.Pen.NewPen.LogPen.lopnColor = RGB(255,255,0);

PolyDraw.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
PolyDraw.Brush.nSize = sizeof(VECTORBRUSH);
PolyDraw.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,255,0);
PolyDraw.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

LVectorPolyDraw VectorPolyDraw(&PolyDraw);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorPolyDraw);

//Now change color to blue
MessageBox(NULL, TEXT("Changing pen color to blue"), TEXT(""), MB_OK);

VECTORPOLYDRAW PolyDrawTemp;

VectorPolyDraw.LockObject(&PolyDrawTemp);

PolyDrawTemp.Pen. bExtPen = FALSE;
PolyDrawTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorPolyDraw.UnlockObject(&PolyDrawTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorPolyDraw destructor called when VectorPolyDraw goes out of scope
}


LVectorPolydraw::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolydraw::UnlockObject(pObject)

pVECTORPOLYDRAW pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORPOLYDRAW structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORPOLYDRAW and pass the address to the LVectorPolydraw::LockObject () function. After modifying the vector object settings, call LVectorPolydraw::UnlockObject (). LVectorPolydraw::LockObject () and LVectorPolydraw::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolydraw::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolydraw::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolydraw::UnlockObject ().

To get the current object information for a class object, call LVectorPolydraw::LockObject.

LVectorPolydraw::LockObjectand LVectorPolydraw::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolydraw::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorPolyDraw::LockObject.


LVectorPolygon::LVectorPolygon

#include "ltwrappr.h"

L_VOID LVectorPolygon::LVectorPolygon(pPolygon = NULL)

L_VOID LVectorPolygon::LVectorPolygon(pObject, pVector =NULL)

pVECTORPOLYGON pPolygon; | /* pointer to a VECTORPOLYGON structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorPolygon object.

Parameter | Description
pPolygon | Pointer to a VECTORPOLYGON structure that contains information used to create and initialize the new vector polygon object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector chord object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector chord object will be associated.

Returns

None

Comments

LVectorPolygon::LVectorPolygon(pPolygon) is a constructor for the LVectorPolygon object. It takes a valid pVECTORPOLYGONpointer and creates an LVectorPolygon object.

LVectorPolygon::LVectorPolygon(pObject, pVector=NULL) creates an LVectorPolygon object based on the information provided in pObject and associates the newly created LVectorPolygon object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorPolygon object using the LVectorPolygon::LVectorPolygon(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_POLYGON
//LVectorBase *pVector is valid
LVectorPolygon MyVectorPolygon(pObject, pVectorBase);
if (MyVectorPolygon.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolygon::~LVectorPolygon, Class Members

Example

For an example for LVectorPolygon::LVectorPolygon(pPolygon), refer to LVectorPolygon::LockObject.

For an example for LVectorPolygon::LVectorPolygon(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorPolygon::~LVectorPolygon

#include "ltwrappr.h"

virtual L_VOID LVectorPolygon::~LVectorPolygon(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorPolygon class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolygon::LVectorPolygon, Class Members

Example

For an example, refer to LVectorPolygon::LockObject.


LVectorPolygon::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolygon::LockObject(pObject)

pVECTORPOLYGON pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORPOLYGON structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORPOLYGON type and pass the address to this function. After modifying the vector object settings, call LVectorPolygon::UnlockObject (). LVectorPolygon::LockObject () and LVectorPolygon::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolygon::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolygon::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolygon::UnlockObject ().

To change the object information for a class object, call LVectorPolygon::UnlockObject.

LVectorPolygon::LockObject and LVectorPolygon::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorPolygon::LockObject and LVectorPolygon::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolygon::UnlockObject
Topics: | Working with Vector Objects

Example

//Example109
// This example will add a new green polygon to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example109(HWND hWnd, LVectorBase *pVector)
{
VECTORPOLYGON Polygon;

//Create Polygon Object
VECTORPOINT Points[5] =
{
10, 10, 20, 0,
20, 10, 20, 0,
20, 20, 20, 0,
15, 30, 0, 0,
10, 20, 0, 0,
};
Polygon.nPointCount = 5;
Polygon.Point = Points;

Polygon.Pen.bExtPen= FALSE;
Polygon.Pen.nSize = sizeof( VECTORPEN );
Polygon.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Polygon.Pen.NewPen.LogPen.lopnWidth.x = 2;
Polygon.Pen.NewPen.LogPen.lopnWidth.y = 2;
Polygon.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorPolygon VectorPolygon(&Polygon);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorPolygon);

//Now change color to blue
MessageBox(NULL, TEXT("Changing color to blue"), TEXT(""), MB_OK);

VECTORPOLYGON PolygonTemp;

VectorPolygon.LockObject(&PolygonTemp);

PolygonTemp.Pen.bExtPen = FALSE;
PolygonTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorPolygon.UnlockObject(&PolygonTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorPolygon destructor called when VectorPolygon goes out of scope
}


LVectorPolygon::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolygon::UnlockObject(pObject)

pVECTORPOLYGON pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORPOLYGON structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORPOLYGON and pass the address to the LVectorPolygon::LockObject () function. After modifying the vector object settings, call LVectorPolygon::UnlockObject (). LVectorPolygon::LockObject () and LVectorPolygon::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolygon::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolygon::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolygon::UnlockObject ().

To get the current object information for a class object, call LVectorPolygon::LockObject.

LVectorPolygon::LockObject and LVectorPolygon::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolygon::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorPolygon::LockObject.


LVectorPolyLine::LVectorPolyLine

#include "ltwrappr.h"

L_VOID LVectorPolyLine::LVectorPolyLine(pPolyLine = NULL)

L_VOID LVectorPolyLine::LVectorPolyLine(pObject, pVector =NULL)

pVECTORPOLYLINE pPolyLine; | /* pointer to a VECTORPOLYLINE structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorPolyLine object.

Parameter | Description
pPolyLine | Pointer to a VECTORPOLYLINE structure that contains information used to create and initialize the new vector polyline object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector polyline object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector polyline object will be associated.

Returns

None

Comments

LVectorPolyLine::LVectorPolyLine(pPolyLine) is a constructor for the LVectorPolyLine object. It takes a valid pVECTORPOLYLINE pointer and creates an LVectorPolyLine object.

LVectorPolyLine::LVectorPolyLine(pObject, pVector=NULL) creates an LVectorPolyLine object based on the information provided in pObject and associates the newly created LVectorPolyLine object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorPolyLine object using the LVectorPolyLine::LVectorPolyLine(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_POLYLINE
//LVectorBase *pVector is valid
LVectorPolyLine MyVectorPolyLine(pObject, pVectorBase);
if (MyVectorPolyLine.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolyLine::~LVectorPolyLine, Class Members

Example

For an example for LVectorPolyLine::LVectorPolyLine(pPolyLine), refer to LVectorObject::UnlockObject.

For an example for LVectorPolyLine::LVectorPolyLine(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorPolyLine::~LVectorPolyLine

#include "ltwrappr.h"

virtual L_VOID LVectorPolyLine::~LVectorPolyLine(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorPolyLine class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorPolyLine::LVectorPolyLine, Class Members

Example

For an example, refer to LVectorObject::UnlockObject.


LVectorPolyline::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolyline::LockObject(pObject)

pVECTORPOLYLINE pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORPOLYLINE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORPOLYLINE type and pass the address to this function. After modifying the vector object settings, call LVectorPolyline::UnlockObject (). LVectorPolyline::LockObject () and LVectorPolyline::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolyline::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolyline::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolyline::UnlockObject ().

To change the object information for a class object, call LVectorPolyline::UnlockObject.

LVectorPolyline::LockObject and LVectorPolyline::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorPolyline::LockObject and LVectorPolyline::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolyline::UnlockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorObject::UnlockObject.


LVectorPolyline::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorPolyline::UnlockObject(pObject)

pVECTORPOLYLINE pObject;

/* pointer to a vector object */

Sets the object information of the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORPOLYLINE structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORPOLYLINE and pass the address to the LVectorPolyline::LockObject () function. After modifying the vector object settings, call LVectorPolyline::UnlockObject(). LVectorPolyline::LockObject () and LVectorPolyline::UnlockObject() should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorPolyline::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorPolyline::UnlockObject(). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorPolyline::UnlockObject().

To get the current object information for a class object, call LVectorPolyline::LockObject.

LVectorPolyline::LockObject and LVectorPolyline::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorPolyline::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorObject::UnlockObject.


LVectorRaster::LVectorRaster

#include "ltwrappr.h"

L_VOID LVectorRaster::LVectorRaster(pRaster = NULL)

L_VOID LVectorRaster::LVectorRaster(pObject, pVector =NULL)

pVECTORRASTER pRaster; | /* pointer to a VECTORRASTER structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorRaster object.

Parameter | Description
pRaster | Pointer to a VECTORRASTER structure that contains information used to create and initialize the new vector raster object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector raster object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector raster object will be associated.

Returns

None

Comments

LVectorRaster::LVectorRaster(pRaster) is a constructor for the LVectorRaster object. It takes a valid pVECTORRASTERpointer and creates an LVectorRaster object.

LVectorRaster::LVectorRaster(pObject, pVector=NULL) creates an LVectorRaster object based on the information provided in pObject and associates the newly created LVectorRaster object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorRaster object using the LVectorRaster::LVectorRaster(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_RASTER
//LVectorBase *pVector is valid
LVectorRaster MyVectorRaster(pObject, pVectorBase);
if (MyVectorRaster.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorRaster::~LVectorRaster, Class Members

Example

For an example for LVectorRaster::LVectorRaster(pRaster), refer to LVectorRaster::LockObject.

For an example for LVectorRaster::LVectorRaster(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorRaster::~LVectorRaster

#include "ltwrappr.h"

virtual L_VOID LVectorRaster::~LVectorRaster(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorRaster class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorRaster::LVectorRaster, Class Members

Example

For an example, refer to LVectorRaster::LockObject.


LVectorRaster::LockObject

virtual L_INT LVectorRaster::LockObject(pObject)

pVECTORRASTER pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORRASTER structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORRASTER type and pass the address to this function. After modifying the vector object settings, call LVectorRaster::UnlockObject (). LVectorRaster::LockObject() and LVectorRaster::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorRaster::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorRaster::UnlockObject ().

To change the object information for a class object, call LVectorRaster::UnlockObject.

LVectorRaster::LockObject and LVectorRaster::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorRaster::LockObject and LVectorRaster::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorRaster::UnlockObject
Topics: | Working with Vector Objects

Example

//Example117
// This example will add a Raster object to the Active Layer LVectorBase object
// Once added, the object will be shifted
L_VOID Example117(HWND hWnd, LVectorBase *pVector)
{
VECTORRASTER Raster;
pBITMAPHANDLE pMyBitmap;
LBitmapBase BitmapBase;

Raster.Point[0].x = 20;
Raster.Point[0].y = 20;
Raster.Point[0].z = 0;

Raster.Point[1].x = 80;
Raster.Point[1].y = 80;
Raster.Point[1].z = 0;

Raster.Bitmap.nSize = sizeof(VECTORBITMAP);
//L_LOADBITMAP("gabe.bmp", Raster.Bitmap.Bitmap, ORDER_BGR,NULL, NULL);
BitmapBase.Load(TEXT("gabe.bmp"));
pMyBitmap = BitmapBase.GetHandle();
if (pMyBitmap)
{
Raster.Bitmap.Bitmap = *pMyBitmap;

LVectorRaster VectorRaster(&Raster);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorRaster);

MessageBox(NULL, TEXT("Shifting..."), TEXT(""), MB_OK);

VECTORRASTER RasterTemp;

VectorRaster.LockObject(&RasterTemp);
Raster.Point[0].x = 40;
VectorRaster.UnlockObject(&RasterTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
}
//LVectorRaster destructor called when VectorRaster goes out of scope
}


LVectorRaster::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorRaster::UnlockObject(pObject)

pVECTORRASTER pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORRASTER structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORRASTER and pass the address to the LVectorRaster::LockObject () function. After modifying the vector object settings, call LVectorRaster::UnlockObject (). LVectorRaster::LockObject () and LVectorRaster::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorRaster::UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorRaster::UnlockObject().

To get the current object information for a class object, call LVectorRaster::LockObject.

LVectorRaster::LockObject and LVectorRaster::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorRaster::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorRaster::LockObject.


LVectorRectangle::LVectorRectangle

#include "ltwrappr.h"

L_VOID LVectorRectangle::LVectorRectangle(pRectangle = NULL)

L_VOID LVectorRectangle::LVectorRectangle(pObject, pVector =NULL)

pVECTORRECTANGLE pRectangle; | /* pointer to a VECTORRECTANGLE structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorRectangle object.

Parameter | Description
pRectangle | Pointer to a VECTORRECTANGLE structure that contains information used to create and initialize the new vector raster object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector rectangle object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector rectangle object will be associated.

Returns

None

Comments

LVectorRectangle::LVectorRectangle(pRectangle) is a constructor for the LVectorRectangle object. It takes a valid pVECTORRECTANGLEpointer and creates an LVectorRectangle object.

LVectorRectangle::LVectorRectangle(pObject, pVector=NULL) creates an LVectorRectangle object based on the information provided in pObject and associates the newly created LVectorRectangle object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorRectangle object using the LVectorRectangle::LVectorRectangle(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_RECTANGLE
//LVectorBase *pVector is valid
LVectorRectangle MyVectorRectangle(pObject, pVectorBase);
if (MyVectorRectangle.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorRectangle::~LVectorRectangle, Class Members

Example

For an example for LVectorRectangle::LVectorRectangle(pRectangle), refer to LVectorObject::UnlockObject.

For an example for LVectorRectangle::LVectorRectangle(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorRectangle::~LVectorRectangle

#include "ltwrappr.h"

virtual L_VOID LVectorRectangle::~LVectorRectangle(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorRectangle class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorRectangle::LVectorRectangle, Class Members

Example

For an example, refer to LVectorObject::UnlockObject.


LVectorRectangle::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorRectangle::LockObject(pObject)

pVECTORRECTANGLE pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORRECTANGLE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORRECTANGLE type and pass the address to this function. After modifying the vector object settings, call LVectorRectangle::UnlockObject (). LVectorRectangle::LockObject() and LVectorRectangle::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorRectangle::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorRectangle::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorRectangle::UnlockObject ().

To change the object information for a class object, call LVectorRectangle::UnlockObject.

LVectorRectangle::LockObject and LVectorRectangle::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorRectangle::LockObject and LVectorRectangle::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorRectangle::UnlockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorObject::UnlockObject.


LVectorRectangle::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorRectangle::UnlockObject(pObject)

pVECTORRECTANGLE pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORRECTANGLE structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORRECTANGLE and pass the address to the LVectorRectangle::LockObject () function. After modifying the vector object settings, call LVectorRectangle::UnlockObject(). LVectorRectangle::LockObject () and LVectorRectangle::UnlockObject() should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorRectangle::UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorRectangle::UnlockObject(). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorRectangle::UnlockObject().

To get the current object information for a class object, call LVectorRectangle::LockObject.

LVectorRectangle::LockObject and LVectorRectangle::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorRectangle::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorObject::UnlockObject.


LVectorSpline::LVectorSpline

#include "ltwrappr.h"

L_VOID LVectorSpline:: LVectorSpline (pSpline = NULL)

L_VOID LVectorSpline:: LVectorSpline (pObject, pVector =NULL)

pVECTORSPLINE pSpline; | /* pointer to a VECTORSPLINE structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorSpline object.

Parameter | Description
pSpline | Pointer to a VECTORSPLINE structure that contains information used to create and initialize the new vector splineline object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector spline object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector spline object will be associated.

Returns

None.

Comments

LVectorSpline::LVectorSpline(pSpline) is a constructor for the LVectorSpline object. It takes a valid pVECTORSPLINE pointer and creates an LVectorSpline object.

LVectorSpline:: LVectorSpline (pObject, pVector=NULL) creates an LVectorSpline object based on the information provided in pObject and associates the newly created LVectorSpline object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorSpline object using the LVectorSpline:: LVectorSpline (pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_SPLINE
//LVectorBase *pVector is valid
LVectorSpline MyVectorSpliner(pObject, pVectorBase);
if (MyVectorSpline.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorSpline::~LVectorSpline, Class Members

Example

For an example for LVectorSpline::LVectorSpline(pSpline), refer to LVectorSpline::LockObject.

For an example for LVectorSpline:: LVectorSpline (pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorSpline::~LVectorSpline

#include "ltwrappr.h"

virtual L_VOID LVectorSpline::~LVectorSpline(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorSpline class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorSpline:: LVectorSpline, Class Members

Example

For an example, refer to LVectorSpline::LockObject.


LVectorSpline::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorSpline::LockObject(pObject)

pVECTORSPLINE pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORSPLINE structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORSPLINE type and pass the address to this function. After modifying the vector object settings, call LVectorSpline::UnlockObject (). LVectorSpline::LockObject () and LVectorSpline::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorSpline::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorSpline::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorSpline::UnlockObject ().

To change the object information for a class object, call LVectorSpline::UnlockObject.

LvectorSpline::LockObject and LVectorSpline::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorSpline::LockObject and LVectorSpline::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LvectorSpline::UnlockObject
Topics: | Working with Vector Objects

Example

//Example108
// This example will add a new green bezier curve to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example108(HWND hWnd, LVectorBase *pVector)
{

VECTORSPLINE Spline;

//Create Spline Object
VECTORPOINT Points[4] =
{
30, 30, 0, 0,
30, 50, 0, 0,
40, 60, 0, 0,
10, 30, 0, 0,
};
Spline.nPointCount = 4;
Spline.Point = Points;

Spline.Pen.nSize = sizeof( VECTORPEN );

Spline.Pen.bExtPen = FALSE;
Spline.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Spline.Pen.NewPen.LogPen.lopnWidth.x = 10;
Spline.Pen.NewPen.LogPen.lopnWidth.y = 10;
Spline.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorSpline VectorSpline(&Spline);

// add to current active layer
LVectorLayer VectorLayer;

L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
VectorLayer.AddObject(&VectorSpline);

//Now change color to blue
MessageBox(NULL, TEXT("Changing color to blue"), TEXT(""), MB_OK);

VECTORSPLINE SplineTemp;

VectorSpline.LockObject(&SplineTemp);

Spline.Pen.bExtPen = FALSE;
SplineTemp.Pen.NewPen.LogPen.lopnColor = RGB(0,0,255);
VectorSpline.UnlockObject(&SplineTemp);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorSpline destructor called when VectorSpline goes out of scope
}


LVectorSpline::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorSpline::UnlockObject(pObject)

pVECTORSPLINE pObject;

/* pointer to a vector object */

Sets the object information of the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORPOLYBEZIER structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORSPLINE and pass the address to the LVectorSpline::LockObject () function. After modifying the vector object settings, call LVectorSpline::UnlockObject (). LVectorSpline::LockObject () and LVectorSpline::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorSpline::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorSpline::UnlockObject (). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorSpline::UnlockObject ().

To get the current object information for a class object, call LVectorSpline::LockObject.

LVectorSpline::LockObject and LVectorSpline::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorSpline::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorSpline::LockObject.


LVectorStock::LVectorStock

#include "ltwrappr.h"

L_VOID LVectorStock::LVectorStock(pStock = NULL)

L_VOID LVectorStock::LVectorStock(pObject, pVector =NULL)

pVECTORSTOCK pStock; | /* pointer to a VECTORSTOCK structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorStock object.

Parameter | Description
pStock | Pointer to a VECTORSTOCK structure that contains information used to create and initialize the new vector stock object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector stock object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector stock object will be associated.

Returns

None

Comments

LVectorStock::LVectorStock(pStock) is a constructor for the LVectorStock object. It takes a valid pVECTORSTOCKpointer and creates an LVectorStock object.

LVectorStock::LVectorStock(pObject, pVector=NULL) creates an LVectorStock object based on the information provided in pObject and associates the newly created LVectorStock object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorStock object using the LVectorStock::LVectorStock(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_STOCK
//LVectorBase *pVector is valid
LVectorStock MyVectorStock(pObject, pVectorBase);
if (MyVectorStock.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorStock::~LVectorStock, Class Members

Example

This is an example for LVectorStock::LVectorStock(pStock):

//Example118
// This example will add all of the stock objects from VecOfice.dll to
// the Active Layer of an LVectorBase object
#include "..\..\..\..\packs\vecofice\vecofice.h"
L_VOID Example118(HWND hWnd, LVectorBase *pVector)
{
VECTORSTOCK Stock;
L_INT iWidth = 10;

// Load the VECOFICE library.
Stock.hInstDLL = LoadLibrary(TEXT("VecOfice.dll"));

// Tell the toolkit to load the stock object using the hInstDLL member.
Stock.pszDLLName = NULL;

// Fill in default pen, brush

Stock.Pen.bExtPen = FALSE;
Stock.Pen.nSize = sizeof( VECTORPEN );
Stock.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Stock.Pen.NewPen.LogPen.lopnWidth.x = 1;
Stock.Pen.NewPen.LogPen.lopnWidth.y = 1;

Stock.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Stock.Brush.nSize = sizeof( VECTORBRUSH );
Stock.Brush.BrushType.StandardBrush.LogBrush.lbStyle = PS_SOLID;
Stock.Brush.BrushType.StandardBrush.LogBrush.lbHatch = 0;

LVectorLayer VectorLayer;
L_INT nRet = pVector->GetActiveLayer(&VectorLayer);
if (nRet == SUCCESS)
{
Stock.Point[0].z = Stock.Point[1].z = 0;
for( Stock.nId = 0; Stock.nId <= VECOFICE_OBJECT_COUNT; Stock.nId++ )
{
Stock.Point[ 1 ].x = Stock.Point[ 0 ].x + iWidth;
Stock.Point[ 1 ].y = Stock.Point[ 0 ].y + iWidth;

// We want to have random colors for each object.
Stock.Pen.NewPen.LogPen.lopnColor = RGB( rand() % 256, rand() % 256, rand() % 256 );
Stock.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( rand() % 256, rand() % 256, rand() % 256 );

LVectorStock VectorStock(&Stock);
VectorLayer.AddObject(&VectorStock);

Stock.Point[ 0 ].x += iWidth;
if( Stock.Point[ 0 ].x > 11 * iWidth )
{
Stock.Point[ 0 ].x = 0;
Stock.Point[ 0 ].y += iWidth;
}
}

pVector->SetParallelogram(NULL, NULL);
pVector->SetOrigin(NULL);
pVector->SetCamera(NULL);
}
else
{
MessageBox(NULL, TEXT("No Active Layer--Load a vector and run again"), TEXT(""), MB_OK);
}
//LVectorStock destructor called when VectorStock goes out of scope
}

For an example for LVectorStock::LVectorStock(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorStock::~LVectorStock

#include "ltwrappr.h"

virtual L_VOID LVectorStock::~LVectorStock(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorStock class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorStock::LVectorStock, Class Members

Example

For an example, refer to LVectorStock::LVectorStock.


LVectorText::LVectorText

#include "ltwrappr.h"

L_VOID LVectorText::LVectorText(pText = NULL)

L_VOID LVectorText::LVectorText(pObject, pVector =NULL)

pVECTORTEXT pText; | /* pointer to a VECTORTEXT structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorText object.

Parameter | Description
pText | Pointer to a VECTORTEXT structure that contains information used to create and initialize the new vector text object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector text object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector text object will be associated.

Returns

None

Comments

LVectorText::LVectorText(pText) is a constructor for the LVectorText object. It takes a valid pVECTORTEXTpointer and creates an LVectorText object.

LVectorText::LVectorText(pObject, pVector=NULL) creates an LVectorText object based on the information provided in pObject and associates the newly created LVectorText object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorText object using the LVectorText::LVectorText(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_TEXT
//LVectorBase *pVector is valid
LVectorText MyVectorText(pObject, pVectorBase);
if (MyVectorText.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorText::~LVectorText, Class Members

Example

For an example for LVectorText::LVectorText(pText), refer to LVectorText::LockObject.

For an example for LVectorText::LVectorText(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorText::~LVectorText

#include "ltwrappr.h"

virtual L_VOID LVectorText::~LVectorText(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorText class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorText::LVectorText, Class Members

Example

For an example, refer to LVectorText::LockObject.


LVectorText::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorText::LockObject(pObject)

pVECTORTEXT pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORTEXT structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORTEXT type and pass the address to this function. After modifying the vector object settings, call LVectorText::UnlockObject (). LVectorText::LockObject() and LVectorText::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorText::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorText::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorText::UnlockObject ().

To change the object information for a class object, call LVectorText::UnlockObject.

LVectorText::LockObject and LVectorText::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorText::LockObject and LVectorText::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorText::UnlockObject
Topics: | Working with Vector Objects

Example

//Example114
// This example will add a text object to the Active Layer LVectorBase object
L_VOID Example114(HWND hWnd, LVectorBase *pVector)
{
VECTORTEXT Text;
LVectorText VectorText;

VectorText.LockObject(&Text);

Text.Point.x = 50;
Text.Point.y = 50;
Text.Point.z = 0;

Text.pszText = TEXT("LEAD");

Text.Pen.bExtPen = FALSE;
Text.Pen.NewPen.LogPen.lopnColor = RGB(255,255,0);

Text.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Text.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB(0,255,0);

Text.CharHeight = 8;
Text.CharWidth = 1;

VectorText.UnlockObject(&Text);

pVector->AddObject(&VectorText);

//LVectorText destructor called when VectorText goes out of scope
}


LVectorText::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorText::UnlockObject(pObject)

pVECTORTEXT pObject;

/* pointer to a vector object */

Sets the object information of the class object.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORTEXT structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORTEXT and pass the address to the LVectorText::LockObject () function. After modifying the vector object settings, call LVectorText::UnlockObject(). LVectorText::LockObject () and LVectorText::UnlockObject() should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorText::UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorText::UnlockObject(). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorText::UnlockObject().

To get the current object information for a class object, call LVectorText::LockObject.

LVectorText::LockObject and LVectorText::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorText::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorText::LockObject.


LVectorVertex::LVectorVertex

#include "ltwrappr.h"

L_VOID LVectorVertex::LVectorVertex(pVertex = NULL)

L_VOID LVectorVertex::LVectorVertex(pObject, pVector =NULL)

pVECTORVERTEX pVertex; | /* pointer to a VECTORVERTEX structure */
pVECTOROBJECT pObject; | /* pointer to a VECTOROBJECT structure */
LVectorBase *pVector; | /* pointer to an LVectorBase object */

Constructs and initializes the different member variables of the LVectorVertex object.

Parameter | Description
pVertex | Pointer to a VECTORVERTEX structure that contains information used to create and initialize the new vector vertex object.
pObject | Pointer to a VECTOROBJECT structure that contains information used to create and initialize the new vector vertex object.
pVector | Pointer to an LVectorBase object with which the newly constructed vector vertex object will be associated.

Returns

None

Comments

LVectorVertex::LVectorVertex(pVertex) is a constructor for the LVectorVertex object. It takes a valid pVECTORVERTEXpointer and creates an LVectorVertex object.

LVectorVertex::LVectorVertex(pObject, pVector=NULL) creates an LVectorVertex object based on the information provided in pObject and associates the newly created LVectorVertex object with the specified LVectorBase object. This constructor can be used with the LVectorLayer::EnumObjects function, which returns a valid pVECTOROBJECT pointer in the LVectorLayer::EnumObjectsCallBack member function. It can also be used with LVectorBase::VectorEventProcCallBack, which can also return a pObject.

Note that it is possible to construct an invalid LVectorVertex object using the LVectorVertex::LVectorVertex(pObject, pVector=NULL) constructor. For example:

//pObject->nType == type other than VECTOR_VERTEX
//LVectorBase *pVector is valid
LVectorVertex MyVectorVertex(pObject, pVectorBase);
if (MyVectorVertex.IsTypeValid() == FALSE)
MessageBox(NULL, TEXT("Invalid Vector Object"), TEXT(""), MB_OK);

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorVertex::~LVectorVertex, Class Members

Example

For an example for LVectorVertex::LVectorVertex(pVertex), refer to LVectorVertex::LockObject.

For an example for LVectorVertex::LVectorVertex(pObject, pVector=NULL), refer to LVectorArc::LVectorArc(pObject, pVector = NULL).


LVectorVertex::~LVectorVertex

#include "ltwrappr.h"

virtual L_VOID LVectorVertex::~LVectorVertex(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None.

Comments

This is the destructor for the LVectorVertex class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorVertex::LVectorVertex, Class Members

Example

For an example, refer to LVectorVertex::LockObject.


LVectorVertex::LockObject

#include "ltwrappr.h"

virtual L_INT LVectorVertex::LockObject(pObject)

pVECTORVERTEX pObject;

/* pointer to a vector object */

Gets the object information of the class object.

Parameter | Description
pObject | Pointer to a VECTORVERTEX structure to be updated with the vector object information.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to retrieve the object information of the class object.

To use this method, declare a variable of the VECTORVERTEX type and pass the address to this function. After modifying the vector object settings, call LVectorVertex::UnlockObject (). LVectorVertex::LockObject() and LVectorVertex::UnlockObject () should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorVertex::UnlockObject () can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorVertex::UnlockObject ().However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorVertex::UnlockObject().

To change the object information for a class object, call LVectorVertex::UnlockObject.

LVectorVertex::LockObject and LVectorVertex::UnlockObject must be called in pairs.

Note that rotating an object may change the object type. However, not all object types are changed by rotation, and not all rotations result in changing an object type. For example, a rectangle rotated 90 degrees about the z-axis is still a rectangle. A rectangle rotated 45 degrees about the z-axis becomes a polydraw object. The table below indicates object types that may change following rotation and the possible resulting object types.

Original object type | Possible object type following rotation
VECTOR_RECTANGLE | VECTOR_POLYGON
VECTOR_ELLIPSE | VECTOR_POLYDRAW
VECTOR_CIRCLE | VECTOR_POLYDRAW
VECTOR_ARC | VECTOR_POLYDRAW
VECTOR_TEXT | VECTOR_POLYDRAW
VECTOR_PIE | VECTOR_POLYDRAW

If an object type changes, LVectorVertex::LockObject and LVectorVertex::UnlockObject will return WRPERR_VECTOR_INVALID_OBJECT_TYPE. Object properties can still be inspected and changed by using LVectorObject::GetObjectAttributes and LVectorObject::SetObjectAttributes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorVertex::UnlockObject
Topics: | Working with Vector Objects

Example

// This example will add a new green vertex to the Active Layer LVectorBase object
// Once added, the color will be changed to blue
L_VOID Example106(HWND hWnd, LVectorBase *pVector)
{
VECTORVERTEX Vertex;

//Create Vertex Object
Vertex.Point.x = 50;
Vertex.Point.y = 50;
Vertex.Point.z = 10;

Vertex.Pen.bExtPen = FALSE;
Vertex.Pen.nSize = sizeof( VECTORPEN );
Vertex.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Vertex.Pen.NewPen.LogPen.lopnWidth.x = 10;
Vertex.Pen.NewPen.LogPen.lopnWidth.y = 10;
Vertex.Pen.NewPen.LogPen.lopnColor = RGB(0,255,0);

LVectorVertex VectorVertex(&Vertex);

pVector->AddObject(&VectorVertex);

//Now change color to blue
MessageBox(NULL, TEXT("Changing color to red"), TEXT(""), MB_OK);

VECTORVERTEX VertexTemp;

VectorVertex.LockObject(&VertexTemp);

VertexTemp.Pen.bExtPen = FALSE;
VertexTemp.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);
VectorVertex.UnlockObject(&VertexTemp);

//LVectorVertex destructor called when VectorVertex goes out of scope
}


LVectorVertex::UnlockObject

#include "ltwrappr.h"

virtual L_INT LVectorVertex::UnlockObject(pObject)

pVECTORVERTEX pObject;

/* pointer to a vector object */

Sets the object information of the class object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
pObject | Pointer to a VECTORVERTEX structure that contains the vector object information to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function is used to update the object information of the class object.

To use this method, declare a variable of type VECTORVERTEX and pass the address to the LVectorVertex::LockObject () function. After modifying the vector object settings, call LVectorVertex::UnlockObject(). LVectorVertex::LockObject() and LVectorVertex::UnlockObject() should always be called in pairs.

Before an object has been added to the LVectorBase object, using LVectorBase::AddObject or LVectorLayer::AddObject, LVectorVertex::UnlockObject() can be used to change ALL properties of an object. However, once the object has been added to the LVectorBase object, some properties cannot be changed using LVectorVertex::UnlockObject(). Specifically, nPointCount, *Point, pszText, and pbyType cannot be changed. However, as long as the number of points does not change, the coordinates of the individual points can always be modified using LVectorVertex::UnlockObject ().

To get the current object information for a class object, call LVectorVertex::LockObject.

LVectorVertex::LockObject and LVectorVertex::UnlockObject must be called in pairs.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorVertex::LockObject
Topics: | Working with Vector Objects

Example

For an example, refer to LVectorVertex::LockObject.


LVectorWindow::LVectorWindow

#include "ltwrappr.h"

L_VOID LVectorWindow::LVectorWindow(L_VOID)

L_VOID LVectorWindow::LVectorWindow(hWndParent, nID, dwStyle, x, y, nCx, nCy)

HWND hWndParent; | /* window handle */
L_INT nID; | /* control ID */
DWORD dwStyle; | /* window style */
L_INT x; | /* x coordinate */
L_INT y; | /* y coordinate */
L_INT nCx; | /* width of the window */
L_INT nCy; | /* height of the window */

Constructs and initializes the different member variables of the LVectorWindow object.

Parameter | Description
hWndParent | Handle of the parent window.
nID | The control’s ID.
dwStyle | Specifies the control's style. Apply any combination of Window styles and LEAD window styles. For more information on Windows styles, refer to your compiler’s help file. For more information on LEAD window styles, refer to Window styles
x | The starting x position.
y | The starting y position.
nCx | The width of the vector window.
nCy | The height of the vector window.

Returns

None

Comments

LVectorWindow:: LVectorWindow () is a constructor for the LVectorWindow object.

LVectorWindow:: LVectorWindow (hWndParent, nID, dwStyle, x, y, nCX, nCY) creates the vector window control using the specified options. This will fill in the m_hWnd data member with the handle to the new window.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

This is an example for LVectorWindow::LVectorWindow():

L_VOID Example1()
{
LVectorWindow myVectorWindow;
//destructor called when out of scope
}

This is an example for LVectorWindow:: LVectorWindow (hWndParent, nID, dwStyle, x, y, nCX, nCY)

L_VOID Example2(HWND hWndParent)
{
LVectorWindow myVectorWindow(hWndParent,15,WS_VISIBLE,0,0,100,100);
}


LVectorWindow::~LVectorWindow

#include "ltwrappr.h"

virtual L_VOID LVectorWindow::~LVectorWindow(L_VOID)

Destroys the object and frees any resources associated with it.

Returns

None

Comments

This is the destructor for the LVectorWindow class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::LVectorWindow, Class Members

Example

For an example, refer to LVectorWindow::LVectorWindow().


LVectorWindow::CreateWnd

#include "ltwrappr.h"

HWND LVectorWindow::CreateWnd(hWndParent, nID=0, dwStyle=WS_VISIBLE|L_BS_PROCESSKEYBOARD, x=0, y=0, nCx=200, nCy200)

HWND hWndParent; | /* handle of the parent window */
L_INT nID; | /* the control’s ID */
DWORD dwStyle; | /* control’s style */
L_INT x; | /* x coordinate for the window */
L_INT y; | /* y coordinate for the window */
L_INT nCx; | /* width of the window */
L_INT nCy; | /* height of the window */

Creates the vector window control using the specified parameters.

Parameter | Description
hWndParent | Handle of the parent window.
nID | The control’s ID.
dwStyle | The style of the window control. Apply any combination of window styles and LEAD window styles. For more information on Windows styles, refer to your compiler’s help file. Currently only the LEAD style L_BS_PROCESSKEYBOARD (to enable keyboard processing) is supported for the LVectorWindow class.
x | X coordinate for the origin of the vector window.
y | Y coordinate for the origin of the vector window.
nCx | The width of the vector window.
nCy | The height of the vector window.

Returns

!NULL | The function was successful and the return value is the window handle for the created control.
NULL | An error ocurred and the window could not be created.

Comments

This function causes the class object to create the control window using the specified parameters.

This will fill in the m_hWnd data member with the handle to the new window.

If you call this function for a class object that already has a created window, the function will simply return m_hWnd.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

//Creates the LVectorWindow as a control
//Assumes pVectorWindow points to a valid LVectorWindow object

#define CONTROL_X 30
#define CONTROL_Y 30
#define CONTROL_WIDTH 300
#define CONTROL_HEIGHT 300

L_VOID Example3(HWND hWndParent, LVectorWindow *pVectorWindow)
{
LSettings::UnlockSupport (L_SUPPORT_VECTOR, L_KEY_VECTOR);
LBase::LoadLibraries
 (LV_KRN | LT_FIL);

// Create the LVectorWindow control
pVectorWindow->CreateWnd(  hWndParent,
901,
WS_VISIBLE|L_BS_PROCESSKEYBOARD,
CONTROL_X,
CONTROL_Y,
CONTROL_WIDTH,
CONTROL_HEIGHT );
}


LVectorWindow::EnableAutoPaint

#include "ltwrappr.h"

L_BOOL LVectorWindow::EnableAutoPaint(bEnable)

L_BOOL bEnable;

/* flag that indicates whether to enable vector window painting */

Enables or disables vector window painting.

Parameter | Description
bEnable | Flag that indicates whether to enable or disable vector window painting. Possible values are:
 | Value | Meaning
 | TRUE | Enable vector window painting.
 | FALSE | Disable vector window painting.

Returns

The previous state.

Comments

This setting is enabled by default.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::IsAutoPaintEnabled, LVectorWindow::Repaint, Class Members

Example

For an example, refer to LVectorWindow::IsAutoPaintEnabled.


LVectorWindow::EnableAutoScroll

#include "ltwrappr.h"

L_BOOL LVectorWindow::EnableAutoScroll(bAutoScroll)

L_BOOL bAutoScroll;

/* flag that indicates whether to enable auto scrolling*/

Enables or disables automatic scrolling of the displayed vector.

Parameter | Description
bAutoScroll | Flag that indicates whether to enable auto scrolling of the vector displayed by the vector window. Possible values are:
 | Value | Meaning
 | TRUE | Enable auto scrolling.
 | FALSE | Disable auto scrolling.

Returns

The previous state.

Comments

When auto scrolling is enabled, the class object's window will display scrollbars when necessary. In addition, it will automatically handle scrolling the vector, based on the scroll messages generated for those scrollbars.

This setting is enabled by default.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::IsAutoScrollEnabled, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example15(HWND hWndParent, LVectorWindow *pVectorWindow)
{
//Toggles the AutoScroll
L_BOOL bAutoScrollState = pVectorWindow->IsAutoScrollEnabled();
pVectorWindow->EnableAutoScroll(!bAutoScrollState);
}


LVectorWindow::EnableDragAcceptFiles

#include "ltwrappr.h"

L_BOOL LVectorWindow::EnableDragAcceptFiles(bDragAcceptFiles)

L_BOOL bDragAcceptFiles;

/* flag that indicates whether to enable drag and drop */

Enables or disables dragging and dropping files for the class object's window.

Parameter | Description
bDragAcceptFiles | Flag that indicates whether to enable or disable drag and drop. Possible values are:
 | Value | Meaning
 | TRUE | Enable drag and drop.
 | FALSE | Disable drag and drop.

Returns

The previous state.

Comments

This setting is enabled by default.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::IsDragAcceptFilesEnabled, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example21(HWND hWndParent, LVectorWindow *pVectorWindow)
{
//Toggle DragAcceptFile state
L_BOOL bDragAcceptFile = pVectorWindow->IsDragAcceptFilesEnabled();
bDragAcceptFile = !bDragAcceptFile;
pVectorWindow->EnableDragAcceptFiles(bDragAcceptFile);
if (bDragAcceptFile)
SetWindowText(hWndParent, TEXT("DragAcceptFiles is enabled. Drag a file into the window."));
else
SetWindowText(hWndParent, TEXT("DragAcceptFiles is disabled."));
}


LVectorWindow::EnableKeyBoard

#include "ltwrappr.h"

L_BOOL LVectorWindow::EnableKeyBoard(bEnable)

L_BOOL bEnable;

/* flag that indicates whether to enable keyboard processing */

Enables or disables keyboard processing for the vector window control.

Parameter | Description
bEnable | Flag that indicates whether to enable or disable keyboard processing. Possible values are:
 | Value | Meaning
 | TRUE | Enable keyboard processing.
 | FALSE | Disable keyboard processing.

Returns

The previous setting.

Comments

When keyboard processing is enabled for the class object, the object will automatically process certain keys. For a list of these keys, refer to LVectorWindow Keys.

This is enabled by default.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::IsKeyBoardEnabled, Class Members

Example

For an example, refer to LVectorWindow::IsKeyboardEnabled.


LVectorWindow::EndChanging

#include "ltwrappr.h"

L_VOID LVectorWindow::EndChanging(nChangeType, nChangeCategory, nRetCode)

L_UINT nChangeType; | /* the type of change */
L_UINT nChangeCategory; | /* the change category */
L_INT nRetCode; | /* the function return code */

This function is called by every function that affects the vector.

Parameter | Description
nChangeType | The type of change that was done to the vector. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .
nChangeCategory | The change category. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .
nRetCode | The function return code.

Returns

None

Comments

This function is called by every function that affects the vector. You can override this function to be notified when the operation has completed changing the vector. This function is called after the changes to the vector have been made. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .

The high level window classes override this function so it will be notified of any changing done to the vector object. This allows these classes to do some special processing, such as updating the display, after the operation has completed.

If you override this function you must do the following:

Do your customer processing, and then call the parent-class implementation for this function to let the parent do default processing for this function.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Bitmap and Vector Change Notifications and Notification Categories , LVectorWindow::StartChanging, Class Members

Example

For an example, refer to LVectorWindow::MsgProcCallBack.


LVectorWindow::FitToParent

#include "ltwrappr.h"

L_INT LVectorWindow::FitToParent(bFlag=TRUE)

L_BOOL bFlag;

/* flag that indicates whether the window will update the display */

Changes the class object's window so that its size fits its parent window's client area.

Parameter | Description
bFlag | Flag that indicates whether the vector window will update the display. Possible values are:
 | Value | Meaning
 | TRUE | The window will update the display.
 | FALSE | The window will not update the display.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

If using the LVectorWindow object as a control, FitToParent can be called in an OnSize event to automatically resize the object whenever the user resizes the parent window.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::Move, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

void Example25(LVectorWindow *pVectorWindow)
{
L_INT nRet = pVectorWindow->FitToParent();

if (SUCCESS != nRet)
{
if (nRet == WRPERR_WINDOW_NOT_CREATED)
MessageBox(NULL, TEXT("Window has not been created."), TEXT(""), MB_OK);
else if (nRet == WRPERR_OPERATION_NOT_ALLOWED)
MessageBox(NULL, TEXT("Window has no parent."), TEXT(""), MB_OK);
}
}


LVectorWindow::Free

#include "ltwrappr.h"

virtual L_INT LVectorWindow::Free(L_VOID)

Frees the memory allocated for the vector data.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call this function to free the memory allocated for the vector data. This function should be called when your program no longer needs the vector data. If the vector was allocated in disk memory, this function deletes the temporary file. If the vector has a palette, it will be deleted. After this function returns, the internal vector handle will be invalidated.

Call this function to remove a vector from an LVectorWindow object. Doing this will cause the LVectorWindow object to be painted with the LVectorWindow background color.

Note: You do not have to call the Free function before destroying an LVectorWindow object. The class object will automatically free the vector when it is destroyed.

Note: This function is available from the parent class (LVectorBase), and is not explicitly defined in the LVectorWindow class.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorWindow::SetBackgroundColor, Class Members
Topics: | Vector Images: Modifying Vector Object Characteristics

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example19(LVectorWindow *pVectorWindow)
{
//Changes the background color of the vector to yellow
pVectorWindow->SetBackgroundColor( RGB(255,255,0) );

//Erases the vector from the LVectorWindow object, leaving a yellow background
pVectorWindow->Free();
}


LVectorWindow::GetBackgroundColor

#include "ltwrappr.h"

L_INT LVectorWindow::GetBackgroundColor(pColor)

L_COLOR L_FAR * pColor;

/* pointer to a variable to be updated */

Gets the current background color.

Parameter | Description
pColor | Pointer to an L_COLOR variable to be updated with the background color.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function returns the current background color. LVectorWindow::Free() uses this color to erase the background.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::SetBackgroundColor, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example20(LVectorWindow *pVectorWindow)
{
L_TCHAR szTemp[100];
L_COLOR color;

pVectorWindow->GetBackgroundColor(&color);
wsprintf(szTemp, TEXT("Background color: %x"), color);
MessageBox(NULL, szTemp, TEXT(""), MB_OK);
}


LVectorWindow::GetKeyMode

This function has been removed.


LVectorWindow::GetScaleFactor

#include "ltwrappr.h"

VECTORPOINT LVectorWindow::GetScaleFactor(L_VOID)

Gets the current scale factor for the LVectorWindow object.

Returns

A VECTORPOINT structure that holds the current LVectorWindow scale factor.

Comments

The LVectorWindow::ScaleIn and LVectorWindow::ScaleOut member functions use the scale factor to scale the currently loaded vector.

Scaling changes the internally stored scale of the vector.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::SetScaleFactor, LVectorWindow::ScaleIn, LVectorWindow::ScaleOut, LVectorWindow::SetKeyMode, LVectorWindow::GetKeyMode, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example14(LVectorWindow *pVectorWindow)
{
VECTORPOINT scale;
L_TCHAR szTemp[100];

//Get the current scale factor
scale = pVectorWindow->GetScaleFactor();
wsprintf(szTemp, TEXT("ScaleFactor[%lf, %lf, %lf]"), scale.x, scale.y, scale.z);
MessageBox(NULL, szTemp, TEXT(""), MB_OK);
}


LVectorWindow::GetSelectedOnly

#include "ltwrappr.h"

L_BOOL LVectorWindow::GetSelectedOnly(L_VOID)

Gets the selected-only state of the LVectorWindow object. This determines if selected objects or all objects are scaled when auto scaling, or rotated when using the rotate tool.

Returns

Current value set by SetSelectedOnly. Possible values are:

Value | Meaning
TRUE | auto scaling or rotating affects only selected objects.
FALSE | auto scaling or rotating affects all objects.

Comments

If the SelectedOnly state is set to TRUE (LVectorWindow::GetSelectedOnly, LVectorWindow::SetSelectedOnly), then only selected objects will be scaled or rotated. If the SelectedOnly state is set to FALSE, then ALL objects are scaled or rotated.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::SetSelectedOnly, LVectorWindow::GetKeyMode, LVectorWindow::SetKeyMode, Class Members

Example

For an example, refer to LVectorWindow::SetSelectedOnly.


LVectorWindow::GetToolType

#include "ltwrappr.h"

L_UINT LVectorWindow::GetToolType(L_VOID)

Gets the current tool type for the class object's window.

Returns

The current tool type. Possible values are:

Value | Meaning
TOOL_VECTOR_USERMODE | user tool type (default).
TOOL_VECTOR_SELECT | select tool - allows user to select individual objects in the vector.
TOOL_VECTOR_PANIMAGE | pan image tool - allows the user to pan the vector image by clicking a mouse button and dragging the mouse. The "pan cursor" will not appear if the image cannot be panned (i.e. - there are no scroll bars). If there are not scroll bars, press the PLUS key on the numeric key pad a few times to zoom until scroll bars appear.
TOOL_VECTOR_ROTATE | 3d rotate tool—allows user to rotate the vector, or individual objects within a vector.

Comments

If the tool type is TOOL_VECTOR_SELECT, you can do the following:

Left-click and drag the mouse to define a rectangle. All objects in the defined rectangle are selected.

Right-click and drag the mouse to define a rectangle. All objects in the defined rectangle are un-selected.

Double clicking the left mouse button automatically selects all objects in the vector. NOTE: If creating the LVectorWindow as a window, the window style must include the CS_DBLCLKS style to receive double click messages.

Double clicking the right mouse button automatically un-selects all objects in the vector. NOTE: If creating the LVectorWindow as a window, the window style must include the CS_DBLCLKS style to receive double click messages.

When using the vector dialogs, only the currently selected objects are affected. If the SelectedOnly state is set to TRUE (LVectorWindow::GetSelectedOnly, LVectorWindow::SetSelectedOnly), then only selected objects will be scaled. If the SelectedOnly state is set to FALSE, then ALL objects are scaled.

Using the vector rotate tool:

Left-click and drag the mouse. If you move the mouse vertically (up and down), the vector image rotates up and down along an imaginary X-axis which passes horizontally through the vector. If you move the mouse horizontally (left and right), the vector image rotates left and right along an imaginary Y-axis which passes veritcally through the vector. Dragging the mouse at an angle results in a combination of these rotations.

Right-click and drag the mouse. The "rotate-Z" cursor appears. Dragging the mouse causes the vector to rotate in the XY plane (the plane that corresponds to the screen) along an imaginary Z-axis which passes through the center of the window.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::SetToolType, LVectorWindow::GetKeyMode, LVectorWindow::SetKeyMode, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example22(LVectorWindow *pVectorWindow)
{
L_TCHAR L_FAR *lpszMsg;

L_UINT uToolType = pVectorWindow->GetToolType();
switch (uToolType)
{
case TOOL_VECTOR_USERMODE:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_USERMODE");
break;
case TOOL_VECTOR_SELECT:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_SELECT");
break;
case TOOL_VECTOR_PANIMAGE:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_PANIMAGE");
break;
case TOOL_VECTOR_ROTATE:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_ROTATE");
break;
}
MessageBox(NULL, lpszMsg, TEXT(""), MB_OK);
}


LVectorWindow::GetVectorRect

#include "ltwrappr.h"

L_INT LVectorWindow::GetVectorRect(pRect)

LPRECT pRect;

/* pointer to the rectangle to be updated */

Gets the rectangle of the window associated with the LVectorWindow object. This includes the area of the scroll bars if present.

Parameter | Description
pRect | Pointer to the RECT structure to be updated with the coordinates of the window associated with the LVectorWindow object.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetVectorWnd, LVectorWindow::GetVectorVisibleRect, Class Members

Example

For an example, refer to LVectorWindow::GetVectorWnd.


LVectorWindow::GetVectorVisibleRect

#include "ltwrappr.h"

L_INT LVectorWindow::GetVectorVisibleRect(pRect)

LPRECT pRect;

/* pointer to the RECT structure to be updated */

Gets the visible rectangle of the displayed vector.

Parameter | Description
pRect | Pointer to the RECT structure to be updated with the visible part of the displayed vector.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetVectorRect, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

//Display information about LVectorWindow object
void Example24 (LVectorWindow *pVectorWindow)
{
L_TCHAR L_FAR *lpszType;
L_TCHAR szTemp[100];
RECT rcClient;

if (pVectorWindow->IsControl())
lpszType = TEXT("LVectorWindow used as control");
else
lpszType = TEXT("LVectorWindow used as a window");

pVectorWindow->GetVectorVisibleRect(&rcClient);
wsprintf(szTemp,
TEXT("%s\nClient Rect (%d, %d, %d, %d)"),
lpszType,
rcClient.left,
rcClient.top,
rcClient.right,
rcClient.bottom);
MessageBox(NULL, szTemp, TEXT(""), MB_OK);
}


LVectorWindow::GetVectorWnd

#include "ltwrappr.h"

HWND LVectorWindow::GetVectorWnd(L_VOID)

Gets the window handle of the class object's vector window.

Returns

The vector handle of the vector window.

Comments

This returns the m_hWnd data member.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetVectorWnd, LVectorWindow::GetVectorRect, LVectorWindow::GetVectorVisibleRect, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object
//This example centers the LVectorWindow object in the parent window

void Example26(LVectorWindow *pVectorWindow)
{
RECT parentRect, vectorRect, moveRect;
L_INT moveWidth, moveHeight;
HWND hWndParent = ::GetParent(pVectorWindow->GetVectorWnd());
if (hWndParent != NULL)
{
::GetClientRect(hWndParent, &parentRect);
pVectorWindow->GetVectorRect(&vectorRect);

moveWidth = vectorRect.right - vectorRect.left;
moveHeight = vectorRect.bottom - vectorRect.top;

moveRect.left = ((parentRect.right - parentRect.left) - moveWidth)/2;
moveRect.top = ((parentRect.bottom - parentRect.top) - moveHeight)/2;
moveRect.right = moveRect.left + moveWidth;
moveRect.bottom = moveRect.top + moveHeight;

pVectorWindow->Move(moveRect, TRUE);
}
}


LVectorWindow::GetZoomPercent

#include "ltwrappr.h"

L_UINT LVectorWindow::GetZoomPercent(L_VOID)

Gets the current zoom percent for the displayed vector.

Returns

The percent to zoom in or out on the displayed vector.

Comments

Setting the specified zoom percent affects all zooming. Zooming is accomplished by calling LVectorWindow::ZoomIn, LVectorWindow::ZoomOut, or using the PLUS or MINUS keys on the numeric keypad. The default zoom percent is 130%.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::SetZoomPercent, Class Members

Example

For an example, refer to LVectorWindow::ZoomOut.


LVectorWindow::IsAutoPaintEnabled

#include "ltwrappr.h"

L_BOOL LVectorWindow::IsAutoPaintEnabled(L_VOID)

Determines whether the vector window painting is enabled.

Returns

TRUE | Vector window painting is enabled.
FALSE | Vector window painting is disabled.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::EnableAutoPaint, LVectorWindow::Repaint, Class Members

Example

//Toggles (enable/disable) the AutoPaint feature
//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example8(HWND hWndParent, LVectorWindow *pVectorWindow)
{
pVectorWindow->EnableAutoPaint( !pVectorWindow->IsAutoPaintEnabled());
if (pVectorWindow->IsAutoPaintEnabled())
SetWindowText(hWndParent, TEXT("AutoPaint Enabled"));
else
SetWindowText(hWndParent, TEXT("AutoPaint Disabled"));
}


LVectorWindow::IsAutoScrollEnabled

#include "ltwrappr.h"

L_BOOL LVectorWindow::IsAutoScrollEnabled(L_VOID)

Determines whether auto scrolling is enabled or disabled.

Returns

TRUE | Auto scrolling is enabled.
FALSE | Auto scrolling is disabled.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::EnableAutoScroll, Class Members

Example

For an example, refer to LVectorWindow::EnableAutoScroll.


LVectorWindow::IsControl

#include "ltwrappr.h"

L_BOOL LVectorWindow::IsControl(L_VOID)

Determines whether this LVectorWindow object was created as a control, or is being used as a window.

Returns

TRUE | This LVectorWindow object was created as a control.
FALSE | This LVectorWindow object was created as a window.

Comments

Use this function to check whether this LVectorWindow object was created as a control (created using LVectorWindow::CreateWnd) or is being used as a window (connected to a window using LVectorWindow::SetWndHandle).

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::CreateWnd, LVectorWindow::SetWndHandle, Class Members

Example

For an example, refer to LVectorWindow::GetVectorVisibleRect.


LVectorWindow::IsDragAcceptFilesEnabled

#include "ltwrappr.h"

L_BOOL LVectorWindow::IsDragAcceptFilesEnabled(L_VOID)

Determines whether drag/drop is enabled for the class object’s window.

Returns

TRUE | Drag/drop is enabled.
FALSE | Drag/drop is disabled.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::EnableDragAcceptFiles, Class Members

Example

For an example, refer to LVectorWindow::EnableDragAcceptFiles.


LVectorWindow::IsKeyBoardEnabled

#include "ltwrappr.h"

L_BOOL LVectorWindow::IsKeyBoardEnabled(L_VOID)

Determines whether keyboard processing is enabled or disabled.

Returns

TRUE | Keyboard processing is enabled.
FALSE | Keyboard processing is disabled.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::EnableKeyBoard, Class Members

Example

//Toggles (enable/disable) the keyboard
//Assumes pVectorWindow points to a valid LVectorWindow object
L_VOID Example7(HWND hWndParent, LVectorWindow *pVectorWindow)
{
pVectorWindow->EnableKeyBoard( !pVectorWindow->IsKeyBoardEnabled());
if (pVectorWindow->IsKeyBoardEnabled())
SetWindowText(hWndParent, TEXT("Keyboard Enabled"));
else
SetWindowText(hWndParent, TEXT("Keyboard Disabled"));
}


LVectorWindow::Load

#include "ltwrappr.h"

virtual L_INT LVectorWindow::Load(pszFile, nEngine=VECTOR_ENGINE_GDI, dwFlags=VECTOR_ENGINE_DOUBLEBUFFER, pLoadOption=NULL, pFileInfo=NULL)

virtual L_INT LVectorWindow::Load(pLoadOption=NULL, pFileInfo=NULL)

L_TCHAR L_FAR * pszFile; | /* name of the file to load */
L_INT nEngine; | /* vector engine */
L_UINT32 dwFlags; | /* flags */
pLOADFILEOPTION pLoadOption; | /* pointer to optional extended load options */
pFILEINFO pFileInfo; | /* pointer to a structure */

Loads a vector image from disk into the class object. The image file can be in any supported vector file format. For supported vector formats, refer to Formats of Vector Input Files.

Parameter | Description
pszFile | Character string containing the name of the file to load.
nEngine | The vector engine to associate with the specified vector handle. Possible values are:
 | Value | Meaning
 | VECTOR_ENGINE_GDI | Use GDI rendering. (No lights and shading).
 | VECTOR_ENGINE_OPENGL | Use OpenGL rendering. (Viewing only, drawings not editable).
dwFlags | Flags that modify the vector engine. Possible values are:

 | Value | Meaning
 | VECTOR_ENGINE_DOUBLEBUFFER | Use double buffering for flicker-free screen updates.
pLoadOption | Pointer to a LOADFILEOPTION structure that contains information on loading the file. Pass NULL to use the default load options.
pFileInfo | Pointer to a FILEINFO structure. This structure may contain file information used in loading an image, or it may be updated with information about the file being loaded.
 | If nothing is known about the file, pass NULL for this parameter, or declare a variable of type FILEINFO and set the FILEINFO.Flags to 0, then pass the address of the FILEINFO structure in this parameter. In this case, if the address of a FILEINFO structure is passed, the FILEINFO structure will be updated with the results of LFile::GetInfo .
 | If only the file type is known, set pFileInfo.Format to the file type and set pFileInfo.Flags to FILEINFO_ONLYFORMATVALID. This can also be done if LFile::GetInfo has been called previously, but values that affect the size of the image loaded have been changed (for example, by calling LFileSettings::SetPCDResolution or LFileSettings::SetWMFResolution ). In this case the FILEINFO structure pointed to by pFileInfo will be updated with the results of LFile::GetInfo .
 | If LFile::GetInfo has been called prior to calling this function, and no changes have been made to the contents of the structure filled by LFile::GetInfo , then the address of the filled FILEINFO structure can be passed for this parameter. In this case, the FILEINFO.Flags member should be set to FILEINFO_INFOVALID. The LFile::GetInfo function will set the FILEINFO.Flags to FILEINFO_INFOVALID. In this case the load will be faster since this function does not have to query the file filters for the file type.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call this function to load a vector image from disk into the class object.

The class object will free the vector when it is destroyed. If you wish to free the vector, use LVectorWindow::Free, which will clear the currently displayed vector from the LVectorWindow object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

This is an example for LVectorWindow::Load(pszFile, pLoadOption=NULL, pFileInfo=NULL):

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example4(LVectorWindow *pVectorWindow)
{
// Load a file
pVectorWindow->Load(TEXT("random.dxf"));
}

This is an example for LVectorWindow::Load(pLoadOption=NULL, pFileInfo=NULL):

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example5(LVectorWindow *pVectorWindow)
{
pVectorWindow->SetFileName(TEXT("skull.dxf"));
pVectorWindow->Load();
}


LVectorWindow::Move

#include "ltwrappr.h"

L_INT LVectorWindow::Move(rect, bFlag=TRUE)

RECT & rect; | /* RECT structure that contains the new dimensions and/or position of the vector window */
L_BOOL bFlag; | /* flag that indicates whether the window will update the display */

Moves and/or resizes the class object's window.

Parameter | Description
rect | RECT structure that contains the new dimensions and/or position of the vector window.
bFlag | Flag that indicates whether the window will update the display. Possible values are:
 | Value | Meaning
 | TRUE | The vector window will update the display.
 | FALSE | The vector window will not update the display.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The rect parameter is passed by reference, and is a required parameter. If using the LVectorWindow object as a control, Move can be called in an OnSize event to automatically resize the object whenever the user resizes the parent window.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::FitToParent, Class Members

Example

For an example, refer to LVectorWindow::GetVectorWnd.


LVectorWindow::MsgProcCallBack

#include "ltwrappr.h"

LRESULT LVectorWindow::MsgProcCallBack(hWnd, uMsg, wParam, lParam)

HWND hWnd; | /* handle to the vector window */
UINT uMsg; | /* the window message */
WPARAM wParam; | /* the first parameter of the window message */
LPARAM lParam; | /* the second parameter of the window message */

This function is called for each message the vector window control receives.

Parameter | Description
hWnd | Handle to the vector window.
uMsg | The window message.
wParam | The first parameter of the window message.
lParam | The second parameter of the window message.

Returns

The result of processing a specific message.

Comments

Override this function to do your own processing of window events and messages. If you override this function you must call the base class implementation (LVectorWindow::MsgProcCallBack) for default processing. Some of the messages that you may want procces include:

Mouse messages (WM_LBUTTONDOWN, WM_RBUTTONDOWN, WM_LBUTTONUP, WM_RBUTTONUP, WM_MOUSEMOVE)

Key messages (WM_KEYDOWN, WM_KEYUP, WM_CHAR). For a list of messages, see Bitmap and Vector Change Notifications and Notification Categories .

Scrolling Messages (WM_HSCROLL,WM_VSCROLL).

Other messages (WM_SETFOCUS, WM_KILLFOCUS, WM_SIZE).

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

The following example derives a class from LVectorWindow, and overrides MsgProcCallBack, OnFileDropped, OnDraw, OnZoom, OnScale, StartChanging, EndChanging member functions. The result is class that displays all vector window messages in the vector window title bar. To use this example, derive a class from LMyVectorWindow, and use the class object as you would a LVectorWindow object.

All mouse messages, scrolling messages, key messages, drag drop messages, as well as any vector specific messages will be displayed in the window title bar.

/***********************************************************************/
//MyVecWnd.h
#ifndef _MY_VECTOR_WINDOW_H_
#define _MY_VECTOR_WINDOW_H_

#include "d:\lead14\dll\include\classlib\ltwrappr.h"

class LMyVectorWindow: public LVectorWindow
{
public:
LMyVectorWindow();
virtual ~LMyVectorWindow() ;

protected:
virtual LRESULT MsgProcCallBack(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
virtual L_BOOL OnFileDropped(L_TCHAR L_FAR* pszFile,L_UINT uFileNumber,L_UINT uFilesCount);
virtual L_VOID OnDraw(HDC hdc,RECT& Rect);
virtual L_VOID OnZoom(L_INT ZoomPercent);
virtual L_VOID OnScale(VECTORPOINT ScalePercent);

virtual L_INT StartChanging(L_UINT nChangeType,L_UINT nChangeCategory);
virtual L_VOID EndChanging(L_UINT nChangeType,L_UINT nChangeCategory,L_INT nRetCode);
L_VOID DisplayMessage(L_TCHAR L_FAR *lpszMsg);
};
#endif _MY_VECTOR_WINDOW_H_
/***********************************************************************/
//MyVecWnd.cpp
#include "MyVecWnd.h"
#include <stdio.h>

LMyVectorWindow::LMyVectorWindow()
{
}

LMyVectorWindow::~LMyVectorWindow()
{
}

LRESULT LMyVectorWindow::MsgProcCallBack(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
L_TCHAR L_FAR *lpszMsg;
static iCount = 0;

iCount = (iCount + 1)% 1000;

switch (uMsg)
{
case WM_LBUTTONDOWN:
lpszMsg = TEXT("WM_LBUTTONDOWN");
break;

case WM_RBUTTONDOWN:
lpszMsg = TEXT("WM_RBUTTONDOWN");
break;

case WM_LBUTTONUP:
lpszMsg = TEXT("WM_LBUTTONUP");
break;

case WM_RBUTTONUP:
lpszMsg = TEXT("WM_RBUTTONUP");
break;

case WM_MOUSEMOVE:
lpszMsg = TEXT("WM_MOUSEMOVE");
break;

case WM_SETFOCUS:
lpszMsg = TEXT("WM_SETFOCUS");
break;

case WM_KILLFOCUS:
lpszMsg = TEXT("WM_KILLFOCUS");
break;

case WM_KEYDOWN:
lpszMsg = TEXT("WM_KEYDOWN");
break;

case WM_KEYUP:
lpszMsg = TEXT("WM_KEYUP");
break;

case WM_CHAR:
lpszMsg = TEXT("WM_CHAR");
break;

case WM_HSCROLL:
lpszMsg = TEXT("WM_HSCROLL");
break;

case WM_VSCROLL:
lpszMsg = TEXT("WM_VSCROLL");
break;

case WM_SIZE:
lpszMsg = TEXT("WM_SIZE");
break;

default:
lpszMsg = NULL;
}
DisplayMessage(lpszMsg);
return LVectorWindow::MsgProcCallBack( hWnd, uMsg, wParam, lParam);
}

L_BOOL LMyVectorWindow::OnFileDropped(L_TCHAR L_FAR* pszFile,L_UINT uFileNumber,L_UINT uFilesCount)

{
L_TCHAR szMsg[256];

wsprintf(szMsg, TEXT("OnFileDropped(%s, %d, %d)"), pszFile, uFileNumber, uFilesCount);
DisplayMessage(szMsg);
return LVectorWindow::OnFileDropped( pszFile, uFileNumber, uFilesCount);
}

L_VOID LMyVectorWindow::OnDraw(HDC hdc,RECT& Rect)
{
L_TCHAR szMsg[256];

wsprintf(szMsg, TEXT("OnDraw(%d, %d, %d, %d)"), Rect.left, Rect.top, Rect.right, Rect.bottom);
DisplayMessage( szMsg);
}

L_VOID LMyVectorWindow::OnZoom(L_INT ZoomPercent)
{
L_TCHAR szMsg[256];

wsprintf(szMsg, TEXT("OnZoom[%d]"), ZoomPercent);
DisplayMessage(szMsg);
}

L_VOID LMyVectorWindow::OnScale(VECTORPOINT ScalePercent)
{
L_TCHAR szMsg[256];

wsprintf(szMsg, TEXT("OnScale[%lf, %lf, %lf]"), ScalePercent.x, ScalePercent.y, ScalePercent.z);
DisplayMessage(szMsg);
}

L_INT LMyVectorWindow::StartChanging(L_UINT nChangeType,L_UINT nChangeCategory)
{
L_TCHAR L_FAR *lpszMsg = NULL;

switch(nChangeType)
{
case NC_VECTOR_ROTATE:
lpszMsg = TEXT("StartChanging[NC_VECTOR_ROTATE]");
break;

case NC_VECTOR_TRANSLATE:
lpszMsg = TEXT("StartChanging[NC_VECTOR_TRANSLATE]");
break;

case NC_VECTOR_SCALE:
lpszMsg = TEXT("StartChanging[NC_VECTOR_SCALE]");
break;

case NC_VECTOR_DIALOG_3DOPTIONS:
lpszMsg = TEXT("StartChanging[NC_VECTOR_DIALOG_3DOPTIONS]");
break;
case NC_VECTOR_CAMERA:
lpszMsg = TEXT("StartChanging[NC_VECTOR_CAMERA]");
break;
case NC_VECTOR_FREE:
lpszMsg = TEXT("StartChanging[NC_VECTOR_FREE]");
break;
case NC_VECTOR_BACKCOLOR:
lpszMsg = TEXT("StartChanging[NC_VECTOR_BACKCOLOR]");
break;

case NC_VECTOR_VIEW_MODE:
lpszMsg = TEXT("StartChanging[NC_VECTOR_VIEW_MODE]");
break;
case NC_VECTOR_PAN:
lpszMsg = TEXT("StartChanging[NC_VECTOR_PAN]");
break;
case NC_VECTOR_BIND_VERTICES:
lpszMsg = TEXT("StartChanging[NC_VECTOR_BIND_VERTICES]");
break;
case NC_VECTOR_DELETE_OBJECT:
lpszMsg = TEXT("StartChanging[NC_VECTOR_DELETE_OBJECT]");
break;

case NC_VECTOR_SELECT_OBJECT:
lpszMsg = TEXT("StartChanging[NC_VECTOR_SELECT_OBJECT]");
break;
case NC_VECTOR_POLYGON_MODE:
lpszMsg = TEXT("StartChanging[NC_VECTOR_POLYGON_MODE]");
break;
case NC_VECTOR_USE_LIGHTS:
lpszMsg = TEXT("StartChanging[NC_VECTOR_USE_LIGHTS]");
break;
case NC_VECTOR_AMBIENT_COLOR:
lpszMsg = TEXT("StartChanging[NC_VECTOR_AMBIENT_ COLOR]");
break;
}

if (lpszMsg != NULL)
{
DisplayMessage(lpszMsg);
}

return LVectorWindow::StartChanging(nChangeType,nChangeCategory);
}

L_VOID LMyVectorWindow::EndChanging(L_UINT nChangeType,L_UINT nChangeCategory,L_INT nRetCode)
{
L_TCHAR L_FAR *lpszMsg;

lpszMsg = NULL;

switch(nChangeType)
{
case NC_VECTOR_ROTATE:
lpszMsg = TEXT("EndChanging[NC_VECTOR_ROTATE]");
break;

case NC_VECTOR_TRANSLATE:
lpszMsg = TEXT("EndChanging[NC_VECTOR_TRANSLATE]");
break;

case NC_VECTOR_SCALE:
lpszMsg = TEXT("EndChanging[NC_VECTOR_SCALE]");
break;

case NC_VECTOR_DIALOG_3DOPTIONS:
lpszMsg = TEXT("EndChanging[NC_VECTOR_DIALOG_3DOPTIONS]");
break;
case NC_VECTOR_CAMERA:
lpszMsg = TEXT("EndChanging[NC_VECTOR_CAMERA]");
break;
case NC_VECTOR_FREE:
lpszMsg = TEXT("EndChanging[NC_VECTOR_FREE]");
break;
case NC_VECTOR_BACKCOLOR:
lpszMsg = TEXT("EndChanging[NC_VECTOR_BACKCOLOR]");
break;

case NC_VECTOR_VIEW_MODE:
lpszMsg = TEXT("EndChanging[NC_VECTOR_VIEW_MODE]");
break;
case NC_VECTOR_PAN:
lpszMsg = TEXT("EndChanging[NC_VECTOR_PAN]");
break;
case NC_VECTOR_BIND_VERTICES:
lpszMsg = TEXT("EndChanging[NC_VECTOR_BIND_VERTICES]");
break;
case NC_VECTOR_DELETE_OBJECT:
lpszMsg = TEXT("EndChanging[NC_VECTOR_DELETE_OBJECT]");
break;

case NC_VECTOR_SELECT_OBJECT:
lpszMsg = TEXT("EndChanging[NC_VECTOR_SELECT_OBJECT]");
break;
case NC_VECTOR_POLYGON_MODE:
lpszMsg = TEXT("EndChanging[NC_VECTOR_POLYGON_MODE]");
break;
case NC_VECTOR_USE_LIGHTS:
lpszMsg = TEXT("EndChanging[NC_VECTOR_USE_LIGHTS]");
break;
case NC_VECTOR_AMBIENT_COLOR:
lpszMsg = TEXT("EndChanging[NC_VECTOR_AMBIENT_COLOR]");
break;
}

if (lpszMsg != NULL)
{
DisplayMessage(lpszMsg);
}

LVectorWindow::EndChanging( nChangeType, nChangeCategory, nRetCode);
}

L_VOID LMyVectorWindow::DisplayMessage(L_TCHAR L_FAR *lpszMsg)
{
if (lpszMsg != NULL)
{
HWND hWnd;

if (IsControl())
hWnd = ::GetParent(GetVectorWnd());
else
hWnd = GetVectorWnd();
SetWindowText(hWnd, lpszMsg);
}
}
/***********************************************************************/


LVectorWindow::OnDraw

#include "ltwrappr.h"

L_VOID LVectorWindow::OnDraw(hdc, Rect)

HDC hdc; | /* the device context */
RECT & Rect; | /* the RECT structure that contains the rectangle to be updated */

This function is called whenever the class object updates its window.

Parameter | Description
hdc | The device context of the vector window.
Rect | RECT structure that contains the coordinates of the rectangle to be updated.

Returns

None.

Comments

Override this function if you want to do your own drawing on the class object's window.

This function will be called following the class object's own processing of the WM_PAINT message.

The rect parameter is passed by reference, and is a required parameter.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorWindow::MsgProcCallBack.


LVectorWindow::OnFileDropped

#include "ltwrappr.h"

L_BOOL LVectorWindow::OnFileDropped(pszFile, uFileNumber, uFilesCount)

L_TCHAR L_FAR * pszFile; | /* dropped file name */
L_UINT uFileNumber; | /* dropped file number */
L_UINT uFilesCount; | /* total number of dropped files */

This function is called for every file that is dropped on the LVectorWindow object's window.

Parameter | Description
pszFile | Character string that contains the name of the dropped file.
uFileNumber | The number of the dropped file.
uFilesCount | The total number of dropped files.

Returns

TRUE | Continue processing.
FALSE | Stop processing.

Comments

This function will be called repeatedly as a result of a file drag/drop operations. The function will be called for every file that is dropped on the LVectorWindow object's window. Override this function if you want to handle the dropped files. The default implementation will attempt to load the image file and display the image.

If more than one file is dropped, then this function will be called for every dropped file, as long as you continue to return TRUE from this function. If you return FALSE, the enumeration process will be terminated.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorWindow::MsgProcCallBack.


LVectorWindow::OnScale

#include "ltwrappr.h"

L_VOID LVectorWindow::OnScale(ScaleFactor)

VECTORPOINT ScaleFactor;

/* the scale factor */

This function is called whenever a scale operation is requested on the vector window.

Parameter | Description
ScaleFactor | The scale factor. The minimum value of each component of the scale factor is 0.1.

Returns

None.

Comments

Override this function to be notified of any scaling on the displayed vector.

A scale can be requested by:

the user pressing one of the keys defined for scaling.

calling the LVectorWindow::ScaleIn or LVectorWindow::ScaleOut functions.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorWindow::MsgProcCallBack.


LVectorWindow::OnZoom

#include "ltwrappr.h"

L_VOID LVectorWindow::OnZoom(uZoomPercent)

L_UINT uZoomPercent;

/* the zoom percent */

This function is called whenever a zoom operation is requested on the vector window.

Parameter | Description
uZoomPercent | The zoom percent. The minimum value is 1.

Returns

None.

Comments

Override this function to be notified of any zooming on the displayed vector.

A zoom can be requested by:

the user pressing one of the keys defined for zooming.

calling the LVectorWindow::ZoomIn or LVectorWindow::ZoomOut functions.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

For an example, refer to LVectorWindow::MsgProcCallBack.


LVectorWindow::Repaint

#include "ltwrappr.h"

L_VOID LVectorWindow::Repaint(pRect=NULL)

LPRECT pRect;

/* pointer to a RECT structure */

Repaints the class object's window if automatic painting is enabled.

Parameter | Description
pRect | Pointer to a rectangle structure that describes the rectangle to be repainted. Pass NULL to repaint the entire window.

Returns

None.

Comments

You can enable automatic painting by calling LVectorWindow::EnableAutoPaint(TRUE).

Only the specified rectangle will be repainted.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example9(HWND hWndParent, LVectorWindow *pVectorWindow)
{
//Load and scale an image
VECTORPOINT scalePoint = {3.0, 1.0, 1.0, 0};
pVectorWindow->EnableAutoPaint(FALSE);
pVectorWindow->Load(TEXT("random.dxf"));
pVectorWindow->SetScale(&scalePoint);

//Now paint the image
pVectorWindow->EnableAutoPaint(TRUE);
pVectorWindow->Repaint();
}


LVectorWindow::Reset

#include "ltwrappr.h"

L_VOID LVectorWindow::Reset(uFlags = VECTOR_RESET_ALL)

L_UINT uFlags;

/* reset flag */

Resets the vector to the default display settings.

Parameter | Description
uFlags | Flag that indicates which values to reset. Possible values are:
 | Value | Meaning
 | VECTOR_RESET_ROTATE | Reset the rotation values to the default settings.
 | VECTOR_RESET_SCALE | Reset the scale values to the default settings.
 | VECTOR_RESET_TRANSLATE | Reset the translation values to the default settings.
 | VECTOR_RESET_CAMERA | Reset the camera values to the default settings.
 | VECTOR_RESET_PARALLELOGRAM | Reset the parallelogram values to the default settings.
 | VECTOR_RESET_ORIGIN | Reset the origin values to the default settings.
 | VECTOR_RESET_PAN | Reset the pan values to the default settings.
 | VECTOR_RESET_ALL | Reset all the values to the default settings. This is the equivalent of combining all the above flags using the OR operator.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions: | LVectorBase::Reset, Class Members
Topics: | Manipulating the Camera
 | Panning Vector Images
 | Rotating, Translating, Scaling Vector Images
 | Viewing Vector Images

Example

// LVectorWindow::Reset()
// This examples resets the vector window to the default display settings
L_VOID ResetVectorWindowTest(LVectorWindow &VectorWindow)
{
VectorWindow.Reset();
}


LVectorWindow::ScaleIn

#include "ltwrappr.h"

L_VOID LVectorWindow::ScaleIn(L_VOID)

Increases the scale of the displayed vector by the scale factor that is set by LVectorWindow::SetScaleFactor.

Returns

None.

Comments

This will modify the scale by the multiplying by the factor specified in LVectorWindow::SetScaleFactor. Scaling changes the internally stored scale of the vector. Zooming does NOT change a vector in any way. Scaling should be used instead of zooming when the user wants to select one or more objects in a vector, and enlarge or shrink only the selected objects, leaving the non-selected objects unchanged.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetScaleFactor, LVectorWindow::SetScaleFactor, LVectorWindow::ScaleOut, LVectorWindow::GetKeyMode, LVectorWindow::SetKeyMode, VECTORSCALEDATA, LVectorWindow::SetSelectedOnly, LVectorWindow::GetSelectedOnly, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example12(LVectorWindow *pVectorWindow)
{
//Set the scale factor, and then scaleIn
VECTORPOINT scalePoint = {1.0f, 1.1f, 1.2f, 0};
pVectorWindow->SetScaleFactor(&scalePoint);
pVectorWindow->ScaleIn();
}


LVectorWindow::ScaleOut

#include "ltwrappr.h"

L_VOID LVectorWindow::ScaleOut(L_VOID)

Reduces the scale of the displayed vector by the scale factor that is set by LVectorWindow::SetScaleFactor.

Returns

None.

Comments

This will modify the scale by dividing by the amount specified in LVectorWindow::SetScaleFactor. Scaling changes the internally stored scale of the vector. Zooming does NOT change a vector in any way. Scaling should be used instead of zooming when the user wants to select one or more objects in a vector, and enlarge or shrink only the selected objects, leaving the non-selected objects unchanged.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetScaleFactor, LVectorWindow::SetScaleFactor, LVectorWindow::ScaleIn, LVectorWindow::GetKeyMode, LVectorWindow::SetKeyMode, VECTORSCALEDATA, LVectorWindow::SetSelectedOnly, LVectorWindow::GetSelectedOnly, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example13(LVectorWindow *pVectorWindow)
{
//Set the scale factor, and then scaleIn
VECTORPOINT scalePoint = {1.2F, 1.2F, 1.2F, 0};
pVectorWindow->SetScaleFactor(&scalePoint);
pVectorWindow->ScaleOut();
}


LVectorWindow::ScrollBy

#include "ltwrappr.h"

POINT LVectorWindow::ScrollBy(dx, dy)

L_INT dx; | /* horizontal distance */
L_INT dy; | /* vertical distance*/

Scrolls the displayed vector by the specified amount.

Parameter | Description
dx | The distance to scroll the vector horizontally.
dy | The distance to scroll the vector vertically.

Returns

A point structure that holds the actual horizontal and vertical distances by which the vector was scrolled.

Comments

The units for dx and dy are in pixels, with the top, left pixel of the image being 0,0. This function can be used with or without scrollbars.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::ScrollTo, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example17(HWND hWndParent, LVectorWindow *pVectorWindow)
{
//Scroll horizontally three pixels
pVectorWindow->ScrollBy(3, 0);
}


LVectorWindow::ScrollTo

#include "ltwrappr.h"

POINT LVectorWindow::ScrollTo(x, y)

L_INT x; | /* the x position */
L_INT y; | /* the y position */

Scrolls the displayed vector to the specified position.

Parameter | Description
x | The x position to which to scroll the vector.
y | The y position to which to scroll the vector.

Returns

A point structure that holds the actual horizontal and vertical distances by which the vector was scrolled.

Comments

The units for x and y are in pixels, with the top, left pixel of the image being 0,0. This function can be used with or without scrollbars.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::ScrollBy, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example16(HWND hWndParent, LVectorWindow *pVectorWindow)
{
static L_INT xPos=0;
static L_INT yPos= 0;

xPos++;
yPos++;
pVectorWindow->ScrollTo(xPos, yPos);
}


LVectorWindow::SelectAllObjects

#include "ltwrappr.h"

L_INT LVectorWindow::SelectAllObjects(bSelect, pRect)

L_BOOL bSelect; | /* flag that indicates whether to select or unselect */
RECT L_FAR * pRect; | /* pointer to a RECT structure */

Selects or unselects objects in a vector. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
bSelect | Flag that indicates whether to select or deselect one or more objects. Possible values are:
 | Value | Meaning
 | TRUE | Select all objects within the specified rectangle.
 | FALSE | Unselect all objects within the specified rectangle.
pRect | Pointer to a RECT structure that contains the rectangle in which the selection operation takes place. Pass NULL to operate on all objects in the vector.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Call this function to select or deselect objects in a vector. If bSelect is TRUE, the function will select objects. If bSelect is FALSE, the function will deselect objects. If pRect is NULL, all objects are affected. If pRect is not NULL, it should point to a valid rectangle. Only objects within this rectangle will be selected, based on the value of bSelect.

The rectangle specified by pRect is given in screen (physical) coordinates.

The current view port, pan position, camera, scale, translation and rotation values are all considered when determining whether the object is within the rectangle.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::SetToolType, LVectorWindow::GetToolType, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object
//This example selects all objects in the upper left quadrant of the vector window

void Example27(LVectorWindow *pVectorWindow)
{
RECT selectRect, clientRect;

pVectorWindow->GetVectorVisibleRect(&clientRect);
::SetRect(&selectRect, 0, 0, clientRect.right /2, clientRect.bottom/2);
pVectorWindow->SelectAllObjects(TRUE, &selectRect);
}


LVectorWindow::SetBackgroundColor

#include "ltwrappr.h"

L_INT LVectorWindow::SetBackgroundColor(color=RGB(0,0,0))

L_COLOR color;

/* the background color */

Sets the current background color.

Parameter | Description
color | The background color to set.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Sets the background color for the LVectorWindow object. If a vector image is loaded, this also sets and updates the background color for the vector image. Loading another vector image can change the background color setting for the LVectorWindow object.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetBackgroundColor, Class Members

Example

For an example, refer to LVectorWindow::Free.


LVectorWindow::SetEngine

#include "ltwrappr.h"

static L_INT LVectorWindow::SetEngine(nEngine=VECTOR_ENGINE_GDI, dwFlags=VECTOR_ENGINE_DOUBLEBUFFER)

L_INT nEngine; | /* vector engine */
L_UINT32 dwFlags; | /* flags */

Sets the vector engine to use when rendering vector images.

Parameter | Description
nEngine | Value that specifies which vector engine to use. Possible values are:
 | Value | Meaning
 | VECTOR_ENGINE_GDI | Use GDI rendering. (No lights and shading).
 | VECTOR_ENGINE_OPENGL | Use OpenGL rendering.
dwFlags | Flags that modify the vector engine. Possible values are:
 | Value | Meaning
 | VECTOR_ENGINE_DOUBLEBUFFER | Use double buffering when the vector image is attached to a window.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

Loads one of the supported vector engines.

After the VECTOR engine is successfully loaded, all subsequent calls to the VECTOR functions will use this engine for rendering the vector image.

Note: OpenGL and DirectX do not support the drawing of 2D objects (Text and Ellipses).

Note: OpenGL and DirectX engines will not work in a palettized screen mode (256-colors or less). This function will fail, and return a value of ERROR_INV_PARAMETER if you try to use either of these engines in 256 color- mode or less.

Attempting to change the vector engine will fail with WRPERR_VECTOR_ALREADY_LOADED if a vector is currently loaded into a LVectorWindow object.

Different vectors can have different engines within the same application.

The default engine is the GDI.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorBase::GetEngine, Class Members

Example

//This example assumes pVectorWindow points to a valid LVectorWindow object.
//This example sets the vector engine to 'nEngine', and displays an error message
//on failure

L_BOOL Example18(HWND hWndParent, LVectorWindow *pVectorWindow, L_INT nEngine)
{
L_TCHAR L_FAR *lpszEngine;
L_TCHAR szTemp[100];
L_INT nRet;

L_UINT32 dwFlags = VECTOR_ENGINE_DOUBLEBUFFER;

nRet = pVectorWindow->SetEngine(nEngine, dwFlags);
if (nRet != SUCCESS )

{
lpszEngine = TEXT("");
switch (nEngine)
{
case VECTOR_ENGINE_GDI:
lpszEngine = TEXT("GDI");
break;

case VECTOR_ENGINE_OPENGL:
lpszEngine = TEXT("OpenGL");
break;
}
wsprintf(szTemp, TEXT("[%s] failed to load"), lpszEngine);
MessageBox(hWndParent, szTemp, TEXT(""), MB_OK);
return FALSE;

}
return TRUE;
}


LVectorWindow::SetKeyMode

This function has been removed.


LVectorWindow::SetPan

#include "ltwrappr.h"

L_INT LVectorWindow::SetPan(pPan)

const POINT L_FAR *pPan;

/* pointer to a structure */

Sets the new pan values.

Parameter | Description
pPan | Pointer to a POINT structure that contains the new pan coordinates.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

This function will set the physical pan values. These pan values are in pixels. This function can be used to scroll the vector image. This function will return ERROR_FEATURE_NOT_SUPPORTED if auto scrolling is enabled.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::EnableAutoScroll, LVectorWindow::IsAutoScrollEnabled, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

//This example pans the image 5 pixels horizontally

void Example29(HWND hWndParent, LVectorWindow *pVectorWindow)
{
POINT panPoint;

pVectorWindow->GetPan(&panPoint);
panPoint.x += 5;

//Must disable auto-scroll to use SetPan
pVectorWindow->EnableAutoScroll(FALSE);
pVectorWindow->SetPan(&panPoint);
}


LVectorWindow::SetScaleFactor

#include "ltwrappr.h"

L_VOID LVectorWindow::SetScaleFactor(pScaleFactor)

pVECTORPOINT pScaleFactor;

/* pointer to a VECTORPOINT structure */

Sets the current scale factor for the LVectorWindow object.

Parameter | Description
pScaleFactor | Pointer to a VECTORPOINT structure that contains the scale factor to set.

Returns

None.

Comments

The LVectorWindow::ScaleIn and LVectorWindow::ScaleOut member functions use the scale factor to scale the currently loaded vector.

Scaling changes the internally stored scale of the vector.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetScaleFactor, LVectorWindow::ScaleIn, LVectorWindow::ScaleOut, LVectorWindow::SetKeyMode, LVectorWindow::GetKeyMode, Class Members

Example

For an example, refer to LVectorWindow::ScaleIn.


LVectorWindow::SetSelectedOnly

#include "ltwrappr.h"

L_BOOL LVectorWindow::SetSelectedOnly(bSelectedOnly)

L_BOOL bSelectedOnly;

/* flag that indicates which objects to process */

Sets the selected-only state of the LVectorWindow object. This determines if selected objects or all objects are affected when auto scaling or rotating using the rotate tool. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
bSelectedOnly | Flag that indicates which objects to process. Possible values are:
 | Value | Meaning
 | TRUE | Process only selected objects.
 | FALSE | Process all objects.

Returns

The previous setting.

Comments

If the SelectedOnly state is set to TRUE (LVectorWindow::GetSelectedOnly, LVectorWindow::SetSelectedOnly), then only selected objects will be scaled or rotated. If the SelectedOnly state is set to FALSE, then ALL objects are scaled or rotated.

Note: When setting SetSelectedOnly(TRUE), the scale of the entire vector is reset to (1,1,1).

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetSelectedOnly, LVectorWindow::GetKeyMode, LVectorWindow::SetKeyMode, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object
//This example toggles the Selected Only state of the LVectorWindow object

void Example28(HWND hWndParent, LVectorWindow *pVectorWindow)
{
pVectorWindow->SetSelectedOnly( !pVectorWindow->GetSelectedOnly());
if (pVectorWindow->GetSelectedOnly())
SetWindowText(hWndParent, TEXT("Selected-Only Enabled"));
else
SetWindowText(hWndParent, TEXT("Selected-Only Disabled"));
}


LVectorWindow::SetToolType

#include "ltwrappr.h"

L_VOID LVectorWindow::SetToolType(uToolType)

L_UINT uToolType;

/* the tool type */

Sets the tool type for the class object's window.

This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter | Description
uToolType | The tool type to be used by the vector window. Possible values are:
 | Value | Meaning
 | TOOL_VECTOR_USERMODE | user tool type (default).
 | TOOL_VECTOR_SELECT | select tool - allows the user to select individual objects in the vector.
 | TOOL_VECTOR_PANIMAGE | pan image tool - allows the user to pan the vector image by clicking a mouse button and dragging the mouse. The "pan cursor" will not appear if the image cannot be panned (i.e. - there are no scroll bars). If there are not scroll bars, press the PLUS key on the numeric key pad a few times to zoom until scroll bars appear.
 | TOOL_VECTOR_ROTATE | 3d rotate tool - allows user to rotate the vector, or individual objects within a vector.

Returns

None.

Comments

The vector window can automatically perform some functions. These include panning the vector, selecting individual components of a vector, and rotating the vector in 3 dimensions. The default setting for an LVectorWindow object is TOOL_VECTOR_USERMODE.

If the tool type is TOOL_VECTOR_SELECT, you can do the following:

Left-click and drag the mouse to define a rectangle. All objects in the defined rectangle are selected.

Right-click and drag the mouse to define a rectangle. All objects in the defined rectangle are un-selected.

Double clicking the left mouse button automatically selects all objects in the vector. NOTE: If creating the LVectorWindow as a window, the window style must include the CS_DBLCLKS style to receive double click messages.

Double clicking the right mouse button automatically un-selects all objects in the vector. NOTE: If creating the LVectorWindow as a window, the window style must include the CS_DBLCLKS style to receive double click messages.

When using the vector dialogs, only the currently selected objects are affected. If the SelectedOnly state is set to TRUE (LVectorWindow::GetSelectedOnly, LVectorWindow::SetSelectedOnly), then only selected objects will be scaled. If the SelectedOnly state is set to FALSE, then ALL objects are scaled.

If the tool type is TOOL_VECTOR_ROTATE, you can do the following:

Left-click and drag the mouse. If you move the mouse vertically (up and down), the vector image rotates up and down along an imaginary X-axis which passes horizontally through the vector. If you move the mouse horizontally (left and right), the vector image rotates left and right along an imaginary Y-axis which passes vertically through the vector. Dragging the mouse at an angle results in a combination of these rotations.

Right-click and drag the mouse. The "rotate-Z" cursor appears. Dragging the mouse causes the vector to rotate in the XY plane (the plane that corresponds to the screen) along an imaginary Z-axis which passes through the center of the window.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetToolType, LVectorWindow::GetKeyMode, LVectorWindow::SetKeyMode, Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example23(HWND hWndParent, LVectorWindow *pVectorWindow, L_UINT uToolType)
{
L_TCHAR L_FAR *lpszMsg;

pVectorWindow->SetToolType(uToolType);
switch (uToolType)
{
case TOOL_VECTOR_USERMODE:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_USERMODE");
break;
case TOOL_VECTOR_SELECT:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_SELECT");
break;
case TOOL_VECTOR_PANIMAGE:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_PANIMAGE");
break;
case TOOL_VECTOR_ROTATE:
lpszMsg = TEXT("Current tool: TOOL_VECTOR_ROTATE");
break;
}
::SetWindowText(hWndParent, lpszMsg);
}


LVectorWindow::SetWndHandle

#include "ltwrappr.h"

L_INT LVectorWindow::SetWndHandle(hWnd)

HWND hWnd;

/* handle to the vector window */

Sets the handle of the window to be used by the vector window.

Parameter | Description
hWnd | Handle to the vector window.

Returns

SUCCESS | The function was successful.
< 1 | An error occurred. Refer to Return Codes.

Comments

The passed window handle will be attached to the vector window. If you pass NULL, then the previously attached window will be detached from the vector window.

If the vector window has a window that was created using the LVectorWindow::CreateWnd function, then this function will return an error code.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Class Members

Example

//Creates the LVectorWindow as a window
//Assumes pVectorWindow points to a valid LVectorWindow object
L_VOID Example6(HWND hWndParent, LVectorWindow *pVectorWindow)
{
LSettings::UnlockSupport (L_SUPPORT_VECTOR, L_KEY_VECTOR);
LBase::LoadLibraries
 (LV_KRN | LT_FIL);

L_INT nRet = pVectorWindow->SetWndHandle(hWndParent);
}


LVectorWindow::SetZoomPercent

#include "ltwrappr.h"

L_VOID LVectorWindow::SetZoomPercent(uPercent)

L_UINT uPercent;

/* the zoom percent */

Sets the current zoom percent for the displayed vector.

Parameter | Description
uPercent | The percent to zoom in or out on the displayed vector.

Returns

None.

Comments

Setting the specified zoom percent affects all zooming. Zooming is accomplished by calling LVectorWindow::ZoomIn, LVectorWindow::ZoomOut, or using the PLUS or MINUS keys on the numeric keypad. The uPercent argument must be greater than or equal to 100. Setting uPercent to a value less than 100 sets the zoom percent to be 100.

The default zoom percent is 130%.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetZoomPercent, Class Members

Example

For an example, refer to LVectorWindow::ZoomIn.


LVectorWindow::StartChanging

#include "ltwrappr.h"

L_INT LVectorWindow::StartChanging(nChangeType, nChangeCategory)

L_UINT nChangeType; | /* type of change */
L_UINT nChangeCategory; | /* the change category */

This function is called by every function that affects the vector.

Parameter | Description
nChangeType | The type of change to be done to the vector. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .
nChangeCategory | The change category. For a list of all the change types and notifications refer to Bitmap and Vector Change Notifications and Notification Categories .

Returns

SUCCESS | Continue the operation without interrupting it.
< 1 | An error occurred. Refer to Return Codes. This will stop the operation.

Comments

This function is called by every function that affects the vector. You can override this function to have control over the different operations that are done to the vector. This function is called before doing any changes to the vector. If you want to cancel the operation, you can return an error code that is less than SUCCESS. If you return SUCCESS, the operation will continue executing. For a list of all the change types and notifications refer to Vector Change Notifications and Notification Categories.

The high level window classes override this function so it will be notified of any changing done to the vector object. This allows these classes to do some special processing before starting the changing operation.

If you override this function you must do one of the following:

To stop an operation, return an error code (anything other than SUCCESS). In this case the operation will stop and the parent class will not have a chance to do any default processing for the operation.

Do your customer processing, and then call the parent-class implementation for this function to let the parent do default processing for this function.

Override this function to be notified of any scaling on the displayed vector.

A scale can be requested by:

the user pressing one of the keys defined for scaling

calling the LVectorWindow::ScaleIn or LVectorWindow::ScaleOut functions

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

Bitmap and Vector Change Notifications and Notification Categories , LVectorWindow::EndChanging, Class Members

Example

For an example, refer to LVectorWindow::MsgProcCallBack.


LVectorWindow::ZoomIn

#include "ltwrappr.h"

L_VOID LVectorWindow::ZoomIn(L_VOID)

Zooms in on the displayed vector.

Returns

None.

Comments

This will zoom by the amount specified in LVectorWindow::SetZoomPercent.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetZoomPercent, LVectorWindow::SetZoomPercent, LVectorWindow::ZoomOut, LVectorWIndow::GetKeyMode, LVectorWindow::SetKeyMode, ZOOMDATA , Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example10(LVectorWindow *pVectorWindow)
{
//Set the zoom percent to 110% and ZoomIn
pVectorWindow->SetZoomPercent(110);
pVectorWindow->ZoomIn();
}


LVectorWindow::ZoomOut

#include "ltwrappr.h"

L_VOID LVectorWindow::ZoomOut(L_VOID)

Zooms out on the displayed vector.

Returns

None.

Comments

This will zoom out by the amount specified in LVectorWindow::SetZoomPercent.

Required DLLs and Libraries

LVKRN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

LVectorWindow::GetZoomPercent, LVectorWindow::SetZoomPercent, LVectorWindow::ZoomIn, LVectorWindow::GetKeyMode, LVectorWindow::SetKeyMode, ZOOMDATA , Class Members

Example

//Assumes pVectorWindow points to a valid LVectorWindow object

L_VOID Example11(LVectorWindow *pVectorWindow)
{
//Increase the ZoomPercent and zoom out
L_INT nZoomPercent = pVectorWindow->GetZoomPercent();
pVectorWindow->SetZoomPercent(nZoomPercent +10);
pVectorWindow->ZoomOut();
}


Tutorials

Creating an Empty Vector

Vector Load and Save

Vector Tools

Transformation

Using the Camera

Using Vector Engines

Implementing Hit Testing

Working with Layers

Adding and Displaying Vector Objects


Creating an Empty Vector

Take the following steps to start a project and to add some code that creates a new empty vector handle, and attaches it to a window.

Note:

This example is for a 32-bit (NT or Windows 9x) environment.

1. | Start Visual C++, version 5.
2. | Select the File->New menu option, click the "projects" tab.
3. | Select "MFC AppWizard".
4. | In the Project Name dialog box, enter Tutorial.
5. | In the Location dialog box, use the examples\classlib\msvc5 directory of your LEAD installation. For example, if you installed LEADTOOLS in c:\ltwin14x, enter c:\ltwin14x\examples\classlib\msvc5\
6. | Click OK.
7. | Choose Single Document and click "Finish", and then OK.
8. | Choose Project->Settings.
9. | In the "Settings For" drop down box, choose "All Configurations".
10. | Click on the C/C++ tab.
11. | In the "Category" drop down box, choose "Preprocessor".
12. | In the "Additional include directories" dialog box, enter the include\classlib directory of your LEAD installation. For example, if you installed LEADTOOSL in c:\ltwin14x, enter c:\ltwin14x\include\classlib .
13. | Open TutorialDoc.h.
14. | Add the following line immediately before the class CTutorialDoc declaration:

#include "ltwrappr.h"

15. | Click on the "Class View" tab.
16. | Click to open the Tutorial Classes branch.
17. | Click "CTutorialApp", and then double click the CTutorialApp() constructor.
18. | Add the following lines after "//TODO: add construction code here":

LSettings::LoadLibraries(LT_KRN|LT_FIL|LV_KRN|LV_DLG);
LSettings::UnlockSupport(L_SUPPORT_VECTOR, L_KEY_VECTOR);

19. | Select Project->Add To Project->Files... and browse to <your LEAD installation directory>\lib\ltwvc_n.lib .
20. | Click on the "Class View" tab.
21. | Right click "CTutorialDoc" and select "Add Member Variable..."
22. | For Variable Type enter LVectorWindow, and for Variable Declaration put *m_pVectorWindow. Leave Access as "Public" and click OK.
23. | Click on the CTutorialDoc tree view branch, and double click the CTutorialDoc() constructor. Add the lines:

m_pVectorWindow = new LVectorWindow;
m_pVectorWindow->SetBackgroundColor (RGB(255, 255, 255));

24.

In the destructor, add the line:

delete m_pVectorWindow;

Your tutorialDoc.cpp should have the following code:

CTutorialDoc::CTutorialDoc()
{
m_pVectorWindow = new LVectorWindow;
m_pVectorWindow->SetBackgroundColor(RGB(255,255,255));
}

CTutorialDoc::~CTutorialDoc()
{
delete m_pVectorWindow;
}

25. | In the ClassView, right click the CTutorialView, choose "Add Windows Message Handler", select WM_CREATE, and click the "Add and Edit" button.
26. | Code the CTutorialView::OnCreate() function as follows:

int CTutorialView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;

L_INT nRet = SUCCESS;
nRet = GetDocument()->m_pVectorWindow->SetWndHandle (m_hWnd);
if(nRet!=SUCCESS)
{
LBase::DisplayErrorFromList ();
return -1;
}
else
{
GetDocument()->m_pVectorWindow->AttachToWindow (m_hWnd);
}

return 0;
}

27.

Modify CTutorialDoc::OnNewDocument() to create a new vector with an empty vector layer. The function should look like this:

BOOL CTutorialDoc::OnNewDocument()
{
if (!CDocument::OnNewDocument())
return FALSE;

//Empty the vector of all objects and layeres
m_pVectorWindow->Empty ();

//Create an empty vector layer layer
VECTORLAYERDESC VectorLayerDesc;

VectorLayerDesc.nSize = sizeof(VECTORLAYERDESC);
lstrcpy(VectorLayerDesc.szName, TEXT("First Layer"));
VectorLayerDesc.bVisible = TRUE;
VectorLayerDesc.bLocked = FALSE;
VectorLayerDesc.dwTag = 0;

LVectorLayer MyLayer(&VectorLayerDesc);
m_pVectorWindow->AddLayer (&MyLayer);
m_pVectorWindow->SetActiveLayer (&MyLayer);

m_pVectorWindow->Reset ();
return TRUE;
}

28.

Compile and run the project by selecting Build->Execute tutorial.exe from the menu. The program should display a white background drawn by the vector handle.


Vector Load and Save

Start with the project you created in Creating an empty vector .

Take the following steps to add vector load and save functionality:

1. | Select View->ClassWizard .
2. | In the Class Name drop down box, select CTutorialDoc.
3. | In the Object IDs drop down box, select CTutorialDoc.
4. | In the Messages drop down box, select OnOpenDocument.
5. | Click the Add Function button, and then click the Edit Code button.
6. | Add the following code to CTutorialDoc::OnOpenDocument():

BOOL CTutorialDoc::OnOpenDocument(LPCTSTR lpszPathName)
{
L_TCHAR szTemp[_MAX_PATH];
L_BOOL bRet;
L_INT nRet;

if (!CDocument::OnOpenDocument(lpszPathName))
return FALSE;

lstrcpy(szTemp, lpszPathName);
nRet = m_pVectorWindow->Load (szTemp);

if (nRet == SUCCESS)
{
m_pVectorWindow->EnableAutoScroll (TRUE);
m_pVectorWindow->SetEngine ();
m_pVectorWindow->Reset ();

}
else
{
CString strTmp;

strTmp.Format(TEXT("Error Loading File[%d]"), nRet);
AfxMessageBox(strTmp);
bRet = FALSE;
}
return bRet;
}

7. | Select View->ClassWizard
8. | In the Class Name drop down box, select CTutorialDoc
9. | In the Object IDs drop down box, select CTutorialDoc
10. | In the Messages drop down box, select OnSaveDocument
11. | Click the Add Function button, and then click the Edit Code button.
12. | Code CTutorialDoc::OnSaveDocument() as follows:

BOOL CTutorialDoc::OnSaveDocument(LPCTSTR lpszPathName)
{
L_TCHAR szFileName[_MAX_PATH];
L_INT nRet = 0;

lstrcpy(szFileName, lpszPathName);

//Apply any transformation before the save
m_pVectorWindow->ApplyTransformation ();
nRet = m_pVectorWindow->Save ( szFileName, m_iFileSaveType);
if (nRet != SUCCESS)
{
CString strTmp;

strTmp.Format(TEXT("Error Saving File[%d]"), nRet);
AfxMessageBox(strTmp);
}

if (nRet == SUCCESS)
SetModifiedFlag(FALSE);
return (nRet == SUCCESS);
}

13. | Click on the "Class View" tab, right-click CTutorialDoc, and choose "Add Member Variable..."
14. | For "Variable Type" enter

L_INT

15.

For "Variable Name" enter

m_iFileSaveType

16. | Leave "Access" as public and click "Ok"
17. | Select View->ClassWizard
18. | In the Class Name drop down box, select CTutorialView
19. | In the Object IDs drop down box, select ID_FILE_SAVE
20. | In the Messages drop down box, select COMMAND
21. | Click the Add Function button, and then click the Edit Code button.
22. | Add the following code to CTutorialView::OnFileSave ()

{
static const L_TCHAR szSaveFileFilter[] = TEXT("DXF(*.dxf)|*.dxf|WMF(*.wmf)|*.wmf|EMF(*.emf)|*.emf|DRW(*.drw)|*.drw|CGM(*.cgm)|*.cgm|PLT(*.plt)|*.plt|PCT(*.pct)|*.pct|Intergraph Vector(*.vec)|*.vec|TIF DXF(*.tif)|*.tif||");
L_UINT uNotUsed;
L_TCHAR szFileName[_MAX_PATH], *pszFileName;
L_INT nRet;

nRet = GetDocument()->m_pVectorWindow->GetFileName (szFileName, &uNotUsed);
pszFileName = (nRet == SUCCESS) ? szFileName : NULL;

CFileDialog SaveDialog(
FALSE,
TEXT("dxf"),
pszFileName,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
szSaveFileFilter,
this
);

nRet = SaveDialog.DoModal();
if (IDOK == nRet)
{
CString strFilename;
strFilename = SaveDialog.GetPathName();
L_INT nIndex = SaveDialog.m_ofn.nFilterIndex;
switch (nIndex)
{
case 1:
GetDocument()->m_iFileSaveType = FILE_DXF;
break;

case 2:
GetDocument()->m_iFileSaveType = FILE_WMF;
break;

case 3:
GetDocument()->m_iFileSaveType = FILE_EMF;
break;

case 4:
GetDocument()->m_iFileSaveType = FILE_DRW;
break;

case 5 :
GetDocument()->m_iFileSaveType = FILE_CGM;
break;

case 6:
GetDocument()->m_iFileSaveType = FILE_PLT;
break;

case 7:
GetDocument()->m_iFileSaveType = FILE_PCT;
break;

case 8:
GetDocument()->m_iFileSaveType = FILE_INTERGRAPH_VECTOR;
break;

case 9:
GetDocument()->m_iFileSaveType = FILE_TIF_DXF;
break;

}
GetDocument()->OnSaveDocument(strFilename);
}
}

23. | Select View->ClassWizard
24. | In the Class Name drop down box, select CTutorialView
25. | In the Object IDs drop down box, select ID_FILE_SAVE_AS
26. | In the Messages drop down box, select COMMAND
27. | Click the Add Function button, and then click the Edit Code button.
28. | Add the following code to CTutorialView::OnFileSaveAs ()

void CTutorialView::OnFileSaveAs()
{
OnFileSave();
}

29.

Compile and run the project. You will be able to view, load and save vector files as you browse your local hard disk. You can also use the numeric key pad to zoom in (+ key) and zoom out (- key).


Vector Tools

Start with the project you created in Vector load and save.

Take the following steps to add panning, selecting, and rotating capabilities:

1. | In the project workspace, click on the Resource View tab and then click to open the "Tutorial resouces" branch.
2. | Click to open the "Menu" branch and double click IDR_MAINFRAME.
3. | Add a menu item called "Tools" between the Edit and View.
4. | Create this Menu structure under the Tools Menu item:

&None with ID = ID_TOOLS_NONE

&Pan with ID = ID_TOOLS_PAN

&Select with ID = ID_TOOLS_SELECT

&Rotate with ID = ID_TOOLS_ROTATE

5. | Choose View->Class Wizard.
6. | Under the "Class Name" drop down box, select "CTutorialDoc".
7. | Under Object IDs select ID_TOOLS_NONE.
8. | Under Messages, select COMMAND.
9. | Click the "Add Function" button and then the "OK" button.
10. | Under Messages, select UPDATE_COMMAND_UI.
11. | Click the "Add Function" button and then the "OK" button.
12. | Repeat steps 6 through 11 for ID_TOOLS_PAN, ID_TOOLS_ROTATE, ID_TOOLS_SELECT.
13. | Click the Edit Code button.
14. | Add the following code for the eight newly created functions:

void CTutorialDoc::OnToolsNone()
{
m_pVectorWindow->SetToolType (TOOL_VECTOR_USERMODE);
}

void CTutorialDoc::OnUpdateToolsNone(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck (m_pVectorWindow->GetToolType () == TOOL_VECTOR_USERMODE);
}

void CTutorialDoc::OnToolsPan()
{
m_pVectorWindow->SetToolType (TOOL_VECTOR_PANIMAGE);
}

void CTutorialDoc::OnUpdateToolsPan(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_pVectorWindow->GetToolType () == TOOL_VECTOR_PANIMAGE);
}

void CTutorialDoc::OnToolsSelect()
{
m_pVectorWindow->SetToolType (TOOL_VECTOR_SELECT);
}

void CTutorialDoc::OnUpdateToolsSelect(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_pVectorWindow->GetToolType () == TOOL_VECTOR_SELECT);
}

void CTutorialDoc::OnToolsRotate()
{
m_pVectorWindow->SetToolType (TOOL_VECTOR_ROTATE);
}

void CTutorialDoc::OnUpdateToolsRotate(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_pVectorWindow->GetToolType () == TOOL_VECTOR_ROTATE);
}

15.

Compile and run the program. Load an image. Hit the "+" key on the numeric keypad several times to zoom on the image. Select the Pan tool. A hand appears. Click anywhere on the image and drag. Now choose the Select tool. Click and drag on the image to select objects. Left-double click to select all objects. Right double-click to unselect all objects. Choose the Rotate tool. Left click and drag to rotate about the x and y axes. Right click and drag to rotate along the Z-axis.


Transformation

Start with the project you created in Vector Tools.

Take the following steps to add scale, rotation and translation to the sample program:

1. | For this tutorial, the VectorWindow must capture and process keystrokes. To process keystrokes, you must derive a class from LVectorWindow and override the MsgProcCallBack().
2. | Click the "Class View" tab in the project workspace.
3. | Right click "tutorial classes" and choose "New Class..."
4. | In the drop down box "Class Type" choose Generic Class.
5. | In the Name dialog box, enter "MyVectorWindow".
6. | In the "Derived From" list box entry, type "LVectorWindow".
7. | A message box appears stating that "The New Class Wizard could not find the appropriate header file(s) to include for the base class(es) LVectorWindow". Click the "OK" button.
8. | Double click the "MyVectorWindow" to open the file "MyVectorWindow.h" and immediately before the class declaration, add the line:

#include "ltwrappr.h".

9.

Double click the "CTutorialDoc" to open "tutorialDoc.h" and immediately before the class declaration, add the line:

#include "MyVectorWindow.h"

10.

Change the definition of *m_pVectorWindow from:

LVectorWindow *m_pVectorWindow;

to

MyVectorWindow *m_pVectorWindow;

11.

Open the "CTutorialDoc" branch, and double click the CTutorialDoc() constructor. Change the CTutorialDoc() constructor as follows:

CTutorialDoc::CTutorialDoc()
{
m_pVectorWindow = new MyVectorWindow;
m_pVectorWindow->SetBackgroundColor ();
}

12. | Click the Class View tab in the project workspace.
13. | Right-click the class "MyVectorWindow" and choose "Add Member Function..."
14. | Enter LRESULT for the function type.
15. | Enter MsgProcCallBack(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) for the function declaration.
16. | Select the "Protected" radio button.
17. | Click OK.
18. | Add the following code to the newly created MsgProcCallBack() member function:

LRESULT MyVectorWindow::MsgProcCallBack(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
VECTORPOINT VecPoint;

switch (uMsg)
{
case WM_CHAR:
{
switch( wParam )
{
case 'x':
case 'X':
case 'y':
case 'Y':
case 'z':
case 'Z':
// get current rotation value
GetRotation(&VecPoint);
VecPoint.x += ( wParam == 'x' || wParam == 'X' ) ? 5.0 : 0;
VecPoint.y += ( wParam == 'y' || wParam == 'Y' ) ? 5.0 : 0;
VecPoint.z += ( wParam == 'z' || wParam == 'Z' ) ? 5.0 : 0;

// set new rotation value
SetRotation(&VecPoint);
break;
}
}
}

return LVectorWindow::MsgProcCallBack ( hWnd, uMsg, wParam, lParam);
}

19. | Compile and run the demo.
20. | Select File/Open… From the program menu, browse to the "images" folder of your LEAD installation. Open the image random.dxf and click OK.
21. | Now you should be able to rotate the vector drawing around any axis using the x, y and z keys on your keyboard.


Using the Camera

Start with the project you created in Transformation.

Take the following steps to add support for the camera:

1. | Click the Class View tab in the project workspace.
2. | Click to open the "MyVectorWindow" branch to display the class member functions.
3. | Double click the MsgProcCallBack() member function.
4. | Add a local variable after the VECTORPOINT VecPoint declaration:

VECTORCAMERA VecCamera;

5.

Add the following cases to the switch(wParam) switch statement (immediately before the case 'x'):

case 'b':
case 'B':
// flip camera projection between parallel and perspective
GetCamera(&VecCamera );
VecCamera.bPerspective = !VecCamera.bPerspective;
SetCamera(&VecCamera );
break;

case 'T':
case 't':
// rotate the camera theta angle
GetCamera(&VecCamera );
VecCamera.Theta += 5.0;
SetCamera(&VecCamera );
break;

case 'P':
case 'p':
// rotate the camera phi angle
GetCamera(&VecCamera );
VecCamera.Phi += 5.0;
SetCamera(&VecCamera );
break;

6. | Compile and run the demo.
7. | From the program menu, browse to the "images" folder of your LEAD installation. Open the image random.dxf and click OK.
8. | Now you should be able to rotate the camera using the T and P keys on your keyboard, and flip projection between parallel and perspective using the B key.


Using Vector Engines

Start with the project you created in Using the Camera.

Take the following steps to add support for viewing vector drawing in different vector engines:

1. | Click the "Resource View" tab of the project workspace.
2. | Click to open the "tutorial resources" branch.
3. | Click to open the "Menu" branch.
4. | Double-click "IDR_MAINFRAME".
5. | Create an "Engine" menu item and check the "Pop-up" check box.
6. | Create this Menu structure under the Engine Menu item:

& GDI with ID = ID_ENGINE_GDI

&OpenGL with ID = ID_ENGINE_OPENGL

7. | Drag the "Engine" menu item so that it appears immediately after the "Edit" menu item.
8. | Choose View->Class Wizard...
9. | Under the Class Name drop down box, select "CTutorialDoc".
10. | Under the Object IDs drop down box, select ID_ENGINE_GDI.
11. | Under the Messages drop down box, Select COMMAND.
12. | Click the "Add Function" button and then the "OK" button.
13. | Select the UPDATE_COMMAND_UI message.
14. | Click the "Add Function" button and then the "OK" button.
15. | Repeat steps 10 through 14 for the Object ID ID_ENGINE_OPENGL.
16. | Click the "Edit Code" button.
17. | Add the following code for the six new functions:

void CTutorialDoc::OnEngineGdi()
{
m_pVectorWindow->SetEngine (VECTOR_ENGINE_GDI);
}

void CTutorialDoc::OnUpdateEngineGdi(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_pVectorWindow->GetEngine () == VECTOR_ENGINE_GDI);
}

void CTutorialDoc::OnEngineOpengl()
{
m_pVectorWindow->SetEngine (VECTOR_ENGINE_OPENGL);
}

void CTutorialDoc::OnUpdateEngineOpengl(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck(m_pVectorWindow->GetEngine () == VECTOR_ENGINE_OPENGL);
}

18. | Compile and run the demo.
19. | From the program menu, browse to the "images" folder of your LEAD installation. Open the image random.dxf and click OK.
20. | Select different vector engines and see the effect of how the drawing is painted on the window.


Implementing Hit Testing

Start with the project you created in Using Vector Engines

Take the following steps to add support for hit testing different vector objects:

1. | Click the "Class View" tab of the project workspace.
2. | Select the CMainFrame() branch.
3. | Right click, and choose "Add Member Function".
4. | For the Function Type enter "void".
5. | For the Function Declaration enter " StatusBarDisplay(LPSTR pszMsg)".
6. | Select the "Public" radio button.
7. | Click OK button.
8. | Add the following code to the newly created member function StatusBarDisplay():

void CMainFrame::StatusBarDisplay(LPTSTR pszMsg)
{
m_wndStatusBar.SetPaneText(0, pszMsg, TRUE);
}

9. | Click to open the "MyVectorWindow" branch in the project workspace.
10. | Double click any of the MyVectorWindow member functions to open the file "MyVectorWindow.cpp".
11. | Add the following two lines after #include "MyVectorWindow.h":

#include "MainFrm.h"
extern CTutorialApp theApp;

12. | Click the "Class View" tab of the project workspace.
13. | Double click the MsgProcCallBack() member function of the MyVectorWindow class.
14. | Add the following variables local to MsgProcCallBack():

POINT pt;
L_INT nRet;
LVectorObject Object;
L_TCHAR szBuffer[200];
VECTORPEN Pen;

15.

Immediately before the "case WM_CHAR" line, add the following code:

case WM_MOUSEMOVE:
// hit test object under mouse cursor
pt.x = LOWORD( lParam );
pt.y = HIWORD( lParam );
nRet = HitTest(&pt, &Object );
if( nRet == SUCCESS )
{
// theres an object, show its type in main window caption
switch( Object.GetType() )
{
case VECTOR_VERTEX: lstrcpy( szBuffer, TEXT("Vertex ")); break;
case VECTOR_LINE: lstrcpy( szBuffer, TEXT("Line ")); break;
case VECTOR_RECTANGLE: lstrcpy( szBuffer, TEXT("Rectangle ")); break;
case VECTOR_POLYLINE: lstrcpy( szBuffer, TEXT("Polyline")); break;
case VECTOR_POLYBEZIER: lstrcpy( szBuffer, TEXT("Polybezier")); break;
case VECTOR_POLYGON: lstrcpy( szBuffer, TEXT("Polygon")); break;
case VECTOR_ELLIPSE: lstrcpy( szBuffer, TEXT("Ellipse")); break;
case VECTOR_CIRCLE: lstrcpy( szBuffer, TEXT("Circle")); break;
case VECTOR_ARC: lstrcpy( szBuffer, TEXT("Arc")); break;
case VECTOR_TEXT: lstrcpy( szBuffer, TEXT("Text")); break;
case VECTOR_PIE: lstrcpy( szBuffer, TEXT("Pie")); break;
case VECTOR_CHORD: lstrcpy( szBuffer, TEXT("Chord")); break;
case VECTOR_RASTER: lstrcpy( szBuffer, TEXT("Raster ")); break;
}
}
else
lstrcpy( szBuffer, TEXT("No object under mouse cursor") );

((CMainFrame *)(theApp.GetMainWnd()))->StatusBarDisplay(szBuffer);
break;

case WM_LBUTTONDOWN:
// hit test object under mouse cursor
pt.x = LOWORD( lParam );
pt.y = HIWORD( lParam );
nRet = HitTest(&pt, &Object );
if( nRet == SUCCESS )
{
// theres an object, flip its pen width between 1 and 4
Object.GetObjectAttributes(NULL, &Pen, NULL, NULL );
Pen.NewPen.LogPen.lopnWidth.x = ( Pen.NewPen.LogPen.lopnWidth.x == 1 ) ? 4 : 1;
Object.SetObjectAttributes(NULL, &Pen, NULL, NULL);
}
break;

case WM_RBUTTONDOWN:
// hit test object under mouse cursor
pt.x = LOWORD( lParam );
pt.y = HIWORD( lParam );
nRet = HitTest(&pt, &Object );
if( nRet == SUCCESS )
{
// there is an object, delete it
Object.DeleteObject();
}
break;

16. | Compile and run the demo.
17. | From the program menu, browse to the "images" folder of your LEAD installation. Open the image random.dxf and click OK.
18. | You should be able now to see the object type under mouse cursor in the status bar. Left click an object to flip its pen width size between 1 and 4. Right click an object to delete it.


Working with Layers

Start with the project you created in Implementing Hit Testing.

Take the following steps to show/hide layers from a vector drawing:

1. | Click the "Class View" tab of the project workspace.
2. | Click to open the MyVectorWindow branch.
3. | Double-click the MsgProcCallBack() member function.
4. | Declare the following variables local to the MsgProcCallBack() function.

L_INT nIndex;
LVectorLayer Layer;
VECTORLAYERDESC LayerDesc;

5.

Add the following code immediately immediately before case 'b':

case '1':
case '2':
{
// get layer from index
if( wParam == '1' )
nIndex = 0;
else
nIndex = 1;

GetLayerByIndex(nIndex, &Layer );

// flip the visible state of the layer
Layer.GetLayerDesc (&LayerDesc);
LayerDesc.bVisible =!LayerDesc.bVisible;
Layer.SetLayerDesc (&LayerDesc);
}

6. | Compile and run the demo.
7. | The sample image (random.dxf) shipped with LEADTOOLS has 2 layers, you should be able to hide/show those layers by pressing 1 and 2 on your keyboard.


Adding and Displaying Vector Objects

Start with the project you created in Working With Layers.

Take the following steps to start adding new layer and objects to the vector handle.

Note:

This tutorial will only use 3 types of objects (Line, Ellipse and Polygon) to keep things simple. You can refer to Vector object types all object types supported by the vector toolkit.

1. | Click the "Class View" tab of the project workspace.
2. | Click to open the MyVectorWindow branch.
3. | Double-click the MsgProcCallBack() member function.
4. | Add the following code immediately immediately before case '1':

case 'l':
case 'L':
{
// add a new vector line
VECTORLINE Line;
L_INT i;

Line.Pen.nSize = sizeof( VECTORPEN );

Line.Pen.bExtPen = FALSE;
Line.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Line.Pen.NewPen.LogPen.lopnWidth.x = 1;
Line.Pen.NewPen.LogPen.lopnWidth.y = 1;
Line.Pen.NewPen.LogPen.lopnColor = RGB( rand() % 246 + 10, rand() % 246 + 10, rand() % 246 + 10 );

// set the line start and end points
for( i = 0; i < 2; i++ )
{
Line.Point[ i ].x = rand() % 100;
Line.Point[ i ].y = rand() % 100;
Line.Point[ i ].z = rand() % 100;
}

LVectorLine VectorLine(&Line);

// add to current active layer
LVectorLayer VectorLayer;
GetActiveLayer(&VectorLayer);
VectorLayer.AddObject (&VectorLine );
this->Reset ();
}
break;

case 'e':
case 'E':
{
VECTORELLIPSE Ellipse;

Ellipse.Point.x = rand() % 100;;
Ellipse.Point.y = rand() % 100;;
Ellipse.Point.z = rand() % 100;;

Ellipse.Pen.nSize = sizeof( VECTORPEN );

Ellipse.Pen.bExtPen = FALSE;
Ellipse.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Ellipse.Pen.NewPen.LogPen.lopnWidth.x = 2;
Ellipse.Pen.NewPen.LogPen.lopnWidth.y = 2;
Ellipse.Pen.NewPen.LogPen.lopnColor = RGB( rand() % 246 + 10, rand() % 246 + 10, rand() % 246 + 10 );

Ellipse.Brush.nSize = sizeof(VECTORBRUSH);

Ellipse.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Ellipse.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( rand() % 246 + 10, rand() % 246 + 10, rand() % 246 + 10 );
Ellipse.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;

Ellipse.xRadius = rand() % 10;;
Ellipse.yRadius = rand() % 10;;

LVectorEllipse VectorEllipse(&Ellipse);

// add to current active layer
LVectorLayer VectorLayer;

GetActiveLayer(&VectorLayer);
VectorLayer.AddObject (&VectorEllipse);
Reset ();
}
break;
case 'g':
case 'G':
{
VECTORPOLYGON Polygon;
L_INT i;

//Create Polygon Object
Polygon.Pen.nSize = sizeof( VECTORPEN );

Polygon.Pen.bExtPen = FALSE;
Polygon.Pen.NewPen.LogPen.lopnStyle = PS_SOLID;
Polygon.Pen.NewPen.LogPen.lopnWidth.x = 2;
Polygon.Pen.NewPen.LogPen.lopnWidth.y = 2;
Polygon.Pen.NewPen.LogPen.lopnColor = RGB( rand() % 246 + 10, rand() % 246 + 10, rand() % 246 + 10 );

// set the polygon brush
Polygon.Brush.nSize = sizeof( VECTORBRUSH );

Polygon.Brush.VectorBrushStyle = VECTORBRUSH_STANDARD;
Polygon.Brush.BrushType.StandardBrush.LogBrush.lbColor = RGB( rand() % 246 + 10, rand() % 246 + 10, rand() % 246 + 10 );
Polygon.Brush.BrushType.StandardBrush.LogBrush.lbStyle = BS_SOLID;
Polygon.Brush.BrushType.StandardBrush.LogBrush.lbHatch = 0;

Polygon.nPointCount = rand() % 5 + 3;
Polygon.Point = (pVECTORPOINT) malloc(Polygon.nPointCount * sizeof( VECTORPOINT ) );
for( i = 0; i < Polygon.nPointCount; i++ )
{
Polygon.Point[ i ].x = rand() % 100;
Polygon.Point[ i ].y = rand() % 100;
Polygon.Point[ i ].z = rand() % 100;
}

// set polygon fill mode
Polygon.nPolyFillMode = VECTOR_POLY_ALTERNATE;

LVectorPolygon VectorPolygon(&Polygon);

// add to current active layer
LVectorLayer VectorLayer;
GetActiveLayer(&VectorLayer);
VectorLayer.AddObject (&VectorPolygon);

free( Polygon.Point );
Reset ();
}
break;

5. | Compile and run the demo.
6. | Hit the 'L' key to create random lines. Hit the 'G' key to create random polygons. Hit the 'E' key to create random ellipses.


Dialog Strings

The following strings can be accessed and modified using LVectorDialog::GetString and LVectorDialog::SetString.

Generic control strings

Value | String
VECTOR_DLGSTR_BUTTON_OK | "OK"
VECTOR_DLGSTR_BUTTON_CANCEL | "Cancel"
VECTOR_DLGSTR_BUTTON_HELP | "Help"
VECTOR_DLGSTR_CHECK_PREVIEW | "Preview"

Transform dialog

Value | String
VECTOR_DLGSTR_TRANSFORM_SCALE_CAPTION | "Scale"
VECTOR_DLGSTR_TRANSFORM_ROTATE_CAPTION | "Rotate"
VECTOR_DLGSTR_TRANSFORM_TRANSLATE_CAPTION | "Translate"
VECTOR_DLGSTR_TRANSFORM_CAMERA_CAPTION | "Camera"
VECTOR_DLGSTR_TRANSFORM_BUTTON_XUP | "+ X"
VECTOR_DLGSTR_TRANSFORM_BUTTON_XDOWN | "- X"
VECTOR_DLGSTR_TRANSFORM_BUTTON_YUP | "+ Y"
VECTOR_DLGSTR_TRANSFORM_BUTTON_YDOWN | "- Y"
VECTOR_DLGSTR_TRANSFORM_BUTTON_ZUP | "+ Z"
VECTOR_DLGSTR_TRANSFORM_BUTTON_ZDOWN | "- Z"
VECTOR_DLGSTR_TRANSFORM_BUTTON_XUPCAMERA | "+ Theta"
VECTOR_DLGSTR_TRANSFORM_BUTTON_XDOWNCAMERA | "- Theta"
VECTOR_DLGSTR_TRANSFORM_BUTTON_YUPCAMERA | "+ Phi"
VECTOR_DLGSTR_TRANSFORM_BUTTON_YDOWNCAMERA | "- Phi"
VECTOR_DLGSTR_TRANSFORM_BUTTON_ZUPCAMERA | "+ Distance"
VECTOR_DLGSTR_TRANSFORM_BUTTON_ZDOWNCAMERA | "- Distance"
VECTOR_DLGSTR_TRANSFORM_CHECK_ALL | "All"
VECTOR_DLGSTR_TRANSFORM_CHECK_PERSPECTIVE | "Perspective"
VECTOR_DLGSTR_TRANSFORM_BUTTON_RESET | "Reset"

Render dialog

Value | String
VECTOR_DLGSTR_RENDER_CAPTION | "Render Options"
VECTOR_DLGSTR_RENDER_FRAME_LIGHTS | "Lights"
VECTOR_DLGSTR_RENDER_CHECK_USELIGHTS | "Use lights"
VECTOR_DLGSTR_RENDER_BUTTON_AMBIENT | "Ambient Color"
VECTOR_DLGSTR_RENDER_FRAME_POLYGONMODE | "Polygon Mode"
VECTOR_DLGSTR_RENDER_RADIO_POINT | "Points"
VECTOR_DLGSTR_RENDER_RADIO_LINE | "Lines"
VECTOR_DLGSTR_RENDER_RADIO_FILL | "Filled"

View mode dialog

Value | String
VECTOR_DLGSTR_VIEWMODE_CAPTION | "View Mode Options"
VECTOR_DLGSTR_VIEWMODE_FRAME_VIEWMODE | "View Mode"
VECTOR_DLGSTR_VIEWMODE_RADIO_FIT | "Fit"
VECTOR_DLGSTR_VIEWMODE_RADIO_SNAP | "Snap"

Hit test dialog

Value | String
VECTOR_DLGSTR_HITTEST_CAPTION | "Hit Test Options"
VECTOR_DLGSTR_HITTEST_FRAME_DISTANCE | "Distance"
VECTOR_DLGSTR_HITTEST_FRAME_OPTIONS | "Options"
VECTOR_DLGSTR_HITTEST_CHECK_CLOSEDFIGURES | "Closed figures"
VECTOR_DLGSTR_HITTEST_CHECK_IGNORESELECTED | "Ignore selected"

All layers dialog

Value | String
VECTOR_DLGSTR_ALLLAYERS_CAPTION | "Layers"
VECTOR_DLGSTR_ALLLAYERS_BUTTON_NEW | "New"
VECTOR_DLGSTR_ALLLAYERS_BUTTON_EDIT | "Edit"
VECTOR_DLGSTR_ALLLAYERS_BUTTON_DELETE | "Delete"
VECTOR_DLGSTR_ALLLAYERS_YES | "Yes"
VECTOR_DLGSTR_ALLLAYERS_NO | "No"
VECTOR_DLGSTR_ALLLAYERS_NAME | "Name"
VECTOR_DLGSTR_ALLLAYERS_ACTIVE | "Active"
VECTOR_DLGSTR_ALLLAYERS_VISIBLE | "Visible"
VECTOR_DLGSTR_ALLLAYERS_LOCKED | "Locked"

Layer dialog

Value | String
VECTOR_DLGSTR_LAYER_CAPTION | "Layer"
VECTOR_DLGSTR_LAYER_FRAME_NAME | "Name"
VECTOR_DLGSTR_LAYER_CHECK_ACTIVE | "Current Active Layer"
VECTOR_DLGSTR_LAYER_CHECK_VISIBLE | "Visible"
VECTOR_DLGSTR_LAYER_CHECK_LOCKED | "Locked"

General dialog

Value | String
VECTOR_DLGSTR_GENERAL_CAPTION | "General"
VECTOR_DLGSTR_GENERAL_FRAME_SELECTION | "Selection"
VECTOR_DLGSTR_GENERAL_CHECK_SELECTION | "Selected"
VECTOR_DLGSTR_GENERAL_FRAME_RASTEROPERATION | "Raster Operation"

ROP2

Value | String
VECTOR_DLGSTR_GENERAL_ROP2_BLACKNESS | "Blackness"
VECTOR_DLGSTR_GENERAL_ROP2_NOTMERGEPEN | "Not Merge Pen"
VECTOR_DLGSTR_GENERAL_ROP2_MASKNOTPEN | "Mask Not Pen"
VECTOR_DLGSTR_GENERAL_ROP2_NOTCOPYPEN | "Not Copy Pen"
VECTOR_DLGSTR_GENERAL_ROP2_MASKPENNOT | "Mask Pen Not"
VECTOR_DLGSTR_GENERAL_ROP2_INVERT | "Invert"
VECTOR_DLGSTR_GENERAL_ROP2_XORPEN | "Xor Pen"
VECTOR_DLGSTR_GENERAL_ROP2_NOTMASK | "Not Mask"
VECTOR_DLGSTR_GENERAL_ROP2_MASKPEN | "Mask Pen"
VECTOR_DLGSTR_GENERAL_ROP2_NOTXORPEN | "Not Xor Pen"
VECTOR_DLGSTR_GENERAL_ROP2_NOP | "Nop"
VECTOR_DLGSTR_GENERAL_ROP2_MERGENOTPEN | "Merge Not Pen"
VECTOR_DLGSTR_GENERAL_ROP2_COPYPEN | "Copy Pen"
VECTOR_DLGSTR_GENERAL_ROP2_MERGEPENNOT | "Merge Pen Not"
VECTOR_DLGSTR_GENERAL_ROP2_MERGEPEN | "Merge Pen"
VECTOR_DLGSTR_GENERAL_ROP2_WHITENESS | "Whiteness"

Pen dialog

Value | String
VECTOR_DLGSTR_PEN_CAPTION | "Pen"
VECTOR_DLGSTR_PEN_FRAME_STYLE | "Style"
VECTOR_DLGSTR_PEN_FRAME_WIDTH | "Width"
VECTOR_DLGSTR_PEN_FRAME_COLOR | "Color"

Pen styles

Value | String
VECTOR_DLGSTR_PEN_STYLE_SOLID | "Solid"
VECTOR_DLGSTR_PEN_STYLE_DASH | "Dash"
VECTOR_DLGSTR_PEN_STYLE_DOT | "Dot"
VECTOR_DLGSTR_PEN_STYLE_DASHDOT | "Dash-Dot"
VECTOR_DLGSTR_PEN_STYLE_DASHDOTDOT | "Dast-Dot-Dot"
VECTOR_DLGSTR_PEN_STYLE_TRANSPARENT | "Transparent"
VECTOR_DLGSTR_PEN_STYLE_INSIDEFRAME | "Inside Frame"

Brush dialog

Value | String
VECTOR_DLGSTR_BRUSH_CAPTION | "Brush"
VECTOR_DLGSTR_BRUSH_FRAME_STYLE | "Style"
VECTOR_DLGSTR_BRUSH_FRAME_HATCH | "Hatch"
VECTOR_DLGSTR_BRUSH_FRAME_COLOR | "Color"

Brush styles

Value | String
VECTOR_DLGSTR_BRUSH_STYLE_SOLID | "Solid"
VECTOR_DLGSTR_BRUSH_STYLE_TRANSPARENT | "Transparent"
VECTOR_DLGSTR_BRUSH_STYLE_HATCHED | "Hatched"

Brush hatched

Value | String
VECTOR_DLGSTR_BRUSH_HATCHED_HORIZONTAL | "Horizontal"
VECTOR_DLGSTR_BRUSH_HATCHED_VERTICAL | "Vertical"
VECTOR_DLGSTR_BRUSH_HATCHED_FORWARDDIAGONAL | "Forward Diagonal"
VECTOR_DLGSTR_BRUSH_HATCHED_BACKWARDDIAGONAL | "Backward Diagonal"
VECTOR_DLGSTR_BRUSH_HATCHED_CROSS | "Corss"
VECTOR_DLGSTR_BRUSH_HATCHED_DIAGONALCROSS | "Diaginal Cross"

Vertex dialog

Value | String
VECTOR_DLGSTR_VERTEX_CAPTION | "Vertex"
VECTOR_DLGSTR_VERTEX_FRAME_LOCATION | "Location"

Line dialog

Value | String
VECTOR_DLGSTR_LINE_CAPTION | "Line"
VECTOR_DLGSTR_LINE_FRAME_STARTPOINT | "Start Point"
VECTOR_DLGSTR_LINE_FRAME_ENDPOINT | "End Point"

Rectangle dialog

Value | String
VECTOR_DLGSTR_RECTANGLE_CAPTION | "Rectangle"
VECTOR_DLGSTR_RECTANGLE_FRAME_STARTPOINT | "Start Point"
VECTOR_DLGSTR_RECTANGLE_FRAME_ENDPOINT | "End Point"

Polyline dialog

Value | String
VECTOR_DLGSTR_POLYLINE_CAPTION | "Poly Line"
VECTOR_DLGSTR_POLYLINE_FRAME_POINTS | "Point"
VECTOR_DLGSTR_POLYLINE_BUTTON_NEW | "New"
VECTOR_DLGSTR_POLYLINE_BUTTON_DELETE | "Delete"

Polybezier dialog

Value | String
VECTOR_DLGSTR_POLYBEZIER_CAPTION | "Poly Bezier"
VECTOR_DLGSTR_POLYBEZIER_FRAME_POINTS | "Points"
VECTOR_DLGSTR_POLYBEZIER_BUTTON_NEW | "New"
VECTOR_DLGSTR_POLYBEZIER_BUTTON_DELETE | "Delete"

Polygon dialog

Value | String
VECTOR_DLGSTR_POLYGON_CAPTION | "Polygon"
VECTOR_DLGSTR_POLYGON_FRAME_POINTS | "Points"
VECTOR_DLGSTR_POLYGON_BUTTON_NEW | "New"
VECTOR_DLGSTR_POLYGON_BUTTON_DELETE | "Delete"
VECTOR_DLGSTR_POLYGON_FRAME_FILLMODE | "Fill Mode"
VECTOR_DLGSTR_POLYGON_RADIO_ALTERNATE | "Alternate"
VECTOR_DLGSTR_POLYGON_RADIO_WINDING | "Winding"

Ellipse dialog

Value | String
VECTOR_DLGSTR_ELLIPSE_CAPTION | "Ellipse"
VECTOR_DLGSTR_ELLIPSE_FRAME_CENTER | "Center"
VECTOR_DLGSTR_ELLIPSE_FRAME_RADIUS | "Radius"

Circle dialog

Value | String
VECTOR_DLGSTR_CIRCLE_CAPTION | "Circle"
VECTOR_DLGSTR_CIRCLE_FRAME_CENTER | "Center"
VECTOR_DLGSTR_CIRCLE_FRAME_RADIUS | "Radius"

Arc dialog

Value | String
VECTOR_DLGSTR_ARC_CAPTION | "Arc"
VECTOR_DLGSTR_ARC_FRAME_CENTER | "Center"
VECTOR_DLGSTR_ARC_FRAME_RADIUS | "Radius"
VECTOR_DLGSTR_ARC_FRAME_ANGLES | "Angles"
VECTOR_DLGSTR_ARC_STATIC_START | "Start"
VECTOR_DLGSTR_ARC_STATIC_SWEEP | "Sweep"

Text dialog

Value | String
VECTOR_DLGSTR_TEXT_CAPTION | "Text"
VECTOR_DLGSTR_TEXT_FRAME_POINT | "Point"
VECTOR_DLGSTR_TEXT_FRAME_HORIZONTAL | "Horizontal"
VECTOR_DLGSTR_TEXT_FRAME_VERTICAL | "Vertical"
VECTOR_DLGSTR_TEXT_CHECK_HITTESTRECTANGLE | "Hit Test Rectangle"
VECTOR_DLGSTR_TEXT_FRAME_TEXT | "Text"
VECTOR_DLGSTR_TEXT_FRAME_FONT | "Font"
VECTOR_DLGSTR_TEXT_BUTTON_FONT | "Font..."
VECTOR_DLGSTR_TEXT_STATIC_CHARWIDTH | "Char Width"
VECTOR_DLGSTR_TEXT_STATIC_CHARHEIGHT | "Char Height"

Text alignment combo

Value | String
VECTOR_DLGSTR_TEXT_LEFT | "Left"
VECTOR_DLGSTR_TEXT_RIGHT | "Right"
VECTOR_DLGSTR_TEXT_HCENTER | "Center"
VECTOR_DLGSTR_TEXT_TOP | "Top"
VECTOR_DLGSTR_TEXT_BOTTOM | "Bottom"
VECTOR_DLGSTR_TEXT_VCENTER | "Center"

Pie dialog

Value | String
VECTOR_DLGSTR_PIE_CAPTION | "Pie"
VECTOR_DLGSTR_CHORD_CAPTION | "Chord"
VECTOR_DLGSTR_PIE_FRAME_CENTER | "Center"
VECTOR_DLGSTR_PIE_FRAME_RADIUS | "Radius"
VECTOR_DLGSTR_PIE_FRAME_ANGLES | "Angles"
VECTOR_DLGSTR_PIE_STATIC_START | "Start"
VECTOR_DLGSTR_PIE_STATIC_SWEEP | "Sweep"

Polydraw dialog

Value | String
VECTOR_DLGSTR_POLYDRAW_CAPTION | "Poly Draw"
VECTOR_DLGSTR_POLYDRAW_FRAME_POINTS | "Points"
VECTOR_DLGSTR_POLYDRAW_BUTTON_NEW | "New"
VECTOR_DLGSTR_POLYDRAW_BUTTON_DELETE | "Delete"
VECTOR_DLGSTR_POLYDRAW_FRAME_TYPE | "Type"
VECTOR_DLGSTR_POLYDRAW_CHECK_CLOSEFIGURE | "Close Figure"

Polydraw types

Value | String
VECTOR_DLGSTR_POLYDRAW_MOVETO | "Move To"
VECTOR_DLGSTR_POLYDRAW_LINETO | "Line To"
VECTOR_DLGSTR_POLYDRAW_BEZIERTO | "Bezier To"

Raster dialog

Value | String
VECTOR_DLGSTR_RASTER_CAPTION | "Raster"
VECTOR_DLGSTR_RASTER_FRAME_POINT1 | "Point 1"
VECTOR_DLGSTR_RASTER_FRAME_POINT2 | "Point 2"
VECTOR_DLGSTR_RASTER_FRAME_BITMAP | "Bitmap"

Messages

Value | String
VECTOR_DLGSTR_VECTOR_IS_LOCKED | "Vector is locked!"
VECTOR_DLGSTR_VECTOR_NOT_ENABLED | "Vector is not enabled!"
VECTOR_DLGSTR_LAYER_NOT_FOUND | "Layer not found!"
VECTOR_DLGSTR_LAYER_ALREADY_EXISTS | "Layer already exists!"
VECTOR_DLGSTR_NO_MEMORY | "Out of memory!"
VECTOR_DLGSTR_DELETELAYERQUERY | "This will delete all objects inside layer:\n%s\n\nAre you sure you want to continue?"
VECTOR_DLGSTR_CANNOTFINISHOPERATION | "Cannot finish this operation"
VECTOR_DLGSTR_CANNOTLOADBITMAP | "Cannot load bitmap!"


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 them by calling LSettings::UnlockSupport (L_SUPPORT_LTPRO, L_KEY_LTPRO). L_KEY_LTPRO can be found in ltkey.h.

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

Document/Medical:

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

These toolkits contain powerful annotation capabilities and optimized document image processing filters, and high performance compression, decompression and viewing of JPEG, LEAD CMP, 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.

Image Conversion. The Document toolkits include support for transforming a bitmap into a binary image using specified thresholds or a threshold calculated automatically based on statistical features of the bitmap.

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 for color documents containing mixed image and text components. For more information, refer to the

Halftoning. [Document/Medical] Convert 1-, 4-, 8-, 16-, 24-, or 32-bit bitmaps to a halftoned bitmap, with a specified pattern rotation. A halftoned bitmap is a 1-bit bitmap that has been dithered for black and white printing or display.

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 .


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.


LVectorWindow: Window vs. Control

To be notified of: | LVectorWindow as Control | LVectorWindow as Window
MouseDown | LBW_LBUTTONDOWN LBW_RBUTTONDOWN | override MsgProcCallBack
MouseUp | LBW_LBUTTONUP LBW_RBUTTONUP | override MsgProcCallBack
Click | LBW_LBUTTONCLICKED LBW_RBUTTONCLICKED | override MsgProcCallBack
Double Click | LBW_LBUTTONDBLCLK LBW_RBUTTONDBLCLK | override MsgProcCallBack
MouseMove | LBW_MOUSEMOVE | override MsgProcCallBack
GotFocus | LBW_SETFOCUS | override MsgProcCallBack
LostFocus | LBW_KILLFOCUS | override MsgProcCallBack
KeyDown | LBW_KEYDOWN | override MsgProcCallBack
KeyUp | LBW_KEYUP | override MsgProcCallBack
KeyPress | LBW_KEYPRESS | override MsgProcCallBack
Scroll | LBW_SCROLLED | override MsgProcCallBack
File Drag/Drop | LBW_FILEDRAGDROP | overrride OnFileDropped
VectorChange | LVW_VECTORCHANGED | override StartChanging override EndChanging
WindowPaint | LBW_PAINTED | override OnDraw
ZoomInDone | LBW_ZOOM | override OnZoom
Scale | LVW_SCALE | override OnScale
Resize | LBW_SIZECHANGED | override MsgProcCallBack

For more information, refer to LVectorWindow Control Notification Messages:


LVectorWindow Control Notification Messages

Message | wParam | lParam
LBW_LBUTTONDOWN | ID of vector window | LPMOUSEDATA
LBW_LBUTTONUP | ID of vector window | LPMOUSEDATA
LBW_RBUTTONDOWN | ID of vector window | LPMOUSEDATA
LBW_RBUTTONUP | ID of vector window | LPMOUSEDATA
LBW_LBUTTONCLICKED | ID of vector window | LPMOUSEDATA
LBW_RBUTTONCLICKED | ID of vector window | LPMOUSEDATA
LBW_LBUTTONDBLCLK | ID of vector window | LPMOUSEDATA
LBW_RBUTTONDBLCLK | ID of vector window | LPMOUSEDATA
LBW_MOUSEMOVE | ID of vector window | LPMOUSEDATA
LBW_KEYDOWN | ID of vector window | LPKEYDATA
LBW_KEYUP | ID of bitmap window | LPKEYDATA
LBW_KEYPRESS | ID of vector window | LPKEYDATA
LBW_SIZECHANGED | ID of vector window | LPSIZEDATA
LBW_FILEDRAGDROP | ID of vector window | LPDRAGDROPDATA
LBW_ZOOM | ID of vector window | LPZOOMDATA
LVW_SCALE | ID of vector window | LPVECTORSCALEDATA
LBW_SETFOCUS | ID of vector window | (HWND) Handle of the LVectorWindow
LBW_KILLFOCUS | ID of vector window | (HWND) Handle of the LVectorWindow
LBW_ENABLED | ID of vector window | (HWND) Handle of the LVectorWindow
LBW_DISABLED | ID of vector window | (HWND) Handle of the LVectorWindow
LBW_SCROLLED | ID of vector window | (HWND) Handle of the LVectorWindow
LVW_VECTORCHANGED | ID of vector window | (HWND) Handle of the LVectorWindow
LBW_PAINTED | ID of vector window | (HWND) Handle of the LVectorWindow


LVectorWindow Keys

The following keys are handled by the LVectorWindow object when the bitmap window control has the focus.

Key | Action
Up Arrow | Scroll down one line step
Down Arrow | Scroll up one line step
Right Arrow | Scroll left one line step
Left Arrow | Scroll right one line step
Page Up | Scroll down one page
Page Down | Scroll up one page
Ctrl + Page Up | Scroll to vector top
Ctrl + Page Down | Scroll to vector bottom
Ctrl + Home | Scroll left one page
Home | Scroll to vector left
End | Scroll to vector right
Ctrl + End | Scroll right one page
+ (Plus) | Zoom in
- (Minus) | Zoom out


Vector Change Notifications and Notification Categories

Description

Vectors

When calling some functions of the LVectorBase LEADTOOLS Class Library classes, particularly those that affect the vector itself, then notification messages are sent through the LVectorBase::StartChanging and LVectorBase::EndChanging member functions. These functions are called before and after executing the function that changes the bitmap. This gives you more control over the operation in progress. In order to use this feature, you must override the virtual functions for StartChanging and EndChanging. In the LVectorBase::StartChanging function, if you return an error code, the change operation will halt the calling function and will return the same error code. In the LVectorBase::EndChanging function you will be notified that the calling function's operation is complete. This gives you a chance to do other processing such as updating the display.

The following sections describe the change notifications and the notification categories:

Vector Changing Notifications:

The following is a list of all the notification messages and the functions that send them:

Notification Message | Function In Progress
NC_VECTOR_ADD_GROUP | LVectorBase::AddGroup
NC_VECTOR_ADD_LAYER | LVectorBase::AddLayer
NC_VECTOR_ADD_OBJECT | LVectorLayer::AddObject
NC_VECTOR_ATTACH | LVectorBase::AttachToWindow
NC_VECTOR_BACKCOLOR | LVectorBase::SetBackgroundColor
NC_VECTOR_BIND_VERTICES | LVectorBase::SetBindVerticesMode
NC_VECTOR_CAMERA | LVectorBase::SetCamera
NC_VECTOR_COPY | LVectorBase::Copy
NC_VECTOR_COPY_GROUP | LVectorBase::CopyGroup
NC_VECTOR_COPY_LAYER | LVectorBase::CopyLayer
NC_VECTOR_COPY_OBJECT | LVectorBase::CopyObject
NC_VECTOR_DELETE_GROUP | LVectorGroup::DeleteGroup
NC_VECTOR_DELETE_GROUP_CLONES | LVectorGroup::DeleteGroupClones
NC_VECTOR_DELETE_LAYER | LVectorLayer::DeleteLayer
NC_VECTOR_DELETE_OBJECTS | LVectorBase::DeleteObject
NC_VECTOR_DIALOG_CAMERA | LVectorDialog::DoModalVectorCamera
NC_VECTOR_DIALOG_ROTATE | LVectorDialog::DoModalVectorRotate
NC_VECTOR_DIALOG_SCALE | LVectorDialog::DoModalVectorScale
NC_VECTOR_DIALOG_TRANSLATE | LVectorDialog::DoModalVectorTranslate
NC_VECTOR_EMPTY_GROUP | LVectorGroup::EmptyGroup
NC_VECTOR_EMPTY_LAYER | LVectorLayer::EmptyLayer
NC_VECTOR_EXPLODE_OBJECT | LVectorObject::ExplodeObject
NC_VECTOR_FREE | LVectorBase::Free
NC_VECTOR_INITIALIZE | LVectorBase::Initialize
NC_VECTOR_PAN | LVectorBase::SetPan
NC_VECTOR_POLYGON_MODE | LVectorBase::SetPolygonMode
NC_VECTOR_REALIZE | LVectorBase::Realize
NC_VECTOR_ROTATE | LVectorBase::SetRotation
NC_VECTOR_SCALE | LVectorBase::SetScale
NC_VECTOR_SELECT_OBJECT | LVectorBase::SelectObject
NC_VECTOR_SET_OBJECT | LVectorObject::UnlockObject
NC_VECTOR_TRANSLATE | LVectorBase::SetTranslation
NC_VECTOR_USE_LIGHTS | LVectorBase::SetUseLights
NC_VECTOR_VECTORHANDLE | LVectorBase::SetHandle
NC_VECTOR_VIEW_MODE | LVectorBase::SetViewMode
NC_VECTOR_VIEW_PORT | LVectorBase::SetViewport

Vector Changing Notification Categories:

The following is a list of all the notification categories:

NCAT_VECTOR | LVectorBase functions for setting view and object characteristics
NCAT_VECTOR_DIALOG | LVectorDialog dialog generation


Vector Class Map Macros

The bitmap and vector class map macros are provided to assist in connecting the different LEADTOOLS Class Library classes with classes you derive from LBitmap (see the Ltclibn.hlp file), LVectorBase or LBitmapBase (see the Ltclibn.hlp file). The mapped classes are created "on demand", that is, no class object will be created if you do not request that class object from the bitmap or vector object.

Connecting different LEADTOOLS Class Library classes to the bitmap or vector class object makes it easy to use these classes with the object when programming applications.

Every LEADTOOLS Class Library class you derive from these bitmap or vector classes must declare a class map. This is done through the LEAD_DECLARE_CLASS_MAP() macro in the header file that contains the declaration for the derived class. In the implementation file for that class the user must use the LEAD_START_CLASS_MAP(ClassName,ClassParent) , LEAD_INIT_…(ClassName) and LEAD_END_CLASS_MAP(ClassName,ClassParent) macros respectively.

Class maps completely support inheritance. If a mapped class is not found then the mapped class of the parent class will be used. Any inherited classes will use the newly mapped classes or the parent mapped classes if the child does not have a mapped class of the same type. This gives you flexibility in programming your applications while using different class maps for each derived bitmap class.

LEAD_DECLARE_CLASS_MAP

LEAD_START_CLASS_MAP

LEAD_END_CLASS_MAP

LEAD_INIT_xxxx

START_BITMAP_CHANGING

END_BITMAP_CHANGING

LDictionary_GetBitmapCount

LDictionary_GetBitmap

LDictionary_DisconnectBitmapList

LDictionary_IsBitmap


Limitations When Printing to Vector File Formats

When printing from your application to a vector file format, only certain types of objects can be put into each of the various vector files.

For example, suppose your application is printing a page, which looks like this:

When printing to a CGM file, which supports text and shape objects, but does not support raster objects, the output will appear like this:

See the table below for a list of which objects are supported for each format.

Format | Raster | Shapes | Text | Notes
VEC | Supported | Supported | Supported |
DWF | Not supported | Supported | Supported | Filling is not supported, - format restriction.
DXF | Supported | Supported | Supported | Filling is not supported, - format restriction.
CGM | Not supported | Supported | Supported | No raster, format - restriction
PLT | Not supported | Supported | Supported | No colors, no filling - format restriction.
PCT | Not supported | Supported | Supported | Elliptical arcs not supported.
DRW | Not supported | Supported | Supported | Elliptical arcs not supported.
WMF | Supported | Supported | Supported |
EMF | Supported | Supported | Supported |
GBR | Not supported | Supported | Supported | Two colors only, - format restriction
SHP | Not supported | Supported | Supported | No raster - format restriction
PRN | Supported | Supported | Supported | No colors, no filling - format restriction.
SVG | Supported | Supported | Supported |
WPG | Supported | Supported | Supported |


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
 LEAD_DECLARE_CLASS_MAP():
 Use this macro to declare a class map for your derived LEAD bitmap class. This macro will declare different functions that you can use to get the corresponding mapped class object. The functions that this macro declares are:
 virtual  *
 Dialog(); //for the mapped LDialog or derived class
 virtual  *
 Region(); //for the mapped LBitmapRgn or derived class
 virtual *
 Paint(); //for the mapped LPaint or derived class
 virtual  *
 PaintEffect(); //for the mapped LPaintEffect or derived class
 virtual  *
 Twain(); //for the mapped LTwain or derived class
 virtual  *
 Isis(); //for the mapped LIsis or derived class
 virtual  *
 MemoryFile(); //for the mapped LMemoryFile or derived class
 virtual  *
 File(); //for the mapped LFile or derived class
 virtual  *
 Print(); //for the mapped LPrint or derived class
 virtual  *
 ScreenCapture(); //for the mapped LScreenCapture or derived class
 virtual  *
 VectorDialog(); //for the mapped LVectorDialog or derived class.
 virtual  *
 VectorFile(); //for the mapped LVectorFile or derived class.
 virtual
 VectorMemoryFile(); //for the mapped LVectorMemoryFile or derived class.
 virtual
 BarCode(); //for the mapped LBarCode or derived class.
 Example:
For example in the header file of the  LEAD bitmap declaration this macro is used as follows:
 class LBitmapBase: public LBase
{
LEAD_DECLARE_CLASS_MAP();
….
….
….
}

.topic 0x10000001
 LEAD_START_CLASS_MAP(ClassName,ClassParent):
 Use this macro to start your class map implementation for your derived LEAD bitmap class object. This is done in the implementation file of your bitmap class.
 Example:
For example in the LEADTOOLS Class Library class  implementation, this macro is used as follows:
 LEAD_START_CLASS_MAP(LBitmapBase,LBase)
…
For the user derived bitmap class (LUserBitmap)
 LEAD_START_CLASS_MAP(LUserBitmap,LParentBitmapClassName)
…
LEAD_END_CLASS_MAP(LUserBitmap,LParentBitmapClassName)

.topic 0x10000002
 LEAD_END_CLASS_MAP(ClassName,ClassParent):
 Use this macro to end your class map implementation for your derived LEAD bitmap class object. This is done in the implementation file of your bitmap class.
 Example:
For example in the LEADTOOLS Class Library class  implementation, this macro is used as follows:
 LEAD_START_CLASS_MAP(LBitmapBase,LBase)
…
LEAD_END_CLASS_MAP(LBitmapBase,LBase)
For the user derived bitmap class (LUserBitmap)
 LEAD_START_CLASS_MAP(LUserBitmap,LParentBitmapClassName)
…
LEAD_END_CLASS_MAP(LUserBitmap,LParentBitmapClassName)

.topic 0x10000003
 LEAD_INIT_xxx (ClassName):
 Use these macros in your class map implementation of your derived LEAD bitmap class object to map different classes to your bitmap object. This is done in the implementation file of your bitmap class.
 The available LEAD_INIT_xxx macros are:
 LEAD_INIT_LFile()
 //to map a LFile class
 LEAD_INIT_LIsis()
 //to map a LIsis class
 LEAD_INIT_LTwain()
 //to map a LTwain class
 LEAD_INIT_LPrint()
 //to map a LPrint class
 LEAD_INIT_LPaint()
 //to map a LPaint class
 LEAD_INIT_LDiaolg()
 //to map a LDialog class
 LEAD_INIT_LBitmapRgn()
 //to map a LBitmapRgn class
 LEAD_INIT_LMemoryFile()
 //to map a LMemoryFile class
 LEAD_INIT_LPaintEffect()
 //to map a LPaintEffect class
 LEAD_INIT_LScreenCapture()
 //to map a LScreenCapture class
 LEAD_INIT_LVectorDialog()
 //to map a LVectorDialog class
 LEAD_INIT_LVectorFile()
 //to map a LVectorFile class
 LEAD_INIT_LVectorMemoryFile()
 //to map a LVectorMemoryFile class
 LEAD_INIT_LBarCode()
 //to map a LBarCode class
 Example:
 For example in the LEADTOOLS Class Library class LBitmapBase implementation, these macros are used as follows:
 LEAD_START_CLASS_MAP(LBitmapBase,LBase)
 LEAD_INIT_LFile(LFile)
 //to map a LFile class to the LBitmapBase class
 LEAD_INIT_LIsis(LIsis)
 //to map a LIsis class to the LBitmapBase class
 LEAD_INIT_LTwain(LTwain)
 //to map a LTwain class to the LBitmapBase class
 LEAD_INIT_LPrint(LPrint)
 //to map a LPrint class to the LBitmapBase class
 LEAD_INIT_LPaint(LPaint)
 //to map a LPaint class to the LBitmapBase class
 LEAD_INIT_LDiaolg(LDialog)
 //to map a LDialog class to the LBitmapBase class
 LEAD_INIT_LBitmapRgn(LBitmapRgn)
 //to map a LBitmapRgn class to the LBitmapBase class
 LEAD_INIT_LMemoryFile(LMemoryFile)
 //to map a LMemoryFile class to the LBitmapBase class
 LEAD_INIT_LPaintEffect(LPaintEffect)
 //to map a LPaintEffect class to the LBitmapBase class
 LEAD_INIT_LScreenCapture(LScreenCapture)
 //to map a LScreenCapture class to the LBitmapBase class
 LEAD_INIT_LBarCode(LBarCode)
 //to map a LBarCode class to the LBitmapBase class
 LEAD_END_CLASS_MAP(LBitmapBase,LBase)

 For the user derived bitmap class (LUserBitmap)

 LEAD_START_CLASS_MAP(LUserBitmap, LBitmapBase)
 LEAD_INIT_LFile(LUserFile)
 //to map a LUserFile class to the LBitmapBase class
 LEAD_INIT_LIsis(LUserIsis)
 //to map a LUserIsis class to the LBitmapBase class
 LEAD_INIT_LPrint(LUserPrint)
 //to map a LUserPrint class to the LBitmapBase class
 LEAD_END_CLASS_MAP(LUserBitmap,LBitmapBase)

 Now executing the following:
 LUserBitmap UserBitmap;

 UserBitmap.File();
 // this returns a pointer to a LFile object
 UserBitmap.Paint();
 // this returns a pointer to a LPaint object
 UserBitmap.Isis();
 // this returns a pointer to a LIsis object
 UserBitmap.Print();
 // this returns a pointer to a LPrint object
 UserBitmap.Region();
 // this returns a pointer to a LBitmapRgn object
 UserBitmap.PaintEffect();
 // this returns a pointer to a LPaintEffect object
 UserBitmap.MemoryFile();
 // this returns a pointer to a LMemoryFile object

.topic 0x10000004
 START_BITMAP_CHANGING(pLBitmap,nNotifyCode,nNotifyCatigory)
 Use this macro to fire a changing notification for the passed bitmap object before executing the function that will change the bitmap. If the StartChanging notification callback returns an error code then this macro will end the calling function and return with the same error code.

.topic 0x10000005
 END_BITMAP_CHANGING(pLBitmap,nNotifyCode,nNotifyCatigory,nRetCode)
 Use this macro to fire a changing notification for the passed bitmap object after executing the function that changed the bitmap. This will notify the bitmap object that the function completed execution.

.topic 0x10000006
 LDictionary_GetBitmapCount()
 Use this macro to get the current number of LEADTOOLS Class Library created bitmap objects.

.topic 0x10000007
 LDictionary_GetBitmap(nIndex)
 Use this macro to get a pointer to a LEADTOOLS Class Library bitmap object. The returned pointer is of type LBitmapBase L_FAR *.

.topic 0x10000008
 LDictionary_DisconnectBitmapList(pLBitmaplist)
 Use this macro to disconnect a LEADTOOLS Class Library bitmap object from the specified bitmap list object.

.topic 0x10000009
 LDictionary_IsBitmap(pLBitmap)
 Use this macro to check for a valid LEADTOOLS Class Library bitmap object. This macro takes a pointer to the bitmap object to be verified.