Commit Graph

654 Commits

Author SHA1 Message Date
Andreas Hocevar 7acd5338c9 Allow sampling data from neighboring pixels 2021-08-18 11:24:37 +02:00
Andreas Hocevar 324148c606 Add more docs 2021-08-18 11:24:37 +02:00
Andreas Hocevar 283aed2dc9 Better docs 2021-08-18 11:24:34 +02:00
Andreas Hocevar f0cac76718 Add expression for Math.abs 2021-08-18 11:24:28 +02:00
Tim Schaub af80477c1d Rendering raster tiles with WebGL 2021-08-18 11:24:23 +02:00
Maximilian Krög 2bcd57193d Don't add color as possible type if it was not set 2021-08-08 15:30:57 +02:00
Seba Kerckhof fec6fee83c Remove color from value type in equal operator 2021-07-28 09:26:29 +02:00
Seba Kerckhof db57d9bf89 Handle named colors as string in equal operator 2021-07-27 18:54:08 +02:00
Maximilian Krög 58e2e57638 Fix hit detection of RegularShape with transparent fill 2021-07-12 19:33:17 +02:00
Maximilian Krög 5f3b22bf7f Remove lineCap, it is useless on closed paths 2021-07-12 19:32:42 +02:00
Maximilian Krög ad37baf351 Remove redundant size properties / getter 2021-07-11 12:32:04 +02:00
Maximilian Krög bee28d61ea cache render options object 2021-07-11 12:32:03 +02:00
Maximilian Krög 53cf5bb282 Lazily create Regular shape canvases
Creating the cached canvases is expensive and they may never be used.
E. g. the hit detect canvas is not needed with the Immediate renderer
and if a feature is never in the viewport the image is not needed either.
2021-07-11 12:32:03 +02:00
Maximilian Krög 87f215939c Fix some RegularShape bugs related to canvsa size
- remove jitter when using RegularShape size in animation, size should
always be an integer
- canvas may have been too small for miter line join
- canvas was at least one stroke width too large for round line join
- reduce canvas size even more for bevel line join

Canvas now precisely fits the shape including stroke, The angle of the
shape is ignored for the calculation.
2021-07-11 12:32:03 +02:00
Maximilian Krög f21513ab5a Consistent behaviour if two radii are provided
Always double the points event when two radii of same size are provided.
2021-07-11 12:32:03 +02:00
Maximilian Krög 28c40fe93e getImage is always called with valid pixelRatio 2021-07-11 12:32:03 +02:00
Maximilian Krög 5716c614a8 Cleanup drawing of RegularShape
Fixes missing miter/bevel line join because path was not closed before
stroking.
Reduce canvas context calls, skip beginPath, and instead of drawing the
last point use closePath
2021-07-11 12:31:55 +02:00
Maximilian Krög 82265ef031 No unnecessary canvas with transparent fill
With pixelRatio != 1 and a transparent fill a unnecessary image was created.
2021-07-11 12:30:18 +02:00
Andreas Hocevar 79f5f46d27 Remove lint 2021-06-28 18:10:51 +02:00
Maximilian Krög 1fc94337f7 Fix icon tinting with pixelRatio < 1 2021-06-21 00:13:55 +02:00
Tim Schaub f08f31101c Lowercase module names for modules without a default export 2021-05-03 07:32:12 -06:00
Andreas Hocevar 4a6db3d2f8 Fix icon displacement 2021-04-01 12:08:32 +02:00
Tim Schaub a7684d8fbf Avoid colliding user variables with internal names 2021-02-11 07:38:46 -07:00
Tim Schaub c9a3b3bf92 Throw when parsing encounters an unexpected type 2021-02-10 19:18:55 -07:00
mike-000 1c47d268fb Correct pixel ratio description 2021-02-06 13:49:48 +00:00
Simon Seyock 2ad5789797 Add descriptions for properties. 2021-02-04 18:19:33 +01:00
Simon Seyock 8facb252f1 Replace google closure syntax = with brackets around name 2021-02-03 14:06:02 +01:00
Simon Seyock c15faa19fc enable check-types 2021-02-03 13:59:34 +01:00
Simon Seyock 808868ad1f Fixed some jsdoc issues. 2021-02-02 12:15:30 +01:00
Simon Seyock f590cb3473 Harmonize jsdoc 2021-02-02 12:14:56 +01:00
mjjurkoic 1842170b20 Eliminate redundant code
Co-authored-by: Stéphane Brunner <stephane.brunner@camptocamp.com>
2021-01-08 09:21:49 -08:00
Michael Jurkoic 81901c72c4 Pass the renderer function to the cloned style 2021-01-07 22:33:08 -08:00
Maximilian Krög d2027c1640 Get value type only once 2020-12-19 14:12:37 +01:00
Maximilian Krög 8363e66d1e Fix error message for assertArgsOdd failure 2020-12-19 14:12:37 +01:00
mike-000 685040347b Add rotation and rotateWithView
Add rotation and rotateWithView to options and clone

