Commit Graph

714 Commits

Author SHA1 Message Date
Tim Schaub 8317317127 Always add first segment when appending coordinates
When we have only a single point, we want to make sure it gets added (fixes #1821).

Because this code doesn't differentiate coordinates that are part of a linestring or linearring from those that are independent points, we always add the first segment (or pair of points).  In addition, coordinates for segments are appended whenever they represent a change in relationship with respect to the extent.  This keeps the code simpler for handling fills and properly capturing intersection points for linestrings.  This could be modified to save a few extra coordinates, but it provides for simpler code at a very minimal cost.
2014-03-07 11:02:25 -07:00
Tim Schaub 36204faf2f Merge pull request #1754 from tschaub/clip
Track max extent for replay and limit draw instructions outside that extent.
2014-03-06 09:37:43 -07:00
Tim Schaub 50001132be Transform extent coordinates before clipping 2014-03-05 13:27:40 -07:00
Tom Payne 95674a5a4c Export ol.render.canvas.Immediate#setTextStyle 2014-03-02 12:20:14 +01:00
Tom Payne ddc990500a Sort exports files alphabetically 2014-03-02 12:19:28 +01:00
ahocevar bd22ebca45 Export #drawCircleGeometry()
Especially with the immediate API, it is convenient to be able
to draw cirlces.
2014-02-26 18:22:44 +01:00
Tim Schaub 2750f53fda Clip to max extent 2014-02-25 21:47:57 -07:00
Tim Schaub 50822a4d58 Skip coordinates that don't affect the rendered extent
Segments that intersect the replay group's extent are drawn.  Any segment that represents a change in coordinate-extent relationship is drawn.  This maintains the left/right relationship (or cross product) between points in the rendered extent and every rendered segment.

Still left undone: clip the replay group's rendering to the max extent.
2014-02-25 21:47:57 -07:00
Tim Schaub f4746687e8 Keep track of max extent for replay 2014-02-25 21:47:57 -07:00
Tom Payne 7a34929b15 Rename rotateWithMap to rotateWithView 2014-02-21 14:32:06 +01:00
Tom Payne a17055a419 Activate rotateWithMap option in ol.render.canvas.Immediate 2014-02-21 12:57:34 +01:00
Tom Payne 0e90cf02ad Pass view rotation to ol.render.canvas.Immediate 2014-02-21 12:57:09 +01:00
Tom Payne 222fafcb77 Activate rotateWithMap option in ol.render.canvas.Replay 2014-02-21 11:57:11 +01:00
Tom Payne fe420ce1eb Pass view rotation to replay 2014-02-21 11:56:34 +01:00
Frederic Junod a445e81115 Handle image opacity in ol.render.canvas.Immediate 2014-02-19 11:40:40 +01:00
Frederic Junod fca0942c30 Handle image opacity in ol.render.canvas.ImageReplay 2014-02-19 11:40:40 +01:00
Tom Payne ea67e21116 Handle null line dashes for text stroke styles in ol.render.canvas.Immediate 2014-02-16 18:46:36 +01:00
Tom Payne a5fd5667b6 Set text style in ol.render.canvas.Immediate 2014-02-15 14:17:10 +01:00
Tom Payne dfc57e9db4 Fix handling of line dash state in ol.render.canvas.Immediate 2014-02-13 15:30:04 +01:00
Tom Payne 5cc3983cdb Fix handling of line dash state in ol.render.canvas.Replay 2014-02-12 17:59:11 +01:00
Tom Payne a74da436d2 Use ol.BrowserFeature.HAS_CANVAS_LINE_DASH in ol.render.canvas.Replay 2014-02-12 17:57:29 +01:00
Tom Payne 09d5d31fc7 Rename ol.render.IRender to ol.render.IVectorContext 2014-02-06 18:03:27 +01:00
BRANDLI Nicolas 447814e1a9 Fix typo in text rendering 2014-02-04 15:27:59 +01:00
Tom Payne 46396ad0f7 Set ol.render.canvas.defaultTextBaseline to middle 2014-02-03 15:49:06 +01:00
Tom Payne b6a7bc1248 Add ol.render.canvas.TextReplay 2014-02-03 15:49:06 +01:00
Tom Payne f24bd65f40 Add ol.render.canvas.Instruction.SET_TEXT_STYLE 2014-02-03 15:49:06 +01:00
Tom Payne c29b88c0e2 Add ol.render.canvas.Instruction.DRAW_TEXT 2014-02-03 15:49:06 +01:00
Tom Payne 60f104c895 Refactor ol.render.canvas.Immediate to render text 2014-02-03 15:49:05 +01:00
Tom Payne 745da0cfc3 Add ol.render.canvas.TextState 2014-02-03 15:49:05 +01:00
Tom Payne e2b2c7f3e0 Add ol.render.canvas.StrokeState 2014-02-03 15:49:05 +01:00
Tom Payne 5645a7e603 Add ol.render.canvas.FillState 2014-02-03 15:49:05 +01:00
Tom Payne 37f31c25df Set ol.render.canvas.defaultTextAlign to center 2014-02-03 15:49:05 +01:00
Tom Payne 131f22efa5 Don't use a color name in ol.render.canvas.defaultStrokeStyle 2014-02-03 15:49:05 +01:00
Tom Payne 090e3cbdd6 Add ol.render.IRender#drawText 2014-02-03 15:49:04 +01:00
Tom Payne ffc27719ea Use oriented rings where needed 2014-01-21 16:11:53 +01:00
Tom Payne 6552046aa0 Use oriented rings where needed 2014-01-21 16:11:52 +01:00
Frederic Junod 56547681c3 Uncomment ol.render.canvas.Immediate#drawCircleGeometry 2014-01-14 16:38:01 +01:00
Tom Payne 50a322208a Merge pull request #1514 from twpayne/vector-api-circle
[vector-api] Add ol.geom.Circle
2014-01-14 03:46:48 -08:00
Tom Payne 825c5290f6 Add ol.render.canvas.PolygonReplay#drawCircleGeometry 2014-01-14 12:34:46 +01:00
Tom Payne 5052bef4a5 Add ol.replay.canvas.Instruction.CIRCLE 2014-01-14 12:34:46 +01:00
Éric Lemoine e76ec3b292 Merge pull request #1504 from elemoine/vector-api-image-vector-hit-detection
[vector-api] Vector image hit detection
2014-01-14 03:33:47 -08:00
Tom Payne a8f5dff9cf Add ol.render.canvas.Immediate#drawCircleGeometry 2014-01-14 12:32:31 +01:00
Tom Payne b2b74a5ee6 Add ol.render.IRender#drawCircleGeometry 2014-01-14 12:31:50 +01:00
Éric Lemoine f7be1c155e Hit detection refactoring
Get the frame state from the map instead of storing values in the layer renderers.
2014-01-14 12:26:49 +01:00
Tom Payne 474b4a444b Use a switch statement, rather than ifs, in ol.render.canvas.Replay 2014-01-13 18:17:38 +01:00
Éric Lemoine ffcd4e8cc2 Fix hit detection on retina displays 2014-01-13 14:10:51 +01:00
Frederic Junod b53ddf5b42 Create 'type' annotation for 'const' variables 2014-01-13 08:53:36 +01:00
Frederic Junod 3f751a5903 Scale the image size and anchor by pixelRatio 2014-01-08 14:25:50 +01:00
Tom Payne c816d0105d Replay groups in defined order 2014-01-07 13:58:21 +01:00
Éric Lemoine 40fdd8a637 Merge pull request #1473 from elemoine/vector-api-zindex
[vector-api] Make canvas immediate API support zIndex
2014-01-06 12:17:33 -08:00