L_VecSetObjectAttributes

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecSetObjectAttributes(pVector, pObject, pnROP, pPen, pBrush, pFont, dwFlags)

Sets the attributes of an object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameters

pVECTORHANDLE pVector

Pointer to a vector handle.

const pVECTOROBJECT pObject

Pointer to the vector object for which to set the attributes.

const L_INT * pnROP

Pointer to a variable that contains the ROP code to set. For more information on valid ROP2 codes, refer to your SDK..

const pVECTORPEN pPen

Pointer to a VECTORPEN structure that contains the pen characteristics to set.

const pVECTORBRUSH pBrush

Pointer to a VECTORBRUSH structure that contains the brush characteristics to set.

const pVECTORFONT pFont

Pointer to a VECTORFONT structure that contains the font to set.

L_UINT32 dwFlags

Flag that indicates which objects to process. Possible values are:

Value Meaning
0 Set the attributes for all objects.
VECTOR_FLAGS_SELECTED_ONLY Set the attributes of the selected objects only.

Returns

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

Comments

If pObject is NULL, the function uses the dwFlags parameter to determine the objects for which to set the new attributes.

If NULL is passed for pnROP, pPen, pBrush and/or pFont, then that attribute will not be set. For example, if NULL is passed for the pFont parameter, the pFont parameter will not be set for the specified object.

Certain parameters are ignored depending on pObject. For example, if pObject is VECTOR_LINE, then the pBrush and pFont parameters are ignored.

This function provides a simpler way of setting object information, without having to get the object descriptor, inspect the object type, set the new attributes and then free the descriptor.

Required DLLs and Libraries

See Also

Functions

Topics

Example

This example change all objects in a given vector handle to use RED pen.

L_LTVKRNTEX_API L_INT VecSetObjectAttributesExample(pVECTORHANDLE pVector) 
{ 
   VECTORPEN Pen; 
 
   Pen.nSize                     = sizeof( Pen ); 
   Pen.bExtPen                   = FALSE; 
   Pen.NewPen.LogPen.lopnColor   = RGB( 255, 0, 0 ); 
   Pen.NewPen.LogPen.lopnWidth.x = 1; 
   Pen.NewPen.LogPen.lopnWidth.y = 1; 
   Pen.NewPen.LogPen.lopnStyle   = PS_SOLID; 
 
   return L_VecSetObjectAttributes( pVector, NULL, NULL, &Pen, NULL, NULL, 0L ); 
} 

Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.