Main Content

Graphical Icon Editor Overview

Create and edit mask icon of a block in a graphical environment. The features in the Graphical Icon Editor help you to easily create icons. You can also create and edit the block mask icons using a set of drawing commands. For more information, see Mask Display and Initialization Commands.

Graphical Icon Editor

You can launch the Graphical Icon Editor from the Mask Editor. In the Mask Editor, select the Icon tab. In the toolstrip, in the Authoring section, select Graphical. Using the Graphical Icon Editor, you can:

Edit Properties of Block Mask Icon and Its Elements

The graphical mode of authoring has a set of tabbed panes that help you to author block mask icons. The options available in these tabbed panes are context sensitive.

  • Icon - Use the options in the Icon tab to control the properties of the icon such as the canvas height and width.

  • Element - All the properties specific to an element of the icon are available in the Element tab, for example, alignment options and transformation options.

Icon Toolstrip

SectionPropertyFunctionality
SaveSave MaskSave the mask.
Save image file with modelSelect to save the mask icon with the model. You can package images with the models having .slx and .mdl extensions.
Authoring ModeToggle editorSwitch between the command and graphical editors.
CanvasHeightSet the height of the canvas.
WidthSet the width of the canvas.
Drawing AidsGrid and Snap to gridEnable these options to create precisely positioned elements. These options help you to visualize the number of pixels each element occupies in the icon. Snap to grid allows enables you to snap the element to the nearest grid line.
Grid SizeControl the spacing between the grid lines.
Grid ColorSelect a color for the grid.
Smart Guides and RulersUse smart guides and rulers to align or position an element with respect to other elements in the icon or the canvas.
Port GridDisplay port grids to align elements with respect to the ports.
PartsAddAdd a new part to the icon.
ImportImport an image or an SVG file as a new part in the icon.
DuplicateDuplicate an existing part.
DeleteDelete an existing part.
ConfigurationPortsDefine the number of ports on the left, right, top, and bottom of the icon.
PreviewPreview in ModelVisualize the icon in its original scale and after transformations such as scaling, horizontal and vertical stretching, and clockwise and counterclockwise rotation.

Element Toolstrip

SectionPropertyFunctionality
ShapeStroke, Stroke Width, Bold, Italics, Underline, and FillDefine the visual appearance of elements by specifying these properties.
ArrangeGroup and UngroupGroup and ungroup elements in the icon.
Flip HorizontalFlip the selected element horizontally.
Flip VerticalFlip the selected element vertically.
OrderSend BackwardSend the element one level backwards.
Send to BackSend the element to the back.
Bring ForwardBring the element one level forward.
Bring to FrontBring the element to the front.
AlignAlign LeftAlign the selected elements to the left.
Align Horizontal CenterAlign the selected elements to the horizontal center.
Align RightAlign the selected elements to the right.
Align BottomAlign the selected elements to the bottom.
Align TopAlign the selected elements to the top.
Align Vertical CenterAlign the selected elements to the vertical center.
Port BindingBind Port or Unbind PortBind or unbind port labels and icon elements to a port. Binding the elements to the port enables to inherit the style from the port. For example, the color codes associated with the port of a block gets inherited by the element. To bind the port and label or element, select the port and the label or element. Specify the port using Select Port. To find the number of elements bound to a port, click the port, which highlights all the elements bound to the port. You can bind multiple elements to a port, but you cannot bind a single element to multiple ports. Select Unbind Port to unbind a label or element to a port.

Icon Properties Pane

Design tab
SectionPropertyFunctionality
TransformH and WSet the height and width of the canvas. Remove the lock to change the height and width of the canvas without preserving the aspect ratio between height and width.
Render tab
SectionPropertyFunctionality
GeneralFrameRectangle - Set the frame shape to rectangle.
Custom - Customize the frame shape. You can create an element of the desired shape and name it as frame in the element browser. The icon takes the shape of the element.
None - The default shape is retained and does not show a frame for the block.
TransformRotateSet this option to rotate the icon along with the block.
ResizeOff: Icon retains its original size when the block resizes.
On: Icon resizes to fit to the block.
Shrink Only: Icon resizes to fit to the block while shrinking but not otherwise.
Stroke BehaviorNormalize WidthOn: Select this option to set the stroke width of all the elements to 1 pixel.
Scale With PortsOn: Select this option to scale the stroke width of the element by the style of the line that is connected to the port that is associated with this element.
Scale on ZoomOn: Select this option to increase the stroke width when the canvas is zoomed in and decrease the stroke width when the canvas is zoomed out.
Scale on ResizeOn: Scale stroke linearly on resizing icon.
Off: Maintain constant stroke width on resizing icon.
Shrink Only: Scale stroke linearly when the icon shrinks and do not scale when icon is enlarged.
AppearanceForegroundAllow: Change foreground color of the icon. The foreground color can be changed by right-clicking the context menu on the Simulink canvas.
Disallow: Retain the original color of the canvas even when it is changed by right-clicking the context menu on the Simulink canvas.
Inherit from Ports: Use the color of the port associated with this element as the foreground color.
BackgroundAllow: Change background color of the icon. The background color can be changed by right-clicking the context menu on the Simulink canvas.
Disallow: Retain the original color of the canvas even when it is changed by right-clicking the context menu on the Simulink canvas.

Element Properties Pane

