ScalableCanvas

p5ex~ ScalableCanvas

(To be filled)

Constructor

new ScalableCanvas()

Source:

Members

aspectRatio

(To be filled)
Source:

nonScaledHeight

(To be filled)
Source:

nonScaledWidth

(To be filled)
Source:

scaleFactor

(To be filled)
Source:

Methods

cancelScale()

Runs scale() with the inversed scale factor.
Source:

getNonScaledValueOf(scaledLength)

Converts a length value on the scaled canvas to the non-scaled one. Typically used for interpreting mouseX and mouseY.
Source:
Parameters:
Name Type Description
scaledLength number scaled length value

resize(parameter)

(To be filled)
Source:
Parameters:
Name Type Description
parameter

scale()

Runs scale() of the current p5 instance for fitting the sketch to the current canvas. Should be called every frame before drawing objects on the canvas.
Source:

updateSize()

(To be filled)
Source: