HTML Canvas
HTML Canvas is an extension in PenguinMod. It was removed, but eventually returned with new blocks. When added, it appears as a lowercased version of the actual title (i.e. "html canvas"). It replaced the original extension, which had the same name.
The current extension has been removed for the time being.
Blocks
Livetests had a version of the extension with the same thumbnail, but more blocks, while the version that was shown in the editor was the legacy version. The livetests version was added to the editor after being re-added. Currently, the extension has 9 reporter blocks and 47 stack blocks, for a total of 56 blocks.
canvas::#0069c2 reporter
set width: (480) height: (360) of [canvas v]::#0069c2
set [compositing method v] of [canvas v] to [source over v]::#0069c2
get [compositing method v] of [canvas v]::#0069c2 reporter
set line dash to [[10, 10\]] on [canvas v]::#0069c2
clear canvas [canvas v]::#0069c2
clear area at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2
draw text [photos printed] at (0) (0) onto [canvas v]::#0069c2
draw text [photos printed] at (0) (0) with size cap (0) onto [canvas v]::#0069c2
draw text outline for [photos printed] at (0) (0) onto [canvas]::#0069c2
draw text outline for [photos printed] at (0) (0) with size cap (0) onto [canvas v]::#0069c2
draw rectangle at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2
draw rectangle outline at x: (0) y: (0) with width: (480) height: (360) on [canvas v]::#0069c2
preload image [https://studio.penguinmod.com/favicon.ico] as [preloaded image]::#0069c2
unload image [preloaded image]::#0069c2
get width of [preloaded image]::#0069c2 reporter
get height of [preloaded image]::#0069c2 reporter
draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) onto canvas [canvas v]::#0069c2
draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) width: (64) height: (64) pointed at: (90) onto canvas [canvas v]::#0069c2
draw image [https://studio.penguinmod.com/favicon.ico] at x: (0) y: (0) width: (64) height: (64) cropping from x: (0) y: (0) width: (100) height: (100) pointed at: (90) onto canvas [canvas]::#0069c2
begin path drawing on [canvas v]::#0069c2
move pen to x: (0) y: (0) on [canvas v]::#0069c2
add line going to x: (0) y: (0) on [canvas v]::#0069c2
- add arc going to x: () y: () on () with control points x: () y: () x: () y: () and radius ()
add a rectangle at x: (0) y: (0) with width: (10) height: (10) to [canvas v]::#0069c2
add a ellipse at x: (0) y: (0) with width: (10) height: (10) pointed towards (90) to [canvas v]::#0069c2
[sic]add a ellipse with starting rotation (0) and ending rotation (360) at x: (0) y: (0) with width: (10) height: (10) pointed towards (90) to [canvas v]::#0069c2
[sic]attempt to close any open path in [canvas v]::#0069c2
draw outline for current path in [canvas v]::#0069c2
draw fill for current path in [canvas v]::#0069c2
save [canvas v]'s transform::#0069c2
reset to [canvas v]'s saved transform::#0069c2
turn left (90) on [canvas v]::#0069c2
turn right (90) on [canvas v]::#0069c2
set rotation to (90) on [canvas v]::#0069c2
set translation X: (10) Y: (10) on [canvas v]::#0069c2
change translation X: (10) Y: (10) on [canvas v]::#0069c2
change X translation by (10) on [canvas v]::#0069c2
set X scaler to (50) on [canvas v]::#0069c2
change Y translation by (10) on [canvas v]::#0069c2
set Y translation by (50) on [canvas v]::#0069c2
[sic]change XY scaler by (10)% on [canvas v]::#0069c2
set XY scaler to (50)% on [canvas v]::#0069c2
change X scaler by (10)% on [canvas v]::#0069c2
set X scaler to (50)% on [canvas v]::#0069c2
change Y scaler by (50)% on [canvas v]::#0069c2
set Y scaler to (50)% on [canvas v]::#0069c2
clear transform in [canvas v]::#0069c2
set new transform [[1, 0, 0, 1, 0, 0\]] on [canvas v]::#0069c2
get current transform in [canvas v]::#0069c2 reporter
set this sprites costume to [canvas v]::#0069c2
[sic]get data URL of [canvas v]::#0069c2 reporter
get width of [canvas v]::#0069c2 reporter
get height of [canvas v]::#0069c2 reporter
get [width v] of text [bogos binted] when drawn to [canvas v]::#0069c2 reporter
Bugs
After the extension was re-added, the ability to rename and delete canvases was added, as well as the ability to make canvases for all sprites and sprite only. However, deleting doesn't work properly at the moment. When attempting to delete a canvas, the canvas either still appears, or the user is prevented from creating new canvases afterward (the latter is true if the () stage monitor is shown).
Trivia
- The blocks in this extension only appear until a canvas is created. This was also the case before it was removed.
- The options for renaming and deleting canvases can be seen when selecting a canvas dropdown, or when a canvas is right clicked. However, it says "variable" instead. This doesn't happen when creating a canvas.