mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-24 03:35:58 +00:00
Add stroke to draw tool color bar.
This commit is contained in:
committed by
Alex Hart
parent
9bd6ad36cc
commit
5fa1560a10
@@ -155,6 +155,11 @@ object HSVColorSlider {
|
||||
val radii: FloatArray = (1..8).map { 50f }.toFloatArray()
|
||||
val bounds = RectF()
|
||||
val clipPath = Path()
|
||||
val paint = Paint().apply {
|
||||
color = Color.WHITE
|
||||
style = Paint.Style.STROKE
|
||||
strokeWidth = ViewUtil.dpToPx(4).toFloat()
|
||||
}
|
||||
|
||||
return customizeOnDraw { wrapped, canvas ->
|
||||
canvas.save()
|
||||
@@ -164,6 +169,7 @@ object HSVColorSlider {
|
||||
clipPath.rewind()
|
||||
clipPath.addRoundRect(bounds, radii, Path.Direction.CW)
|
||||
|
||||
canvas.drawPath(clipPath, paint)
|
||||
canvas.clipPath(clipPath)
|
||||
wrapped.draw(canvas)
|
||||
canvas.restore()
|
||||
|
||||
Reference in New Issue
Block a user