
21/04/2008, 15:21
|
| | Fecha de Ingreso: julio-2006
Mensajes: 150
Antigüedad: 18 años, 6 meses Puntos: 0 | |
Re: Problema de Interseccion Graficando Los Path se dibujan correctamente usando el codigo
int posX3 = Singleton.Instance.panelVenn.ClientRectangle.Width / -12;
int posY3 = Singleton.Instance.panelVenn.ClientRectangle.Heigh t / 3;
Rectangle R3 = new Rectangle(posX3, posY3, ancho, alto);
// Create a Matrix object
Matrix X3 = new Matrix();
// Rotate by 45 degrees
X3.Rotate(-25, MatrixOrder.Append);
// Apply Matrix object to the Graphics object
// (i.e., to all the graphics items
// drawn on the Graphics object)
G.Transform = X3;
// Fill a rectangle
GraphicsPath P3 = new GraphicsPath();
P3.AddEllipse(R3);
//G.FillEllipse(Brushes.Yellow, R3);
G.DrawPath(Pens.Black, P3);
Pero cuando los vas a intersectar con el codigo
G.SetClip(P1);
G.SetClip(P3, CombineMode.Intersect);
G.FillPath(Brushes.Red, P1);
La interseccion no se ubica en donde es en realidad. |