We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

question

Is there a way for make a text overlap a rectangle?. In other words make the text visible and not invisible when the rectangle has a background with color.

1 Reply

AD Administrator Syncfusion Team December 1, 2006 08:54 PM UTC

Hi Douglas,

It is possible to fill the rectangle with some color and draw a text over it. Could you please refer the following lines.

// Draw the rectangle
doc.LastPage.Graphics.DrawRectangle(new RectangleF(100,70,200,100),state);
state.ForeColor=Color.White;
doc.LastPage.Graphics.DrawMultiText(new PointF(170,110),100,"Visible Text",font,state);

We can make the text invisible by setting the property state’s back color value same as rectangle’s back color value.

Here is the sample for your reference.
Rectangle.zip

Could you please take a look at this and let me if you have any other problems.

Regards,
Prakash.


Loader.
Live Chat Icon For mobile
Up arrow icon