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

Commit 5e083024 authored by Xavier Ducrohet's avatar Xavier Ducrohet
Browse files

ADT/Layoutlib: shader clean-up.

Change-Id: I0a200f438b7ccde2bfc19fd23614a647cb19d312
parent d3026e16
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ public class BitmapShader extends Shader {
    }

    @Override
    Paint getPaint() {
    Paint getJavaPaint() {
        return null;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -126,7 +126,7 @@ public class Canvas extends _Original_Canvas {

        Shader shader = paint.getShader();
        if (shader != null) {
            java.awt.Paint shaderPaint = shader.getPaint();
            java.awt.Paint shaderPaint = shader.getJavaPaint();
            if (shaderPaint != null) {
                g.setPaint(shaderPaint);
            } else {
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ public class ComposeShader extends Shader {
    }

    @Override
    Paint getPaint() {
    Paint getJavaPaint() {
        return null;
    }
}
+5 −1
Original line number Diff line number Diff line
@@ -48,6 +48,8 @@ public class LinearGradient extends Shader {

        // FIXME implement multi color linear gradient
        if (colors.length == 2) {
            // The hasAlpha flag in Color() is only used to enforce alpha to 0xFF if false.
            // If true the alpha is read from the int.
            mGradientPaint = new GradientPaint(x0, y0, new Color(colors[0], true /* hasalpha */),
                    x1, y1, new Color(colors[1], true /* hasalpha */), tile != TileMode.CLAMP);
        }
@@ -66,6 +68,8 @@ public class LinearGradient extends Shader {
     */
    public LinearGradient(float x0, float y0, float x1, float y1, int color0, int color1,
            TileMode tile) {
        // The hasAlpha flag in Color() is only used to enforce alpha to 0xFF if false.
        // If true the alpha is read from the int.
        mGradientPaint = new GradientPaint(x0, y0, new Color(color0, true /* hasalpha */), x1, y1,
                new Color(color1, true /* hasalpha */), tile != TileMode.CLAMP);
    }
@@ -73,7 +77,7 @@ public class LinearGradient extends Shader {
    // ---------- Custom Methods

    @Override
    public Paint getPaint() {
    public Paint getJavaPaint() {
        return mGradientPaint;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public class RadialGradient extends Shader {
   }

    @Override
    Paint getPaint() {
    Paint getJavaPaint() {
        // TODO Auto-generated method stub
        return null;
    }
Loading