Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CADability.Forms/CadCanvas.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ private static CADability.Substitutes.PaintEventArgs Subst(System.Windows.Forms.
return new Substitutes.PaintEventArgs()
{
ClipRectangle = v.ClipRectangle,
#pragma warning disable CS0618 // still set for views of applications that read it, until CADability 2.0
Graphics = v.Graphics
#pragma warning restore CS0618
};
}
private IView view;
Expand Down
5 changes: 5 additions & 0 deletions CADability/FormsSubst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ public KeyEventArgs(Keys keyData)
public class PaintEventArgs
{
public Rectangle ClipRectangle { get; set; }
/// <summary>
/// The GDI+ graphics of the paint event. No view of CADability reads it: views paint through
/// <see cref="ICanvas.PaintTo3D"/>.
/// </summary>
[Obsolete("No view of CADability uses it. Paint through ICanvas.PaintTo3D instead. GDI+ is removed from the kernel in CADability 2.0 (issue #412).")]
public Graphics Graphics { get; set; }
}

Expand Down
1 change: 1 addition & 0 deletions CADability/ModelView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3013,6 +3013,7 @@ public void Scroll(int HScrollOffset, int VScrollOffset)
/// Not implemented: always returns null. Kept for compatibility with earlier versions.
/// </summary>
/// <returns>null</returns>
[Obsolete("Not implemented, always returns null. Use CADability.Forms.PaintToOpenGL.PaintToBitmap to render the model into a bitmap. GDI+ is removed from the kernel in CADability 2.0 (issue #412).")]
public Bitmap GetContentsAsBitmap()
{
{
Expand Down
1 change: 1 addition & 0 deletions CADability/PaintToOpenGl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,7 @@ internal static void InvokeSetProjection(IntPtr renderContext, IPaintTo3D paintT
/// <param name="height">of the bitmap</param>
/// <param name="extent">the extent to show in the bitmap; if null, the extent of the objects is used</param>
/// <returns></returns>
[Obsolete("Not implemented in the kernel, always throws a NotImplementedException. Use CADability.Forms.PaintToOpenGL.PaintToBitmap with the same parameters instead. GDI+ is removed from the kernel in CADability 2.0 (issue #412).")]
public static Bitmap PaintToBitmap(GeoObjectList list, GeoVector viewDirection, int width, int height, BoundingCube? extent = null)
{
throw new NotImplementedException("PaintToBitmap not implemented, maybe implement in CADability.Forms");
Expand Down
Loading