Add rotation and rotateWithView to clone test
Also check that scale and displacement arrays are cloned
2020-09-08 16:23:45 +01:00
mike-000 0807b44722 Clear this.canvas_ whenever render() is called 2020-09-01 09:27:17 +01:00
mike-000 f897503e10 Cosmetic fix to doc (missing closing quote) 2020-08-28 22:27:33 +01:00
Andreas Hocevar f0170f378f Merge pull request #11418 from MoonE/icon-color-default-to-composite-operation
Icon color default to composite operation
2020-08-11 20:57:40 +02:00
Maximilian Krög 558b3a3ed2 Support alpha channel for icon tinting 2020-08-09 21:58:33 +02:00
Maximilian Krög 38ecaa9814 Use compositing operation for icon colorization when possible. 2020-08-09 21:58:33 +02:00
mike-000 722e0c5b69 Include scale in options
Add rectangle to example
Add ellipse and rectangle to rendering tests
2020-08-09 10:25:16 +01:00
Andreas Hocevar ac5f52a21f Hit detect everything with a pixel ratio of 1 2020-07-27 19:56:35 +02:00
Andreas Hocevar 5b84b2470c Merge pull request #11277 from sbrunner/hires-regularshape-master
Have high resolution regular shape
2020-07-26 12:39:44 +02:00
Andreas Hocevar 2e781afd56 Use static test context for tainted canvas 2020-07-26 12:12:57 +02:00
Stéphane Brunner f6061f0589 Don't creates too many canvas 2020-07-17 11:22:29 +02:00
michael ryding b25d7bc58a Added all and any operator 2020-07-16 09:03:00 +01:00
Stéphane Brunner fd1effa992 High resolution icon 2020-07-15 16:30:24 +02:00
Stéphane Brunner f2fe6e5957 Have high resolution regular shape 2020-07-15 10:53:20 +02:00
mike-000 cf0e650435 allow scale to be two dimensional
add getScaleArray() method

test two dimension scale icons
test two dimension scale text

add example of icon and label scaling
use smaller icon and larger interval
test two dimensional scale icons
test two dimensional scale icons
2020-05-20 09:54:47 +01:00
Tim Schaub 054af09032 Make code prettier
This updates ESLint and our shared eslint-config-openlayers to use Prettier.  Most formatting changes were automatically applied with this:

    npm run lint -- --fix

A few manual changes were required:

 * In `examples/offscreen-canvas.js`, the `//eslint-disable-line` comment needed to be moved to the appropriate line to disable the error about the `'worker-loader!./offscreen-canvas.worker.js'` import.
 * In `examples/webpack/exapmle-builder.js`, spaces could not be added after a couple `function`s for some reason.  While editing this, I reworked `ExampleBuilder` to be a class.
 * In `src/ol/format/WMSGetFeatureInfo.js`, the `// @ts-ignore` comment needed to be moved down one line so it applied to the `parsersNS` argument.
2020-04-06 12:54:09 -06:00