Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


6 Pages«<456
Options
Go to last post Go to first unread
Offline Alex M.  
#101 Posted : 13 February 2016 09:03:18(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Davide, I need your help.

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()..

Edited by user 13 February 2016 19:01:23(UTC)  | Reason: Not specified

thanks 1 user thanked Alex M. for this useful post.
on 13/02/2016(UTC)
Offline Alex M.  
#102 Posted : 13 February 2016 10:14:16(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Here is a sample of what the new Image Region can do.

Pretty impressive Clap

ImageTestFile.sm (2,148kb) downloaded 67 time(s).

Don't forget to use ALL the latest .dll's!

https://drive.google.com...QXRicXM/view?usp=sharing

Edited by user 13 February 2016 10:20:15(UTC)  | Reason: Not specified

thanks 1 user thanked Alex M. for this useful post.
on 13/02/2016(UTC)
Offline Davide Carpi  
#103 Posted : 13 February 2016 19:23:17(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: Alex.M Go to Quoted Post
Fixed it... I forgot to set imageWasChanged = true in openAs()..


Good 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.

Code:
                    canvas.Invalidate();
                    canvas.PrePainter();
                    canvas.ReadyToPaint();

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#104 Posted : 13 February 2016 19:52:45(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: mkraska Go to Quoted Post

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



Offline Jean Giraud  
#105 Posted : 13 February 2016 20:22:16(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
It is pretty impressive what you can achieve with matrix manipulations, Jean. Keep it up!

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

thanks 1 user thanked Jean Giraud for this useful post.
on 14/02/2016(UTC)
Offline Alex M.  
#106 Posted : 13 February 2016 20:34:06(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Originally Posted by: Alex.M Go to Quoted Post
Fixed it... I forgot to set imageWasChanged = true in openAs()..


Good 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.

Code:
                    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.
Offline Davide Carpi  
#107 Posted : 13 February 2016 22:51:34(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Originally Posted by: Alex.M Go to Quoted Post
frankly 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:

Code:

			// 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:

Code:
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)

Edited by user 14 February 2016 01:31:13(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Alex M.  
#108 Posted : 14 February 2016 09:32:30(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Originally Posted by: Alex.M Go to Quoted Post
frankly 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:

Code:

			// 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:

Code:
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!
thanks 1 user thanked Alex M. for this useful post.
on 14/02/2016(UTC)
Offline overlord  
#109 Posted : 13 February 2017 00:47:10(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,125
Turkey

Was thanked: 506 time(s) in 337 post(s)
I 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.

Without Plugin everything seems normal,
without image plugin.png

When I install the plugin the Smath Studio got crazy.
with image plugin.png
Offline Alex M.  
#110 Posted : 21 February 2017 01:34:42(UTC)
Alex M.


Rank: Advanced Member

Groups: Registered
Joined: 03/03/2014(UTC)
Posts: 418
Canada

Was thanked: 125 time(s) in 96 post(s)
Originally Posted by: overlord Go to Quoted Post
I 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.

Offline Jean Giraud  
#111 Posted : 21 February 2017 04:43:03(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: overlord Go to Quoted Post
2560x1440 resolution


That is not resolution, it is the "pixel display".
PC screen have 96 ppi resolution [ppi = pixel per inch]
Offline Jean Giraud  
#112 Posted : 21 February 2017 04:57:41(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: overlord Go to Quoted Post
it 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 (293kb) downloaded 46 time(s).
Offline overlord  
#113 Posted : 23 February 2017 01:15:02(UTC)
overlord


Rank: Advanced Member

Groups: Registered
Joined: 23/07/2013(UTC)
Posts: 1,125
Turkey

Was thanked: 506 time(s) in 337 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: overlord Go to Quoted Post
2560x1440 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

Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: overlord Go to Quoted Post
it 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 (293kb) downloaded 46 time(s).


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

SC1.png

SC2.png

Offline Jean Giraud  
#114 Posted : 23 February 2017 20:30:52(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,868
Canada

Was thanked: 980 time(s) in 808 post(s)
"Resolution is the capability of the sensor to observe or measure the smallest object
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.
Offline Davide Carpi  
#115 Posted : 23 February 2017 21:31:44(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,639
Man
Italy
Location: Italy

Was thanked: 1323 time(s) in 873 post(s)
Issues are are form's fonts changed, desktop background visible through the window and these. I'll see if I can help Alex, as pointed out the issues are related to windows 10 only.
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Users browsing this topic
Similar Topics
Editable Image Region - Plugin Update (Extensions)
by Alex M. 14/02/2016 09:46:23(UTC)
6 Pages«<456
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.