ChangeDrawing
Modifies an Drawing element.
def ChangeDrawing (element) -> String
Parameters
- element
- [in] An APIObject describing the Drawing element to modify.
Return Values
This function returns the GUID of the modified element.
Remarks
This function is analogous to the ACAPI_Element_Change function of the C++ API for Drawing elements. By setting a member of the passed APIObject you also mask it for the operation.
For information on how to fill the passed APIObject, visit the C++ documentation.
Example
def MakeDrawing (scale): element = APIObject () element.head = APIObject () element.head.typeID = API_DrawingID element.head.hasMemo = True memo = APIObject () drawingData = DrawingData () drawingData.StartDrawing (scale) DrawText (-0.45, 0.2, "Hello") DrawCircle (0, 0, 1) DrawCircle (0, 0, 2) DrawCircle (0, 0, 3) DrawCircle (0, 0, 4) DrawCircle (0, 0, 5) drawingData.StopDrawing () memo.drawingData = drawingData element.bounds = drawingData.GetBounds () element.bounds.xMin -= 1 element.bounds.yMin -= 1 element.bounds.xMax += 1 element.bounds.yMax += 1 element.nameType = APIName_CustomName element.name = "Test Drawing" return CreateDrawing (element, memo) def ChangeDrawing (guid): element = GetDrawing (guid) element = element[0] element.hasBorderLine = True element.borderLineType = 1 element.borderPen += 2 element.borderSize *= 1.5 element.angle = 3.141592654 / 12 # 15 Degrees element.colorMode = APIColorMode_GrayScale return ChangeDrawing (element, APIObject ()) drawing = MakeDrawing (100) ChangeDrawing (drawing)
Requirements
- Version: Python API 0.1 or Later
- Module: GS