Gets the logical origin of this
AnnObject.
Supported in Silverlight, Windows Phone 7
Syntax
Visual Basic (Declaration) | |
---|
Public Overridable ReadOnly Property Origin As Point |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As AnnObject
Dim value As Point
value = instance.Origin |
C# | |
---|
public virtual Point Origin {get;} |
C++/CLI | |
---|
public:
virtual property Point Origin {
Point get();
} |
Property Value
The logical origin of this
AnnObject.
Example
Visual Basic | Copy Code |
---|
Private Sub AnnObject_Transform(ByVal obj As AnnObject)
' show the matrix
ShowMatrix(obj.Transform)
obj.Translate(2, 3)
ShowMatrix(obj.Transform)
obj.Scale(1.5F, 1.5F, obj.Origin)
ShowMatrix(obj.Transform)
obj.Rotate(45, obj.Origin)
ShowMatrix(obj.Transform)
obj.ResetTransform()
ShowMatrix(obj.Transform)
End Sub
Private Sub ShowMatrix(ByVal mat As Matrix)
Console.Write("{0}, ", mat.M11)
Console.Write("{0}, ", mat.M12)
Console.Write("{0}, ", mat.M21)
Console.Write("{0}, ", mat.M22)
Console.Write("{0}, ", mat.OffsetX)
Console.Write("{0}, ", mat.OffsetY)
End Sub |
C# | Copy Code |
---|
private void AnnObject_Transform(AnnObject obj)
{
// show the matrix
ShowMatrix(obj.Transform);
obj.Translate(2, 3);
ShowMatrix(obj.Transform);
obj.Scale(1.5F, 1.5F, obj.Origin);
ShowMatrix(obj.Transform);
obj.Rotate(45, obj.Origin);
ShowMatrix(obj.Transform);
obj.ResetTransform();
ShowMatrix(obj.Transform);
}
private void ShowMatrix(Matrix mat)
{
Console.Write("{0}, ", mat.M11);
Console.Write("{0}, ", mat.M12);
Console.Write("{0}, ", mat.M21);
Console.Write("{0}, ", mat.M22);
Console.Write("{0}, ", mat.OffsetX);
Console.Write("{0}, ", mat.OffsetY);
} |
SilverlightCSharp | Copy Code |
---|
private void AnnObject_Transform(AnnObject obj)
{
// show the matrix
ShowMatrix(obj.Transform);
obj.Translate(2, 3);
ShowMatrix(obj.Transform);
obj.Scale(1.5F, 1.5F, obj.Origin);
ShowMatrix(obj.Transform);
obj.Rotate(45, obj.Origin);
ShowMatrix(obj.Transform);
obj.ResetTransform();
ShowMatrix(obj.Transform);
}
private void ShowMatrix(Matrix mat)
{
Console.Write("{0}, ", mat.M11);
Console.Write("{0}, ", mat.M12);
Console.Write("{0}, ", mat.M21);
Console.Write("{0}, ", mat.M22);
Console.Write("{0}, ", mat.OffsetX);
Console.Write("{0}, ", mat.OffsetY);
} |
SilverlightVB | Copy Code |
---|
Private Sub AnnObject_Transform(ByVal obj As AnnObject)
' show the matrix
ShowMatrix(obj.Transform)
obj.Translate(2, 3)
ShowMatrix(obj.Transform)
obj.Scale(1.5F, 1.5F, obj.Origin)
ShowMatrix(obj.Transform)
obj.Rotate(45, obj.Origin)
ShowMatrix(obj.Transform)
obj.ResetTransform()
ShowMatrix(obj.Transform)
End Sub
Private Sub ShowMatrix(ByVal mat As Matrix)
Console.Write("{0}, ", mat.M11)
Console.Write("{0}, ", mat.M12)
Console.Write("{0}, ", mat.M21)
Console.Write("{0}, ", mat.M22)
Console.Write("{0}, ", mat.OffsetX)
Console.Write("{0}, ", mat.OffsetY)
End Sub |
Remarks
Requirements
Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)
See Also