Ignore:
Timestamp:
2014-03-02T16:23:58+01:00 (10 years ago)
Author:
bastiK
Message:

mapcss: add support for @media expressions
includes part of the style sheet under certain condition
e.g. min josm version.

There is a major limitation: the intire file is still parsed.
So if new syntax is introduced, it will still generate
a parsing error for old josm version even if the new code
is wrapped in an @media section.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/mappaint/StyleSource.java

    r6889 r6896  
    2121import org.openstreetmap.josm.tools.Utils;
    2222
     23/**
     24 * A mappaint style (abstract class).
     25 *
     26 * Handles everything from parsing the style definition to application
     27 * of the style to an osm primitive.
     28 */
    2329public abstract class StyleSource extends SourceEntry {
    2430
     
    4450    }
    4551
     52    /**
     53     * Apply style to osm primitive.
     54     *
     55     * Adds properties to a MultiCascade. All active {@link StyleSource}s add
     56     * their properties on after the other. At a later stage, concrete painting
     57     * primitives (lines, icons, text, ...) are derived from the MultiCascade.
     58     * @param mc the current MultiCascade, empty for the first StyleSource
     59     * @param osm the primitive
     60     * @param scale the map scale
     61     * @param multipolyOuterWay support for a very old multipolygon tagging style
     62     * where you add the tags both to the outer and the inner way.
     63     * However, independent inner way style is also possible.
     64     * @param pretendWayIsClosed For styles that require the way to be closed,
     65     * we pretend it is. This is useful for generating area styles from the (segmented)
     66     * outer ways of a multipolygon.
     67     */
    4668    public abstract void apply(MultiCascade mc, OsmPrimitive osm, double scale, OsmPrimitive multipolyOuterWay, boolean pretendWayIsClosed);
    4769
Note: See TracChangeset for help on using the changeset viewer.