Skip to content

Feature request: Make coordinate types configurable as float #47

@Arkarit

Description

@Arkarit

Currently, all coordinates are implemented as ints, which is perfectly fine for static pages.

The problem begins, when you begin to animate things. A perfectly smooth animation in a typical render loop is impossible using int output, since you always have frame time fractions, which lead to a jitter of the movement due to the conversion to int.

But I assume, litehtml often will be used as a UI support library, and at least in game UI smooth animation is crucial.

There could be a preprocessor switch for this, which could be set if you use float capable output like cairo and if you need it for animation, so that a coord_t could be either int or float/double.

The jitter effect is subtle, and I am not sure if it is worth the effort.
But smooth animations are a sign of quality at least in game development, and I wanted to post this just as a basis for discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy