MCPcopy Create free account
hub / github.com/dumbledore/AlbiteREADER / getXonPage

Method getXonPage

src/org/albite/albite/BookCanvas.java:2322–2341  ·  view source on GitHub ↗
(final int x, final int y)

Source from the content-addressed store, hash-verified

2320
2321 //#if !(TinyMode || TinyModeExport || LightMode || LightModeExport)
2322 private int getXonPage(final int x, final int y) {
2323 final int w = getWidth();
2324 final int h = getHeight();
2325
2326 switch (orientation) {
2327 case ORIENTATION_0:
2328 return x - currentMarginWidth;
2329
2330 case ORIENTATION_180:
2331 return w - x - currentMarginWidth;
2332
2333 case ORIENTATION_90:
2334 return y - currentMarginWidth;
2335
2336 case ORIENTATION_270:
2337 return h - y - currentMarginWidth;
2338 }
2339
2340 return x;
2341 }
2342
2343 private int getYonPage(final int x, final int y) {
2344 final int w = getWidth();

Callers 2

processPointerDraggedMethod · 0.95

Calls 2

getWidthMethod · 0.45
getHeightMethod · 0.45

Tested by

no test coverage detected