Android Paint stroke width positioning

前端 未结 1 1220
栀梦
栀梦 2020-12-09 01:45

Given this code to draw a line:

Paint p;

p = new Paint(Paint.ANTI_ALIAS_FLAG);
p.setColor(android.graphics.Color.WHITE);
p.setStyle(Paint.Style.FILL);
p.set         


        
相关标签:
1条回答
  • 2020-12-09 02:16

    No you can't; the stroke is always centered. The only things you can control are:

    • stroke miter
    • stroke cap
    • stroke join
    • stroke width

    You must manually account for the stroke width when defining your drawing paths.

    0 讨论(0)
提交回复
热议问题