Skip to content

set_drawing_object_paramsSetDrawingObjectParamsSetDrawingObjectParamsset_drawing_object_paramsT_set_drawing_object_params🔗

Short description🔗

set_drawing_object_paramsSetDrawingObjectParamsSetDrawingObjectParamsset_drawing_object_paramsT_set_drawing_object_params — Set the parameters of a drawing object.

Signature🔗

set_drawing_object_params( drawing_object DrawID, attribute.name GenParamName, attribute.name GenParamValue )void SetDrawingObjectParams( const HTuple& DrawID, const HTuple& GenParamName, const HTuple& GenParamValue )static void HOperatorSet.SetDrawingObjectParams( HTuple drawID, HTuple genParamName, HTuple genParamValue )def set_drawing_object_params( draw_id: HHandle, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[float, int, str]] ) -> None

Herror T_set_drawing_object_params( const Htuple DrawID, const Htuple GenParamName, const Htuple GenParamValue )

void HDrawingObject::SetDrawingObjectParams( const HTuple& GenParamName, const HTuple& GenParamValue ) const

void HDrawingObject::SetDrawingObjectParams( const HString& GenParamName, double GenParamValue ) const

void HDrawingObject::SetDrawingObjectParams( const char* GenParamName, double GenParamValue ) const

void HDrawingObject::SetDrawingObjectParams( const wchar_t* GenParamName, double GenParamValue ) const (Windows only)

void HDrawingObject.SetDrawingObjectParams( HTuple genParamName, HTuple genParamValue )

void HDrawingObject.SetDrawingObjectParams( string genParamName, double genParamValue )

Description🔗

set_drawing_object_paramsSetDrawingObjectParams is used to set the parameters GenParamNamegenParamNamegen_param_name of the drawing object DrawIDdrawIDdraw_id to the values specified in GenParamValuegenParamValuegen_param_value.

Depending on the type of the drawing object the following parameters can be set for the different types of drawing object:

  • circle:

    'row'"row": Row coordinate of the center of the circle.

    'column'"column": Column coordinate of the center of the circle.

    'radius'"radius": Radius of the circle.

  • circle_sector:

    'row'"row": Row coordinate of the center.

    'column'"column": Column coordinate of the center.

    'radius'"radius": Radius of the circle.

    'start_angle'"start_angle": Start angle of the circle arc.

    'end_angle'"end_angle": End angle of the circle arc.

  • ellipse: 'row'"row": Row coordinate of the center of the ellipse.

    'column'"column": Column coordinate of the center of the ellipse.

    'phi'"phi": Orientation of the first half axis in radians.

    'radius1'"radius1": Length of the first half axis.

    'radius2'"radius2": Length of the second half axis.

  • ellipse_sector: 'row'"row": Row coordinate of the center of the ellipse sector.

    'column'"column": Column coordinate of the center of the ellipse sector.

    'phi'"phi": Orientation of the first half axis in radians.

    'radius1'"radius1": Length of the first half axis.

    'radius2'"radius2": Length of the second half axis.

    'start_angle'"start_angle": Starting angle of the ellipse arc.

    'end_angle'"end_angle": End angle of the ellipse arc.

  • rectangle1: 'row1'"row1": Row coordinate of the upper left corner.

    'column1'"column1": Column coordinate of the upper left corner.

    'row2'"row2": Row coordinate of the lower right corner.

    'column2'"column2": Column coordinate of the lower right corner.

  • rectangle2: 'row'"row": Row coordinate of the center of the rectangle.

    'column'"column": Column coordinate of the center of the rectangle.

    'phi'"phi": Orientation of the first half axis in radians.

    'length1'"length1": Length of the first half axis.

    'length2'"length2": Length of the second half axis.

  • line: 'row1'"row1": Row coordinate of the first line point.

    'column1'"column1": Column coordinate of the first line point.

    'row2'"row2": Row coordinate of the second line point.

    'column2'"column2": Column coordinate of the second line point.

  • xld: 'row'"row": Row coordinates of the contour points.

    'column'"column": Column coordinates of the contour points.

    It is possible to either set only the row or column coordinates of the contour points, or both at the same time. In the first case, the number of elements in the input tuple must be the same as the number of points in the contour. In the second case, all existing contour points are discarded and replaced by new ones. The new coordinates are specified in GenParamValuegenParamValuegen_param_value in the following order: [Row_0, Row_1, …, Row_n, Column_0, Column_1, … Column_n][Row_0, Row_1, …, Row_n, Column_0, Column_1, … Column_n].

  • text: 'row'"row": Row coordinate of the text position.

    'column'"column": Column coordinate of the text position.

    'string'"string": Text string to be displayed.

