I don't seem to be able to fill a clipped area with a transparent color.
if i clip a path for example:
and then try and fill it with a color.. Any color works:
mainDrawable.Initialize(Colors.Red, 0)
cvs.DrawDrawable(mainDrawable, mainRect)
But I can't fill it with transparent:
mainDrawable.Initialize(Colors.Transparent, 0)
cvs.DrawDrawable(mainDrawable, mainRect)
I need to erase an area within a clipped path. Say in the shape of a diamond, pentagon, hexagon....
Doing so with
cvs.DrawRect(mainRect, Colors.Transparent, True, 1)
or
cvs.DrawCircle(mainRect.CenterX, mainRect.CenterY, gridData.radius, Colors.Transparent, True, 1)
work fine for a square or a circle.
Any other ideas how to accomplish this within a irregular shaped clipped path?
if i clip a path for example:
B4X:
mainPath.Initialize(mainRect.CenterX, mainRect.Top)
mainPath.LineTo(mainRect.Right, mainRect.CenterY)
mainPath.LineTo(mainRect.CenterX, mainRect.Bottom)
mainPath.LineTo(mainRect.Left, mainRect.CenterY
mainPath.LineTo(mainRect.CenterX, mainRect.Top)
cvs.ClipPath(mainPath)
and then try and fill it with a color.. Any color works:
mainDrawable.Initialize(Colors.Red, 0)
cvs.DrawDrawable(mainDrawable, mainRect)
But I can't fill it with transparent:
mainDrawable.Initialize(Colors.Transparent, 0)
cvs.DrawDrawable(mainDrawable, mainRect)
I need to erase an area within a clipped path. Say in the shape of a diamond, pentagon, hexagon....
Doing so with
cvs.DrawRect(mainRect, Colors.Transparent, True, 1)
or
cvs.DrawCircle(mainRect.CenterX, mainRect.CenterY, gridData.radius, Colors.Transparent, True, 1)
work fine for a square or a circle.
Any other ideas how to accomplish this within a irregular shaped clipped path?