Generated by DocFX

Class Transform

Ladybug Transform instance

Inheritance
System.Object
Transform
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Ladybug
Assembly: ladybug.dll
Syntax
public class Transform
Remarks

Represents basic location, size, scale, and rotation information

Properties

| Improve this Doc View Source

Bounds

The outer bounds of the Transform

Declaration
public Rectangle Bounds { get; }
Property Value
Type Description
Microsoft.Xna.Framework.Rectangle
| Improve this Doc View Source

DefaultScale

Default scale value

Declaration
public static Vector2 DefaultScale { get; }
Property Value
Type Description
Microsoft.Xna.Framework.Vector2
| Improve this Doc View Source

Location

Read-only location value of the Transform

Declaration
public Vector2 Location { get; }
Property Value
Type Description
Microsoft.Xna.Framework.Vector2
Remarks

To move the Transform, use Move(Int32, Int32), SetPosition(Int32, Int32, BoxHandle), or their overloads.

| Improve this Doc View Source

Rotation

The rotation value of the Transform, in degrees

Declaration
public float Rotation { get; }
Property Value
Type Description
System.Single
| Improve this Doc View Source

Scale

The scale of the Transform

Declaration
public Vector2 Scale { get; }
Property Value
Type Description
Microsoft.Xna.Framework.Vector2

Methods

| Improve this Doc View Source

Move(Vector2)

Moves the Transform, updating its position

Declaration
public void Move(Vector2 newPos)
Parameters
Type Name Description
Microsoft.Xna.Framework.Vector2 newPos

Vector2 value to move the Transform by

| Improve this Doc View Source

Move(Int32, Int32)

Moves the Transform, updating its position

Declaration
public void Move(int xMove, int yMove)
Parameters
Type Name Description
System.Int32 xMove

Distance to move the Transform by horizontally, in pixels

System.Int32 yMove

Distance to move the Transform by vertically, in pixels

| Improve this Doc View Source

RotateBy(Single)

Rotates the Transform

Declaration
public void RotateBy(float newRot)
Parameters
Type Name Description
System.Single newRot

Value to rotate the Transform by, in degrees

Remarks

This method rotates the Transform relative to its current rotation. To set the Transform's rotation to an absolute value, use SetRotation(Single)

| Improve this Doc View Source

ScaleBy(Vector2)

Scales the Transform

Declaration
public void ScaleBy(Vector2 newScale)
Parameters
Type Name Description
Microsoft.Xna.Framework.Vector2 newScale

Value to scale the transform by

Remarks

This method scales the Transform relative to its current scale. To set the Transform's scale to an absolute value, use SetScale(Single)

| Improve this Doc View Source

ScaleBy(Single)

Scales the Transform

Declaration
public void ScaleBy(float newScale)
Parameters
Type Name Description
System.Single newScale

Value to scale the transform by

Remarks

This method scales the Transform relative to its current scale. To set the Transform's scale to an absolute value, use SetScale(Single)

| Improve this Doc View Source

SetBounds(Rectangle)

Sets the Transform's bounds

Declaration
public void SetBounds(Rectangle rectangle)
Parameters
Type Name Description
Microsoft.Xna.Framework.Rectangle rectangle

New Bounds for the Transform

| Improve this Doc View Source

SetPosition(Vector2, BoxHandle)

Sets the position of the Transform

Declaration
public void SetPosition(Vector2 newPos, BoxHandle handle = BoxHandle.TopLeft)
Parameters
Type Name Description
Microsoft.Xna.Framework.Vector2 newPos

New location of the Transform

BoxHandle handle

The handle of the Transform's Bounds used to place it in its new Position

| Improve this Doc View Source

SetPosition(Int32, Int32, BoxHandle)

Sets the position of the Transform

Declaration
public void SetPosition(int x, int y, BoxHandle handle = BoxHandle.TopLeft)
Parameters
Type Name Description
System.Int32 x

New x coordinate of the Transform

System.Int32 y

New y coordinate of the Transform

BoxHandle handle

The handle of the Transform's Bounds used to place it in its new Position

| Improve this Doc View Source

SetRotation(Single)

Sets the Transform's rotation

Declaration
public void SetRotation(float newRot)
Parameters
Type Name Description
System.Single newRot

Transform's new rotation value, in degrees

| Improve this Doc View Source

SetScale(Vector2)

Sets the Transform's Scale

Declaration
public void SetScale(Vector2 newScale)
Parameters
Type Name Description
Microsoft.Xna.Framework.Vector2 newScale

Transform's new scale value

| Improve this Doc View Source

SetScale(Single)

Sets the Transform's Scale

Declaration
public void SetScale(float newScale)
Parameters
Type Name Description
System.Single newScale

Transform's new scale value