Rename pixels to points

This commit is contained in:
David Hart
2017-02-03 20:46:12 +01:00
parent b5c2b09780
commit 9f192b0372
17 changed files with 186 additions and 165 deletions

View File

@@ -14,7 +14,7 @@ import com.facebook.proguard.annotations.DoNotStrip;
@DoNotStrip
public interface YogaBaselineFunction {
/**
* Return the baseline of the node in pixels. When no baseline function is set the baseline
* Return the baseline of the node in points. When no baseline function is set the baseline
* default to the computed height of the node.
*/
@DoNotStrip

View File

@@ -14,7 +14,7 @@ import com.facebook.proguard.annotations.DoNotStrip;
@DoNotStrip
public enum YogaUnit {
UNDEFINED(0),
PIXEL(1),
POINT(1),
PERCENT(2);
private int mIntValue;
@@ -30,7 +30,7 @@ public enum YogaUnit {
public static YogaUnit fromInt(int value) {
switch (value) {
case 0: return UNDEFINED;
case 1: return PIXEL;
case 1: return POINT;
case 2: return PERCENT;
default: throw new IllegalArgumentException("Unknown enum value: " + value);
}

View File

@@ -14,7 +14,7 @@ import com.facebook.proguard.annotations.DoNotStrip;
@DoNotStrip
public class YogaValue {
static final YogaValue UNDEFINED = new YogaValue(YogaConstants.UNDEFINED, YogaUnit.UNDEFINED);
static final YogaValue ZERO = new YogaValue(0, YogaUnit.PIXEL);
static final YogaValue ZERO = new YogaValue(0, YogaUnit.POINT);
public final float value;
public final YogaUnit unit;