DrawBot 3.112 Release


  • admin

    A new version is available:

    • The launch time is now at lightning speed!

    • Added a new keyword argument center for the rotate(), scale(), and skew() functions.

    The optional center argument will make the transformation be centered around the given point:

    rotate(20, center=(500, 500)) # rotate around (500, 500)
    rect(250, 250, 500, 500)
    

    Just for reference: the extra argument does the same as this example but is a lot more convenient:

    # define a center point
    centerX, centerY = 500, 500
    # translate to that center point
    translate(centerX, centerY)
    # do the transformation
    rotate(20)
    # translate back 
    translate(-centerX, -centerY)
    # draw something
    rect(250, 250, 500, 500)
    

    Download and Play!!!


Log in to reply