Neue Testversion 21.40b4

Hier diskutieren die Betatester von PhotoLine untereinander und mit den Entwicklern
User avatar
Gerhard Huber
Entwickler
Entwickler
Posts: 3550
Joined: Mon 18 Nov 2002 15:30
Location: Bad Gögging

Neue Testversion 21.40b4

Post by Gerhard Huber » Tue 02 Oct 2018 16:42

Hallo,

es gibt wieder eine neue Testversion 21.40b4.

Windows:
http://www.pl32.com/beta/pl2140b4.zip

Mac OS:
http://www.pl32.com/beta/plx2140b4.zip


Neues:
  • Öffnen-Dialog: Jetzt ohne Dialogerweiterung
  • Scripting: neue Operation "Resize"
  • Scripting: Unter Windows gibt es IPLDocument.Merge, unter macOS den merge-Befehl
  • Scripting, Windows: path = doc.SaveDialog(String dialogTitle = "", String defaultPath = "")
  • Scripting: neue Operationen: "MakeSelection", "InvertSelection", "ClearSelection", "FillSelection"
  • Ablage > Import > GS-Import, macOS: startet Ghostscript nun auch optional von /usr/local/bin/gs
  • diverse kleinere Fehlerbehebungen
New:
  • Open dialog: Now without dialog extension
  • Scripting: New operation "Resize"
  • Scripting: On Windows there is IPLDocument.Merge, on macOS there is the merge command.
  • Scripting, Windows: path = doc.SaveDialog(String dialogTitle = "", String defaultPath = "")
  • Scripting: New operations: "MakeSelection", "InvertSelection", "ClearSelection", "FillSelection".
  • File > Import > GS-Import, macOS: now starts Ghostscript optionally from /usr/local/bin/gs instead of using Ghostscript.framework
  • various minor bug fixes

User avatar
gmhofmann
Betatester
Posts: 659
Joined: Tue 19 Nov 2002 17:22
Location: Heilbronx, Deutschland

Re: Neue Testversion 21.40b4

Post by gmhofmann » Wed 03 Oct 2018 08:59

- Öffnen-Dialog: Jetzt ohne Dialogerweiterung

???

User avatar
Herbert123
Mitglied
Posts: 1680
Joined: Sat 12 May 2012 21:38

Re: Neue Testversion 21.40b4

Post by Herbert123 » Wed 03 Oct 2018 10:25

I reported earlier that the control widget of patterns and textures would always appear at the top left of the document, but today I checked "Align Pattern", and that places it at the object's top left origin. That solves the issue, and I am pretty sure that did not work in the previous version b3, but today I tested an older version, and it did behave the same.

So either the previous version broke something, or I made a mistake. I am guessing I did. So the pattern request can be moved in the bin.

However, I would still like to see PhotoLine honour existing pattern settings, because it is quite cumbersome to re-do the rotation, for example, every single time I switch to another pattern or texture. Anyway, small niggle.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

Martin Huber
Entwickler
Entwickler
Posts: 3205
Joined: Tue 19 Nov 2002 15:49

Re: Neue Testversion 21.40b4

Post by Martin Huber » Thu 04 Oct 2018 09:55

gmhofmann wrote:
Wed 03 Oct 2018 08:59
- Öffnen-Dialog: Jetzt ohne Dialogerweiterung
Früher zeigte der Öffnen-Dialog weitere Informationen zum Bild an und unter Windows optional eine Vorschau. Da das heutzutage der Dateidialog direkt kann, haben wir das rausgenommen.

Martin

Martin Huber
Entwickler
Entwickler
Posts: 3205
Joined: Tue 19 Nov 2002 15:49

Re: Neue Testversion 21.40b4

Post by Martin Huber » Thu 04 Oct 2018 10:48

Herbert123 wrote:
Wed 03 Oct 2018 10:25
I reported earlier that the control widget of patterns and textures would always appear at the top left of the document, but today I checked "Align Pattern", and that places it at the object's top left origin. That solves the issue, and I am pretty sure that did not work in the previous version b3, but today I tested an older version, and it did behave the same.
That's the usual behavior and AFAIK there hasn't been any change in the past:
- If "Align pattern" is activated, patterns are relative to the layer. Their origin is the top left of the layer (therefore the pattern control is located there) and they are transformed along with the layer.
- If it isn't activated, patterns are relative to the page. Therefore the pattern origin and the pattern control is at the top left of the page.
Herbert123 wrote:
Wed 03 Oct 2018 10:25
So either the previous version broke something, or I made a mistake. I am guessing I did. So the pattern request can be moved in the bin.

