Skip to content

Mark the remaining GDI+ members of the 2.0 list obsolete (#412) - #483

Closed
dsn27 wants to merge 1 commit into
masterfrom
feature/png-snapshots
Closed

dsn27 wants to merge 1 commit into
masterfrom
feature/png-snapshots

Conversation

@dsn27

@dsn27 dsn27 commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Part of #412. Against master, independent of the other #412 PRs.

Why

Breaking changes in 2.0 in #412 lists three class members that no open PR had marked [Obsolete] yet. The acceptance criteria require every class member removed in 2.0 to be [Obsolete] in 1.x, naming its replacement.

What

Member State on master Replacement named in [Obsolete]
ModelView.GetContentsAsBitmap() always returns null CADability.Forms.PaintToOpenGL.PaintToBitmap
OpenGlCustomize.PaintToBitmap(…) always throws NotImplementedException CADability.Forms.PaintToOpenGL.PaintToBitmap, which has the same signature and works
Substitutes.PaintEventArgs.Graphics set by CadCanvas, read by no view of CADability painting through ICanvas.PaintTo3D
  • CadCanvas keeps setting Graphics, with the warning suppressed, so that views of applications that read it keep working until 2.0.
  • No public interface changes.

Deviations from the list in #412

  • The list says that GetContentsAsBitmap() and OpenGlCustomize.PaintToBitmap(…) "no longer return a GDI+ Bitmap". This PR adds no kernel method that returns encoded image bytes instead. Neither method has ever worked in the kernel, and a working replacement already exists in CADability.Forms, so a new kernel API would only add surface. That can still come in 2.0 if a headless snapshot is wanted.
  • The branch name feature/png-snapshots comes from that dropped plan. Pushes from this session cannot rename or delete branches.

Testing

  • CADability.Forms builds without new warnings.
  • CADability.Tests on Linux: 624 passed, 18 skipped, 0 failed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YXvDW91oXpy7RquGHNxgR5


Generated by Claude Code

ModelView.GetContentsAsBitmap, OpenGlCustomize.PaintToBitmap and
Substitutes.PaintEventArgs.Graphics are removed in 2.0 but were not
[Obsolete] yet. Their messages name the replacement, as #412 requires:

- GetContentsAsBitmap always returned null, and OpenGlCustomize.PaintToBitmap
  always threw. Both point to CADability.Forms.PaintToOpenGL.PaintToBitmap,
  which already implements the same signature.
- No view of CADability reads PaintEventArgs.Graphics; views paint through
  ICanvas.PaintTo3D. CadCanvas keeps setting it for application views.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YXvDW91oXpy7RquGHNxgR5

dsn27 commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator Author

Closing without merge. These [Obsolete] markers announce removals for step 8 of #412, which is now deferred, and the browser does not need them (#484). Without step 8 they would only cause warnings for consumers, and break builds that treat warnings as errors.


Generated by Claude Code

@dsn27 dsn27 closed this Oct 16, 2026
@dsn27
dsn27 deleted the feature/png-snapshots branch October 17, 2026 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants