Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

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
 Share

  • Recently Browsing   0 members

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