B
Brian Basquille
Hello all,
Just a quick GDI+ related question for you all. I've three ellipses being
drawn in my game. I'm trying to smoothen the edges of them out using
anti-aliasing. Why is it that my puck (and neither of the paddles) is only
looking like it's been affected by this anti-aliasing, even though i apply
the SmoothingMode property before drawing anything?
See what i mean here:
http://homepage.eircom.net/~basquilletj/antialiasing.JPG
And here's the code i used:
private void GameDraw(Graphics g)
{
// anti-aliasing
g.SmoothingMode = SmoothingMode.AntiAlias;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
CreatePaddle1Region();
CreatePaddle2Region();
CreatePuckPath();
// puck brushes
Brush puckBr = new SolidBrush(Color.Red);
g.FillPath(puckBr, puckPth);
puckBr.Dispose();
// paddle brushes
Brush paddleBr = new SolidBrush(Color.Black);
g.FillRegion(paddleBr, rgnPaddle1);
g.FillRegion(paddleBr, rgnPaddle2);
paddleBr.Dispose();
}
Many thanks in advance.
Brian
Just a quick GDI+ related question for you all. I've three ellipses being
drawn in my game. I'm trying to smoothen the edges of them out using
anti-aliasing. Why is it that my puck (and neither of the paddles) is only
looking like it's been affected by this anti-aliasing, even though i apply
the SmoothingMode property before drawing anything?
See what i mean here:
http://homepage.eircom.net/~basquilletj/antialiasing.JPG
And here's the code i used:
private void GameDraw(Graphics g)
{
// anti-aliasing
g.SmoothingMode = SmoothingMode.AntiAlias;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
CreatePaddle1Region();
CreatePaddle2Region();
CreatePuckPath();
// puck brushes
Brush puckBr = new SolidBrush(Color.Red);
g.FillPath(puckBr, puckPth);
puckBr.Dispose();
// paddle brushes
Brush paddleBr = new SolidBrush(Color.Black);
g.FillRegion(paddleBr, rgnPaddle1);
g.FillRegion(paddleBr, rgnPaddle2);
paddleBr.Dispose();
}
Many thanks in advance.
Brian