L_VecSetObjectAttributes

#include "lvkrn.h"

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

pVECTORHANDLE pVector;

/* pointer to a vector handle */

const pVECTOROBJECT pObject;

/* pointer to a vector object */

const L_INT L_FAR * 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 an object. This function is available in the LEADTOOLS Vector Imaging Pro Toolkit.

Parameter

Description

pVector

Pointer to a vector handle.

pObject

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

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 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

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

LVKRN

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

See Also

Functions:

L_VecGetObjectAttributes, L_VecGetObject, L_VecSetObject, L_VecFreeObject

Topics:

Working with Vector Objects

Example

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

void RedPen( 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;

   L_VecSetObjectAttributes( pVector, NULL, NULL, &Pen, NULL, NULL, 0L );
}