Andreas Hocevar
8a73db9331
Apply fill and stroke only when set
2017-12-27 09:31:41 +01:00
Andreas Hocevar
ac195c46b1
Reuse declutter tree for hit detection
...
Replaying for hit detection no longer declutters, but uses the declutter tree
from the previous rendered frame.
2017-11-28 01:36:47 +01:00
Andreas Hocevar
674868a683
Deprecate exceedLength and replace with overflow
2017-11-27 09:25:41 +01:00
Andreas Hocevar
ad8e4debbe
Make text states available for replay time
2017-11-16 00:39:27 +01:00
Andreas Hocevar
53b85a9192
Add rendering tests
2017-11-13 13:58:11 +01:00
Andreas Hocevar
df90f1b78c
Reuse more code
2017-11-12 22:49:32 +01:00
Andreas Hocevar
1afc686af9
Add text background rendering and text padding
2017-11-12 22:49:32 +01:00
Andreas Hocevar
c6eca804f9
Refactor stroke style management to reuse code
2017-11-10 01:16:18 +01:00
Andreas Hocevar
5483fa3181
More efficient font checking loop
2017-11-03 13:52:06 +01:00
Andreas Hocevar
431d570b91
Only split text at line angle changes
2017-11-03 11:26:38 +01:00
Andreas Hocevar
4a73754b93
Entertain the compiler
2017-10-31 11:33:48 +01:00
Andreas Hocevar
b3f9e4e8ef
Improve documentation
2017-10-31 11:33:48 +01:00
Andreas Hocevar
08af207724
Add decluttering for images and text
2017-10-31 11:33:48 +01:00
Andreas Hocevar
742a71cd4b
Only render images when visible
2017-10-31 11:33:48 +01:00
Andreas Hocevar
ca11fd00c1
Fix vertical stroke/fill alignment for text along lines
2017-09-24 22:54:45 +02:00
Andreas Hocevar
e2ebd05624
Use a stricter type for chars_
2017-09-12 11:27:26 +02:00
Andreas Hocevar
efc86d59b0
Implement text rendering along paths
...
This commit also changes the TextReplay.drawText() signature, and moves
geometry calculation into drawText(). This improves performance where no
text needs to be rendered (TextStyle.getText() == ''), which is used often
in applications.
2017-09-11 16:54:27 +02:00
Andreas Hocevar
6469d3e864
Handle pixelRatio on replay creation instead of replay
2017-08-31 21:41:07 +02:00
Andreas Hocevar
35bd92b713
Prerender labels and cache them as images
2017-08-31 21:41:07 +02:00
Andreas Hocevar
617151c8ff
Simplify the renderer function API
2017-08-05 00:15:58 +02:00
Andreas Hocevar
67aa1a6dc9
Cache coordinates for reuse on replay, not on geometry
2017-08-04 21:06:22 +02:00
Andreas Hocevar
68f6b61217
Address review comments
2017-07-30 00:32:51 +02:00
Andreas Hocevar
c6b942f185
Allow styles to configure a custom renderer
...
Two new examples show how custom renderers can be used to render text along
paths, and to declutter labels using 3rd party libraries.
2017-07-29 17:57:38 +02:00
Andreas Hocevar
dd878e2a4c
Remove lint
2017-07-25 10:42:18 +02:00
Marc Jansen
d0ef05977b
Autofix indentation issues (eslint --fix)
2017-06-19 11:58:00 +02:00
Frederic Junod
5763e1d145
Remove unused goog.require
2017-02-03 12:40:53 +01:00
Andreas Hocevar
76cae0e63f
Make sure moveTo is called after beginPath
2017-01-13 19:32:26 +01:00
Andreas Hocevar
08ed00dfb0
Merge pull request #6358 from ahocevar/canvas-moveto
...
Ensure polygons without stroke are fully filled
2017-01-12 16:22:07 +01:00
Andreas Hocevar
7b232700d5
When applying a pending fill, also apply a pending stroke
2017-01-11 18:32:58 +01:00
Andreas Hocevar
a671687133
Allow replaying with null transform
2017-01-11 17:46:28 +01:00
Andreas Hocevar
2296ca3942
Do not skip moveTo calls after fill
2017-01-11 17:38:31 +01:00
Thomas Chandelle
7a4ae3a6ac
Line Dash offset
2017-01-04 11:19:47 +01:00
Tim Schaub
137cdc04c8
Remove ol.DEBUG
2017-01-01 20:37:52 -07:00
Thomas Chandelle
a0e310700c
Apply pixelRatio to line dash
2016-12-05 09:24:13 +01:00
Andreas Hocevar
a2a2a53e08
Use geometry extent's top left corner as pattern/gradient origin
2016-10-27 21:27:17 +02:00
Andreas Hocevar
fdae2e8e00
Set one-off transform instead of transforming back and forth
2016-10-14 17:54:21 +02:00
Frederic Junod
988b3f8b9b
Add missing jsdoc to ol.render.canvas.Replay#fill_ function
2016-10-14 15:05:30 +02:00
Andreas Hocevar
f655f6740e
Move gradient and pattern fills with the view
2016-10-13 09:30:09 +02:00
Frédéric Junod
7ec100f3f8
Merge pull request #5863 from fredj/stroke_pattern
...
Allow CanvasPattern or CanvasGradient as stroke style
2016-09-14 08:38:41 +02:00
Frederic Junod
e48fda6bef
Allow CanvasPattern or CanvasGradient as stroke style
2016-09-13 17:16:29 +02:00
Andreas Hocevar
e7bc7121d6
Add option to skip first coordinate for use with closePath()
2016-09-13 02:14:12 +02:00
Andreas Hocevar
129757578d
Do not repeat first vertex when closed is true
2016-09-13 02:13:30 +02:00
Tim Schaub
9e1a3f59e3
Restructure Canvas replay classes
2016-09-01 06:58:12 -06:00
Tim Schaub
d1d3e6a37a
Move ol.render.canvas.Instruction to its own file
2016-09-01 06:58:12 -06:00
Andreas Hocevar
d1e4b33760
Rename goog.DEBUG to ol.DEBUG
2016-08-31 21:10:01 +02:00
Andreas Hocevar
2037e725b3
Move to 90° along the circle, not 0°
2016-08-29 09:30:23 +02:00
Andreas Hocevar
457de34485
Merge pull request #5708 from ahocevar/no-closepath
...
Remove unnecessary closePath() instructions
2016-08-25 17:05:52 +02:00
Andreas Hocevar
65d03bfbfb
Bail out when there is no fill and stroke
2016-08-25 16:40:31 +02:00
Andreas Hocevar
b7c84b269c
Merge pull request #5196 from ahocevar/batch-fill-stroke
...
Batch polygon and circle fills and strokes
2016-08-24 12:02:52 +02:00
Andreas Hocevar
395793b921
Additional tests and code comments
2016-08-24 11:44:15 +02:00