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

CanvasRenderingContext2D setFillColor tries to unwrap a number #722

Closed
DartBot opened this issue Dec 7, 2011 · 1 comment
Closed

CanvasRenderingContext2D setFillColor tries to unwrap a number #722

DartBot opened this issue Dec 7, 2011 · 1 comment
Labels
closed-duplicate Closed in favor of an existing report

Comments

@DartBot
Copy link

DartBot commented Dec 7, 2011

This issue was originally filed by domi...@google.com


 void render(html.CanvasRenderingContext2D context) {
       num r = 255;
       num g = 0;
       num b = 0;
       context.setFillColor(r, g, b);
       context.fillRect(100, 100, 64, 64);
   }

The call CanvasRenderingContext2DWrappingImplementation.setFillColor correctly determines that r is a number and that g and b are non-null. It then calls

this._ptr.setFillColor$4(LevelDom.unwrap(c_OR_color_OR_grayLevel_OR_r), alpha_OR_g_OR_m, b_OR_y, a_OR_k);

which tries to unwrap r as a number, which fails with the exception:

Uncaught TypeError: Object 255 has no method 'get$_ptr'
    LevelDom.unwrap
    CanvasRenderingContext2DWrappingImplementation.setFillColor

@DartBot
Copy link
Author

DartBot commented Dec 7, 2011

This comment was originally written by jrgf...@google.com


Added Duplicate label.
Marked as being merged into #150.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-duplicate Closed in favor of an existing report
Projects
None yet
Development

No branches or pull requests

1 participant