コード例 #1
0
ファイル: UVRectangle.cs プロジェクト: photones/awgraphics
 /// <summary>
 /// Constructs a new <see cref="UVRectangle"/> by copying its values from a template.
 /// </summary>
 /// <param name="template">The UVRectangle to copy values from</param>
 public UVRectangle(UVRectangle template)
 {
     this.TopLeft     = template.TopLeft;
     this.TopRight    = template.TopRight;
     this.BottomLeft  = template.BottomLeft;
     this.BottomRight = template.BottomRight;
 }
コード例 #2
0
ファイル: UVRectangle.cs プロジェクト: photones/awgraphics
        /// <summary>
        /// Returns a new <see cref="UVRectangle"/> scaled by multiplying all coordinates with the given scalar.
        /// </summary>
        /// <param name="scale">The scalar</param>
        public UVRectangle ReScaled(float scale)
        {
            UVRectangle ret = new UVRectangle(this);

            ret.ReScale(scale);
            return(ret);
        }
コード例 #3
0
ファイル: UVRectangle.cs プロジェクト: photones/awgraphics
        /// <summary>
        /// Returns a new <see cref="UVRectangle"/> rotated by a given angle around a given point.
        /// </summary>
        /// <param name="angle">The angle by which to rotate</param>
        /// <param name="center">The point around which to rotate</param>
        public UVRectangle Rotated(float angle, Vector2 center)
        {
            UVRectangle ret = new UVRectangle(this);

            ret.Rotate(angle, center);
            return(ret);
        }
コード例 #4
0
ファイル: UVRectangle.cs プロジェクト: photones/awgraphics
        /// <summary>
        /// Returns a new <see cref="UVRectangle"/> flipped vertically.
        /// </summary>
        public UVRectangle FlippedV()
        {
            UVRectangle ret = new UVRectangle(this);

            ret.FlipV();
            return(ret);
        }
コード例 #5
0
ファイル: UVRectangle.cs プロジェクト: corefan/awgraphics
 /// <summary>
 /// Constructs a new <see cref="UVRectangle"/> by copying its values from a template.
 /// </summary>
 /// <param name="template">The UVRectangle to copy values from</param>
 public UVRectangle(UVRectangle template)
 {
     this.TopLeft = template.TopLeft;
     this.TopRight = template.TopRight;
     this.BottomLeft = template.BottomLeft;
     this.BottomRight = template.BottomRight;
 }
コード例 #6
0
 public UVQuadGeometry(IndexedSurface <TVertexData> surface)
 {
     this.Size      = Vector2.One;
     this.LineWidth = 1;
     this.UV        = UVRectangle.Default;
     this.Surface   = surface;
 }
コード例 #7
0
ファイル: UVRectangle.cs プロジェクト: corefan/awgraphics
 /// <summary>
 /// Returns a new <see cref="UVRectangle"/> scaled by multiplying all coordinates with the given scalar.
 /// </summary>
 /// <param name="scale">The scalar</param>
 public UVRectangle ReScaled(float scale)
 {
     UVRectangle ret = new UVRectangle(this);
     ret.ReScale(scale);
     return ret;
 }
コード例 #8
0
ファイル: UVRectangle.cs プロジェクト: corefan/awgraphics
 /// <summary>
 /// Returns a new <see cref="UVRectangle"/> flipped vertically.
 /// </summary>
 public UVRectangle FlippedV()
 {
     UVRectangle ret = new UVRectangle(this);
     ret.FlipV();
     return ret;
 }
コード例 #9
0
ファイル: UVRectangle.cs プロジェクト: corefan/awgraphics
 /// <summary>
 /// Returns a new <see cref="UVRectangle"/> rotated by a given angle around a given point.
 /// </summary>
 /// <param name="angle">The angle by which to rotate</param>
 /// <param name="center">The point around which to rotate</param>
 public UVRectangle Rotated(float angle, Vector2 center)
 {
     UVRectangle ret = new UVRectangle(this);
     ret.Rotate(angle, center);
     return ret;
 }