Design tab
SectionPropertyFunctionality
TransformX, YSet the X and Y coordinates of the element.
W, HSet the width and height of the element. Remove the lock to change the width and height of the element without preserving the aspect ratio.
AngleAdjust the angleSpecify an angle between -360 to 360 to rotate the element to the specified angle.
Flip horizontallyflip horizontallyFlip the element horizontally.
Flip verticallyflip verticallyFlip the element vertically.
Corner radiusset corner radiusDefine the radius of an element's corners.
FormatFillSelect a color to fill the element and enter a value between 0 to 1 to adjust the transparency of the color .
StrokeSelect a stroke color and enter a value between 0 to 1 to adjust transparency of the stroke color.
Stroke styleEnter the stroke width and select the stroke style.
Cap typeSelect the style for the end of the line or path.
Join typeSelect the style for the joints for the path element.
Start typeSelect the start arrow head type. Toggle to fill the arrow head and then select the size of the arrow head.
End typeSelect the end arrow head type. Toggle to fill the arrow head and the select the size of the arrow head.
TextFont SizeSelect the size of the text from the available options.
StyleBold, italicize, underline, or strike through the text on the icon.
Letter caseChoose the font casing. You can also format the text as superscript or subscript.
FillSelect the color for the text. You can also choose the transparency of the text.
StrokeSelect the color for the border of the text. You can also choose the transparency for the border of the text.
Render tab
TransformRotateWith Parent - Rotate the element with its parent.
Readable - Maintain readable text element. The text appears from left to right or bottom to top without mirrored.
Fixed - Maintain orientation of the element even if the block is rotated.
With Ports - Rotate the element along with the port.
ResizeOn: Scale linearly along with parent when the icon is resized.
Off: Maintain the size of the element when the icon is resized.
Shrink Only: Shrink the element linearly when its parent shrinks but maintains the size when its parent is enlarged.
Adaptive: Scale port labels appropriately along with the block.
Horizontal ScalingOn: Scale the element horizontally along with the block.
Off: Maintain the width of the element.
Shrink Only: Shrink horizontally when its parent shrinks but maintain the size when its parent is enlarged.
Vertical ScalingOn: Scale the element vertically along with the block.
Off: Maintain the height of the element.
Shrink Only: Shrink vertically when its parent shrinks but maintain the size when its parent is enlarged.
Scale On ZoomOn: Scale the element linearly when the canvas is zoomed.
Off: Maintain the size of the element when the canvas is zoomed.
Shrink Only: Shrink the element when the canvas is zoomed out and maintain its size when the canvas is zoomed in.
Stroke BehaviorNormalize WidthInherit: Inherit the style from the icon. If the element is part of a group then it inherits the style from its parent element.
On: Set the stroke width of all the elements to 1 pixel.
Scale With PortsInherit: Inherit the style from the icon. If the element is part of a group then it inherits the style from its parent element.
On: Scale the stroke width of the element by the style of the line that is connected to the port that is associated with this element.
Scale On ZoomInherit: Inherit the style from the icon. If the element is part of a group then it inherits the style from its parent element.
On: Scale the stroke width of the elements when the canvas is zoomed out. Maintain a constant stroke width when the canvas is zoomed in.
Scale On ResizeInherit: Inherit the style from the icon. If the element is part of a group then it inherits the style from its parent element.
On: Scale element's stroke linearly on resizing icon.
Off: Maintain constant stroke width of the elements on resizing icon.
Shrink Only: Scale stroke of the elements linearly when the icon shrinks and do not scale when icon is enlarged.

Drawing Tools

ToolFunctionality
PathCreate the desired shape using the Path tool.
RectDraw a rectangle or square using the Rect tool.
EllipseDraw an ellipse or circle using the Ellipse tool.
LineDraw lines using Line tool.
CurvatureSimplify path creation. To draw curves, click on the canvas in two separate locations to create anchor points. Drag the center point to draw the curve. Drag the edge points of the curve to enlarge it. You can also rotate the curve clockwise or anticlockwise to form loops.
Equation ToolWrite equations using LaTeX markup. This tool is similar to the equation tool present in MATLAB® and Simulink.
Edit ShapeUse the Edit Shape tool to edit all supported shapes, such as rectangles, ellipses, lines, and paths. To edit a shape, select the Edit Shape tool in fixed palette above the canvas and click on an element. All edit points that form the shape appear.
ScissorSplit a path or element on the canvas at an anchor point or along a segment. Click a point on the path you want to split. To modify the object, select the anchor points that are created due to splitting.
ConnectorConnect two or more open paths. This connection creates a single path element. Click the tool and drag to connect open paths.

Note

Along with using these tools to draw shapes, you can use predefined shapes from Electrical, Translational, and Rotational libraries. You can also use basic shapes like Cylinder, Triangle, Axis, and Wave.

Element Browser

The element browser provides you the following functionalities:

  • Identify each element using a unique name.

  • Hide or unhide an element so that it does not get in the way while modifying other elements.

  • Lock or unlock an element so that the position of the element is locked in the icon.

  • Arrange elements within the group.

  • Delete elements.

  • Maintain a stack order for the elements.

Other Menu Options

MenuPropertyFunctionality
PropertiesTransformChange the position, rotation, and corner radius of an element in the icon.
Path PointsX and YSelect an edit point in a shape, then modify the X and Y coordinates of the edit point.
Point TypeChange between smooth point and corner point.
Symmetric HandlesSymmetrically move the handles of the edit point.

Related Topics