Skip to content
Open
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
35 changes: 35 additions & 0 deletions src/eu/finwe/obrazki/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,10 @@ public static enum typFiltra
SKALUJ, ODBIJ_POZIOMO, ODBIJ_PIONOWO, OPISZ, MNOZ;
}

public static enum typNicNierobienia {
NIEROBNIC, NIEROBABSOLUTNIENIC, ZROBCOS;
}


/*
* prywatna tablica mieszająca ułatwia przechowywanie niektórych,
Expand Down Expand Up @@ -674,6 +678,37 @@ public Point2D getPoint2D(Point2D srcPt, Point2D dstPt)

}

private static class FiltrNicNieRobiacy extends Filtr {

private final typNicNierobienia dlaChecy;

public FiltrNicNieRobiacy(typNicNierobienia dlaChecy) {
this.dlaChecy = dlaChecy;
}

@Override
public BufferedImage filter(BufferedImage src, BufferedImage dest) {
throw new UnsupportedOperationException("Not supported yet.");
}

@Override
public Rectangle2D getBounds2D(BufferedImage src) {
return src.getRaster().getBounds();
}

@Override
public Point2D getPoint2D(Point2D srcPt, Point2D dstPt) {

switch (dlaChecy) {
case NIEROBABSOLUTNIENIC:
case ZROBCOS:
return Filtr.getPoint2D_same(srcPt, dstPt);
default: return null;
}

}
}


/* Testowanie wybranych metod;
* klas zawierających metodę main() może być w projekcie dużo.
Expand Down