Examples of Rect


Examples of com.sun.jna.platform.win32.WinDef.RECT

        }, new LPARAM(0)).booleanValue());
    }
   
    @Test
    public final void testAdjustWindowRect() {
      RECT lpRect = new RECT();
      lpRect.left = 100;
      lpRect.top = 200;
      lpRect.bottom = 300;
      lpRect.right = 500;
     
View Full Code Here

Examples of de.yaams.rgssplayer.core.java.Rect

    if (alpha < 255.0D) {
      c = g.getComposite();
      g.setComposite(AlphaComposite.getInstance(3, (float) (alpha / 255.0D)));
    }

    Rect rect = text_size(str);

    height -= 3;
    width -= 6;

    if (align == 0) {
View Full Code Here

Examples of flash.swf.types.Rect

    else
      {
        height = configuration.defaultHeight();
      }

    size = new Rect(width * 20, height * 20);

        if ((configuration.scriptLimitsSet()))
        {
            scriptLimits = new ScriptLimits( configuration.getScriptRecursionLimit(),
                                             configuration.getScriptTimeLimit() );
View Full Code Here

Examples of fr.dz.swan.balises.graphic.Rect

public class Script {
  public static void main(String[] args) {
    ScriptEngineManager mgr = new ScriptEngineManager();
      ScriptEngine engine = mgr.getEngineByName("JavaScript");
      Rect rect = new Rect();
      engine.put("rectangle",rect);
     try {
     
      engine.eval("rectangle.setAttribute('x',32);");
     
      System.out.println(rect.getAttribute("x"));
    } catch (ScriptException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
View Full Code Here

Examples of graphics.common.Rect

    private class Get2D implements BoundingGet {
        @Override
        public Box get( double x, double y, double z,
                        double width, double height, double depth ) {
            return new Rect( x, y, width, height );
        }
View Full Code Here

Examples of jaron.gui.Rect

   * <code>draw</code> method of the Processing Development Environment. This
   * ensures that the slider is updated periodically.
   */
  public void draw() {
    // get the panel's rectangles for easy access
    Rect frame = panel.getFrame();
    Rect content = panel.getContent();
   
    // initialize the graphics environment
    applet.fill(Colors.GRAY_BACKGROUND);
    applet.stroke(Colors.STROKE);
    applet.strokeWeight(1);

    // draw the bounds frame
    applet.rect(frame.getLeft(), frame.getTop(), frame.getWidth(), frame.getHeight());
    // draw the content frame
    applet.rect(content.getLeft(), content.getTop(), content.getWidth(), content.getHeight());
    // draw the label's frame
    applet.rect(panel.labelBottom.getLeft(), panel.labelBottom.getTop(), panel.labelBottom.getWidth(), panel.labelBottom.getHeight());
    applet.rect(panel.labelRight.getLeft(), panel.labelRight.getTop(), panel.labelRight.getWidth(), panel.labelRight.getHeight());
   
    // draw the slider
View Full Code Here

Examples of jaron.gui.Rect

   * <code>draw</code> method of the Processing Development Environment. This
   * ensures that the joystick is updated periodically.
   */
  public void draw() {
    // get the panel's rectangles for easy access
    Rect frame = panel.getFrame();
    Rect content = panel.getContent();
   
    // initialize the graphics environment
    applet.fill(Colors.GRAY_BACKGROUND);
    applet.stroke(Colors.STROKE);
    applet.strokeWeight(1);

    // draw the bounds frame
    applet.rect(frame.getLeft(), frame.getTop(), frame.getWidth(), frame.getHeight());
    // draw the content frame
    applet.rect(content.getLeft(), content.getTop(), content.getWidth(), content.getHeight());
    // draw the label's frame
    applet.rect(panel.labelBottom.getLeft(), panel.labelBottom.getTop(), panel.labelBottom.getWidth(), panel.labelBottom.getHeight());
    applet.rect(panel.labelRight.getLeft(), panel.labelRight.getTop(), panel.labelRight.getWidth(), panel.labelRight.getHeight());
    // draw a closing line
    applet.line(frame.getLeft() + content.getWidth(), frame.getTop(), frame.getLeft() + content.getWidth(), frame.getTop() + frame.getHeight());
   
    // draw the control (stick)
    if (isMousePressed()) applet.fill(Colors.CONTROL_CLICKED);
    else if (isMouseOver()) applet.fill(Colors.CONTROL_MOUSE_OVER);
    else  applet.fill(Colors.CONTROL);
    double midX = getSignalX().getLow() + (getSignalX().getBandwidth() / 2);
    double valueX = (getSignalX().getValue() - midX);
    double maxSignalX = (getSignalX().getBandwidth()/2);
    double degX =  Math.toRadians(35 * valueX / maxSignalX);
    double x = Math.cos(degX) * control.getWidth();
    double offsetX = control.getWidth() - x;
    float centerX = content.getLeft() + (content.getWidth() / 2);
    if (degX < 0) offsetX = 0;
    double midY = getSignalY().getLow() + (getSignalY().getBandwidth() / 2);
    double valueY = (getSignalY().getValue() - midY);
    double maxSignalY = (getSignalY().getBandwidth()/2);
    double degY =  Math.toRadians(35 * valueY / maxSignalY);
    double y = Math.cos(degY) * control.getHeight();
    double offsetY = control.getHeight() - y;
    float centerY = content.getTop() + (content.getHeight() / 2);
    if (degY < 0) offsetY = 0;

    if (centerY > control.getTop() + (float )(offsetY + y)) {
      // bottom right
      applet.line(centerX, centerY, control.getLeft() + (float )(offsetX + x), control.getTop() + (float )(offsetY + y));
      // bottom left
      applet.line(centerX, centerY, control.getLeft() + (float )offsetX, control.getTop() + (float )(offsetY + y));
    }
    if (centerY < control.getTop()) {
      // top right
      applet.line(centerX, centerY, control.getLeft() + (float )offsetX, control.getTop() + (float )offsetY);
      // top left
      applet.line(centerX, centerY, control.getLeft() + (float )(offsetX + x), control.getTop() + (float )offsetY);
    }
    if (centerX > control.getLeft() + (float )(offsetX + x)) {
      // bottom right
      applet.line(centerX, centerY, control.getLeft() + (float )(offsetX + x), control.getTop() + (float )(offsetY + y));
      // top left
      applet.line(centerX, centerY, control.getLeft() + (float )(offsetX + x), control.getTop() + (float )offsetY);
    }
    if (centerX < control.getLeft()) {
      // bottom left
      applet.line(centerX, centerY, control.getLeft() + (float )offsetX, control.getTop() + (float )(offsetY + y));
      // top right
      applet.line(centerX, centerY, control.getLeft() + (float )offsetX, control.getTop() + (float )offsetY);
    }
    applet.rect(control.getLeft() + (float )offsetX, control.getTop() + (float )offsetY, (float )x, (float )y);

    // draw the bottom label (x-axis)
    applet.pushMatrix();
    applet.translate(panel.labelBottom.getLeft(), panel.labelBottom.getTop());
    // draw the label's text
    applet.fill(Colors.TEXT);
    applet.textFont(Fonts.getFontBold(applet), Fonts.FONT_SIZE);
    applet.textAlign(PApplet.LEFT);
    applet.text(labelX, Fonts.LINE_SPACING, Fonts.LINE_HEIGHT);
    // draw the label's value
    applet.textFont(Fonts.getFontPlain(applet), Fonts.FONT_SIZE);
    applet.textAlign(PApplet.RIGHT);
    applet.text(String.format("%1.2f", getValueX()), content.getWidth() - Fonts.LINE_SPACING, Fonts.LINE_HEIGHT);
    applet.popMatrix();

    // draw the right label (y-axis)
    applet.pushMatrix();
    applet.translate(panel.labelRight.getLeft(), panel.labelRight.getTop() + panel.labelRight.getHeight());
View Full Code Here

Examples of jaron.gui.Rect

   * @param width     the component's width
   */
  public Label(PApplet applet, String text, int left, int top, int width, int height) {
    this.applet = applet;
    this.text = text;
    frame = new Rect(left, top, width, height);
  }
View Full Code Here

Examples of jjil.core.Rect

                   imMask = (Gray8Image) image;
                   GrayConnComp gcc = new GrayConnComp();
                   gcc.push(imMask);
                   if (gcc.getComponents()> 0) {
                       // found a face
                       Rect r = gcc.getComponent(0);
                       // calculate center of face in mask coordinates
                       int x = r.getLeft() + r.getWidth() / 2;
                       int y = r.getTop() + r.getHeight() / 2;
                       // convert from mask to original image
                       x = (x * this.imInput.getWidth()) / imMask.getWidth();
                       y = (y * this.imInput.getHeight()) / imMask.getHeight();
                       // (x,y) is the center of the detected face
                   }
View Full Code Here

Examples of jjil.core.Rect

            nRight ++;
        }
        if (nLeft > nRight) {
          return null;
        }
        return new Rect(nLeft+r.getLeft(), r.getTop(), nRight-nLeft, r.getHeight());
    }
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.