Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering a gigantically obscenely rectangular rectangle #1292

Open
Benny- opened this issue Mar 24, 2017 · 5 comments
Open

Rendering a gigantically obscenely rectangular rectangle #1292

Benny- opened this issue Mar 24, 2017 · 5 comments

Comments

@Benny-
Copy link

Benny- commented Mar 24, 2017

Observe the following program:

paper.setup(theCanvas)

var hello = new paper.PointText({
    point: new paper.Point(16, 16),
    content: 'Hello!',
    font: '"Latin Modern Math"',
    fontSize: 16,
});

var background = new paper.Shape.Rectangle(
    new paper.Point(10, 10),
    new paper.Size(40, 889005130)
    )
background.fillColor = new paper.Color(1, 0, 0, 0.5);

Expected output:
Expected output

Actual output (in chrome and firefox respectively):
Actual output

Note how the rectangle in chrome moved (the bottom of the rectangle is visible while the top is no longer visible). And the rectangle in Firefox decided to move on to better geometry or is totally invisible.

This bug is reproducible using the JavaScript above. Remove the least significant digit from the height and it renders correctly again.

I tried to render a 30 hour video using paperjs on a rather big canvas. After a week of rendering this bug was discovered.

@lehni
Copy link
Member

lehni commented Mar 25, 2017

I am fairly certain this is the same problem as #823, which has been determined to be a Canvas limitation that is really difficult to overcome in paper.js, as it depends on vendor implementations of the Canvas API and is therefore unpredictable… Could you work around it in your own code?

@lehni
Copy link
Member

lehni commented Mar 25, 2017

What we should do though is create a simplified test-case similar to #823 (comment) and log separate issues with the browser vendors for this behavior...

@Benny-
Copy link
Author

Benny- commented Mar 25, 2017

You have a good test-case there. Has the linked comment already been reported to corresponding browsers/canvas implementers?

@lehni
Copy link
Member

lehni commented Mar 25, 2017

No, not yet… I should do it.

@Benny-
Copy link
Author

Benny- commented Mar 25, 2017

If you done so please put the url to the bug report in this issue or the issue you linked.

@lehni lehni self-assigned this Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants