use of android.graphics.Shader_Delegate in project android_frameworks_base by crdroidandroid.
the class GcSnapshot method setShader.
private boolean setShader(Graphics2D g, Paint_Delegate paint) {
Shader_Delegate shaderDelegate = paint.getShader();
if (shaderDelegate != null) {
if (shaderDelegate.isSupported()) {
java.awt.Paint shaderPaint = shaderDelegate.getJavaPaint();
assert shaderPaint != null;
if (shaderPaint != null) {
g.setPaint(shaderPaint);
return true;
}
} else {
Bridge.getLog().fidelityWarning(LayoutLog.TAG_SHADER, shaderDelegate.getSupportMessage(), null, /*throwable*/
null);
}
}
// if no shader, use the paint color
g.setColor(new Color(paint.getColor(), true));
return false;
}
Aggregations