Jump to content

RESOLVED: graphics hires problem


Stephan
 Share

Recommended Posts

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):

bug@1.PNG.baf7a7c82f22b51ba26877aebf08e0ac.PNG

 

And here is with hires=4:

 bug.PNG.03dd28b60dbdafdebf556c5c0f0843d4.PNG

 

 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

 

 

Link to comment
Share on other sites

  • Stephan changed the title to RESOLVED: graphics hires problem

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...