In addition, there is an additional number of attributes that model the appearance of the drawing object in the window it is attached to. Depending on the type of the drawing object the following attributes can be set.

  • Draw objects of type ‘text’:

    • 'color'"color": Set the color of a text object. The color can be specified either by name, e.g., ‘green’, or by RGB values, e.g., ‘#ffb529’. See set_colorSetColor for more information.

    • 'font'"font": Set the font of a text object. A list of all available fonts can be queried with query_fontQueryFont. See set_fontSetFont for a detailed description of the available values.

  • Draw objects of type ‘circle’, ‘circle_sector’, ‘ellipse’, ‘ellipse_sector’, ‘rectangle1’, ‘rectangle1’, ‘xld’, ‘line’:

    • 'color'"color": Set the color of a drawing object. The color can be specified either by name, e.g., ‘green’, or by RGB values, e.g., ‘#ffb529’. See set_colorSetColor for more information.

    • 'line_style'"line_style": Set the line style of the drawing object. This attribute requires at least one pair of attribute values in form of a tuple. The first defines the length of the visible part, the second defines the length of the invisible part. See set_line_styleSetLineStyle for more details. Please notice that since the length of the input tuple may vary, 'line_style'"line_style" must not be combined with other parameters or attributes in the same call. Otherwise an exception will the thrown.

    • 'line_width'"line_width": Set the line width of the drawing object in pixel. See set_line_widthSetLineWidth for more information.

    • 'marker_size'"marker_size": Set the width and height of the markers used as anchor points for manipulating this drawing object.

      Value range: [77 … 3276832768]

If more than one parameter shall be set, they have to be passed as a tuple in GenParamNamegenParamNamegen_param_name containing the name of the parameters. The corresponding values have to be passed as a tuple in GenParamValuegenParamValuegen_param_value.

If the drawing object is currently attached to a window, this window is redrawn for each call of set_drawing_object_paramsSetDrawingObjectParams.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

DrawIDdrawIDdraw_id (input_control) drawing_object → (handle)HTuple (HHandle)HDrawingObject, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the drawing object.

GenParamNamegenParamNamegen_param_name (input_control) attribute.name(-array) → (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Parameter names of the drawing object.

List of values: 'color', 'column', 'column1', 'column2', 'end_angle', 'font', 'length1', 'length2', 'line_style', 'line_width', 'marker_size', 'phi', 'radius', 'radius1', 'radius2', 'row', 'row1', 'row2', 'start_angle', 'string'"color", "column", "column1", "column2", "end_angle", "font", "length1", "length2", "line_style", "line_width", "marker_size", "phi", "radius", "radius1", "radius2", "row", "row1", "row2", "start_angle", "string"

GenParamValuegenParamValuegen_param_value (input_control) attribute.name(-array) → (real / integer / string)HTuple (double / Hlong / HString)HTuple (double / int / long / string)MaybeSequence[Union[float, int, str]]Htuple (double / Hlong / char*)

Parameter values.

Result🔗

set_drawing_object_paramsSetDrawingObjectParams returns 2 (H_MSG_TRUE) if the DrawIDdrawIDdraw_id is valid, and the pairs of names and values of the tuples GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value are coherent with the corresponding drawing object type. Otherwise an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_drawing_object_rectangle1CreateDrawingObjectRectangle1, create_drawing_object_rectangle2CreateDrawingObjectRectangle2, create_drawing_object_ellipseCreateDrawingObjectEllipse, create_drawing_object_circleCreateDrawingObjectCircle, create_drawing_object_lineCreateDrawingObjectLine, create_drawing_object_ellipse_sectorCreateDrawingObjectEllipseSector, create_drawing_object_circle_sectorCreateDrawingObjectCircleSector, create_drawing_object_xldCreateDrawingObjectXld, attach_drawing_object_to_windowAttachDrawingObjectToWindow

Possible successors

get_drawing_object_paramsGetDrawingObjectParams, attach_drawing_object_to_windowAttachDrawingObjectToWindow, get_drawing_object_iconicGetDrawingObjectIconic

See also

attach_drawing_object_to_windowAttachDrawingObjectToWindow, get_drawing_object_iconicGetDrawingObjectIconic, set_drawing_object_callbackSetDrawingObjectCallback

Module🔗

Foundation