public void scale(float x, float y) { checkMatrix(2); matrix.scale(x, y); }
/** * @param x percentage to scale the object in the x-axis * @param y percentage to scale the object in the y-axis * @param z percentage to scale the object in the z-axis */ public void scale(float x, float y, float z) { checkMatrix(3); matrix.scale(x, y, z); }
/** * @param x percentage to scale the object in the x-axis * @param y percentage to scale the object in the y-axis * @param z percentage to scale the object in the z-axis */ public void scale(float x, float y, float z) { checkMatrix(3); matrix.scale(x, y, z); }
public void scale(float x, float y) { checkMatrix(2); matrix.scale(x, y); }
/** * ( begin auto-generated from PShape_scale.xml ) * * Increases or decreases the size of a shape by expanding and contracting * vertices. Shapes always scale from the relative origin of their bounding * box. Scale values are specified as decimal percentages. For example, the * method call <b>scale(2.0)</b> increases the dimension of a shape by * 200%. Subsequent calls to the method multiply the effect. For example, * calling <b>scale(2.0)</b> and then <b>scale(1.5)</b> is the same as * <b>scale(3.0)</b>. This transformation is applied directly to the shape, * it's not refreshed each time <b>draw()</b> is run. * <br /><br /> * Using this method with the <b>z</b> parameter requires using the P3D * parameter in combination with size. * * ( end auto-generated ) * @webref pshape:method * @usage web_application * @brief Increases and decreases the size of a shape * @param s percentate to scale the object * @see PShape#rotate(float) * @see PShape#translate(float, float) * @see PShape#resetMatrix() */ public void scale(float s) { checkMatrix(2); // at least 2... matrix.scale(s); }
/** * ( begin auto-generated from PShape_scale.xml ) * * Increases or decreases the size of a shape by expanding and contracting * vertices. Shapes always scale from the relative origin of their bounding * box. Scale values are specified as decimal percentages. For example, the * method call <b>scale(2.0)</b> increases the dimension of a shape by * 200%. Subsequent calls to the method multiply the effect. For example, * calling <b>scale(2.0)</b> and then <b>scale(1.5)</b> is the same as * <b>scale(3.0)</b>. This transformation is applied directly to the shape, * it's not refreshed each time <b>draw()</b> is run. * <br /><br /> * Using this method with the <b>z</b> parameter requires using the P3D * parameter in combination with size. * * ( end auto-generated ) * @webref pshape:method * @usage web_application * @brief Increases and decreases the size of a shape * @param s percentate to scale the object * @see PShape#rotate(float) * @see PShape#translate(float, float) * @see PShape#resetMatrix() */ public void scale(float s) { checkMatrix(2); // at least 2... matrix.scale(s); }
matrix.scale(width/viewBox[2], height/viewBox[3]); matrix.translate(-viewBox[0], -viewBox[1]);