diff --git a/_0_-odbicieV.jpg b/_0_-odbicieV.jpg new file mode 100644 index 0000000..d224d0e Binary files /dev/null and b/_0_-odbicieV.jpg differ diff --git a/_0_-rotacja.jpg b/_0_-rotacja.jpg new file mode 100644 index 0000000..d2b30e1 Binary files /dev/null and b/_0_-rotacja.jpg differ diff --git a/_1_-odbicieV-odbicieH.jpg b/_1_-odbicieV-odbicieH.jpg new file mode 100644 index 0000000..5f8b7fb Binary files /dev/null and b/_1_-odbicieV-odbicieH.jpg differ diff --git a/_1_-rotacja-odbicieV.jpg b/_1_-rotacja-odbicieV.jpg new file mode 100644 index 0000000..d2b30e1 Binary files /dev/null and b/_1_-rotacja-odbicieV.jpg differ diff --git a/_2_-odbicieV-odbicieH-skala.jpg b/_2_-odbicieV-odbicieH-skala.jpg new file mode 100644 index 0000000..91cbda0 Binary files /dev/null and b/_2_-odbicieV-odbicieH-skala.jpg differ diff --git a/_2_-rotacja-odbicieV-odbicieH.jpg b/_2_-rotacja-odbicieV-odbicieH.jpg new file mode 100644 index 0000000..d2b30e1 Binary files /dev/null and b/_2_-rotacja-odbicieV-odbicieH.jpg differ diff --git a/_3_-odbicieV-odbicieH-skala-wygladzanie.jpg b/_3_-odbicieV-odbicieH-skala-wygladzanie.jpg new file mode 100644 index 0000000..7f4112c Binary files /dev/null and b/_3_-odbicieV-odbicieH-skala-wygladzanie.jpg differ diff --git a/_3_-rotacja-odbicieV-odbicieH-skala.jpg b/_3_-rotacja-odbicieV-odbicieH-skala.jpg new file mode 100644 index 0000000..f6215e1 Binary files /dev/null and b/_3_-rotacja-odbicieV-odbicieH-skala.jpg differ diff --git a/_4_-odbicieV-odbicieH-skala-wygladzanie-znieksztalcenie.jpg b/_4_-odbicieV-odbicieH-skala-wygladzanie-znieksztalcenie.jpg new file mode 100644 index 0000000..c3134ea Binary files /dev/null and b/_4_-odbicieV-odbicieH-skala-wygladzanie-znieksztalcenie.jpg differ diff --git a/_4_-rotacja-odbicieV-odbicieH-skala-wygladzanie.jpg b/_4_-rotacja-odbicieV-odbicieH-skala-wygladzanie.jpg new file mode 100644 index 0000000..f6215e1 Binary files /dev/null and b/_4_-rotacja-odbicieV-odbicieH-skala-wygladzanie.jpg differ diff --git a/_5_-rotacja-odbicieV-odbicieH-skala-wygladzanie-znieksztalcenie.jpg b/_5_-rotacja-odbicieV-odbicieH-skala-wygladzanie-znieksztalcenie.jpg new file mode 100644 index 0000000..3f375fc Binary files /dev/null and b/_5_-rotacja-odbicieV-odbicieH-skala-wygladzanie-znieksztalcenie.jpg differ diff --git a/_odbicieHp1.jpg b/_odbicieHp1.jpg new file mode 100644 index 0000000..0c1c05e Binary files /dev/null and b/_odbicieHp1.jpg differ diff --git a/_odbicieHp2.jpg b/_odbicieHp2.jpg new file mode 100644 index 0000000..fc36b0a Binary files /dev/null and b/_odbicieHp2.jpg differ diff --git a/_odbicieVp1.jpg b/_odbicieVp1.jpg new file mode 100644 index 0000000..d224d0e Binary files /dev/null and b/_odbicieVp1.jpg differ diff --git a/_odbicieVp2.jpg b/_odbicieVp2.jpg new file mode 100644 index 0000000..156b21a Binary files /dev/null and b/_odbicieVp2.jpg differ diff --git a/_rotacjap1.jpg b/_rotacjap1.jpg new file mode 100644 index 0000000..d2b30e1 Binary files /dev/null and b/_rotacjap1.jpg differ diff --git a/_rotacjap2.jpg b/_rotacjap2.jpg new file mode 100644 index 0000000..d2b30e1 Binary files /dev/null and b/_rotacjap2.jpg differ diff --git a/_skalap1.jpg b/_skalap1.jpg new file mode 100644 index 0000000..4c95e67 Binary files /dev/null and b/_skalap1.jpg differ diff --git a/_skalap2.jpg b/_skalap2.jpg new file mode 100644 index 0000000..0c22cde Binary files /dev/null and b/_skalap2.jpg differ diff --git a/_wygladzaniep1.jpg b/_wygladzaniep1.jpg new file mode 100644 index 0000000..bce6e1c Binary files /dev/null and b/_wygladzaniep1.jpg differ diff --git a/_wygladzaniep2.jpg b/_wygladzaniep2.jpg new file mode 100644 index 0000000..353477f Binary files /dev/null and b/_wygladzaniep2.jpg differ diff --git a/_znieksztalceniep1.jpg b/_znieksztalceniep1.jpg new file mode 100644 index 0000000..3707adf Binary files /dev/null and b/_znieksztalceniep1.jpg differ diff --git a/_znieksztalceniep2.jpg b/_znieksztalceniep2.jpg new file mode 100644 index 0000000..9b7ebc5 Binary files /dev/null and b/_znieksztalceniep2.jpg differ diff --git a/src/eu/finwe/obrazki/Util.java b/src/eu/finwe/obrazki/Util.java index 056d790..cc3aeb9 100644 --- a/src/eu/finwe/obrazki/Util.java +++ b/src/eu/finwe/obrazki/Util.java @@ -165,6 +165,20 @@ private static void kopiujW(final BufferedImage src, BufferedImage dst) * @param src obraz źródłowy * @return nowy obraz w tym samym modelu kolorów zawierający obraz oryginalny odbity poziomo */ + + public static BufferedImage zrotuj(final BufferedImage src) + { + BufferedImage ret = czystyObraz(src); + int w = src.getWidth(); + int h = src.getHeight(); + + Graphics2D g = ret.createGraphics(); + g.rotate(45); +// g.drawImage(src, 0, 0, w, h, +// w, 0, 0, h, null); + + return ret; + } public static BufferedImage odbijPoziomo(final BufferedImage src) { BufferedImage ret = czystyObraz(src); @@ -378,7 +392,7 @@ public static BufferedImage drukujNapisPD(BufferedImage im, String napis, */ public static enum typFiltra { - SKALUJ, ODBIJ_POZIOMO, ODBIJ_PIONOWO, OPISZ, MNOZ; + SKALUJ, ODBIJ_POZIOMO, ODBIJ_PIONOWO, ROTUJ, OPISZ, MNOZ; } @@ -419,6 +433,7 @@ public static BufferedImageOp dajFiltr(typFiltra typ, HashMap pa { case ODBIJ_PIONOWO: case ODBIJ_POZIOMO: + case ROTUJ: // te filtry się nie zmieniają, więc za każdym razem, jak ktoś // poprosi, to dostanie ten sam if (!gotoweFiltry.containsKey(typ)) @@ -616,6 +631,9 @@ public BufferedImage filter(BufferedImage src, BufferedImage dest) switch(this.typ) { + case ROTUJ: + ret = Util.zrotuj(src); + break; case ODBIJ_POZIOMO: ret = Util.odbijPoziomo(src); break; @@ -659,6 +677,7 @@ public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) // // ale w tym [laboratoryjnym] przypadku nie ma większego sensu + case ROTUJ: case ODBIJ_PIONOWO: case ODBIJ_POZIOMO: throw new UnsupportedOperationException("Destination " + @@ -709,7 +728,7 @@ public static void main(String args[]) // 3. NASZE odbicia op.put("odbicieV", Util.dajFiltr(Util.typFiltra.ODBIJ_PIONOWO, null)); op.put("odbicieH", Util.dajFiltr(Util.typFiltra.ODBIJ_POZIOMO, null)); - + op.put("rotacja", Util.dajFiltr(Util.typFiltra.ROTUJ, null)); // 4. NASZE skalowanie HashMap param = new HashMap();