GithubHelp home page GithubHelp logo

Comments (6)

Framstag avatar Framstag commented on May 26, 2024

AREA.BORDER is now introduced to the style sheet, agg cairo and Qt backends have been adapted.

from libosmscout.

vyskocil avatar vyskocil commented on May 26, 2024

iOS and OSX backend have also been adapted.
Has the negative/positive offset already been implemented ?

from libosmscout.

Framstag avatar Framstag commented on May 26, 2024

No, not yet. Next task would be:

  • Extend OSS Syntax to allow multiple AREA.BORDER together with slot notation
  • Extend StyleConfig to allow a list of BorderStyles (see existing objects with slot notation)
  • Extend MapPainter to now handle list of BorderStyles returned by StyleConfig (instead of no or single instance)
  • See how this gets mapped to AreaData
  • Finally extends the OSS Syntax and BorderStyle with new attributes to define offset to area border, extend MapPainter to calculate new outline of area using offset and extend AreaData to hold this (optional) additional information

This will break StyleConfig API again and likely all render backends must be adapted again. It may be possible that one can handle the 1:n relation between area and its border by creating a new (special) AreaData for each border. This way MapPainter AreaData API would not break.

from libosmscout.

Framstag avatar Framstag commented on May 26, 2024

Pushed change which introduced offset, displayOffset and priority attributes to BorderStyle. So we do not have multiple borders but backend could start implementing (with common to all backend changes to MapPainter, too) borders with offsets to the area shape.

from libosmscout.

Framstag avatar Framstag commented on May 26, 2024

Now pushed support for multiple BORDERs in style sheet. MapPainter though only evaluates first entry in list. So the following tasks are now left:

  • See how this gets mapped to AreaData
  • extend MapPainter to calculate new outline of area using offset and extend AreaData to hold this (optional) additional information

from libosmscout.

Framstag avatar Framstag commented on May 26, 2024

Next push:
Multiple borders are now syntactically possible an the MapPainter creates special AreaData instances for it. That means, multiple borders are now rendered if used in the style sheet.

However:

  • The MapPainter derived class must be able to handle AreaData instances without a fillStyle (Qt backend was fixed)
  • A border with an offset is not transformed well. That means that the resulting border line is overlapping some cases. Possibly e need a special TransformArea method instead of reusing the existing TransformWay method?
  • An offset of 10m draws a 10m smaller area. This is irritating. Should be switch sign?
  • The AreaData instances are not sorted optimally. In some cases neighbouring areas are overwriting parts of the (bigger than the original area) border. The bounding box must somehow get fixed for these borders :-/

from libosmscout.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.