However, I would still like to see PhotoLine honour existing pattern settings, because it is quite cumbersome to re-do the rotation, for example, every single time I switch to another pattern or texture. Anyway, small niggle.
IMO the current behavior is correct. The transformation of a pattern is part of that pattern. If I am applying a diagonal hatch (which are usually vertical lines rotated by 45°) to a vector layer, I want it to be diagonal, even if the current pattern was straight.

I just can think of an additional command for applying a pattern and keeping the transformation of the current one (analogous to "Edit > Paste as unformatted text" with text layers).

Martin

User avatar
Herbert123
Mitglied
Posts: 1680
Joined: Sat 12 May 2012 21:38

Re: Neue Testversion 21.40b4

Post by Herbert123 » Fri 05 Oct 2018 09:44

Martin Huber wrote:
Thu 04 Oct 2018 10:48
Herbert123 wrote:
Wed 03 Oct 2018 10:25
So either the previous version broke something, or I made a mistake. I am guessing I did. So the pattern request can be moved in the bin.

However, I would still like to see PhotoLine honour existing pattern settings, because it is quite cumbersome to re-do the rotation, for example, every single time I switch to another pattern or texture. Anyway, small niggle.
IMO the current behavior is correct. The transformation of a pattern is part of that pattern. If I am applying a diagonal hatch (which are usually vertical lines rotated by 45°) to a vector layer, I want it to be diagonal, even if the current pattern was straight.

I just can think of an additional command for applying a pattern and keeping the transformation of the current one (analogous to "Edit > Paste as unformatted text" with text layers).

Martin
What would be handy is when the user holds down <ALT> (option Mac) while clicking a pattern or texture that the current transformation is maintained.

So: <Alt> click a pattern/texture maintain current fill transformation
<ALT><SHIFT> click maintain current stroke transformation

I feel that would be a simple and workable solution. What do you think?
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
Herbert123
Mitglied
Posts: 1680
Joined: Sat 12 May 2012 21:38

Re: Neue Testversion 21.40b4

Post by Herbert123 » Wed 10 Oct 2018 01:11

Bug Line tool: With shapes, when "In Active Layer" is selected in the Tool Settings, a shape is drawn in the current vector or bitmap layer.

However, the Line tool behaves differently: it always creates at least one vector layer, even if the user selected a bitmap layer to directly draw in.

Expected behaviour should be consistent with how the shapes work: when the user activates "In Active Layer" for the Line Tool, and a bitmap layer is active, the line tool should draw lines directly in the bitmap layer, and not create a new vector layer.
/*---------------------------------------------*/
System: Win10 64bit - i7 920@3.6Ghz, p6t Deluxe v1, 48gb (6x8gb RipjawsX), Nvidia GTX1080 8GB, Revodrive X2 240gb, e-mu 1820, 2XSamsung SA850 (2560*1440) and 1XHP2408H 1920*1200 portrait

User avatar
russellcottrell
Mitglied
Posts: 60
Joined: Sat 26 Jul 2014 10:13

Re: Neue Testversion 21.40b4

Post by russellcottrell » Thu 11 Oct 2018 06:38

Hello, and thank you for working on scripting. Small problem: I can’t figure out how to make a selection; the MakeSelection operation does not accept any sort of size or position.

Also, when I create a new layer using CreateObject("PhotoLine.Image"), it is filled with white. Is there a way to create a new transparent layer? DoOperation "ColorToTransparency" works but seems cumbersome. DoOperation "New Layer" seems like it would be a good idea.

Martin Huber
Entwickler
Entwickler
Posts: 3205
Joined: Tue 19 Nov 2002 15:49

Re: Neue Testversion 21.40b4

Post by Martin Huber » Thu 11 Oct 2018 10:44

russellcottrell wrote:
Thu 11 Oct 2018 06:38
Hello, and thank you for working on scripting. Small problem: I can’t figure out how to make a selection; the MakeSelection operation does not accept any sort of size or position.
"MakeSelection" creates a selection based on the alpha channel of the layer you are applying it to. The b4 should contain a short documentation for both AppleScript and VBScript. The release additionally contains a few sample scripts.
russellcottrell wrote:
Thu 11 Oct 2018 06:38
Also, when I create a new layer using CreateObject("PhotoLine.Image"), it is filled with white. Is there a way to create a new transparent layer? DoOperation "ColorToTransparency" works but seems cumbersome. DoOperation "New Layer" seems like it would be a good idea.
Image has the Method InitPicture which allows initializing a newly created image. The following code creates a new image having the same picture type and size as the active layer plus transparency. Sadly VBScript doesn't support enumerations, so I had to use fix numbers instead.

