Editable Image Region - Сообщения
I just realized that if I use "Open With..." on a new blank image (say png) and edit/save it, the changes are not visible and do not load till its double clicked. If you check the code there is not too much difference between the two, except simple "Open" command also calls base.OnMouseDown() which I cannot call from a menu item, can I).
If image region was double clicked prior to using "Open With..." it works OK.
Any thoughts how to fix this?
Fixed it... I forgot to set imageWasChanged = true in openAs()..
Pretty impressive

ImageTestFile.sm (2 МиБ) скачан 111 раз(а).
Don't forget to use ALL the latest .dll's!
https://drive.google.com/file/d/0Bw0qVm5PVpzvZzdEZEFpQXRicXM/view?usp=sharing
WroteFixed it... I forgot to set imageWasChanged = true in openAs()..
Good

Minor thing, not sure about the purpose of these 3 lines of code in the open with MenuButton, seems it works fine even without.
canvas.Invalidate();
canvas.PrePainter();
canvas.ReadyToPaint();
Wrote
IPE can create pdf and has layers plus uses latex for embedded math stuff. Thus displaying pdf images might be an option. However, I don't know how many users would appreciate that. If I want to have a nice figure, I use IPE generated pdfs (currently just screenshots to transfer them to smath)
Martin could you educate me on the use of IPE? Can you set the .PDF page size? IPE does not seem to read any PDF unfortunately. Otherwise it is a great sketching tool! How come didn't I see it earlier..
It will be super quick to add support for IPE if I could generate a .pdf that IPE can read with pre-set page size (dimensions of the image region)
Thanks
Wait my friend, you have not seen all what I can do with a shovel and a glass of cognac !
I hope Davide or more collabs will help in rotating by an angle.
Yourself: do you have idea to rescue rotate degree ?
Andrey: where are you these days ?
Cheers, Jean
WroteWroteFixed it... I forgot to set imageWasChanged = true in openAs()..
Good
Minor thing, not sure about the purpose of these 3 lines of code in the open with MenuButton, seems it works fine even without.canvas.Invalidate(); canvas.PrePainter(); canvas.ReadyToPaint();
No purpose - was messing around to see what would fix "Open With..." - frankly could use some explaining on what those functions do.
Wrotefrankly could use some explaining on what those functions do.
Let's say you want to change the size of the region (f.e. because you wanna keep the scale factor while you rotate the image or after the external editor changes the image size).
From the region holder you can call:
// do something that requires a change of the size from inside the region (no resize markers involved)
// ...
this.canv.SetSize(); // this changes the sizes of the canvas from the canvas, if the calculations are made in the canvas;
// alternatively: this.canv.Size = new Size(newWidth, newHeight); // newWidth, newHeight calculated/available in the region holder
this.PrePainter(); // this is needed to change the sizes and the positions of the region elements
this.Invalidate(); // this repaints all
While the canvas' method SetSize() contains:
this.Size = new Size(newWidth,newHeight); // newWidth, newHeight calculated/available in the region canvas
If you don't use PrePainter, the math placeholder doesn't fit the new canvas size/position (as well as the selection rectangle and the region canvas itself)
WroteWrotefrankly could use some explaining on what those functions do.
Let's say you want to change the size of the region (f.e. because you wanna keep the scale factor while you rotate the image or after the external editor changes the image size).
From the region holder you can call:// do something that requires a change of the size from inside the region (no resize markers involved) // ... this.canv.SetSize(); // this changes the sizes of the canvas from the canvas, if the calculations are made in the canvas; // alternatively: this.canv.Size = new Size(newWidth, newHeight); // newWidth, newHeight calculated/available in the region holder this.PrePainter(); // this is needed to change the sizes and the positions of the region elements this.Invalidate(); // this repaints all
While the canvas' method SetSize() contains:this.Size = new Size(newWidth,newHeight); // newWidth, newHeight calculated/available in the region canvas
If you don't use PrePainter, the math placeholder doesn't fit the new canvas size/position (as well as the selection rectangle and the region canvas itself)
Thank you for explanation, Davide. As always very informative!
WroteI don't know what is happening but it seems image plugin is ruining the integrity of Smath Studio
I am using Nvidia GTX 1070 with 2560x1440 resolution and 125% text on Windows 10 if it will helps.
What is the version of SMath you are using?
debugging in WIN10 will be a challenge because I still use WIN7.
Wrote2560x1440 resolution
That is not resolution, it is the "pixel display".
PC screen have 96 ppi resolution [ppi = pixel per inch]
Wroteit seems image plugin is ruining the integrity of Smath Studio
If you get the last R,G,B,Yw,Cy,Ma => the image region is OK.
This is 6179 on Win 7 ... please report for further insight.
Jean
Image RGBYCM.sm (292 КиБ) скачан 100 раз(а).
WroteWrote2560x1440 resolution
That is not resolution, it is the "pixel display".
PC screen have 96 ppi resolution [ppi = pixel per inch]
I know you just love to correct people but according to wikipedia your statement is wrong. 2560x1440 is a resoulution and called WQHD.
https://en.wikipedia.org/wiki/Graphics_display_resolution
WroteWroteit seems image plugin is ruining the integrity of Smath Studio
If you get the last R,G,B,Yw,Cy,Ma => the image region is OK.
This is 6179 on Win 7 ... please report for further insight.
Jean
Image RGBYCM.sm (292 КиБ) скачан 100 раз(а).
I have never said image region is not working, it just scrambles the Smath (6179) window with my Windows 10 display settings.
You can see that on the screenshot below too. Everything is fine if I remove Image Region.
Regards
clearly with distinct boundaries ..." fineness ... number of details per unit area ...
The human eye is normalised 1200 ppi. A photo sensor 1" square at 15 MegaPixels is
equivalent to human eye. To view the captured details you will have to display on
a PC 12.5" x 12.5" ... 1200/96 ~ 12.5
What needs be doctored in your red squares: Smath Win 10 ? your box ?
Can't help.
-
Новые сообщения
-
Нет новых сообщений