Examples of PGraphicsJava2D


Examples of processing.core.PGraphicsJava2D

    buff.g2.draw(roundRect);
  }

  public static synchronized void drawVerticalGradientRect(MenuItem item, float x, float y, float width, float height)
  {
    PGraphicsJava2D buff = item.menu.buff;
    StyleSet style = item.menu.style;
    Menu menu = item.menu;

    roundRect.setRoundRect(x, y, width, height, style.roundOff,
        style.roundOff);
View Full Code Here

Examples of processing.core.PGraphicsJava2D

  static RenderingHints rh;
  static void preDraw(MenuItem item)
  {
    Menu menu = item.menu;
    StyleSet style = menu.style;
    PGraphicsJava2D buff = item.menu.buff;
    rh = menu.buff.g2.getRenderingHints();
    buff.g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
        RenderingHints.VALUE_ANTIALIAS_ON);
    buff.g2.setPaint(style.strokeColor);
    buff.g2.setStroke(style.stroke);
View Full Code Here

Examples of processing.core.PGraphicsJava2D

  }
 
  public static synchronized void drawDoubleGradientRect(MenuItem item,
      float x, float y, float width, float height)
  {
    PGraphicsJava2D buff = item.menu.buff;
    StyleSet style = item.menu.style;
    Menu menu = item.menu;
 
    roundRect.setRoundRect(x,y,width,height, style.roundOff,
        style.roundOff);
View Full Code Here

Examples of processing.core.PGraphicsJava2D

  static void setRenderingHints(PApplet p)
  {
    if (p.g instanceof PGraphicsJava2D)
    {
      PGraphicsJava2D pg = (PGraphicsJava2D) p.g;
      Graphics2D g2 = pg.g2;
      g2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
      g2.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS, RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    }
  }
View Full Code Here

Examples of processing.core.PGraphicsJava2D

   */
  public static void setMatrix(PApplet p)
  {
    if (isJava2D(p))
    {
      PGraphicsJava2D g = (PGraphicsJava2D) p.g;
      AffineTransform tr = g.g2.getTransform();
      try
      {
        affineToPMatrix(tr, modelview);
        // tr.invert();
View Full Code Here

Examples of processing.core.PGraphicsJava2D

    EventManager.instance.add(this);
  }

  PGraphicsJava2D createBuffer(int w, int h)
  {
    PGraphicsJava2D asdf = (PGraphicsJava2D) canvas.createGraphics(w, h,
        PApplet.JAVA2D);
    return asdf;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.