[darwin, android] SDK bindings for circle-stroke properties
This commit is contained in:
@@ -196,6 +196,52 @@ public class CircleLayer extends Layer {
|
||||
return (PropertyValue<String>) new PropertyValue(nativeGetCirclePitchScale());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the CircleStrokeWidth property
|
||||
*
|
||||
* @return property wrapper value around Float
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public PropertyValue<Float> getCircleStrokeWidth() {
|
||||
return (PropertyValue<Float>) new PropertyValue(nativeGetCircleStrokeWidth());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the CircleStrokeColor property
|
||||
*
|
||||
* @return property wrapper value around String
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public PropertyValue<String> getCircleStrokeColor() {
|
||||
return (PropertyValue<String>) new PropertyValue(nativeGetCircleStrokeColor());
|
||||
}
|
||||
/**
|
||||
* The stroke color of the circle.
|
||||
*
|
||||
* @return int representation of a rgba string color
|
||||
* @throws RuntimeException thrown if property isn't a value
|
||||
*/
|
||||
@ColorInt
|
||||
public int getCircleStrokeColorAsInt() {
|
||||
PropertyValue<String> value = getCircleStrokeColor();
|
||||
if (value.isValue()) {
|
||||
return rgbaToColor(value.getValue());
|
||||
} else {
|
||||
throw new RuntimeException("circle-stroke-color was set as a Function");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the CircleStrokeOpacity property
|
||||
*
|
||||
* @return property wrapper value around Float
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public PropertyValue<Float> getCircleStrokeOpacity() {
|
||||
return (PropertyValue<Float>) new PropertyValue(nativeGetCircleStrokeOpacity());
|
||||
}
|
||||
|
||||
private native Object nativeGetCircleRadius();
|
||||
|
||||
private native Object nativeGetCircleColor();
|
||||
@@ -210,6 +256,12 @@ public class CircleLayer extends Layer {
|
||||
|
||||
private native Object nativeGetCirclePitchScale();
|
||||
|
||||
private native Object nativeGetCircleStrokeWidth();
|
||||
|
||||
private native Object nativeGetCircleStrokeColor();
|
||||
|
||||
private native Object nativeGetCircleStrokeOpacity();
|
||||
|
||||
|
||||
@Override
|
||||
protected native void finalize() throws Throwable;
|
||||
|
||||
@@ -871,6 +871,76 @@ public class PropertyFactory {
|
||||
return new PaintProperty<>("circle-pitch-scale", function);
|
||||
}
|
||||
|
||||
/**
|
||||
* The width of the circle's stroke. Strokes are placed outside of the "circle-radius".
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static Property<Float> circleStrokeWidth(Float value) {
|
||||
return new PaintProperty<>("circle-stroke-width", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The width of the circle's stroke. Strokes are placed outside of the "circle-radius".
|
||||
*
|
||||
* @param function a wrapper function for Float
|
||||
* @return property wrapper around a Float function
|
||||
*/
|
||||
public static Property<Function<Float>> circleStrokeWidth(Function<Float> function) {
|
||||
return new PaintProperty<>("circle-stroke-width", function);
|
||||
}
|
||||
|
||||
/**
|
||||
* The stroke color of the circle.
|
||||
*
|
||||
* @param value a int color value
|
||||
* @return property wrapper around String color
|
||||
*/
|
||||
public static Property<String> circleStrokeColor(@ColorInt int value) {
|
||||
return new PaintProperty<>("circle-stroke-color", colorToRgbaString(value));
|
||||
}
|
||||
|
||||
/**
|
||||
* The stroke color of the circle.
|
||||
*
|
||||
* @param value a String value
|
||||
* @return property wrapper around String
|
||||
*/
|
||||
public static Property<String> circleStrokeColor(String value) {
|
||||
return new PaintProperty<>("circle-stroke-color", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The stroke color of the circle.
|
||||
*
|
||||
* @param function a wrapper function for String
|
||||
* @return property wrapper around a String function
|
||||
*/
|
||||
public static Property<Function<String>> circleStrokeColor(Function<String> function) {
|
||||
return new PaintProperty<>("circle-stroke-color", function);
|
||||
}
|
||||
|
||||
/**
|
||||
* The opacity of the circle's stroke.
|
||||
*
|
||||
* @param value a Float value
|
||||
* @return property wrapper around Float
|
||||
*/
|
||||
public static Property<Float> circleStrokeOpacity(Float value) {
|
||||
return new PaintProperty<>("circle-stroke-opacity", value);
|
||||
}
|
||||
|
||||
/**
|
||||
* The opacity of the circle's stroke.
|
||||
*
|
||||
* @param function a wrapper function for Float
|
||||
* @return property wrapper around a Float function
|
||||
*/
|
||||
public static Property<Function<Float>> circleStrokeOpacity(Function<Float> function) {
|
||||
return new PaintProperty<>("circle-stroke-opacity", function);
|
||||
}
|
||||
|
||||
/**
|
||||
* The opacity at which the image will be drawn.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user