1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // Multi-Phasic Applications: SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc
.squirreljme
.runtime
.lcdui
.scritchui
;
12 import cc
.squirreljme
.jvm
.mle
.scritchui
.ScritchInterface
;
13 import cc
.squirreljme
.jvm
.mle
.scritchui
.brackets
.ScritchScreenBracket
;
14 import cc
.squirreljme
.jvm
.mle
.scritchui
.brackets
.ScritchWindowBracket
;
15 import cc
.squirreljme
.runtime
.cldc
.annotation
.SquirrelJMEVendorApi
;
16 import cc
.squirreljme
.runtime
.cldc
.debug
.Debugging
;
19 * Floating point scaling for displays.
24 public class DisplayFloatScale
27 /** The base screen. */
29 protected final ScritchScreenBracket screen
;
31 /** The base window. */
33 protected final ScritchWindowBracket window
;
35 /** The scritch interface to use. */
37 protected final ScritchInterface scritch
;
39 /** Scaled target width. */
41 private final int scaledW
;
43 /** Scaled target height. */
45 private final int scaledH
;
48 * Initializes the scaling information.
50 * @param __scritch The ScritchUI interface to use.
51 * @param __screen The screen to access.
52 * @param __window The window to access.
53 * @param __scaledW The scaled width.
54 * @param __scaledH The scaled height.
55 * @throws IllegalArgumentException If the scale target is invalid.
56 * @throws NullPointerException On null arguments.
60 public DisplayFloatScale(ScritchInterface __scritch
,
61 ScritchScreenBracket __screen
,
62 ScritchWindowBracket __window
, int __scaledW
, int __scaledH
)
63 throws IllegalArgumentException
, NullPointerException
65 if (__scritch
== null || __screen
== null || __window
== null)
66 throw new NullPointerException("NARG");
68 this.scritch
= __scritch
;
69 this.screen
= __screen
;
70 this.window
= __window
;
71 this.scaledW
= __scaledW
;
72 this.scaledH
= __scaledH
;
81 public boolean requiresBuffer()
92 public int screenX(int __x
)
94 throw Debugging
.todo();
102 @SquirrelJMEVendorApi
103 public int screenY(int __y
)
105 throw Debugging
.todo();
113 @SquirrelJMEVendorApi
114 public int textureH()
124 @SquirrelJMEVendorApi
125 public int textureMaxH()
135 @SquirrelJMEVendorApi
136 public int textureMaxW()
146 @SquirrelJMEVendorApi
147 public int textureW()
157 @SquirrelJMEVendorApi
158 public int textureX(int __x
)
160 throw Debugging
.todo();
168 @SquirrelJMEVendorApi
169 public int textureY(int __y
)
171 throw Debugging
.todo();