Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added _0_-odbicieV.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _1_-odbicieV-odbicieH.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _2_-odbicieV-odbicieH-skala.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _3_-odbicieV-odbicieH-skala-wygladzanie.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _odbicieHp1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _odbicieHp2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _odbicieNICp1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _odbicieNICp2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _odbicieVp1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _odbicieVp2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _skalap1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _skalap2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _wygladzaniep1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _wygladzaniep2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _znieksztalceniep1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _znieksztalceniep2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 11 additions & 3 deletions src/eu/finwe/obrazki/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ public static BufferedImage odbijPoziomo(final BufferedImage src)
return ret;
}

public static BufferedImage odbijNic(final BufferedImage src)
{
BufferedImage ret = czystyObraz(src);

return ret;
}

/**
* Tworzy obraz odbity względem poziomej osi obrazu oryginalnego.
* Zwraca wynik jako nowy obraz.
Expand Down Expand Up @@ -378,7 +385,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, ODBIJ_NIC, OPISZ, MNOZ;
}


Expand Down Expand Up @@ -418,6 +425,7 @@ public static BufferedImageOp dajFiltr(typFiltra typ, HashMap<String, String> pa
switch(typ)
{
case ODBIJ_PIONOWO:
case ODBIJ_NIC:
case ODBIJ_POZIOMO:
// te filtry się nie zmieniają, więc za każdym razem, jak ktoś
// poprosi, to dostanie ten sam
Expand Down Expand Up @@ -658,7 +666,7 @@ public Point2D getPoint2D(Point2D srcPt, Point2D dstPt)
// BufferedImageOp x = new FiltrOdbijajacy(..., BufferedImage obraz);
//
// ale w tym [laboratoryjnym] przypadku nie ma większego sensu

case ODBIJ_NIC:
case ODBIJ_PIONOWO:
case ODBIJ_POZIOMO:
throw new UnsupportedOperationException("Destination " +
Expand Down Expand Up @@ -709,7 +717,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("odbicieNIC", Util.dajFiltr(Util.typFiltra.ODBIJ_NIC, null));

// 4. NASZE skalowanie
HashMap<String, String> param = new HashMap<String, String>();
Expand Down