예제 #1
0
  protected void generateBrushCursorScaled(float scale) {
    BufferedImage outlineSource = brush.getScaledImage();
    int w = (int) Math.max(scale * outlineSource.getWidth(), 1);
    int h = (int) Math.max(scale * outlineSource.getHeight(), 1);
    BufferedImage outlineSourceScaled = new BufferedImage(w, h, outlineSource.getType());

    Graphics2D g = (Graphics2D) outlineSourceScaled.getGraphics();
    g.drawImage(outlineSource, 0, 0, w, h, null);
    g.dispose();
    lastScale = scale;
    brushCursorScaled = OutlineUtil.generateOutline(outlineSourceScaled, Color.BLACK, true);
  }
예제 #2
0
 protected void generateBrushCursor() {
   brushCursorOriginal = OutlineUtil.generateOutline(brush.getScaledImage(), Color.BLACK, false);
   generateBrushCursorScaled(lastScale);
 }