public void drawWithoutTransform(Canvas canvas) { if (mode != null) { textPaint.setXfermode(mode.xfermode); borderPaint.setXfermode(mode.xfermode); } if (stroke != null) { canvas.drawTextOnPath(text, stroke.getPath(), 0.0F, 0.0F, textPaint); if (hasBorder) { canvas.drawTextOnPath(text, stroke.getPath(), 0.0F, 0.0F, borderPaint); } } }
private void readObject(ObjectInputStream objectinputstream) { try { stroke = (Stroke) objectinputstream.readObject(); text = (String) objectinputstream.readObject(); hasBorder = objectinputstream.readBoolean(); hasGradient = objectinputstream.readBoolean(); fillColor = objectinputstream.readInt(); gradientColor = objectinputstream.readInt(); mode = (com.socialin.android.brushlib.view.DrawingView.DrawingMode) objectinputstream.readObject(); styleData = objectinputstream.readObject(); invokeSecureMethod(styleData); init(); stroke.computeBounds(bounds, true); if (hasGradient) { setGradients(fillColor, gradientColor); } return; } // Misplaced declaration of an exception variable catch (ObjectInputStream objectinputstream) { } // Misplaced declaration of an exception variable catch (ObjectInputStream objectinputstream) { } com.socialin.android.d.b( TAG, new Object[] { (new StringBuilder("Got unexpected exception: ")) .append(objectinputstream.getMessage()) .toString() }); }
public void setGradients(int i, int j) { textPaint.getTextBounds(text, 0, text.length(), gradientBounds); gradientBounds.sort(); stroke.getPosTan(0.0F, points, null); textPaint.setShader( new LinearGradient( points[0], points[1] - bounds.height(), points[0], points[1], i, j, android.graphics.Shader.TileMode.CLAMP)); }
public void setStroke(Stroke stroke1) { stroke = stroke1; stroke1.computeBounds(bounds, true); }