예제 #1
0
 public static bool BoundingRectSingle(IVertexSource vs, uint path_id, ref RectD rect)
 {
     double x1, y1, x2, y2;
     bool rValue = BoundingRectSingle(vs, path_id, out x1, out y1, out x2, out y2);
     rect.x1 = x1;
     rect.y1 = y1;
     rect.x2 = x2;
     rect.y2 = y2;
     return rValue;
 }
예제 #2
0
 //---------------------------------------------------------UniteRectangles
 public void UniteRectangles(RectD r1, RectD r2)
 {
     m_x1 = r1.x1;
     m_y1 = r1.y1;
     m_x2 = r1.x2;
     m_x2 = r1.y2;
     if (m_x2 < r2.x2)
     {
         m_x2 = r2.x2;
     }
     if (m_y2 < r2.y2)
     {
         m_y2 = r2.y2;
     }
     if (m_x1 > r2.x1)
     {
         m_x1 = r2.x1;
     }
     if (m_y1 > r2.y1)
     {
         m_y1 = r2.y1;
     }
 }
예제 #3
0
파일: Basics.cs 프로젝트: hj1980/Mosa
 //---------------------------------------------------------UniteRectangles
 public void UniteRectangles(RectD r1, RectD r2)
 {
     m_x1 = r1.x1;
     m_y1 = r1.y1;
     m_x2 = r1.x2;
     m_x2 = r1.y2;
     if (m_x2 < r2.x2) m_x2 = r2.x2;
     if (m_y2 < r2.y2) m_y2 = r2.y2;
     if (m_x1 > r2.x1) m_x1 = r2.x1;
     if (m_y1 > r2.y1) m_y1 = r2.y1;
 }
예제 #4
0
파일: Basics.cs 프로젝트: hj1980/Mosa
 //-----------------------------------------------------IntersectRectangles
 public void IntersectRectangles(RectD r1, RectD r2)
 {
     m_x1 = r1.x1;
     m_y1 = r1.y1;
     m_x2 = r1.x2;
     m_x2 = r1.y2;
     // First process m_x2,m_y2 because the other order
     // results in Internal Compiler Error under
     // Microsoft Visual C++ .NET 2003 69462-335-0000007-18038 in
     // case of "Maximize Speed" optimization option.
     //-----------------
     if (m_x2 > r2.x2) m_x2 = r2.x2;
     if (m_y2 > r2.y2) m_y2 = r2.y2;
     if (m_x1 < r2.x1) m_x1 = r2.x1;
     if (m_y1 < r2.y1) m_y1 = r2.y1;
 }
예제 #5
0
파일: Basics.cs 프로젝트: hj1980/Mosa
 public bool Clip(RectD r)
 {
     if (m_x2 > r.x2) m_x2 = r.x2;
     if (m_y2 > r.y2) m_y2 = r.y2;
     if (m_x1 < r.x1) m_x1 = r.x1;
     if (m_y1 < r.y1) m_y1 = r.y1;
     return m_x1 <= m_x2 && m_y1 <= m_y2;
 }
예제 #6
0
 /*PathStorage _LinesToDraw = new PathStorage ();
     _LinesToDraw.remove_all ();
     _LinesToDraw.MoveTo (x1, y1);
     _LinesToDraw.LineTo (x2, y2);
     ConvStroke StrockedLineToDraw = new ConvStroke (_LinesToDraw);*/
 //Render (StrockedLineToDraw, color);
 /// <summary>
 /// 
 /// </summary>
 /// <param name="rect_d">
 /// A <see cref="rect_d"/>
 /// </param>
 public abstract void SetClippingRect(RectD rectD);