예제 #1
0
 public MouseEventArgs(PointD point, SizeD areaSize, bool up, bool down, int count, KeyModifierFlags keyModifiers, ulong held1To64)
 {
     Point        = point;
     AreaSize     = areaSize;
     Up           = up;
     Down         = down;
     Count        = count;
     KeyModifiers = keyModifiers;
     Held1To64    = held1To64;
 }
예제 #2
0
 public MouseEventArgs(PointD point, SizeD surfaceSize, bool up, bool down, int count, ModifierKey keyModifiers, long held1To64)
 {
     Point        = point;
     SurfaceSize  = surfaceSize;
     Up           = up;
     Down         = down;
     Count        = count;
     KeyModifiers = keyModifiers;
     Held1To64    = held1To64;
 }
예제 #3
0
 /// <summary>
 /// Converts the specified <see cref="SizeD"/> to a <see cref="Size"/> by truncating the values of the <see cref="SizeD"/>.
 /// </summary>
 /// <param name="val">The <see cref="SizeD"/> to convert.</param>
 /// <returns>The <see cref="Size"/> this converts to.</returns>
 public static Size Truncate(SizeD val) => new Size((int)Math.Truncate(val.Width), (int)Math.Truncate(val.Height));
예제 #4
0
 /// <summary>
 /// Converts the specified <see cref="SizeD"/> to a <see cref="Size"/> by rounding the values of the <see cref="SizeD"/> to the nearest integer.
 /// </summary>
 /// <param name="val">The <see cref="SizeD"/> to convert.</param>
 /// <returns>The <see cref="Size"/> this method converts to.</returns>
 public static Size Round(SizeD val) => new Size((int)Math.Round(val.Width), (int)Math.Round(val.Height));
예제 #5
0
 /// <summary>
 /// Converts the specified <see cref="SizeD"/> to a <see cref="Size"/> by rounding the values of the <see cref="SizeD"/> to the next higher integer values.
 /// </summary>
 /// <param name="val">The <see cref="SizeD"/> to convert.</param>
 /// <returns>The <see cref="Size"/> this method converts to.</returns>
 public static Size Ceiling(SizeD val) => new Size((int)Math.Ceiling(val.Width), (int)Math.Ceiling(val.Height));
예제 #6
0
 /// <summary>
 /// Returns the result of subtracting the specified <see cref="SizeD"/> from the specified <see cref="PointD"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointD"/> to be subtracted from.</param>
 /// <param name="sz">The <see cref="SizeD"/> to subtract from <paramref name="pt"/>.</param>
 public static PointD Subtract(PointD pt, SizeD sz) => new PointD(pt.X - sz.Width, pt.Y - sz.Height);
예제 #7
0
 /// <summary>
 /// Adds the specified <see cref="SizeD"/> to the specified <see cref="PointD"/>.
 /// </summary>
 /// <param name="pt">The <see cref="PointD"/> to add.</param>
 /// <param name="sz">The <see cref="SizeD"/> to add.</param>
 /// <returns>The <see cref="PointD"/> that is the result of the addition operation.</returns>
 public static PointD Add(PointD pt, SizeD sz) => new PointD(pt.X + sz.Width, pt.Y + sz.Height);
예제 #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PointD"/> structure from a <see cref="Size"/>.
 /// </summary>
 /// <param name="sz">A <see cref="Size"/> that specifies the coordinates for the new <see cref="PointD"/>.</param>
 public PointD(SizeD sz) : this(sz.Width, sz.Height)
 {
 }
예제 #9
0
 /// <inheritdoc cref="Equals(object)"/>
 public bool Equals(SizeD point) => Width == point.Width && Height == point.Height;
예제 #10
0
 /// <summary>
 /// Subtracts the specified <see cref="SizeD"/> from the other specified <see cref="SizeD"/>.
 /// </summary>
 /// <param name="sz1">The <see cref="SizeD"/> to be subtracted from.</param>
 /// <param name="sz2">The <see cref="SizeD"/> to subtract from <paramref name="sz1"/>.</param>
 /// <returns>The <see cref="SizeD"/> that is the result of the addition operation.</returns>
 public static SizeD Subtract(SizeD sz1, SizeD sz2) => new SizeD(sz1.Width - sz2.Width, sz1.Height - sz2.Height);
예제 #11
0
 /// <summary>
 /// Adds the specified <see cref="SizeD"/> to the other specified <see cref="SizeD"/>.
 /// </summary>
 /// <param name="sz1">The <see cref="SizeD"/> to be added to.</param>
 /// <param name="sz2">The <see cref="SizeD"/> to add to <paramref name="sz1"/>.</param>
 /// <returns>The <see cref="SizeD"/> that is the result of the addition operation.</returns>
 public static SizeD Add(SizeD sz1, SizeD sz2) => new SizeD(sz1.Width + sz2.Width, sz1.Height + sz2.Height);
예제 #12
0
 public DrawEventArgs(Context context, RectangleD clip, SizeD areaSize)
 {
     Context  = context;
     Clip     = clip;
     AreaSize = areaSize;
 }
예제 #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DrawEventArgs"/> class with the specified event data.
 /// </summary>
 /// <param name="context">The drawing context.</param>
 /// <param name="clip">The rectangle that has been requested to be redrawn.</param>
 /// <param name="surfaceSize">The current size of the surface.</param>
 public DrawEventArgs(Context context, RectangleD clip, SizeD surfaceSize)
 {
     Context     = context;
     Clip        = clip;
     SurfaceSize = surfaceSize;
 }
예제 #14
0
 public void AddRectangle(PointD location, SizeD size) => AddRectangle(location.X, location.Y, size.Width, size.Height);
예제 #15
0
 /// <summary>
 /// Indicates whether this instance and a specified object are equal.
 /// </summary>
 /// <param name="size">The size to compare with the current instance.</param>
 /// <returns>true if obj and this instance are the same type and represent the same value; otherwise, false.</returns>
 public bool Equals(SizeD size) => Width == size.Width && Height == size.Height;
예제 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RectangleD"/> class with the specified location and size.
 /// </summary>
 /// <param name="location">A <see cref="Point"/> that represents the upper-left corner of the rectangle.</param>
 /// <param name="size">A <see cref="Drawing.Size"/> that represents the width and height of the rectangle.</param>
 public RectangleD(PointD location, SizeD size) : this(location.X, location.Y, size.Width, size.Height)
 {
 }