Katsu
September 27, 2016, 10:40pm
1
View.CaptureToBitmap does not include Title, even if View.TitleVisible=true.
It was possible when I use former "DotNetSDK " with argument , How can I do it in RhinoCommon ?
My program is here.
Rectangle rc = new Rectangle(0, 0, 480, 480);
Rhino.Display.RhinoView View = Doc.Views.Add("Snapshot",
Rhino.Display.DefinedViewportProjection.Top,
rc, true);
View.TitleVisible = true;
View.Redraw();
Size sz = new Size(480, 480);
var bitmap = View.CaptureToBitmap(sz, Rhino.Display.DisplayModeDescription.FindByName("Shaded"));
dale
(Dale Fugier)
September 27, 2016, 11:08pm
2
What function did you call in Rhino_DotNet? I don’t believe it is the equivalent to RhinoCommon’s View.CaptureToBitmap
…
Katsu
September 28, 2016, 12:13am
3
Thank you dale,
Yes, CaptureToBitmap is not in DotNetSDK .
But In DotNetSDK, This code can include title. I’d like to include view title(caption) in bitmap.
bmp = new System.Drawing.Bitmap(1, 1);
if (!view.ScreenCaptureToBitmap(ref bmp, true, false)) ....
In RhinoCommon, I think "View.TitleVisible = true " is good to control title visiblity for some capture method of view.
dale
(Dale Fugier)
September 28, 2016, 3:32pm
4
The Rhino_DotNet code you show provides the functionality of Rhino’s ScreenCaptureToClipboard/File commands, as where the RhinoCommon code provides the functionality of Rhino’s ViewCaptureToClipboard/File commands. The features do two different things.
http://docs.mcneel.com/rhino/5/help/en-us/commands/viewcapture.htm
RhinoCommon does not have a functional equivalent to ScreenCaptureToClipboard/File.
Just curious, why do you need screen captures with titles?
stevebaer
(Steve Baer)
September 28, 2016, 3:41pm
5
You should be able to just use Graphics.CopyFromScreen for this
Willem
(Willem Derks)
September 28, 2016, 10:07pm
7
For those on phones and small monitors:
-Willem
Katsu
September 28, 2016, 11:54pm
8
Thank you dale, it was great help for me.
Because, I’d like to take some snapshots of views to tell my intention of design or to tell operation procedures.
“Title” is important information for them to understand each snapshot combine with rhino operations especially using custom CPlane even if the world axis is visible on it.
Katsu
September 29, 2016, 2:19am
9
Hi dale,
The Created Date Time of Image file by “ScreenCaptureToFile” in Explorer is very funny.
The timestamp seems to use Locale time “North america”.
Would you please check this ?
dale
(Dale Fugier)
September 29, 2016, 6:12pm
10
In what way? What am I supposed to check?