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.
gmhofmann hat geschrieben: Mi 03 Okt 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.
Herbert123 hat geschrieben: Mi 03 Okt 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 hat geschrieben: Mi 03 Okt 2018 10:25So 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 Huber hat geschrieben: Do 04 Okt 2018 10:48
Herbert123 hat geschrieben: Mi 03 Okt 2018 10:25So 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?
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.
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.
russellcottrell hat geschrieben: Do 11 Okt 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 hat geschrieben: Do 11 Okt 2018 06:38Also, 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.
' 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
Herbert123 hat geschrieben: Mi 10 Okt 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.
Herbert123 hat geschrieben: Fr 05 Okt 2018 09:44What 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?
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?
"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 hat geschrieben: Do 11 Okt 2018 17:41And 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:
russellcottrell hat geschrieben: Do 11 Okt 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.