Poor Points
-
The System.Drawing.Point Class has really a lot of missing Features. It has no TypeConverter and no support for operators like + and -. This is really weak. Is there any possibility to fix that issue? Sure... I could write an own Point class but that one won't be compatible with all the (drawing-)functions like DrawPoly and I don't want to write some ugly conversion code.
-
The System.Drawing.Point Class has really a lot of missing Features. It has no TypeConverter and no support for operators like + and -. This is really weak. Is there any possibility to fix that issue? Sure... I could write an own Point class but that one won't be compatible with all the (drawing-)functions like DrawPoly and I don't want to write some ugly conversion code.
TyronX wrote: It has no TypeConverter Funny mine has a type convertor...
[Serializable, StructLayout(LayoutKind.Sequential), TypeConverter(typeof(PointConverter)), ComVisible(true)] public struct Point {...}
top secret
Download xacc-ide 0.0.3 now!
See some screenshots -
The System.Drawing.Point Class has really a lot of missing Features. It has no TypeConverter and no support for operators like + and -. This is really weak. Is there any possibility to fix that issue? Sure... I could write an own Point class but that one won't be compatible with all the (drawing-)functions like DrawPoly and I don't want to write some ugly conversion code.
Actually you seem to be clueless... :^):omg:
[Serializable, StructLayout(LayoutKind.Sequential), TypeConverter(typeof(PointConverter)), ComVisible(true)]
public struct Point
{
public static readonly Point Empty;
public Point(int x, int y);
public Point(Size sz);
public Point(int dw);
public bool IsEmpty { get; }
public int X { get; set; }
public int Y { get; set; }
public static implicit operator PointF(Point p);
public static explicit operator Size(Point p);
public static Point operator +(Point pt, Size sz);
public static Point operator -(Point pt, Size sz);
public static bool operator ==(Point left, Point right);
public static bool operator !=(Point left, Point right);
public static Point Ceiling(PointF value);
public static Point Truncate(PointF value);
public static Point Round(PointF value);
public override bool Equals(object obj);
public override int GetHashCode();
public void Offset(int dx, int dy);
public override string ToString();
}top secret
Download xacc-ide 0.0.3 now!
See some screenshots -
Actually you seem to be clueless... :^):omg:
[Serializable, StructLayout(LayoutKind.Sequential), TypeConverter(typeof(PointConverter)), ComVisible(true)]
public struct Point
{
public static readonly Point Empty;
public Point(int x, int y);
public Point(Size sz);
public Point(int dw);
public bool IsEmpty { get; }
public int X { get; set; }
public int Y { get; set; }
public static implicit operator PointF(Point p);
public static explicit operator Size(Point p);
public static Point operator +(Point pt, Size sz);
public static Point operator -(Point pt, Size sz);
public static bool operator ==(Point left, Point right);
public static bool operator !=(Point left, Point right);
public static Point Ceiling(PointF value);
public static Point Truncate(PointF value);
public static Point Round(PointF value);
public override bool Equals(object obj);
public override int GetHashCode();
public void Offset(int dx, int dy);
public override string ToString();
}top secret
Download xacc-ide 0.0.3 now!
See some screenshots