From 22c2e81767eb661b51c59dc89fcc2f8178a2859f Mon Sep 17 00:00:00 2001 From: Student Date: Thu, 14 Mar 2019 10:02:11 +0100 Subject: [PATCH] Dodanie filtra FiltrDodajacyNapis --- src/eu/finwe/obrazki/Util.java | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/eu/finwe/obrazki/Util.java b/src/eu/finwe/obrazki/Util.java index 056d790..0755cd4 100644 --- a/src/eu/finwe/obrazki/Util.java +++ b/src/eu/finwe/obrazki/Util.java @@ -672,6 +672,34 @@ public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) + } + + static private class FiltrDodajacyNapis extends Filtr + { + private final typFiltra typ; + + public FiltrDodajacyNapis(typFiltra typ) { + this.typ = typ; + } + + @Override + public BufferedImage filter(BufferedImage src, BufferedImage dest) { + int odLewej=0; + int odGory=1; + BufferedImage tmp = Util.drukujNapisLG(src, "aa", null, Color.yellow, odLewej, odGory); + return tmp; + } + + @Override + public Rectangle2D getBounds2D(BufferedImage src) { + return src.getRaster().getBounds(); + } + + @Override + public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) { + return Filtr.getPoint2D_same(srcPt, dstPt); + } + }