projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
457660f
)
2003/12/21 09:29:50
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 07:43:05 +0000
(07:43 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 07:43:05 +0000
(07:43 +0000)
darcs-hash:
20040130074305
-2ba56-
8bade0c08815f531f92374d642db4d410dfb5146
.gz
src/org/xwt/Box.java
patch
|
blob
|
history
diff --git
a/src/org/xwt/Box.java
b/src/org/xwt/Box.java
index
25dc935
..
a96383e
100644
(file)
--- a/
src/org/xwt/Box.java
+++ b/
src/org/xwt/Box.java
@@
-138,6
+138,8
@@
public final class Box extends JSScope implements Scheduler.Task {
private int fillcolor = 0x00000000;
private int strokecolor = 0xFF000000;
private int fillcolor = 0x00000000;
private int strokecolor = 0xFF000000;
+ private int aspect = 0;
+
// specified directly by user
public LENGTH minwidth = 0;
public LENGTH maxwidth = MAX_LENGTH;
// specified directly by user
public LENGTH minwidth = 0;
public LENGTH maxwidth = MAX_LENGTH;
@@
-349,6
+351,7
@@
public final class Box extends JSScope implements Scheduler.Task {
if ((fillcolor & 0xFF000000) != 0x00000000)
buf.fillTrapezoid(globalx, globalx + width, globaly, globalx, globalx + width, globaly + height, fillcolor);
if ((fillcolor & 0xFF000000) != 0x00000000)
buf.fillTrapezoid(globalx, globalx + width, globaly, globalx, globalx + width, globaly + height, fillcolor);
+ // FIXME: do aspect in here
if (texture != null && texture.isLoaded)
for(int x = globalx; x < cx2; x += texture.width)
for(int y = globaly; y < cy2; y += texture.height)
if (texture != null && texture.isLoaded)
for(int x = globalx; x < cx2; x += texture.width)
for(int y = globaly; y < cy2; y += texture.height)
@@
-413,6
+416,7
@@
public final class Box extends JSScope implements Scheduler.Task {
case "shrink": return B(test(HSHRINK) || test(VSHRINK));
case "hshrink": return B(test(HSHRINK));
case "vshrink": return B(test(VSHRINK));
case "shrink": return B(test(HSHRINK) || test(VSHRINK));
case "hshrink": return B(test(HSHRINK));
case "vshrink": return B(test(VSHRINK));
+ case "aspect": return N(aspect);
case "x": return (parent == null || !test(VISIBLE)) ? N(0) : N(x);
case "y": return (parent == null || !test(VISIBLE)) ? N(0) : N(y);
case "width": return N(width);
case "x": return (parent == null || !test(VISIBLE)) ? N(0) : N(x);
case "y": return (parent == null || !test(VISIBLE)) ? N(0) : N(y);
case "width": return N(width);
@@
-469,6
+473,7
@@
public final class Box extends JSScope implements Scheduler.Task {
case "noclip": CHECKSET_FLAG(NOCLIP); if (parent == null) dirty(); else parent.dirty();
case "visible": CHECKSET_FLAG(VISIBLE); dirty(); MARK_RESIZE; dirty();
case "packed": CHECKSET_FLAG(PACKED); MARK_REPACK_parent;
case "noclip": CHECKSET_FLAG(NOCLIP); if (parent == null) dirty(); else parent.dirty();
case "visible": CHECKSET_FLAG(VISIBLE); dirty(); MARK_RESIZE; dirty();
case "packed": CHECKSET_FLAG(PACKED); MARK_REPACK_parent;
+ case "aspect": CHECKSET_INT(aspect); DIRTY;
case "globalx": put("x", N(globalToLocalX(toInt(value))));
case "globaly": put("y", N(globalToLocalY(toInt(value))));
case "align": clear(ALIGNS); setAlign(value == null ? "center" : value); MARK_RESIZE;
case "globalx": put("x", N(globalToLocalX(toInt(value))));
case "globaly": put("y", N(globalToLocalY(toInt(value))));
case "align": clear(ALIGNS); setAlign(value == null ? "center" : value); MARK_RESIZE;