Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71e806b2 authored by Tenghui Zhu's avatar Tenghui Zhu Committed by Android (Google) Code Review
Browse files

Merge "Add fillType support to VectorDrawable" into nyc-dev

parents 495defd7 46591f4a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -559,6 +559,7 @@ package android {
    field public static final int fillBefore = 16843196; // 0x10101bc
    field public static final int fillColor = 16843780; // 0x1010404
    field public static final int fillEnabled = 16843343; // 0x101024f
    field public static final int fillType = 16844064; // 0x1010520
    field public static final int fillViewport = 16843130; // 0x101017a
    field public static final int filter = 16843035; // 0x101011b
    field public static final int filterTouchesWhenObscured = 16843460; // 0x10102c4
+1 −0
Original line number Diff line number Diff line
@@ -654,6 +654,7 @@ package android {
    field public static final int fillBefore = 16843196; // 0x10101bc
    field public static final int fillColor = 16843780; // 0x1010404
    field public static final int fillEnabled = 16843343; // 0x101024f
    field public static final int fillType = 16844064; // 0x1010520
    field public static final int fillViewport = 16843130; // 0x101017a
    field public static final int filter = 16843035; // 0x101011b
    field public static final int filterTouchesWhenObscured = 16843460; // 0x10102c4
+1 −0
Original line number Diff line number Diff line
@@ -559,6 +559,7 @@ package android {
    field public static final int fillBefore = 16843196; // 0x10101bc
    field public static final int fillColor = 16843780; // 0x1010404
    field public static final int fillEnabled = 16843343; // 0x101024f
    field public static final int fillType = 16844064; // 0x1010520
    field public static final int fillViewport = 16843130; // 0x101017a
    field public static final int filter = 16843035; // 0x101011b
    field public static final int filterTouchesWhenObscured = 16843460; // 0x10102c4
+3 −3
Original line number Diff line number Diff line
@@ -78,11 +78,11 @@ static jlong createFullPath(JNIEnv*, jobject, jlong srcFullPathPtr) {
static void updateFullPathPropertiesAndStrokeStyles(JNIEnv*, jobject, jlong fullPathPtr,
        jfloat strokeWidth, jint strokeColor, jfloat strokeAlpha, jint fillColor, jfloat fillAlpha,
        jfloat trimPathStart, jfloat trimPathEnd, jfloat trimPathOffset, jfloat strokeMiterLimit,
        jint strokeLineCap, jint strokeLineJoin) {
        jint strokeLineCap, jint strokeLineJoin, jint fillType) {
    VectorDrawable::FullPath* fullPath = reinterpret_cast<VectorDrawable::FullPath*>(fullPathPtr);
    fullPath->updateProperties(strokeWidth, strokeColor, strokeAlpha, fillColor, fillAlpha,
            trimPathStart, trimPathEnd, trimPathOffset, strokeMiterLimit, strokeLineCap,
            strokeLineJoin);
            strokeLineJoin, fillType);
}

static void updateFullPathFillGradient(JNIEnv*, jobject, jlong pathPtr, jlong fillGradientPtr) {
@@ -331,7 +331,7 @@ static const JNINativeMethod gMethods[] = {
        {"nDraw", "(JJJLandroid/graphics/Rect;ZZ)V", (void*)draw},
        {"nCreateFullPath", "!()J", (void*)createEmptyFullPath},
        {"nCreateFullPath", "!(J)J", (void*)createFullPath},
        {"nUpdateFullPathProperties", "!(JFIFIFFFFFII)V", (void*)updateFullPathPropertiesAndStrokeStyles},
        {"nUpdateFullPathProperties", "!(JFIFIFFFFFIII)V", (void*)updateFullPathPropertiesAndStrokeStyles},
        {"nUpdateFullPathFillGradient", "!(JJ)V", (void*)updateFullPathFillGradient},
        {"nUpdateFullPathStrokeGradient", "!(JJ)V", (void*)updateFullPathStrokeGradient},
        {"nGetFullPathProperties", "(J[BI)Z", (void*)getFullPathProperties},
+6 −0
Original line number Diff line number Diff line
@@ -5876,6 +5876,12 @@ i
        </attr>
        <!-- sets the Miter limit for a stroked path -->
        <attr name="strokeMiterLimit" format="float"/>
        <!-- sets the fillType for a path. It is the same as SVG's "fill-rule" properties.
             For more details, see https://www.w3.org/TR/SVG/painting.html#FillRuleProperty -->
        <attr name="fillType" format="enum">
            <enum name="nonZero" value="0"/>
            <enum name="evenOdd" value="1"/>
        </attr>
    </declare-styleable>

    <!-- Defines the clip path used in VectorDrawables. -->
Loading