mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
sil ic alpha rendering
This commit is contained in:
Binary file not shown.
@@ -97,6 +97,7 @@ public class SIL_IC extends AbstractTransparentComponent<String> {
|
|||||||
public SIL_IC() {
|
public SIL_IC() {
|
||||||
super();
|
super();
|
||||||
updateControlPoints();
|
updateControlPoints();
|
||||||
|
alpha = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty
|
@EditableProperty
|
||||||
@@ -282,13 +283,6 @@ public class SIL_IC extends AbstractTransparentComponent<String> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Area mainArea = getBody()[0];
|
Area mainArea = getBody()[0];
|
||||||
Composite oldComposite = g2d.getComposite();
|
|
||||||
if (alpha < MAX_ALPHA) {
|
|
||||||
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1f * alpha / MAX_ALPHA));
|
|
||||||
}
|
|
||||||
g2d.setColor(outlineMode ? Constants.TRANSPARENT_COLOR : getBodyColor());
|
|
||||||
g2d.fill(mainArea);
|
|
||||||
g2d.setComposite(oldComposite);
|
|
||||||
|
|
||||||
if (!outlineMode) {
|
if (!outlineMode) {
|
||||||
int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2;
|
int pinSize = (int) PIN_SIZE.convertToPixels() / 2 * 2;
|
||||||
@@ -300,6 +294,14 @@ public class SIL_IC extends AbstractTransparentComponent<String> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Composite oldComposite = g2d.getComposite();
|
||||||
|
if (alpha < MAX_ALPHA) {
|
||||||
|
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 1f * alpha / MAX_ALPHA));
|
||||||
|
}
|
||||||
|
g2d.setColor(outlineMode ? Constants.TRANSPARENT_COLOR : getBodyColor());
|
||||||
|
g2d.fill(mainArea);
|
||||||
|
g2d.setComposite(oldComposite);
|
||||||
|
|
||||||
Color finalBorderColor;
|
Color finalBorderColor;
|
||||||
if (outlineMode) {
|
if (outlineMode) {
|
||||||
Theme theme =
|
Theme theme =
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user