Move some System.err to Debugging.debugNote.
[SquirrelJME.git] / modules / midp-lcdui / src / main / java / cc / squirreljme / runtime / lcdui / scritchui / DisplayFloatScale.java
blob52640bc44e4887a48803392595d9ee24c08714a2
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;
18 /**
19 * Floating point scaling for displays.
21 * @since 2024/03/09
23 @SquirrelJMEVendorApi
24 public class DisplayFloatScale
25 extends DisplayScale
27 /** The base screen. */
28 @SquirrelJMEVendorApi
29 protected final ScritchScreenBracket screen;
31 /** The base window. */
32 @SquirrelJMEVendorApi
33 protected final ScritchWindowBracket window;
35 /** The scritch interface to use. */
36 @SquirrelJMEVendorApi
37 protected final ScritchInterface scritch;
39 /** Scaled target width. */
40 @SquirrelJMEVendorApi
41 private final int scaledW;
43 /** Scaled target height. */
44 @SquirrelJMEVendorApi
45 private final int scaledH;
47 /**
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.
57 * @since 2024/03/11
59 @SquirrelJMEVendorApi
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;
75 /**
76 * {@inheritDoc}
77 * @since 2024/05/12
79 @Override
80 @SquirrelJMEVendorApi
81 public boolean requiresBuffer()
83 return true;
86 /**
87 * {@inheritDoc}
88 * @since 2024/03/09
90 @Override
91 @SquirrelJMEVendorApi
92 public int screenX(int __x)
94 throw Debugging.todo();
97 /**
98 * {@inheritDoc}
99 * @since 2024/03/09
101 @Override
102 @SquirrelJMEVendorApi
103 public int screenY(int __y)
105 throw Debugging.todo();
109 * {@inheritDoc}
110 * @since 2024/03/18
112 @Override
113 @SquirrelJMEVendorApi
114 public int textureH()
116 return this.scaledH;
120 * {@inheritDoc}
121 * @since 2024/03/11
123 @Override
124 @SquirrelJMEVendorApi
125 public int textureMaxH()
127 return this.scaledH;
131 * {@inheritDoc}
132 * @since 2024/03/11
134 @Override
135 @SquirrelJMEVendorApi
136 public int textureMaxW()
138 return this.scaledW;
142 * {@inheritDoc}
143 * @since 2024/03/18
145 @Override
146 @SquirrelJMEVendorApi
147 public int textureW()
149 return this.scaledW;
153 * {@inheritDoc}
154 * @since 2024/03/09
156 @Override
157 @SquirrelJMEVendorApi
158 public int textureX(int __x)
160 throw Debugging.todo();
164 * {@inheritDoc}
165 * @since 2024/03/09
167 @Override
168 @SquirrelJMEVendorApi
169 public int textureY(int __y)
171 throw Debugging.todo();