Bug 5747 - KCPathData needs to be redesigned
Summary: KCPathData needs to be redesigned
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-15 00:16 PST by Eric Seidel (no email)
Modified: 2005-12-05 17:25 PST (History)
1 user (show)

See Also:


Attachments
replace KCPathDataList & KCanvasUserData with KCanvasPath (abstract) (63.09 KB, patch)
2005-12-05 06:09 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Slightly improved KCanvasPath fix (now with bonus ChangeLog!) (71.79 KB, patch)
2005-12-05 14:56 PST, Eric Seidel (no email)
timo: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-11-15 00:16:58 PST
KCPathData needs to be redesigned

Currently in KCanvas, there is this strange KCPathData class, which I think exists only for AGG support (in 
linux), since linux renderers may not have their own path structures.  In CG, we'd really like to use 
CGPaths, even if they are wrapped in some other structure.  We'd like to re-work KCanvas to have 
KCPathData abstracted so that it can be a real CGpath on our platform, and whatever else on KDE.  This 
would make converting between the two, transparent (and get rid of the need for 2 types of path data in 
KCanvas)
Comment 1 Eric Seidel (no email) 2005-12-05 06:09:24 PST
Created attachment 4963 [details]
replace KCPathDataList & KCanvasUserData with KCanvasPath (abstract)

This patch removes the previous *two* path representations in KCanvas/KSVG2 and
replaces them with a single improved path representation: KCanvasPath. 
KCanvasPath is an abstract class, (KCanvasPathQuartz concrete implementation)
which are vended from the appropriate KRenderingDevice
(QPainter::renderingDevice() in our implementation).  This dramatically
simplifies path handling code and is a major improvement in KCanvas design.
Comment 2 Eric Seidel (no email) 2005-12-05 06:12:19 PST
Comment on attachment 4963 [details]
replace KCPathDataList & KCanvasUserData with KCanvasPath (abstract)

See comments in the bug.  This is a pretty straightforward patch.  I welcome
anyone to give it a go.  There are a couple things you will see here:

1.  Removing KCanvasUserData and KCPathData/KCPathDataList, instead replacing
them with KCanvasPath*.

2.  Several places where I renamed "list" to "path" and change . access to ->.

3.  Flat-out removal of several unneeded methods from KRenderingDeviceQuartz,
KCanvasCreator, KCanvasMatrix.

4.  Minor adjustments to the rest of the code to use the new KCanvasPath type.
Comment 3 Eric Seidel (no email) 2005-12-05 14:51:35 PST
Comment on attachment 4963 [details]
replace KCPathDataList & KCanvasUserData with KCanvasPath (abstract)

Actually, I have a slightly better patch I'll post.
Comment 4 Eric Seidel (no email) 2005-12-05 14:56:11 PST
Created attachment 4976 [details]
Slightly improved KCanvasPath fix (now with bonus ChangeLog!)
Comment 5 Eric Seidel (no email) 2005-12-05 14:56:41 PST
Comment on attachment 4976 [details]
Slightly improved KCanvasPath fix (now with bonus ChangeLog!)

See previous comments in the bug for more information.
Comment 6 Eric Seidel (no email) 2005-12-05 17:25:15 PST
KDE will want to pick this up.