Sets the vector automation properties. This function is only available in the Vector toolkits.
#include "ltwrappr.h"
L_INT LAutomation::SetVectorProperty(pAutomationVectorProperties);
Pointer to an AUTOMATIONVECTORPROPERTIES structure that contains the new vector automation properties to set.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The properties set by this function include pen, brush and font properties used when drawing new vector objects in the automation container.
This example allows the user to set the default color (RED) when using automation to create vector objects.
L_INT LAutomation_SetVectorPropertyExample(LAutomation &Automation)
{
L_INT nRet;
AUTOMATIONVECTORPROPERTIES AutVecProps;
//Get current automation PEN properties
AutVecProps.nSize = sizeof(AUTOMATIONVECTORPROPERTIES);
AutVecProps.dwMask = AUTOMATION_VECTOR_PEN;
nRet = Automation.GetVectorProperty(&AutVecProps);
if(nRet != SUCCESS)
return nRet;
AutVecProps.Pen.bExtPen = FALSE;
AutVecProps.Pen.NewPen.LogPen.lopnColor = RGB(255,0,0);
nRet = Automation.SetVectorProperty(&AutVecProps);
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}