> manolo gouy wrote: > > > I tried it. It doesn't work well because writing a string larger > > than the bitmap to a bitmap context gives strange results. > > OK - I don't think I understand: why is the string larger than the > bitmap? If the bitmap is measured to fit the string, then... > > Oh, is this because of the way that OSX anti-aliases the text as it > renders it into the context, so that it ends up being bigger than it was > measured, something like that? >
The fl_text_extents rectangle is smaller than the fl_measure one. But fl_draw() seems to expect a surface the size of fl_measure to do its job, and seems unhappy when given a bitmap only the size of fl_text_extents. In other words, the x of fl_draw(str,x,y) has to be negative so that the body of text lands right in the bitmap, and this does not seem to be well accepted by a bitmap context. So, we would have to write to a bitmap the size of fl_measure, extract from that a rectangle the size of fl_text_extents, and use it to construct the texture. I don't think this complicated algorithm would be beneficial at the end. _______________________________________________ fltk-dev mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-dev
