True Type Text Disappears with Filled Arcs (Linux Only)

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
rsb
I live to help wx-kind
I live to help wx-kind
Posts: 170
Joined: Fri May 29, 2015 7:26 pm

True Type Text Disappears with Filled Arcs (Linux Only)

Post by rsb »

Hello,

This is an obscure problem but I thought I would ask in case it was a know issue with wxWidgets.

We have a panel where we display true type text inside a border outline, the outline consists of arc and line
objects. The arc objects are displayed using a stipple mask.

The border outline can be turned on and off. When the outline is off, the true text displays correctly but
when it is on, the text disappears. This is on Linux Only, Windows is fine.

Any idea, why this happens. Could it be a problem with wxWidgets?

Thank you.

wxWidgets: 3.1.0, 3.0.2
Os: Red Hat Enterprise Linux Workstation release 6.9 (Santiago)
Compiler: (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)
Attachments
sdsdsd
sdsdsd
TrueTypeTextNormal.PNG (10.74 KiB) Viewed 1442 times
TrueTypeTextDisappears.PNG
TrueTypeTextDisappears.PNG (6.15 KiB) Viewed 1442 times
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: True Type Text Disappears with Filled Arcs (Linux Only)

Post by doublemax »

In which order is the content drawn? Text after outline? If yes, try changing the order.
Use the source, Luke!
rsb
I live to help wx-kind
I live to help wx-kind
Posts: 170
Joined: Fri May 29, 2015 7:26 pm

Re: True Type Text Disappears with Filled Arcs (Linux Only)

Post by rsb »

Yes, it was text after outline and I reversed it and it now works. I would think it would be the other way around.

Thanks!
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: True Type Text Disappears with Filled Arcs (Linux Only)

Post by doublemax »

The arc objects are displayed using a stipple mask.
I guess the reason is that you didn't reset the stipple mask after drawing the outline.
Use the source, Luke!
rsb
I live to help wx-kind
I live to help wx-kind
Posts: 170
Joined: Fri May 29, 2015 7:26 pm

Re: True Type Text Disappears with Filled Arcs (Linux Only)

Post by rsb »

Is this the best way to reset the stipple mask?

wxBrush brush = dc->GetBrush() ;
brush.SetStipple(wxNullBitmap) ;

Also, Is there a problem drawing arcs with a stipple mask. We draw circles, polygons and arcs with a stipple
mask essentially the same way. The circles and polygons work perfectly but the arcs always come out filled.

Thanks.
Attachments
FilledObjects.PNG
FilledObjects.PNG (11.43 KiB) Viewed 1389 times
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: True Type Text Disappears with Filled Arcs (Linux Only)

Post by doublemax »

Also, Is there a problem drawing arcs with a stipple mask. We draw circles, polygons and arcs with a stipple
mask essentially the same way. The circles and polygons work perfectly but the arcs always come out filled.
Works for me under Windows, but i can't test under Linux.

If you can reproduce it in a small sample, please open a bug report at http://trac.wxwidgets.org/
Use the source, Luke!
Post Reply