Home > Software design >  How to fill text with 2 different color/texture
How to fill text with 2 different color/texture

Time:05-14

I draw text on top of a image using Path.Addstring and filling it with a color and it works perfectly. Now I would like to split(bisect) the text vertically and have 2 different colors or textures. For eg. the top half of the text with a solid brush and the bottom half with hatch brush. I'd like to know if this is possible and which way should I implement it.

Reference image created using paint.net software. I drew a line to split the text and filled the bottom part with a different texture.

Text

*I don't want the line to be visible in the final output.

CodePudding user response:

Possible.

  1. Fill the path with the solid brush.
  2. Get the rectangle that bounds the path through the SOQ72225088A

    SOQ72225088B

  • Related