Platforms to show: All Mac Windows Linux Cross-Platform

CGAffineTransformMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class CoreGraphics MBS MacCG Plugin 3.4 ✅ Yes ❌ No ❌ No ✅ Yes All
A class for an affine transformation.
Example
dim af as CGAffineTransformMBS = CGAffineTransformMBS.Identity

MsgBox str(af.A)+" "+str(af.b)+" "+str(af.c)+" "+str(af.d)+" "+str(af.tx)+" "+str(af.ty)

af = af.Scale( 1, -1 )

MsgBox str(af.A)+" "+str(af.b)+" "+str(af.c)+" "+str(af.d)+" "+str(af.tx)+" "+str(af.ty)

af = af.Translate( 0, 100 )

MsgBox str(af.A)+" "+str(af.b)+" "+str(af.c)+" "+str(af.d)+" "+str(af.tx)+" "+str(af.ty)

dim r1 as CGRectMBS
dim r2 as CGRectMBS

r1=CGMakeRectMBS(100,100,100,100)

r2=r1.ApplyAffineTransform(af)

MsgBox "("+str(r1.Left)+", "+str(r1.top)+", "+str(r1.width)+", "+str(r1.height)+") => ("+str(r2.Left)+", "+str(r2.top)+", "+str(r2.width)+", "+str(r2.height)+")"
  • 7 properties
    • property A as Double
    • property B as Double
    • property C as Double
    • property D as Double
    • property StringValue as String
    • property TX as Double
    • property TY as Double
  • 15 methods
    • method Binary as MemoryBlock
    • method Concat(t as CGAffineTransformMBS) as CGAffineTransformMBS
    • method Constructor
    • method Constructor(a as double, b as double, c as double, d as double, tx as double = 0.0, ty as double = 0.0)
    • method Constructor(p as Ptr)
    • method Constructor(transform as CGAffineTransformMBS)
    • method EqualToTransform(t as CGAffineTransformMBS) as boolean
    • method Invert as CGAffineTransformMBS
    • method IsIdentity as boolean
    • method Operator_Convert as String
    • method Operator_Multiply(other as CGAffineTransformMBS) as CGAffineTransformMBS
    • method Operator_MultiplyRight(other as CGAffineTransformMBS) as CGAffineTransformMBS
    • method Rotate(angle as Double) as CGAffineTransformMBS
    • method Scale(sx as Double, sy as Double) as CGAffineTransformMBS
    • method Translate(tx as Double, ty as Double) as CGAffineTransformMBS
  • 5 shared methods
    • shared method Identity as CGAffineTransformMBS
    • shared method Make(a as double, b as double, c as double, d as double, tx as double = 0.0, ty as double = 0.0) as CGAffineTransformMBS
    • shared method MakeRotation(angle as Double) as CGAffineTransformMBS
    • shared method MakeScale(sx as Double, sy as Double) as CGAffineTransformMBS
    • shared method MakeTranslation(tx as Double, ty as Double) as CGAffineTransformMBS

This class has no sub classes.

Some methods using this class:

Some properties using for this class:

Some examples using this class:

Blog Entries

Release notes


The items on this page are in the following plugins: MBS MacCG Plugin.


CFWriteStreamMBS   -   CGBitmapContextMBS


The biggest plugin in space...