Grainlines and Labels appearance

OK… I finished adding color to the grainlines & pattern labels, as well as adding global view toggles to show / hide all of them. This should accommodate anyone using a drag or lazer cutter.

Here is an example of all the piece items colorized a different color, and the new grainline & label prefs.

The additions to the View toolnbar

view_toolbar

and the View menu

gl_menu

While adding color to the labels, another issue I fixed, one that I’m surprised has not been brought up before… is the Layout → Export text as paths…

exportaspath

The idea of using texts as a path is where the font should have no (brush) fill… unlike the output in Valentina:

labelpath1

How the label text as paths should be…

labelpath2

Just added the same path option to the grainlines:

welt

2 Likes

Oh, wow! I can’t wait to test-drive it :star_struck: :star_struck: :star_struck: :grin:

I’ll probably upload the changes later today… just cleaning up - um refactoring the gawd awful Hungarian Notation naming conventions used in the Text Labels & Grainline widgets. For the life of me I don’t know why anyone in their right mind would use that in modern day C++. The code is hard enough to read through without having to deal with that on top of bad abbreviations - like pME or fH and fW… instead of event, height and width. Or instances like bShort == true instead of just isShort.

In case anyone is wondering what Hungarian Notation is… it’s a naming convention where the data type prefixes all the variable names - p for pointer, i for int, f for float, d for double, b for boolean, qs for QString, etc etc etc. It can be a nightmare to decipher.

" Linus Torvalds (against Systems Hungarian):

Encoding the type of a function into the name (so-called Hungarian notation) is brain damaged—the compiler knows the types anyway and can check those, and it only confuses the programmer"

1 Like

Yes, the difference between Apps Hungarian (which can be useful) and Systems Hungarian (Microsoft did not understand the invention of Charles_Simonyi) :wink:

1 Like

Debatable. Regardless… it’s not the style of this project. And there in lies the problem… no one was maintaining any consistency in style. Considering Qt is the framework - IMO that’s the style the the project should follow - which is certainly NOT Hungarian notation.

1 Like

As a consequence of testing this issue, I came across again a long standing issue in regards to the rotation of the pattern “piece” label. When trying to interactively rotate it, once you release the mouse the label returns to it’s original rotation. I fixed the issue and made a PR.

Anyhow… I added the line weight option to the grainlines. The default is set to 0.25 mm, which when scaled by a factor of 3 (which I did to get a wider range of sizes for the grain lines), approx yields the current line width of 3 pixels.

default1

default

and the max of 2.11mm yields this:

max

Also fixed the arrow heads when using “Text as paths” to not have the leader line going through the head(s).

welt2

2 Likes

Should be in this pre-release…

2 Likes

Wow! Thank you very much :slight_smile: It seems to work very well. Unfortunately, I printed my pattern yesterday, so it will be a few days before I need to print another, so will keep you posted :star_struck:

Arrow heads were exporting separate from the line, normally without a fill. They now export as one item with solid colour. Thank you very much. :slight_smile:

Unless you select “Text as Path” in the layout settings, in which case only the outline (path) or the arrow heads are exported. I just used the same checkbox state to determine how the text and arrowheads export. Granted the terminology should probably change to something more inclusive like “Graphic objects as path”… even more so once I introduce symbols.

1 Like