[IoId("00000000-ba64-4792-9acf-45bd1328dfc9")] public class VectorIcon : AbstractIcon, IStorable
Implements IIcon for vector graphics.

Constructors

VectorIcon

#
Create a new vector icon.
public VectorIcon(
builder
Builder with all vector shapes and states.
)

VectorIcon

#
Deserialisation constructor.
public VectorIcon(
reader
)

Fields

NullRank

#
Defines the null category, ie. the category that cannot be hidden.
public const int NullRank = -2147483648

Properties

Size

#
Gets the frame within which this icon is positioned.
public Size Size { get; }

States

Enumerate over all state names.
public IEnumerable<IconState> States { get; }
inherited fromAbstractIcon
States

Type

Gets the type of icon.
public IconType Type { get; }
inherited fromAbstractIcon
Type

Methods

AddState

Add a state to this icon. This method ought to be called from the constructor of derived types only.
protected void AddState(
state
State to add.
)
inherited fromAbstractIcon

Draw

Render this icon into a graphics context.
public void Draw(
context
Graphics context for icon.
)
inherited fromAbstractIcon
Draw

DrawDropShadow

Create a bitmap containing the drop shadow of this icon.
public Bitmap DrawDropShadow(
Size
size,
Size of the icon in pixels.
blur,
Amount of blurring.
strength
Darkness of shadow.
)
inherited fromAbstractIcon
A bitmap with only black pixels and varying transparencies. The size of this bitmap is the provided size plus padding to cater for the blurring.

DrawInternal

#
Internal render method.
protected override void DrawInternal(
context
Graphics context.
)

DrawToBitmap

Render the icon to a bitmap.
public Bitmap DrawToBitmap(
Size
size,
Size of bitmap.
padding,
Number of padding pixels around entire image.
Color
background
Icon background colour. Note that the actual bitmap will be drawn on a Transparent background. This argument merely informs those parts of icon that case about background/foreground contrast.
)
inherited fromAbstractIcon
Rendered bitmap.
DrawToBitmap

FindState

Find the icon state with the specified name.
public IconState FindState(
name
Name to search for.
)
inherited fromAbstractIcon
Icon state with given name or null.
FindState

HandleStateChange

#
protected override void HandleStateChange(
state
)

Hide

#
Hide a specific category.
public void Hide(
rank
Category to show.
)

MoveState

Move a named state to a new value over time.
public void MoveState(
value,
State value to assign.
name = null,
Name of state. Leave blank to set the default state.
duration = null,
Animation duration. Leave blank to re-use the previous duration.
motion = null
Animation motion. Leave blank to re-use the previous motion.
)
inherited fromAbstractIcon
MoveState

SetState

Set the value of a named state immediately.
public void SetState(
value,
State value to assign.
name = null
Name of state. Leave blank to set the default state.
)
inherited fromAbstractIcon
SetState

Show

#
Show (ie. unhide) a specific category.
public void Show(
rank
Category to show.
)

ShowAll

#
Show all categories.
public void ShowAll()

ShowOnly

#
Show a single category, hide all others.
public void ShowOnly(
rank
Category to show.
)

Store

#
Serialise this icon.
public void Store(
writer
)
Store

ToSvgXml

#
Create an xml document from this icon.
public string ToSvgXml()