On Tue, 2023-02-07 at 12:21 +0100, Francesco Pretto wrote: > I believe there must be a distinction between DrawSomething() > functions that actually perform some stroking and/or filling and just > adding to a path. If you noticed, DrawSomething() are just in > PdfPainter and AddSomething() is just in PdfPainterPathContext. This > is a similar approach from .NET Graphics[1] and GraphicsPath[2] (but > the latter don't have "prolong to" stateful methods). I think you may > want to imagine having no Draw/Add prefix at all or you imagine just > the "Draw" prefix in PdfPainter and no prefix at all in > PdfPainterPathContext. That would be more confusing to me.
Hi, I see, I might overlook the [2]. I'm more used to the HDC Windows API, where is no AddSomething(), the context knows whether it's creating a path or drawing directly. It's easier in PDF, because it's always creating the path, it never draws anything directly. > - Why you need to access a raw string stream with just the content > of the path? To be able to simulate complex drawing functions from the HDC Windows API. It does not require everything what had been drawn since the start of the program, it requires only the current path: https://sourceforge.net/p/litepdf/code/HEAD/tree/trunk/src/meta2pdf.cpp#l3259 Bye, zyx _______________________________________________ Podofo-users mailing list Podofo-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/podofo-users