Giter Site home page Giter Site logo

Border glitch during resize about pyvistaqt HOT 6 OPEN

machur avatar machur commented on July 20, 2024
Border glitch during resize

from pyvistaqt.

Comments (6)

machur avatar machur commented on July 20, 2024

I've observed that this happens on Windows with different scaling set than 100% (tested 125% and 135%).

from pyvistaqt.

larsoner avatar larsoner commented on July 20, 2024

Does it happen with 200% scaling? If not I'm guessing it has to do with the fractional scaling sometimes (but not others) making the render area 1px bigger than Qt expects due to rounding errors/differences (e.g., we round while they floor or similar)

from pyvistaqt.

machur avatar machur commented on July 20, 2024

@larsoner thanks for the quick reply. Yes, it looks like the issue. For 200% scaling there are no artifacts. Is there a feasible way to hack it?

I'm trying to figure out a way around it, hence my discussion #464 - as a workaround I tried to draw some rectangles over the plotter to simply cover the incorrect borders (I'm using wide margins anyway), but it didn't work either.

from pyvistaqt.

larsoner avatar larsoner commented on July 20, 2024

Can you try locally changing these to use np.floor rather than round?

w = int(round(scale*self.width()))

it might fix the problem, in which case we should make this change here and in the VTK gitlab source

from pyvistaqt.

larsoner avatar larsoner commented on July 20, 2024

(or math.floor probably since numpy doesn't appear to be used in that file)

from pyvistaqt.

machur avatar machur commented on July 20, 2024

I've tested np.floor/np.ceil/np.round and unfortunately the glitch is stilll there.

from pyvistaqt.

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.