Snapshot Region

Snapshot Region - Extends SMath Studio with a region that makes canvas' snapshots - Messages

#61 Posted: 7/5/2025 9:55:20 PM
Martin Kraska

Martin Kraska

1,247 likes in 2,174 posts.

Group: Moderator

I like the concept, yet I'd prefer the lines and tags to be in a gray tone similar to the grid lines. The idea is that these elements aren't meant for the reader of a sheet, just for the author, who wishes to create some screenshots.

image.png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
1 users liked this post
sergio 7/6/2025 5:55:17 PM
#62 Posted: 7/6/2025 8:10:15 PM
Davide Carpi

Davide Carpi

1,430 likes in 2,892 posts.

Group: Moderator

As for now I think I'll leave the colors as they are, as I've already implemented colors customization for both the borders and the tag through the standard color dialogs of smath (It is only in the SVN, not implemented in the link shared before)

immagine.png
Edited 7/7/2025 9:11:42 AM
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 users liked this post
Martin Kraska 7/7/2025 2:44:49 PM
#63 Posted: 7/10/2025 2:09:46 PM
Davide Carpi

Davide Carpi

1,430 likes in 2,892 posts.

Group: Moderator

Wrote

Wrote

Would it be possible to increase the resolution of the screenshots?



I think with the current API is possible, I'll give it a shot later.



No results here, I've tried using the new IGraphics API but without meaningful results. Any hints Andrey?


                var ibmp = SMath.Drawing.Graphics.Specifics.CreateBitmap(max_X, max_Y);
                var SF = 2.0f;

                enumerator = region.Parent.GetRegionsEnumerator();

                using (var g = SMath.Drawing.Graphics.Specifics.GraphicsFromBitmap(ibmp))
                {
                    g.Scale(SF);
                    // Filter out every invisible Region (no need to draw Regions hidden by Compacted Areas)
                    enumerator.FilterInvisible = true;

                    // Iterate through all available Regions one by one
                    while (enumerator.MoveNext())
                    {
                        if (!(enumerator.Current is SnapshotRegion) && enumerator.Current.Location.X < max_X && enumerator.Current.Location.Y - enumerator.CollapsedHeight < max_Y)
                        {
                            // Draws graphical representation of the worksheet Region (TopCorrection is the height of hidden by Compacted Area worksheet part above the Region)
                            var regionBMP = enumerator.Current.DrawToBitmapScaled();
                            var pt= new PointF(enumerator.Current.Location.X, enumerator.Current.Location.Y - enumerator.CollapsedHeight);
                            g.DrawImage(regionBMP, pt);

// ....

Edited 7/10/2025 2:10:46 PM
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#64 Posted: 8/4/2025 10:43:30 PM
Martin Kraska

Martin Kraska

1,247 likes in 2,174 posts.

Group: Moderator

I observed that the clipboard copy of SMath region provides a high resolution bitmap. This seems to correspond to the screen resolution at zoom level 200%.

image.png

whereas the snapshot region provides the following:

image.png

Is that what I can expect from Snapshot region or should that be better and I am just doing something wrong?

Is there any chance to get something like the snapshot region (even without the option to clip regions) in the clipboard resolution? Any experience with playing around with system dpi settings, Windows scaling factor and the like?

I am just trying to improve the screenshot quality in my books on SMath Studio without having to create them one by one repeatedly.

Edited 8/4/2025 10:50:56 PM
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
  • New Posts New Posts
  • No New Posts No New Posts