Other Functions

The following functions are available globally.

  • Compares two Brush instances.

    Declaration

    Swift

    public func == (left: Brush, right: Brush) -> Bool

    Return Value

    true if the Brush-es are equal; otherwise false.

  • Comapres two Color instances.

    Declaration

    Swift

    public func == (col1: Color, col2: Color) -> Bool

    Parameters

    col1

    The first Color to compare.

    col2

    The second Color to compare.

    Return Value

    true if the Color-s are equal; otherwise false.

  • Checks if two DiagramItem-s are equal.

    Declaration

    Swift

    public func == (lhs: DiagramItem, rhs: DiagramItem) -> Bool

    Return Value

    true if the DiagramItem-s are equal; otherwise false.

  • Attaches and detaches event handlers.

    Declaration

    Swift

    @discardableResult
    public func +=<T>(
        event: Event<T>, handler: @escaping (AnyObject, T) -> Void) -> Int

    Parameters

    event

    An event that uses event arguments of type T.

    handler

    The handler for this event, which can be sent by any object and uses event arguments of type T.

    Return Value

    An integer, which represents a unique id number for this event.

  • Compares two images.

    Declaration

    Swift

    public func == (left: Image, right: Image) -> Bool

    Parameters

    left

    The first image to compare.

    right

    The second image to compare.

    Return Value

    true if the two images are the same; otherwise false.

  • Compares two MeasureUnit-s.

    Declaration

    Swift

    public func == (left: MeasureUnit, right: MeasureUnit) -> Bool

    Parameters

    left

    The first MeasureUnit to compare.

    right

    The second MeasureUnit to compare.

    Return Value

    true if the MeasureUnit-s are euqal; otherwise false.

  • Compares two Metatype objects.

    Declaration

    Swift

    public func == <T>(left: Metatype<T>, right: Metatype<T>) -> Bool where T : AnyObject

    Parameters

    left

    The first Metatype object to compare.

    second

    The second Metatype object to compare.

    Return Value

    true if the Metatype objects are equal; otherwise false.

  • Checks if two Point-s are equal.

    Declaration

    Swift

    public func == (first: Point, second: Point) -> Bool

    Parameters

    first

    The first Point to compare.

    second

    The second Point to compare.

    Return Value

    true if the coordinates of the Point-s are equal; otherwise false.

  • Undocumented

    Declaration

    Swift

    public func - (first: Point, second: Point) -> Point
  • Checks if two Rect objects are equal.

    Declaration

    Swift

    public func == (lhs: Rect, rhs: Rect) -> Bool

    Parameters

    lhs

    The first Rect to compare.

    rhs

    The second Rect to compare.

    Return Value

    true if the two Rect objects have the same location and size; otherwise false.

  • Undocumented

    Declaration

    Swift

    public func == (lhs: Size, rhs: Size) -> Bool
  • Undocumented

    Declaration

    Swift

    public func != (lhs: Size, rhs: Size) -> Bool
  • Compares two Style-s.

    Declaration

    Swift

    public func == (left: Style, right: Style) -> Bool

    Parameters

    left

    The first Style to compare.

    right

    The second Style to compare.

    Return Value

    true if the Style-s are equal. otherwise false.

  • Undocumented

    Declaration

    Swift

    public func == (lhs: TreeViewItem, rhs: TreeViewItem) -> Bool
  • Compares two Vector-s.

    Declaration

    Swift

    public func == (v1: Vector, v2: Vector) -> Bool

    Parameters

    v1

    The first Vector to compare.

    v2

    The second Vector to compare.

    Return Value

    true if the Vector-s are equal; otherwise false.

  • Multiplies the specified Vector by the specified scalar.

    Declaration

    Swift

    public func * (vector: Vector, scalar: Double) -> Vector

    Parameters

    vector

    The Vector to multiply.

    scalar

    The scalar by which the Vector is multiplied.

    Return Value

    The result of the multiplication of the Vector with the scalar.

  • Multiplies the specified scalar by the specified Vector.

    Declaration

    Swift

    public func * (scalar: Double, vector: Vector) -> Vector

    Parameters

    scalar

    The scalar to multiply.

    vector

    The Vector by which the scalar is multiplied.

    Return Value

    The result of the multiplication of the scalar with the Vector.

  • Multiplies the specified Vector by the specified scalar.

    Declaration

    Swift

    public func *= (vector: inout Vector, scalar: Double)

    Parameters

    vector

    The Vector to multiply.

    scalar

    The scalar by which the Vector is multiplied.

  • Divides the specified Vector by the specified scalar.

    Declaration

    Swift

    public func / (vector: Vector, scalar: Double) -> Vector

    Parameters

    vector

    The Vector to divide.

    scalar

    The scalar by which the Vector is divided.

    Return Value

    The result of the division of the Vector with the scalar.

  • Divides the specified Vector by the specified scalar.

    Declaration

    Swift

    public func /= (vector: inout Vector, scalar: Double)

    Parameters

    vector

    The Vector to divide.

    scalar

    The scalar by which the Vector is divided.

  • Adds the specified Vector to the specified point.

    Declaration

    Swift

    public func + (vector: Vector, point: Point) -> Point

    Parameters

    vector

    The Vector to add.

    point

    The Point to which the vector is added.

    Return Value

    The result point.

  • Adds the specified point to the specified Vector.

    Declaration

    Swift

    public func + (point: Point, vector: Vector) -> Point

    Parameters

    point

    The point which is added to the Vector.

    vector

    The Vector to which the point is added.

    Return Value

    The result point.

  • Undocumented

    Declaration

    Swift

    public func + (v1: Vector, v2: Vector) -> Vector
  • Undocumented

    Declaration

    Swift

    public func - (v1: Vector, v2: Vector) -> Vector
  • Compares two Weak objects with the == operator.

    Declaration

    Swift

    public func == <T>(lhs: Weak<T>, rhs: Weak<T>) -> Bool where T : AnyObject

    Parameters

    lhs

    The first Weak object to compare.

    rhs

    The second Weak object to compare.

    Return Value

    true if the objects are equal; otherwise false.