|
Post by vovchik on May 5, 2017 9:19:18 GMT 1
Dear all,
I have updated the app, taking into account MochiMoppel's comments (Puppy Linux forum). Default font handling is now better, and combo lists are now alphabetized. Also, the display window closes after a save. Next in line is the inclusion of axis scaling and skewing and matrix transforms.
The updated version is in the first post.
With kind regards,
|
|
|
Post by Pjot on May 5, 2017 18:40:36 GMT 1
I'm getting a seqfault. Current BaCon 3.5.4 pulled from Fossil a few minutes ago, hug.bac just pulled from the website. <....> With the fixed xsize, ysize, works great, and it'll be handy for doing some GnuCOBOL banners. I was able to reproduce this segfault now. It turns out that the function 'pango_layout_get_pixel_size' was (a) wrongly defined and (b) wrongly used The error relates to the way C refers to pointer variables. When the ADDRESS function is used without proper pointer definitions then GC will simply see two large numbers, while it needs addresses to store values. In the latest source code, the following has to be adapted. Line 380: IMPORT "pango_layout_get_pixel_size(long,int*,int*)" FROM pango$ TYPE void
Line 503: pango_layout_get_pixel_size(layout, &l_width, &l_height)
Now the program works also without optimization flags. BR Peter
|
|
|
Post by vovchik on May 5, 2017 19:39:34 GMT 1
Dear Peter, Thanks for that serious fix - and the explanation. The revised source is in the first post. I have also implemented radial gradients for text and backtround, but this option is activated by selecting "Radial" in the colors combos. It was easier to implement this way, without having to rearrange the gui. The attached image shows radial gradients for font and background. With kind regards, vovchik Attachments:
|
|
|
Post by basica on May 5, 2017 21:23:48 GMT 1
vovchik, This makes me feel like I'm at the console control screen of the great Vovchik "Texticonator". A power tool of mass construction. For saving and applying, it looks as if you took a "have your cake and eat it, too", approach. Nicely done. Thanks again, for a great program, basica (One item -I did not notice a "Radial" selection, just the "FG grad" and "BG grad" with color selection boxes)
|
|
|
Post by vovchik on May 5, 2017 22:25:08 GMT 1
Dear basica, Thanks. I have some new filters ready (Bevel, Distort, Shadow Drop and Warp). Warp is really weird with a fat font. As for Radial, it appears as an option in the color selection combo just under Font Sample (Radial for background is also in the background simple color select combo), at the bottom of the colors list. When you select it, the colsel boxes come alive, allowing you to set the gradient colors. I did Radial that way because it was faster for now and obviated the need to redesign the entire gui to make room for several extra widgets. This little app is coming along, and I will also do skewX/Y and matrix mods. With kind regards, vovchik PS. I am posting the updated source now.
|
|
|
Post by vovchik on May 6, 2017 12:56:23 GMT 1
Dear all,
MochiMoppel on the Puppy Linux forum suggested that I add a stroke-width spinbox to facilitate the thickening of fonts where font weights are not available (he uses many such Japanese fonts). It's an excellent idea and I have implemented it in the latest update. See first post.
With kind regards, vovchik
|
|
|
Post by vovchik on May 6, 2017 17:25:13 GMT 1
I have added patterns. A sample pattern can be accessed via the simple named color combo box and then by choosing two gradient colors. Attachments:
|
|
|
Post by alexfish on May 6, 2017 22:04:26 GMT 1
Hi Vovchik found a problem with the delete event , hug.bac has a auto delete-event ->exit if the X is clicked on the show pic window the the app crashes how add some extra imports + the methods of in the SUB SHOWPIC a of a hack a day but suppose can be cleaned up. txt2svg.bac in archive BR Alex Attachments:txt2svg.bac.bz2 (13.52 KB)
|
|
|
Post by vovchik on May 6, 2017 23:05:19 GMT 1
Dear Alex, Thanks for the mod. Much better not having the prog exit when you least expect it. I am posting the mod, which also includes another pattern. With thanks again and kind regards, vovchik
|
|
|
Post by alexfish on May 7, 2017 12:07:01 GMT 1
Hi Vovchik
Not sure if having alpha channel on the colour buttons may help with the colour scheme
Can be set using SETPROPERTY
IE
SETPROPERTY(colsel_fg1,"use-alpha",TRUE)
The Alpha value can be retrieved by
Doc Entry / API
guint16 gtk_color_button_get_alpha (GtkColorButton *color_button)
Returns
The Actual Alpha Visual = values 0 to 255
OR Can get the Alpha from GETPROPERTY Properties list
guint alpha Read / Write GdkColor * color Read / Write gchar * title Read / Write gboolean use-alpha Read / Write
BR Alex
|
|
|
Post by vovchik on May 7, 2017 12:37:43 GMT 1
Dear Alex, Thanks for that. I have to have a think how to implement alpha. Right now GETCOLOR$ returns #xxxxxx, and SVGs can deal with that but not #xxxxxxAA, as I understand. But there is also an SVG attribute "rgba:xxxxxxx" that supports alpha. And I have to test how gdk_pixbuf handles such SVGs. It all sounds very doable. With kind regards, vovchik
|
|
|
Post by greco558 on May 7, 2017 14:31:40 GMT 1
vovchik,
What a great program.
I will have to study the source code, I always learn something new from looking at your programs.
I am always impressed by the work you and the rest of the people on this forum put out.
It goes to show how limitless you can be in creating programs in BaCon, thanks Peter!
Best regards John
|
|
|
Post by btiffin on May 7, 2017 17:30:39 GMT 1
Thanks. Peter. Above and beyond, as usual.
Have good, Brian
|
|
|
Post by vovchik on May 7, 2017 20:51:38 GMT 1
Dear all, I added hatch, crosshatch and candystripe patterns (see first post). With kind regards, vovchik @john: Thanks. I hope you can make use of it it. I am already using it to design little logos. Attachments:
|
|
|
Post by vovchik on May 8, 2017 15:42:33 GMT 1
Dear all, I added a few filters - glass, icy and metal. The updated source is in the first post. With kind regards, vovchik Attachments:
|
|