Git Product home page Git Product logo

Comments (5)

liamHowatt avatar liamHowatt commented on June 11, 2024

Hi. Are you able to draw the line segments without a mask? i.e. start the lines from where the inner mask's edge would be and end the lines where the outer mask's edge would be? If it's too difficult to align the ends of the lines nicely, could you draw something else like a LV_DRAW_TASK_TYPE_ARC where the mask would have been, on top of the lines?

from lvgl.

kisvegabor avatar kisvegabor commented on June 11, 2024

What are my options (except maybe waiting for the NXP SDK which is planned to support VG-Lite 4.x)?

See this issue for comments from NXP on this topic.

I draw these lines upon changes in encoder, like a volume control. So I need these lines to be drawm efficiently and fast enough.

What about having an image with the ticks and setting it as the background of an arc. The arc will mask out parts of the image as you adjust it's angles/value. It should be much faster than drawing the ticks one by one.

from lvgl.

oleg-amp avatar oleg-amp commented on June 11, 2024

What about having an image with the ticks and setting it as the background of an arc. The arc will mask out parts of the image as you adjust it's angles/value. It should be much faster than drawing the ticks one by one.

The problem is that the design should have one color for ON ticks and another for OFF tick. I solved this by drawing a line with a different color on a canvas on top of already drawn lines.

If it's too difficult to align the ends of the lines nicely, could you draw something else like a LV_DRAW_TASK_TYPE_ARC where the mask would have been, on top of the lines?

So, I will have to draw the inner and outer arcs every time I redraw the tick with the different color, correct? It is possible, as long the lines and arcs are drawn by vglite. I will try it.

from lvgl.

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.