Пример #1
0
 public void ApplyBounds(SVGBounds bounds)
 {
     SetMinMax(bounds._minX, bounds._minY, bounds._maxX, bounds._maxY);
 }
Пример #2
0
        public bool Compare(SVGBounds bounds)
        {
            return (_minX == bounds._minX &&
                    _minY == bounds._minY &&
                    _maxX == bounds._maxX &&
                    _maxY == bounds._maxY);

        }
Пример #3
0
 public SVGBounds Encapsulate(SVGBounds bounds)
 {
     return Encapsulate(bounds._minX, bounds._minY, bounds._maxX, bounds._maxY);
 }
Пример #4
0
 public bool Intersects(SVGBounds bounds)
 {
     return !(_minX > bounds._maxX || 
         _maxX < bounds._minX ||
         _minY > bounds._maxY ||
         _maxY < bounds._minY);
 }
Пример #5
0
 public bool Contains(SVGBounds bounds)
 {
     return bounds._minX >= _minX && bounds._minY >= _minY && bounds._maxX <= _maxX && bounds._maxY <= _maxY;
 }
Пример #6
0
        public static void Bounds(SVGBounds bounds)
        {
            Vector3 p0 = new Vector3(bounds.minX, bounds.minY, 0f);        
            Vector3 p1 = new Vector3(bounds.maxX, bounds.minY, 0f);
            Vector3 p2 = new Vector3(bounds.minX, bounds.maxY, 0f);
            Vector3 p3 = new Vector3(bounds.maxX, bounds.maxY, 0f);

            Handles.DrawLine(p0, p1);
            Handles.DrawLine(p1, p3);
            Handles.DrawLine(p3, p2);
            Handles.DrawLine(p2, p0);
        }
Пример #7
0
 public void ApplyBounds(SVGBounds bounds)
 {
     SetMinMax(bounds._minX, bounds._minY, bounds._maxX, bounds._maxY);
 }
Пример #8
0
 public SVGBounds Encapsulate(SVGBounds bounds)
 {
     return(Encapsulate(bounds._minX, bounds._minY, bounds._maxX, bounds._maxY));
 }
Пример #9
0
 public bool Contains(SVGBounds bounds)
 {
     return(bounds._minX >= _minX && bounds._minY >= _minY && bounds._maxX <= _maxX && bounds._maxY <= _maxY);
 }