Specify properties of model annotation
Instances of this class specify the properties of annotations.
You can use getCallbackAnnotation
in
an annotation callback function to get the Simulink.Annotation
instance
for the annotation associated with the callback function. You can
use find_system
and get_param
to get the Simulink.Annotation
instance
associated with any annotation in a model. For example, this code
gets the annotation object for the first annotation in the currently
selected model and turns on its drop shadow
ah = find_system(gcs,'FindAll','on','type','annotation'); ao = get_param(ah(1),'Object'); ao.DropShadow = 'on';
None.
Property | Description | Values |
---|---|---|
AnnotationType | Type of annotation—text (note), area, or image. This property is read only. |
|
BackgroundColor | Background color of this annotation. | RGB value array | Annotation background color
can also be |
ClickFcn | Specifies MATLAB® code to execute when you click this annotation. See Associate a Click Function with an Annotation for more information. | character vector |
DeleteFcn | MATLAB code to execute before deleting this annotation. See Annotation Callback Functions. | character vector |
Description | Description of this annotation. | character vector |
DropShadow | Turn drop shadow display on or off. |
|
FixedHeight | Specify whether the bottom border of the annotation resizes as you add content. |
|
FixedWidth | Specify whether to use word wrap or to have the width of the annotation expand to accommodate text. |
|
FontAngle (plain text only) | Angle of the annotation font. The default value, |
|
FontName (plain text only) | Name of annotation font. The default value, | character vector |
FontSize (plain text only) | Size of annotation font in points. The default value, | decimal number | |
FontWeight (plain text only) | Weight of the annotation font. The default value, |
|
ForegroundColor | Foreground color of this annotation. | RGB value array | Annotation foreground color
can also be |
Handle | Annotation handle. | real |
HiliteAncestors | For internal use. | |
HorizontalAlignment | Horizontal alignment of this annotation. |
|
Interpreter | Specifies whether the annotation is interpreted as rich text or contains LaTeX
commands. The default value, |
|
IsImage | Specifies whether the annotation is an image-only annotation. |
|
InternalMargins | Space from the bounding box of text to the borders of the annotation. | 1x4 array Supported coordinates are between -1073740824 and 1073740823, inclusive. |
LoadFcn | MATLAB code to execute when the model containing this annotation is loaded. See Annotation Callback Functions. | character vector |
Name | Text of annotation. Same as | character vector |
Parent | Parent name of annotation object. | character vector |
Path | Path to the annotation. | character vector |
PlainText | Read-only display of the text in the annotation, without formatting. | vector |
Position | Location of the annotation. | vector of coordinates, in pixels: The origin is the upper-left corner of the Simulink® Editor canvas before any canvas resizing. Supported coordinates are between -1073740824 and 1073740823, inclusive. Positive values are to the right of and down from the origin. Negative values are to the left of and up from the origin. |
RequirementInfo | For internal use. | character vector |
Selected | Specifies whether this annotation is currently selected. |
|
Tag | Text to assign to the annotation | character vector |
TeXMode | Specifies whether to render TeX markup. |
|
Text | Text of annotation. Same as | character vector |
Type | Annotation type. This is always |
|
UseDisplayTextAsClickCallback | Specifies whether to use the contents of the If set to See Associate a Click Function with an Annotation for more information. |
|
UserData | Any data that you want to associate with this annotation. | vector |
VerticalAlignment | Vertical alignment of this annotation. |
|
Method | Description |
---|---|
| Delete this annotation from the Simulink model. |
| Display the Annotation properties dialog box. |
| Display the property names and their settings for this Annotation object. |
| Zoom in on this annotation and highlight it in the model. |
| Return the specified property settings for this annotation. |
| Display a list of properties for this Annotation object with short descriptions. |
| Display all nonglobal methods of this Annotation object. |
| Set the specified property of this Annotation object with the specified value. |
| Set the annotation contents to the specified image file. The resulting annotation is an image-only annotation. |
| Return and display a MATLAB structure containing the property settings of this Annotation object. |
| Display this annotation in the Simulink Editor with this annotation highlighted. |