Code: Select all

   ' Is the active layer an image? 1 is the equivalent of LayerType.LTImage
    If ((Not actLayer Is Nothing) And (actLayer.Type = 1)) Then
	Dim newImage
	Dim fillColor
	
	Set fillColor = CreateObject("PhotoLine.Color")
	fillColor.Model = 0	' 0: Gray
	fillColor.Values = Array(0, 0)	' Color Data: Gray value 0, no opacity
	' Create a new image having the same picture type as the active layer, but
	' transparency (+ 16384). It also has the same size and position.
	Set newImage = CreateObject("PhotoLine.Image")
	newImage.InitPicture actLayer.PictureType Or 16384, actLayer.Size(2), fillColor
	' The new image has the same transformation as the active layer.
	newImage.MatrixToPage = actLayer.MatrixToPage
	' Insert the new image behind the active one.
	actLayer.Parent.Insert newImage, actLayer
    End If
Martin

Martin Huber
Entwickler
Entwickler
Posts: 3205
Joined: Tue 19 Nov 2002 15:49

Re: Neue Testversion 21.40b4

Post by Martin Huber » Thu 11 Oct 2018 11:16

Herbert123 wrote:
Wed 10 Oct 2018 01:11
Bug Line tool: With shapes, when "In Active Layer" is selected in the Tool Settings, a shape is drawn in the current vector or bitmap layer.
I will fix that.

Martin

Martin Huber
Entwickler
Entwickler
Posts: 3205
Joined: Tue 19 Nov 2002 15:49

Re: Neue Testversion 21.40b4

Post by Martin Huber » Thu 11 Oct 2018 11:17

Herbert123 wrote:
Fri 05 Oct 2018 09:44
What would be handy is when the user holds down <ALT> (option Mac) while clicking a pattern or texture that the current transformation is maintained.

So: <Alt> click a pattern/texture maintain current fill transformation
<ALT><SHIFT> click maintain current stroke transformation

I feel that would be a simple and workable solution. What do you think?
I will check that.

Martin

User avatar
russellcottrell
Mitglied
Posts: 60
Joined: Sat 26 Jul 2014 10:13

Re: Neue Testversion 21.40b4

Post by russellcottrell » Thu 11 Oct 2018 17:41

Hello, and thank you for the reply. This also works; it creates a new RGB, 16-bit, transparent layer:

Code: Select all

newImage.InitPicture 1 Or 8192 Or 16384, doc.Size, Array(0, 0, 0, 0)
"MakeSelection" creates a selection based on the alpha channel of the layer you are applying it to. The b4 should contain a short documentation for both AppleScript and VBScript. The release additionally contains a few sample scripts.
I am sorry but I still do not get this. I do not see MakeSelection in any of the sample scripts. And is there a way to just create a selection in the active layer by specifying a rectangle?

User avatar
russellcottrell
Mitglied
Posts: 60
Joined: Sat 26 Jul 2014 10:13

Re: Neue Testversion 21.40b4

Post by russellcottrell » Thu 11 Oct 2018 19:48

Also I notice that when merging two 16-bit layers with doc.Merge Array(aLayer, bLayer), the resulting layer is 8-bit.

Martin Huber
Entwickler
Entwickler
Posts: 3205
Joined: Tue 19 Nov 2002 15:49

Re: Neue Testversion 21.40b4

Post by Martin Huber » Thu 11 Oct 2018 21:47

russellcottrell wrote:
Thu 11 Oct 2018 17:41
"MakeSelection" creates a selection based on the alpha channel of the layer you are applying it to. The b4 should contain a short documentation for both AppleScript and VBScript. The release additionally contains a few sample scripts.
I am sorry but I still do not get this. I do not see MakeSelection in any of the sample scripts.
There isn't a "MakeSelection" sample script yet.
Example: If your document has two layers (a background image and a filled vector layer), and you have a variable "vector" referencing the vector layer, it is as simple as

vector.DoOperation "MakeSelection"
russellcottrell wrote:
Thu 11 Oct 2018 17:41
And is there a way to just create a selection in the active layer by specifying a rectangle?
Not without creating a temporary vector layer, for example by doing something like:

Code: Select all

		Set vector = CreateObject("PhotoLine.Vector")
		
		vector.InsertPoints 0, 0, Array(0,0, 100,0, 100,100, 0,100, 0,0)
		vector.FillColor(0) = Array(0, 0, 0)
		Vector.LineColor(0) = Array(0, 0, 0, 0)
		layer.Parent.Insert vector, layer
Martin

Martin Huber
Entwickler
Entwickler
Posts: 3205
Joined: Tue 19 Nov 2002 15:49

Re: Neue Testversion 21.40b4

Post by Martin Huber » Thu 11 Oct 2018 21:48

russellcottrell wrote:
Thu 11 Oct 2018 19:48
Also I notice that when merging two 16-bit layers with doc.Merge Array(aLayer, bLayer), the resulting layer is 8-bit.
In fact, the interactive command behaves the same. The result has the bit depth of the document.

Martin