summaryrefslogtreecommitdiff
path: root/include/mbgl/style/function
Commit message (Collapse)AuthorAgeFilesLines
* [core] Replace use of *Stops with expressions DSLJohn Firebaugh2018-06-292-2/+4
|
* [core] InterpolateBase → Interpolate; Interpolate → InterpolateImplJohn Firebaugh2018-06-282-4/+4
|
* [core] Privatize Interpolate<T>John Firebaugh2018-06-281-34/+25
|
* [core] Split Interpolator into a separate fileJohn Firebaugh2018-06-281-1/+1
|
* [core] Don't resolve tokens after evaluating a text-field or icon-image ↵John Firebaugh2018-03-223-22/+17
| | | | expression (#11509)
* [core] Implement Expression::serialize()Chris Loer2018-02-281-0/+1
| | | | | | | | Issue #10714 - Each expression stores its operator as a string, and default serialization is [operator, serialize(child1), ...] - Custom implementations of `serialize` for Expression types that don't follow the pattern - expression::Value -> mbgl::Value converter - node_expression bindings to expose `serialize`
* Reimplement style values atop NSExpression (#10726)Minh Nguyễn2018-01-243-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [ios, macos] Import headers, not implementation files * [core] Added accessors for various expression parameters Added missing parameter accessors to various expression operator classes, as well as a method on InterpolatorBase and Step that enumerates the stops and their values. * [ios, macos] Silenced warning in test of error condition * [ios, macos] Made MGLSphericalPosition boxable * [ios, macos] Implemented array enumeration during conversion * [ios, macos] Temporarily ignore heatmap layer type * [ios, macos] Migrated MGLSymbolStyleLayer.text to NSExpression MGLSymbolStyleLayer.text is now of type NSExpression instead of MGLStyleValue, as a first step toward migrating the entire layer API from style values to expressions. Implemented conversions from NSExpression to JSON arrays and vice versa. The most common NSExpression functions are now converted into style expressions, but not all of the most common style expression operators are supported yet. * [ios, macos] Implemented string coercion * [ios, macos] Color literals * [ios, macos] Null constant expressions * [ios, macos] Convert dictionary literals * [ios, macos] Interpolation expressions * [ios, macos] to-boolean, to-number, get from object * [ios, macos] Variable expressions Implemented custom expression functions for assigning and referring to variables within the context of an expression. Variables are assigned via a “context dictionary” and applied to an subexpression that is given as another argument to the same expression. Also implemented built-in variable expressions for zoom level and heatmap density. * [ios, macos] Convert colors, offsets, padding in expressions to JSON objects * [ios, macos] Expression-based style property getters Implemented a conversion from mbgl::style::PropertyValues to Objective-C JSON objects, which are then converted to NSExpressions. * [ios, macos] Consolidated property value–expression conversion in MGLStyleValueTransformer * [ios, macos] Predicate and expression guide Extracted documentation about predicates from a documentation comment in MGLVectorStyleLayer.h to a new jazzy guide. Added details about NSExpression support as well. Began updating the “For Style Authors” guide to reflect the transition from style values to expressions. * [ios, macos] Updated style authoring guide Updated the Information for Style Authors guide to discuss expressions instead of style functions. Included a table mapping style specification expression operators to NSExpression syntaxes. * [ios, macos] Migrated codegen templates to expressions * [ios, macos] Applied expression changes via codegen Ran make darwin-style-code. * [macos] Migrated macosapp to expressions * [ios, macos] Updated style function guide This guide needs to be thoroughly rewritten, but for now the example code has been migrated to expressions. * [ios, macos] Eviscerated style function tests * [ios, macos] Updated changelogs * [ios] Migrated iosapp to expressions * [ios, macos] Exposed JSON conversion methods publicly * [ios, macos] Removed MGLStyleValue, MGLStyleFunction
* [core, ios, macos, android] Add data-driven-styling support for `text-font`John Firebaugh2018-01-104-2/+17
|
* [core] Fix copy in range-based for loopsJason Wray2017-12-151-1/+1
| | | | Caught by `CLANG_WARN_RANGE_LOOP_ANALYSIS = YES`.
* Implement Expressions (#9439)Anand Thakker2017-11-084-101/+481
| | | Ports https://github.com/mapbox/mapbox-gl-js/pull/4777 (and its several follow-ups)
* [core] GCC 4.9 does not fully support custom variable templatesBruno de Oliveira Abinader2017-07-123-4/+4
|
* [core] Enable property functions for line-width (#9250)Lauren Budorick2017-06-193-0/+3
|
* [core] Fix composite function approximation for non-integer stopsJohn Firebaugh2017-06-161-22/+53
|
* Fix undefined memory access in getCoveringRanges() (#9227)Anand Thakker2017-06-091-1/+1
| | | | | | | | | | | | * Add simple unit tests for SymbolSizeBinder * Fix bug in symbol size uniform value calculation For camera functions we were setting the zoom levels in "covering ranges" to `[(zoom stop <= tile zoom), (zoom stop >= 1 + tile zoom)]`, but then evaluating the function at `[tile_zoom, tile_zoom + 1]`. * Check for it != end() before accessing it->first
* [core] Make ExponentialStops behavior consistent; add testsJohn Firebaugh2017-05-192-4/+2
|
* [core] Eliminate round-trip through Value in CameraFunction::evaluateJohn Firebaugh2017-05-193-16/+22
|
* [core] More complete fix for composite function interpolation edge caseJohn Firebaugh2017-04-201-3/+0
| | | | b5b4549 / #8613 handled the edge case for layout properties, but not paint properties. Move the check for a degenerate range to interpolationFactor in order to handle both correctly.
* [core] Add DDS support for {text,icon}-size (#8593)Anand Thakker2017-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Update gl-js and generate style code * Factor out packUint8Pair() helper function * Draft implementation of DDS for {text,icon}-size Ports https://github.com/mapbox/mapbox-gl-js/pull/4455 * Fix text-size/composite-function-line-placement test * Refactor to PaintPropertyBinders-like strategy * Dedupe gl::Program construction * Use exponential function base for interpolation * Dedupe coveringZoomStops method * Fixup tests * Fix CI errors (hidden within #if block)
* Fix edge case in composite function interpolation (#8613)Anand Thakker2017-04-031-1/+8
| | | | | | | | | | | | | | | | This fixes a bug where, for a zoom value greater than that of the highest zoom stop, composite function interpolation would return nan. (Blocking a render test over in #8593) * Add failing tests for composite function edge case The failing cases here are: - Should interpolate before the first stop - Should interpolate past the last stop * Fix edge case in composite function interpolation * Hold functions constant outside stop-defined domain
* [core] Avoid public geometry_tile_data.hpp includeJohn Firebaugh2017-03-282-3/+4
|
* [core, ios, macos] Refactor composite stop types and conversionsJohn Firebaugh2017-02-094-16/+113
|
* [core] default value support in categorical function conversionIvo van Dongen2017-02-027-27/+35
|
* [core] Add support for data-driven stylingJohn Firebaugh2017-02-027-0/+371