Skip to content

Commit

Permalink
#46: Also override drawRect() and
Browse files Browse the repository at this point in the history
use a Rectangle with drawShape().
  • Loading branch information
rototor committed Sep 16, 2022
1 parent 1f801d8 commit 7cd93c7
Showing 1 changed file with 9 additions and 0 deletions.
Expand Up @@ -1481,6 +1481,7 @@ static <T> T throwException(Exception e)
throw new RuntimeException(e);
}

@Override
public void copyArea(int x, int y, int width, int height, int dx, int dy)
{
/*
Expand All @@ -1489,16 +1490,24 @@ public void copyArea(int x, int y, int width, int height, int dx, int dy)
throw new IllegalStateException("copyArea() not possible!");
}

@Override
public void drawLine(int x1, int y1, int x2, int y2)
{
draw(new Line2D.Double(x1, y1, x2, y2));
}

@Override
public void fillRect(int x, int y, int width, int height)
{
fill(new Rectangle(x, y, width, height));
}

@Override
public void drawRect(int x, int y, int width, int height)
{
draw(new Rectangle(x, y, width, height));
}

public void clearRect(int x, int y, int width, int height)
{
Paint p = paint;
Expand Down

0 comments on commit 7cd93c7

Please sign in to comment.