Examples of drawRect()


Examples of android.graphics.Canvas.drawRect()

        lImgView.setScaleType(ImageView.ScaleType.CENTER);
        lImgView.setPadding(0, 0, 0, 0);

        final Paint bck = new Paint();
        bck.setARGB(0xff, 0x80, 0x80, 0x80);
        lCanvas.drawRect(0, 0, width, height, bck);

        final Paint p = new Paint();
        p.setARGB(0xff, 0xff, 0x00, 0xff);
 
        mLinearLayout.addView(lImgView);
View Full Code Here

Examples of com.tinyline.tiny2d.Tiny2D.drawRect()

        int wH = daWidth(tile) >> 1;
        int hH = daHeight(tile) >> 1;
        int wQ = wH >> 1;
        int hQ = hH >> 1;
        t2d.drawRect(daAnchorX + wQ, daAnchorY + hQ, wH, hH);
    }

    void drawCross(final Tile tile, boolean black) {
        Tiny2D t2d = getT2D(tile);
        setT2DPureMark(t2d, tile, black);
View Full Code Here

Examples of com.trolltech.qt.gui.QPainter.drawRect()

                if (searchWord.startsWith("*"))
                  searchWord = searchWord.substring(1);
                if (searchWord.endsWith("*"))
                  searchWord = searchWord.substring(0,searchWord.length()-1);
                if (text.toLowerCase().contains(searchWord)) {
                  p2.drawRect(x,y,w,h);     
                }
              }
            }
          }
      }
View Full Code Here

Examples of java.awt.Graphics.drawRect()

        g.drawOval(p.getX() - 4, p.getY() - 4, 8, 8);
      } else if (stateMap.containsKey(e.state)) {
        CircuitState substate = stateMap.get(e.state);
        Component subcirc = substate.getSubcircuit();
        Bounds b = subcirc.getBounds();
        g.drawRect(b.getX(), b.getY(), b.getWidth(), b.getHeight());
      }
    }
    GraphicsUtil.switchToWidth(g, 1);
  }
 
View Full Code Here

Examples of java.awt.Graphics.drawRect()

      }
     
      g.setColor(color);
      g.fillRect(x, y, w - DEPTH, h - DEPTH);
      g.setColor(Color.BLACK);
      g.drawRect(x, y, w - DEPTH, h - DEPTH);
    } else {
      depress = 0;
      int[] xp = new int[] { x, x + w - DEPTH, x + w, x + w, x + DEPTH, x };
      int[] yp = new int[] { y, y, y + DEPTH, y + h, y + h, y + h - DEPTH };
      g.setColor(color.darker());
View Full Code Here

Examples of java.awt.Graphics.drawRect()

      g.setColor(color.darker());
      g.fillPolygon(xp, yp, xp.length);
      g.setColor(color);
      g.fillRect(x, y, w - DEPTH, h - DEPTH);
      g.setColor(Color.BLACK);
      g.drawRect(x, y, w - DEPTH, h - DEPTH);
      g.drawLine(x + w - DEPTH, y + h - DEPTH, x + w, y + h);
      g.drawPolygon(xp, yp, xp.length);
    }
   
    g.translate(depress, depress);
View Full Code Here

Examples of java.awt.Graphics.drawRect()

 
  protected abstract void paintIconShaped(InstancePainter painter);
 
  protected void paintIconRectangular(InstancePainter painter) {
    Graphics g = painter.getGraphics();
    g.drawRect(1, 2, 16, 16);
    if (negateOutput) g.drawOval(16, 8, 4, 4);
    String label = getRectangularLabel(painter.getAttributeSet());
    GraphicsUtil.drawCenteredText(g, label, 9, 8);
  }
View Full Code Here

Examples of java.awt.Graphics.drawRect()

    int len = (width + 3) / 4;

    Graphics g = painter.getGraphics();
    g.setColor(Color.RED);
    if (len > 4) {
      g.drawRect(bds.getX(), bds.getY() + 3, bds.getWidth(), 25);
    } else {
      int wid = 7 * len + 2;
      g.drawRect(bds.getX() + (bds.getWidth() - wid) / 2, bds.getY() + 4, wid, 15);
    }
    g.setColor(Color.BLACK);
View Full Code Here

Examples of java.awt.Graphics.drawRect()

    g.setColor(Color.RED);
    if (len > 4) {
      g.drawRect(bds.getX(), bds.getY() + 3, bds.getWidth(), 25);
    } else {
      int wid = 7 * len + 2;
      g.drawRect(bds.getX() + (bds.getWidth() - wid) / 2, bds.getY() + 4, wid, 15);
    }
    g.setColor(Color.BLACK);
  }

  @Override
View Full Code Here

Examples of java.awt.Graphics.drawRect()

  @Override
  public void paintIcon(ComponentDrawContext c, int x, int y) {
    Graphics g = c.getGraphics();
    g.fillRect(x + 2, y + 1, 9, 2);
    g.drawRect(x + 2, y + 3, 15, 12);
    g.setColor(Color.lightGray);
    g.drawLine(x + 4, y + 2, x + 8, y + 2);
    for (int y_offs = y + 6; y_offs < y + 15; y_offs += 3) {
      g.drawLine(x + 4, y_offs, x + 14, y_offs);
    }
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.