projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
renderOutline() and renderSymbol() now have access to visibleRegion
[Mograsim.git]
/
net.mograsim.logic.ui
/
src
/
net
/
mograsim
/
logic
/
ui
/
model
/
components
/
SubmodelComponent.java
diff --git
a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SubmodelComponent.java
b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SubmodelComponent.java
index
5e5d18a
..
a4fe1aa
100644
(file)
--- a/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SubmodelComponent.java
+++ b/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/SubmodelComponent.java
@@
-148,21
+148,21
@@
public abstract class SubmodelComponent extends GUIComponent
if (submodelAlpha != 0)
{
gc.setAlpha(submodelAlpha);
if (submodelAlpha != 0)
{
gc.setAlpha(submodelAlpha);
- renderer.render(tgc, visibleRegion.translate(
-posX, -posY
, 1 / submodelScale));
+ renderer.render(tgc, visibleRegion.translate(
posX / submodelScale, posY / submodelScale
, 1 / submodelScale));
}
if (labelAlpha != 0)
{
gc.setAlpha(labelAlpha);
}
if (labelAlpha != 0)
{
gc.setAlpha(labelAlpha);
- renderSymbol(gc);
+ renderSymbol(gc
, visibleRegion
);
}
conf.reset(gc);
// draw the outline after all other operations to make interface pins look better
}
conf.reset(gc);
// draw the outline after all other operations to make interface pins look better
- renderOutline(gc);
+ renderOutline(gc
, visibleRegion
);
}
}
- protected abstract void renderOutline(GeneralGC gc);
+ protected abstract void renderOutline(GeneralGC gc
, Rectangle visibleRegion
);
- protected abstract void renderSymbol(GeneralGC gc);
+ protected abstract void renderSymbol(GeneralGC gc
, Rectangle visibleRegion
);
private static double map(double val, double valMin, double valMax, double mapMin, double mapMax)
{
private static double map(double val, double valMin, double valMax, double mapMin, double mapMax)
{