summaryrefslogtreecommitdiffstats
path: root/core/jni/android/graphics/PathEffect.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/jni/android/graphics/PathEffect.cpp')
-rw-r--r--core/jni/android/graphics/PathEffect.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/core/jni/android/graphics/PathEffect.cpp b/core/jni/android/graphics/PathEffect.cpp
index cfa9ce4..0503614 100644
--- a/core/jni/android/graphics/PathEffect.cpp
+++ b/core/jni/android/graphics/PathEffect.cpp
@@ -19,12 +19,12 @@ public:
SkPathEffect* outer, SkPathEffect* inner) {
return new SkComposePathEffect(outer, inner);
}
-
+
static SkPathEffect* Sum_constructor(JNIEnv* env, jobject,
SkPathEffect* first, SkPathEffect* second) {
return new SkSumPathEffect(first, second);
}
-
+
static SkPathEffect* Dash_constructor(JNIEnv* env, jobject,
jfloatArray intervalArray, float phase) {
AutoJavaFloatArray autoInterval(env, intervalArray);
@@ -32,30 +32,30 @@ public:
float* values = autoInterval.ptr();
SkAutoSTMalloc<32, SkScalar> storage(count);
- SkScalar* intervals = storage.get();
+ SkScalar* intervals = storage.get();
for (int i = 0; i < count; i++) {
intervals[i] = SkFloatToScalar(values[i]);
}
return new SkDashPathEffect(intervals, count, SkFloatToScalar(phase));
}
-
+
static SkPathEffect* OneD_constructor(JNIEnv* env, jobject,
const SkPath* shape, float advance, float phase, int style) {
SkASSERT(shape != NULL);
return new SkPath1DPathEffect(*shape, SkFloatToScalar(advance),
SkFloatToScalar(phase), (SkPath1DPathEffect::Style)style);
}
-
+
static SkPathEffect* Corner_constructor(JNIEnv* env, jobject, float radius){
return new SkCornerPathEffect(SkFloatToScalar(radius));
}
-
+
static SkPathEffect* Discrete_constructor(JNIEnv* env, jobject,
float length, float deviation) {
return new SkDiscretePathEffect(SkFloatToScalar(length),
SkFloatToScalar(deviation));
}
-
+
};
////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -95,11 +95,10 @@ static JNINativeMethod gDiscretePathEffectMethods[] = {
SK_ARRAY_COUNT(array)); \
if (result < 0) return result
-int register_android_graphics_PathEffect(JNIEnv* env);
int register_android_graphics_PathEffect(JNIEnv* env)
{
int result;
-
+
REG(env, "android/graphics/PathEffect", gPathEffectMethods);
REG(env, "android/graphics/ComposePathEffect", gComposePathEffectMethods);
REG(env, "android/graphics/SumPathEffect", gSumPathEffectMethods);
@@ -107,7 +106,6 @@ int register_android_graphics_PathEffect(JNIEnv* env)
REG(env, "android/graphics/PathDashPathEffect", gPathDashPathEffectMethods);
REG(env, "android/graphics/CornerPathEffect", gCornerPathEffectMethods);
REG(env, "android/graphics/DiscretePathEffect", gDiscretePathEffectMethods);
-
+
return 0;
}
-