Category : canvas

I need implement this feature: text keeps its current size when other elements scaling. I implement this based on the SVGMapView on github, it uses the surfaceview and sets matrix to the canvas. I add the following code to the draw method of the SVGMapLocationOverlay: textPaint.setColor(Color.BLACK); textPaint.setTextSize(80.0f*currentZoom); textPaint.setDither(true); canvas.drawText("Hello World!", goal[0], goal[1], textPaint); The "80.0f*currentZoom" ..

Read more

I searched the net a lot of time, to make a code like this: import android.app.Activity; import android.os.Bundle; import android.graphics.DrawFilter; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Canvas; import android.graphics.Paint; import android.view.View; import android.graphics.drawable.DrawableWrapper; import android.graphics.drawable.Drawable; import android.graphics.*; public class math_math extends DrawableWrapper { private final DrawFilter DRAW_FILTER = new PaintFlagsDrawFilter(Paint.FILTER_BITMAP_FLAG, 0); public math_math(Drawable wrapped) ..

Read more

I am trying to create a simple app where i can draw a signature over a pdf page that has been turned into a Bitmap. I’m successful on implementing the PDF feature but i’m having trouble implementing the SignaturePad feature in my app. When i draw on my SignaturePad view, it draws exactly where i ..

Read more