-
Notifications
You must be signed in to change notification settings - Fork 0
Using Rotation
Gökdeniz edited this page Dec 30, 2018
·
2 revisions
I believe it is easy to understand it from this example:
create an image with width 256 and height 256 with background color black
create new image text with id "test" with content "0 degree"
set size of "test" to 30
set font of "test" to "Comic Sans MS"
set {_textWidth} to width of "test"
set {_textHeight} to height of "test"
write image text with id "test" on the image at location (128 - {_textWidth} / 2), (128 - {_textHeight} / 2)
set content of "test" to "20 degree"
write image text with id "test" on the image at location (128 - {_textWidth} / 2), (128 - {_textHeight} / 2) with rotation 20 degree angle
set content of "test" to "90 degree"
write image text with id "test" on the image at location (128 - {_textWidth} / 2), (128 - {_textHeight} / 2) with rotation 90 degree angle
set content of "test" to "-45 degree"
write image text with id "test" on the image at location (128 - {_textWidth} / 2), (128 - {_textHeight} / 2) with rotation -45 degree angle
PNG
GIF
create an image with width 512 and height 512 with background color black
draw circle with radius 5 and color light green on the image at location 256, 256
Preview
At the distance we want from the dot
create an image with width 512 and height 512 with background color black
draw circle with radius 5 and color light green on the image at location 256, 256
create new image text with id "test" with content "imagesk"
set size of "test" to 30
set font of "test" to "Comic Sans MS"
set {_textWidth} to width of "test"
set {_textHeight} to height of "test"
write image text with id "test" on the image at location 300, (256 - {_textHeight}) - 10
draw line with width 10 on the image from location 300, 256 to (300 + {_textWidth}), 256
Preview
Actually we will not rotate it only one time, we will loop the 0, 45, 90, 135, 180, 225, 270 and 315
angles, rotate it using the angle, draw it.
create an image with width 512 and height 512 with background color black
draw circle with radius 5 and color light green on the image at location 256, 256
create new image text with id "test" with content "imagesk"
set size of "test" to 30
set font of "test" to "Comic Sans MS"
set {_textWidth} to width of "test"
set {_textHeight} to height of "test"
loop 0, 45, 90, 135, 180, 225, 270 and 315:
write image text with id "test" on the image at location 300, (256 - {_textHeight}) - 10 with rotation loop-number degree using origin location 256, 256
draw line with width 10 with rotation loop-number degree using origin location 256, 256 on the image from location 300, 256 to (300 + {_textWidth}), 256
(we used location of the green dot as the origin location)
- Create Image
- Get Image
- Save Image
- Create Image Text
- Write Text
- Resize/Scale Image
- Get Image Part
- Draw Image
- Draw Line
- Draw Rectangle
- Draw Rounded Rectangle
- Draw Oval
- Draw Circle
- Draw Polygon
- Bucket Fill
- Make Image Rounded
- Make Mask
- Register Font
- Upload Image to Discord
- Create Discord Emote