Jump to content

Recommended Posts

Posted (edited)

Hi,

I am trying to PNG export a simple stroke made using a Pen tool in Affinity Designer

Stroke width  = 750px

stroke thickness = 10px

Export size = 765 x 15px

Stroke properties

Cap = Butt Cap

Join = Miter Join

Align stroke = Outside

 

How can I set the stroke properties such that the size is exactly 750px x 10px instead of 765px x 15px ? Thank you

Edited by plutopot
more details
Posted

It would be easier to draw a rectangle 750px x10px or you could use (main menu at the top of the affinity app) Layer > Expand Stroke.

Also make sure the rectangle is pixel aligned so in the transform panel, in the X: and Y: boxes make sure it has integer numbers i.e. 80 not 80.3 

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Posted
2 hours ago, firstdefence said:

Also make sure it is pixel aligned so in the transform panel, in the X: and Y: boxes make sure it has integer numbers i.e. 80 not 80.3 

When I tried it, a pixel-aligned 750x10 px stroke, exported to PNG as "selection without background", ended up as 752x12px in the exported file. And it was surrounded by some transparent background, making the total size 770x20 px.

I don't understand why.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Posted

This throws up a related issue. Creating slices from individual strokes can give some strange slice dimensions.
See my attached afdesign file and image where each curve is 100 pixels in length with different ‘endings’. Creating a slice from each produces some interesting results where only ‘two-round-ends’ is created as I would expect. (The vertical guides shows where the curves are supposed to stand and end.) The slice containing the 300% oblique arrow head is particularly large.
I don’t think this is the correct behaviour, or to put it another way, if I wanted to export a slice from a curve I wouldn’t expect or want all of the extra space.

strangely-sized-surve-slices.afdesign

Annotation 2019-12-31 123816.png

Posted
33 minutes ago, walt.farrell said:

When I tried it, a pixel-aligned 750x10 px stroke, exported to PNG as "selection without background", ended up as 752x12px in the exported file. And it was surrounded by some transparent background, making the total size 770x20 px.

I don't understand why.

I was talking about the 750px x 10px rectangle Walt, the stroke exported just makes sizes up depending on which cap, butt and align you use, you could use the export persona to manually create a slice but that kind of defeats the object of the slice from layer approach.  

This is a manually drawn slice in export persona, the stroke is pixel aligned so snapping is accurate.
1195008242_ScreenShot2019-12-31at12_53_13.png.33993b1caeaeb5cf89cde1023369ffe6.png

This can also be used on layer slice creations and as long as the stroke is pixel aligned you can quickly modify the layer created slice to fit exactly, so although it's a bit of a bind to have to post edit a slice it's a doable workaround.

pixel-aligned-stroke.gif

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Posted
21 hours ago, firstdefence said:

It would be easier to draw a rectangle 750px x10px or you could use (main menu at the top of the affinity app) Layer > Expand Stroke.

Also make sure the rectangle is pixel aligned so in the transform panel, in the X: and Y: boxes make sure it has integer numbers i.e. 80 not 80.3 

I eventually did it the rectangular way, but it requires extra work when I want to experiment with different stroke sizes. The line is pixel aligned, but still getting the same behavior.

I used pen tool as I wanted stroke on certain parts of a shape. For example a hexagon with stroke on 3 sides. Would really like to know if there's any way to do this

 

Posted
2 hours ago, plutopot said:

For example a hexagon with stroke on 3 sides

You can create a hexagon using the Polygon Tool...

  1. Select the Polygon tool Shape_Polygon_lightui.png.19ecf94129abd382aef24e01e0d30bcf.png
  2. Change the Sides: to six on the polygon context menu (Just above the workspace)
  3. Apply a stroke width and stroke colour
  4. Set the Cap, Align and Join (Adjust mitre if necessary)
  5. Set No fill line_none_lightui.png.b6464eedc246ce41aa1b96b29093837d.png 
  6. Convert to curves
  7. Select two opposing nodes and break curve 195974864_BreakCurve_lightui@2x.png.d2f26d4bc8dcb90be05020c2eb802415.png
  8. You should now have two curves in the layers panel that represent two halves of the hexagon.

You can Expand the stroke after and edit the nodes to suit.

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.