Tabnine Logo
PApplet.rotate
Code IndexAdd Tabnine to your IDE (free)

How to use
rotate
method
in
processing.core.PApplet

Best Java code snippets using processing.core.PApplet.rotate (Showing top 6 results out of 315)

origin: mirador/mirador

public void rotate(float angle) {
 intf.app.rotate(angle);
}
origin: mirador/mirador

public void rotate(float angle, float x, float y, float z) {
 intf.app.rotate(angle, x, y, z);
}
origin: ruby-processing/JRubyArt

/**
 * Rotate the parent sketch according to the quaternion
 *
 * @param q Quaternion
 */
public void applyQuaternion2Matrix(Quaternion q) {
  // instead of transforming q into a matrix and applying it...
  double[] aa = q.getValue();
  parent.rotate((float) aa[0], (float) aa[1], (float) aa[2], (float) aa[3]);
}
origin: ruby-processing/JRubyArt

applet.pushMatrix();
applet.translate(pX + pH / 2, pY + pW / 2);
applet.rotate(HALF_PI);
applet.text(Integer.toString((int) pValue), 0, 0 + labelSize / 2 - 2);
applet.popMatrix();
applet.textAlign(PConstants.RIGHT);
applet.translate(pX - numberSize / 2, pY);
applet.rotate(HALF_PI);
applet.text(String.format(lFormat, (int) vMax), 0, 0);
applet.popMatrix();
applet.textAlign(PConstants.LEFT);
applet.translate(pX - numberSize / 2, pY + pW);
applet.rotate(HALF_PI);
applet.text(String.format(lFormat, (int) vMin), 0, 0);
applet.popMatrix();
origin: ruby-processing/JRubyArt

@Override
void displayText() {
  String lFormat = "%d";
  if (displayLabel) {
    applet.fill(labelColor);
    applet.textSize(labelSize);
    applet.textAlign(PConstants.CENTER);
    applet.pushMatrix();
    applet.translate(pX + pH / 2, pY + pW / 2);
    applet.rotate(HALF_PI);
    applet.text(Integer.toString((int) pValue), 0, 0 + labelSize / 2 - 2);
    applet.popMatrix();
  }
  if (displayValue) {
    applet.textSize(numberSize);
    applet.fill(numbersColor);
    applet.pushMatrix();
    applet.textAlign(PConstants.RIGHT);
    applet.translate(pX - numberSize / 2, pY);
    applet.rotate(HALF_PI);
    applet.text(String.format(lFormat, (int) vMax), 0, 0);
    applet.popMatrix();
    applet.pushMatrix();
    applet.textAlign(PConstants.LEFT);
    applet.translate(pX - numberSize / 2, pY + pW);
    applet.rotate(HALF_PI);
    applet.text(String.format(lFormat, (int) vMin), 0, 0);
    applet.popMatrix();
  }
}
origin: ruby-processing/JRubyArt

applet.pushMatrix();
applet.translate(pX + pH / 2, pY + pW / 2);
applet.rotate(HALF_PI);
applet.text(Integer.toString((int) pValue), 0, 0 + labelSize / 2 - 2);
applet.popMatrix();
applet.textAlign(PConstants.RIGHT);
applet.translate(pX - numberSize / 2, pY);
applet.rotate(HALF_PI);
applet.text(String.format(lFormat, (int) vMax), 0, 0);
applet.popMatrix();
applet.textAlign(PConstants.LEFT);
applet.translate(pX - numberSize / 2, pY + pW);
applet.rotate(HALF_PI);
applet.text(String.format(lFormat, (int) vMin), 0, 0);
applet.popMatrix();
processing.corePAppletrotate

Javadoc

Two dimensional rotation.

Same as rotateZ (this is identical to a 3D rotation along the z-axis) but included for clarity. It'd be weird for people drawing 2D graphics to be using rotateZ. And they might kick our a-- for the confusion.

Additional background.

Popular methods of PApplet

  • constrain
  • createGraphics
    Create an offscreen graphics surface for drawing, in this case for a renderer that writes to a file
  • loadStrings
    ( begin auto-generated from loadStrings.xml ) Reads the contents of a file or url and creates a Stri
  • saveStrings
    ( begin auto-generated from saveStrings.xml ) Writes an array of strings to a file, one line per str
  • abs
  • createImage
    ( begin auto-generated from createImage.xml ) Creates a new PImage (the datatype for storing images)
  • createShape
  • createWriter
    ( begin auto-generated from createWriter.xml ) Creates a new file in the sketch folder, and a PrintW
  • loadImage
  • main
    main() method for running this class from the command line. Usage: PApplet [options] [s
  • max
  • parseInt
  • max,
  • parseInt,
  • random,
  • round,
  • split,
  • sqrt,
  • unhex,
  • arrayCopy,
  • ceil,
  • checkExtension

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • setContentView (Activity)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ImageIO (javax.imageio)
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now