mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-15 19:41:36 +08:00
Return number of clipping polygons.
For metrics in editor.
This commit is contained in:
parent
a50ee49781
commit
7b40f0c4d0
@ -47,8 +47,8 @@ public class SkeletonClipping {
|
||||
private ClippingAttachment clipAttachment;
|
||||
private Array<FloatArray> clippingPolygons;
|
||||
|
||||
public void clipStart (Slot slot, ClippingAttachment clip) {
|
||||
if (clipAttachment != null) return;
|
||||
public int clipStart (Slot slot, ClippingAttachment clip) {
|
||||
if (clipAttachment != null) return 0;
|
||||
clipAttachment = clip;
|
||||
|
||||
int n = clip.getWorldVerticesLength();
|
||||
@ -61,6 +61,7 @@ public class SkeletonClipping {
|
||||
polygon.add(polygon.items[0]);
|
||||
polygon.add(polygon.items[1]);
|
||||
}
|
||||
return clippingPolygons.size;
|
||||
}
|
||||
|
||||
public void clipEnd (Slot slot) {
|
||||
|
||||
@ -908,7 +908,7 @@ public class SkeletonViewer extends ApplicationAdapter {
|
||||
if (os.contains("Windows")) dpiScale = Toolkit.getDefaultToolkit().getScreenResolution() / 96f;
|
||||
if (os.contains("OS X")) {
|
||||
Object object = Toolkit.getDefaultToolkit().getDesktopProperty("apple.awt.contentScaleFactor");
|
||||
if (object instanceof Float && ((Float)object).intValue() == 2) dpiScale = 2;
|
||||
if (object instanceof Float && ((Float)object).intValue() >= 2) dpiScale = 2;
|
||||
}
|
||||
if (dpiScale >= 2.0f) uiScale = 2;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user