summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* curve2: Show osculating circlespath-testsMatthias Clasen2020-12-271-0/+22
|
* Add gsk_path_measure_get_curvatureMatthias Clasen2020-12-274-0/+133
|
* Add an interactive path testMatthias Clasen2020-12-272-0/+794
| | | | | | | | | | | | This one is for interactive exploring of svg paths. You can enter an SVG path in the entry and hit Enter to see how GSK renders it. If you click the button in the headerbar, you can see what GTK thinks the closest point, tangent and distance are wrt. to the mouse position, and the bounding box of the path. There's also stroke parameters to play with.
* xxx: Make gsk_stroke_to_cairo publicMatthias Clasen2020-12-273-3/+12
| | | | It comes in handy, and does no harm.
* Add a path editor demoMatthias Clasen2020-12-274-0/+2875
| | | | Add a simple demo for editing a poly-Bezier curve.
* Implement gsk_path_offsetpath-strokeMatthias Clasen2020-12-273-43/+381
| | | | | Implement offsetting of paths by reusing the infrastructure of the stroker.
* Add gsk_path_offsetMatthias Clasen2020-12-274-5/+95
| | | | | | | | | Add a function that takes a path, and offsets it by some distance, applying line-join parameters as needed. This commit just adds the api, the implementation will be in the following commit.
* stroker: CleanupsMatthias Clasen2020-12-261-85/+85
| | | | Move some utility functions around.
* stroker: Implement arcsMatthias Clasen2020-12-261-15/+697
| | | | Implement arced joins as specified in SVG2.
* Add GSK_LINE_JOIN_ARCSMatthias Clasen2020-12-263-1/+5
| | | | Implementation will follow.
* xxx: assorted fixes for special contoursMatthias Clasen2020-12-261-26/+9
| | | | Fix winding numbers, and strokes wrt to direction.
* Add another stroker testMatthias Clasen2020-12-261-0/+100
| | | | | | Check that the outlines of random paths look as expected. We currently have to exclude paths where points get too close to each other.
* Add basic tests for strokesMatthias Clasen2020-12-261-1/+133
| | | | | | Add tests to check that any point on a path is always at most half the line-width away from the stroke path with that line-width.
* Implement strokingMatthias Clasen2020-12-267-1/+1274
| | | | | | | | | | | Implement gsk_contour_default_add_stroke, which takes a contour and stroke parameters, and adds contours to a path builder for the outline that woul be produced by stroking the path with these parameters. The current implementation does not try to handle short segments in the vicinity of sharp joins in any special way, so there can be some artifacts in that situation.
* Special-case circles for strokesMatthias Clasen2020-12-261-0/+17
| | | | The outline of a circle is just two circles.
* Special-case rects for strokesMatthias Clasen2020-12-261-0/+32
| | | | | In many cases, the outline of a rectangle is just two rectangles.
* Add gsk_path_strokeMatthias Clasen2020-12-264-3/+74
| | | | | | Add the plumbing that will let us do special-case stroking for rectangles, circles and other special contours. There is no implementation yet.
* Add gsk_curve_get_curvaturecurve-opsMatthias Clasen2020-12-262-16/+227
| | | | This will be used in the stroker.
* Add gsk_curve_get_normalMatthias Clasen2020-12-262-0/+16
| | | | Its easy but thats no reason not to have this api.
* Add a test for gsk_curve_offsetMatthias Clasen2020-12-261-0/+109
| | | | | The stroker relies on offsetting. This only tests a few very simple cases.
* Add a test for gsk_curve_reverseMatthias Clasen2020-12-261-0/+47
| | | | The stroker relies on this working.
* Add a test for tangents of degenerate curvesMatthias Clasen2020-12-261-1/+31
| | | | The stroker relies on these to work.
* curve: Handle degenerate casesMatthias Clasen2020-12-261-16/+99
| | | | | | | | Nothing prevents control points from being identical, and if that happens, some of our constructions involving tangents and normals break down. Handle these cases in get_{start,end}_tangent and offset, for the case of cubics.
* Add gsk_curve_reverseMatthias Clasen2020-12-262-3/+56
| | | | This will be used in stroking.
* Add gsk_curve_offsetMatthias Clasen2020-12-262-3/+153
| | | | | | | This method creates an offset curve from an existing curve by just moving the control points laterally. This will be used in stroking.
* Add conic decomposition testsMatthias Clasen2020-12-261-2/+77
| | | | We don't have good error bounds here, unfortunately.
* path: support conic->curve in foreachMatthias Clasen2020-12-261-9/+26
|
* Add gsk_curve_decompose_curveMatthias Clasen2020-12-262-0/+135
| | | | | | This is mainly useful for decomposing a conic into cubics. The criterion here for terminating the subdivision is very improvised.
* Add a performance test for curve evalMatthias Clasen2020-12-261-0/+56
| | | | All curve types are equally fast here.
* Add a performance test for curve intersectionMatthias Clasen2020-12-262-0/+136
| | | | | This shows how much more expensive curve intersections are.
* Add curve split testsMatthias Clasen2020-12-261-0/+71
|
* Add another intersection testcaseMatthias Clasen2020-12-261-0/+35
| | | | | This tests horizontal line/conic intersection, which failed before the fix in the previous commit.
* xxx: work around bounding box problemsMatthias Clasen2020-12-261-0/+6
| | | | | | | | graphene_rect_intersect returns FALSE when you intersect the bounding boxes of axis-aligned lines, so we never find intersections with those. Make things better by making the bounding boxes worse.
* Add curve intersection testsMatthias Clasen2020-12-262-1/+100
| | | | | These tests check that gsk_curve_intersect finds the intersections we want.
* Add gsk_curve_intersectMatthias Clasen2020-12-263-0/+460
| | | | | Add a way to find the intersections of two curves. This will be used in stroking.
* Add gsk_curve_get_boundsMatthias Clasen2020-12-262-5/+206
| | | | Add getters for bounding boxes of curves.
* Only test conic weights between 1/20 and 20Matthias Clasen2020-12-261-2/+2
| | | | The rest just give us no end of numeric trouble.
* Ottie: Add ottie-editorBenjamin Otte2020-12-279-0/+925
|
* ottie: Add a snapshot testsuite testBenjamin Otte2020-12-2739-0/+4933
| | | | | | | | | | | | | | | | | The test takes a lottie file and a timestamp in seconds and produces a rendernode at that timestamp. It then serializes that node and compares it via diff(1) with a file containing the expected output. This is a lot stricter than it needs to be (because different node files can generate the same output and updates to the rendering pipeline can break everything) but I chose this method on purpose because it does a good job at guarding against accidental changes in other parts of the code. It's also better than comparing image output because it avoids antialiasing artifacts when using curves and things like that.
* ottie: Add a command-line toolBenjamin Otte2020-12-273-0/+436
| | | | | | | | | | | | | Supports: * Taking a screenie: ottie image file.lottie image.png * Recording a rendernode: ottie node file.lottie render.node * Encoding an image: ottie video file.lottie video.webm
* Ottie: AddBenjamin Otte2020-12-2759-7/+7929
|
* path: Add gsk_path_builder_add_ellipse()Benjamin Otte2020-12-273-0/+51
|
* path: Change semantics of gtk_path_builder_add_segment()Benjamin Otte2020-12-274-42/+103
| | | | | Allow start >= end to mean that the path continues at the beginning after reaching the end until it reaches the point at @end.
* path: Add gsk_path_measure_is_closed ()Benjamin Otte2020-12-273-0/+27
|
* path: Add gsk_path_measure_restrict_to_contour()Benjamin Otte2020-12-273-7/+79
|
* Add gsk_path_measure_get_{path,tolerance}Matthias Clasen2020-12-273-0/+35
| | | | | | | | These are just nice apis to have and avoid having to carry these around as extra arguments in many places. This was showing up as inconvenience in writing tests for the measure apis.
* xxx path)_fillBenjamin Otte2020-12-271-1/+57
|
* Add gsk_path_get_stroke_boundsMatthias Clasen2020-12-275-3/+153
| | | | | A relatively cheap way to get bounds for the area that would be affected by stroking a path.
* testsuite: Add tests for the dasherBenjamin Otte2020-12-273-0/+183
|
* path: Add a foreach function that dashes a pathBenjamin Otte2020-12-275-0/+413
|