Stephan Posted April 26, 2019 Share Posted April 26, 2019 Hi, I just came across a small hires problem when drawing graphics. settings: game.config = { name: '', system: { width: 150, height: 100, scale: false, center: true, resize: false, hires: 1 }, mobile: { } }; the code: var grap = new game.Graphics().addTo(this.stage); //red shape with bezier curve grap.fillColor = '#ff0000'; grap.drawPolygon([ {x: 0, y: 0}, [50, 0, 50, 0, 50, 20], //this is a bezier curve! {x: 50, y: 40}, {x: 0, y: 40}, {x: 0, y: 0}, ]); //white shape to show the intended outline points grap.fillColor = '#99cc99'; grap.fillAlpha = 0; grap.lineColor = '#ffffff' grap.lineWidth = 2; grap.drawPolygon([ {x: 0, y: 0}, {x: 50, y: 20}, {x: 50, y: 40}, {x: 0, y: 40}, {x: 0, y: 0}, ]); This is the shape @ hires=1x (as it should be drawn): And here is with hires=4: Am I doing anything silly here or might this be a bug? It appears that the coordinated are not translated to the hires scale... Thanx, Stephan Quote Link to comment Share on other sites More sharing options...
Stephan Posted April 27, 2019 Author Share Posted April 27, 2019 I just had another look at the problem and I think it is a small bug in the engine. I just posted a pull request for the develop branch to fix the problem. Wolfsbane 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.