//////////////////////////////////////////////////////////// /// <summary> /// Default constructor /// </summary> //////////////////////////////////////////////////////////// protected Shape() : base(IntPtr.Zero) { myGetPointCountCallback = new GetPointCountCallbackType(InternalGetPointCount); myGetPointCallback = new GetPointCallbackType(InternalGetPoint); SetThis(sfShape_create(myGetPointCountCallback, myGetPointCallback, IntPtr.Zero)); }
//////////////////////////////////////////////////////////// /// <summary> /// Default constructor /// </summary> //////////////////////////////////////////////////////////// protected Shape() : base(IntPtr.Zero) { myGetPointCountCallback = new GetPointCountCallbackType(InternalGetPointCount); myGetPointCallback = new GetPointCallbackType(InternalGetPoint); CPointer = sfShape_create(myGetPointCountCallback, myGetPointCallback, IntPtr.Zero); }
//////////////////////////////////////////////////////////// /// <summary> /// Construct the shape from another shape /// </summary> /// <param name="copy">Shape to copy</param> //////////////////////////////////////////////////////////// public Shape(Shape copy) : base(IntPtr.Zero) { myGetPointCountCallback = new GetPointCountCallbackType(InternalGetPointCount); myGetPointCallback = new GetPointCallbackType(InternalGetPoint); SetThis(sfShape_create(myGetPointCountCallback, myGetPointCallback, IntPtr.Zero)); Origin = copy.Origin; Position = copy.Position; Rotation = copy.Rotation; Scale = copy.Scale; Texture = copy.Texture; TextureRect = copy.TextureRect; FillColor = copy.FillColor; OutlineColor = copy.OutlineColor; OutlineThickness = copy.OutlineThickness; }
//////////////////////////////////////////////////////////// /// <summary> /// Construct the shape from another shape /// </summary> /// <param name="copy">Shape to copy</param> //////////////////////////////////////////////////////////// public Shape(Shape copy) : base(IntPtr.Zero) { myGetPointCountCallback = new GetPointCountCallbackType(InternalGetPointCount); myGetPointCallback = new GetPointCallbackType(InternalGetPoint); CPointer = sfShape_create(myGetPointCountCallback, myGetPointCallback, IntPtr.Zero); Origin = copy.Origin; Position = copy.Position; Rotation = copy.Rotation; Scale = copy.Scale; Texture = copy.Texture; TextureRect = copy.TextureRect; FillColor = copy.FillColor; OutlineColor = copy.OutlineColor; OutlineThickness = copy.OutlineThickness; }
static extern IntPtr sfShape_create(GetPointCountCallbackType getPointCount, GetPointCallbackType getPoint, IntPtr userData);