VB .Net GDI + use Clip only for one region

0

My question is about the SetClip / Clip function.
I'm creating a control that shows a list, and the shape of this list is rectangular with rounded tips. With the DrawPath function, I create the contour of the figure without problems:

G.DrawPath(Pen1, XRoundRectangle(New Rectangle(0, 0, Width - 1, Height - 1), 20))

Where '20' is the curvature of the edges.
 The elements of the list are in the form of a white rectangle with the corresponding text. To make the rectangles are adopted to that way I use SetClip

    G = e.Graphics
    Dim nRegion As New Region(XRoundRectangle(New Rectangle(-1, -1, Width + 1, Height + 1), 20))

    G.SetClip(nRegion, CombineMode.Intersect)

I do not understand the second parameter of the SetClip function very well, but it works. The problem is that while it works, the white color stands out for very little in the corners.
So I wanted to know if it is possible that the Clip will only be applied to the part of the code where the elements of the list are created and not the part where I draw the contour of the figure. Is it possible?
Thank you very much!

    
asked by Salvador Bacci 07.11.2018 в 02:50
source

0 answers