[vtk-developers] vtkVectorText -- to deprecate or not?
David Lonie
david.lonie at kitware.com
Wed Oct 17 09:17:03 EDT 2012
On Wed, Oct 17, 2012 at 9:09 AM, David Gobbi <david.gobbi at gmail.com> wrote:
> On Wed, Oct 17, 2012 at 6:52 AM, David Lonie <david.lonie at kitware.com> wrote:
>> I should point out here that I added a vtkPath class, which stores a
>> path consisting of Bezier curves, a while back, as well as the ability
>> to generate these paths from strings. Both FreeTypeUtilities and
>> MathTextUtilities support this, and this is actually how most
>> characters are stored in many font formats.
>>
>> Seems like string->path->polydata would be one way forward, though
>> we'll need to write a filter that strokes the path into polydata. This
>> would at least get us to an outline of the text. Filling in the
>> outlines and getting the cells right would be tricky...But there's
>> probably an algorithm out there that can do this. That (along with the
>> higher demands on CPU) would be the biggest challenge.
>
> I have a class in gerrit that can fill the outlines, i.e. it can fill
> contours that contain holes. I can update it and put it up for
> review again:
> http://review.source.kitware.com/#/c/3785/
Very cool! That's one less concern about this approach, all that's
left is my concern about performance, as this is going to be a lot
more expensive than the current VectorText implementation. But IMO, if
someone wants speed, they should look to the texture based methods --
if they really need polydata, it will just be slower. And we can
always keep VectorText around in case someone really needs it.
If time permits, I'll look into writing a filter that strokes a
vtkPath (this would be pretty useful in general, I think).
Dave
More information about the vtk-developers
mailing list