GFX_Wizzard_BF - [Modules - All OS]

Share your advanced PureBasic knowledge/code with the community.
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

Hi, I'm Saki Tanaka.

I am a software developer and since a short time I'm also creating functions for the PureBasic based GFX_Wizzard_BF.
Soon a lot of new professional features for text and text output gadgets will be added to the package.


The newest text functions of the GFX_Wizzard_BF use completely new algrythms.
For example, you can completely remove annoying text borders.
However, they can be added again in any size via a virtual padding.
Proportional and unproportional text output of any size can be created.
It is sufficient to define an output rectangle.
This simplifies the handling of text outputs to a unique level.
No fonts need to be loaded, text sizes in any size are generated automatically.
Fonts can be used as desired by simply calling the font name. As well as all Font Flags.
Even the distance between the letters and the distance between the text lines can be freely adjusted.

A part of what you see here is already included in the current archive.
Many new features and demo codes in the next update. :!:

Unfortunately I can't invest much time in this free thing, because I have other things to do. :(

This is a amazing enhanced PB ButtonImageGadget()
With the new text functions such a gadget can be created in minutes.
The same is also true for example for extended MessageRequester, GUI and much more.
An effort of many hours of programming can be reduced to minutes with the new text functions of the Wizzard.
The time saving can be exorbitantly high :!:
Image

This is an advanced Gadget_BF.
It can be used as ButtonImageGadget or CanvasGadget
are automatically created.
It can output any text, even animate it.
Alpha blending and any color changes are also available.
No fonts need to be loaded, everything is fully automatic, any text size can be displayed
Image


This ToggleGadget_BF is also based on the new text automatic functions.
The possibilities of this gadget are only partly shown here 8)
Image


This is a pasted text that automatically follows any resizing.
The text can be arbitrary, also multiline.
It requires considerable programming effort to create such a function.
However, it is the basis for all advanced pixel-exact output functions.
The text can be adjusted proportionally or unproportionally.
Image

This is a standard text function of the GFX_Wizzard_BF
(Little artifacts you see are gif bugs, all animations are absolutely clean)
Image

The advanced GFX_Wizzard_BF text output can be done on all channels, of course also on screen.
Image

A lot new text functions for PB
Image


Image
Best Regards

Saki
Last edited by Saki on Fri Sep 04, 2020 11:50 am, edited 3 times in total.
地球上の平和
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Andre »

A new update of the free GFX Wizzard BF package was released today. See first post for download.
(Note: For smaller bug-fix releases only the 'actual date' in first post will be updated.)

Included changes are the extended/updated Wizzard module and around 30 new or updated demo codes.
See more infos and screenshots in the previous posting by Saki.

Have fun! :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

I have created a new gadget for the GFX_Wizzard_BF the last days.
It can be used as ButtonImageGadget or CanvasGadget.

MagicTextGadget_BF

It will probably be included in the next update, the next few days.
At the moment it is still under review.
Everything is already working fine.

It works with an additional "Set" function,
which as usual supports a functionality similar to #PB_Ignore.

It is a very powerful gadget, which is based on my latest findings.

It is not so easy for me to read the Wizzard code,
but things are getting better and better.

The gadget is based on several other functions.
This is the usual way in the Wizzard.

It was difficult and complex to code, but it was worth it, it work perfectly.

That was it with the new text functions,
I just have to take care of other things.

Best Regards Saki

The animations shown in the other gif above are also possible here and much more :wink:

Image
地球上の平和
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Andre »

A new update of the free GFX Wizzard BF package has just been released. See first post for download.
(Note: For smaller bug-fix releases only the 'actual date' in first post will be updated.)

Included are the latest additions (MagicTextGadgets) and improvements on the GFX_Wizzard module and demo codes.
See above for more infos and screenshots.

Have fun! :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

Announcement :
In the next days there will probably be an main update of the GFX_Wizzard_BF.
The work is almost finished.
Extensions, new functions and many optimizations are included.

Based on the Magic Text routines of the Wizzard there is a new amazingly working
beautiful MessageRequester.

There is no need to load fonts and the text sizes are still infinitely variable.
Images are insertable, gradient colors and much more.
Just enter the name of the desired font.

Any text is automatically fitted, even in the buttons.
The available space is optimally used.

The concept of Magic Text (MT) and his Button Generation is new and only available in the Wizzard.

Best Regards Saki

Image
Last edited by Saki on Tue Sep 29, 2020 8:37 pm, edited 2 times in total.
地球上の平和
Bitblazer
Enthusiast
Enthusiast
Posts: 733
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Bitblazer »

That looks very nice. I am looking forward to the update :) Good work.
webpage - discord chat links -> purebasic GPT4All
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

Hi Bitblazer
Many thanks.
Now all is final.
Look, the image above is updated.
The update can go online.

Best Regard Saki

The small sample images above do not show the high image quality with DPI aware enabled.
On a 4K monitor this looks really extremely good.

The image size of the images that can be added in the Requester
can be specified as a percentage of the available space, separated in x and y.
This way the images are always adjusted exactly automatically, no matter how big the requester is.
The image proportions are not changed,
so the images are never displayed too large or distorted.

Image
Last edited by Saki on Mon Oct 05, 2020 9:24 pm, edited 1 time in total.
地球上の平和
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Andre »

A new update of the free GFX Wizzard BF package has just been released. See first post for download.
(Note: For smaller bug-fix releases only the 'actual date' in first post will be updated.)

Included are the latest additions (new powerful MessageRequester) and improvements on the GFX_Wizzard module and demo codes, as mentioned above.

Have fun!
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

A new update is ready, which mainly deals with the MagicGadgets.
It will probably be uploaded immediately.

There are now new fascinating possibilities to create buttons or text gadgets.
These buttons can be created as Canvas or ButtonImageGadget as before, which can be easily selected with a flag.
Colors and background images or "icons" can be added as you like.
Any image format supported by PB is supported.
Everything can be combined with Alpha Blending.
Image layers can be placed in front or behind the text.
The background color can be mixed with the colors of the images.

It was a lot of work and extremely difficult to implement, but
it works fantastically well and is very beautiful to look at.

These new gadgets work great with all OS and DPI aware

The new Messagerequester_Magic_BF is also extended by this.
(Image above updated)
There is a new parameter to set the color of the buttons, which has to be considered if you use an older version.
This is then reported by the debugger.
Now you can make also the Text clickable with a simple flag.

Furthermore a core routine has been optimized which speeds up the image buildup noticeably.

These are a few examples showing inserted images.
Normal color buttons can be displayed as well.
Fading, zoom, moving text and much more is possible
Image
地球上の平和
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Andre »

The updated GFX_Wizzard_BF archive is online, including updated functions and demo codes as described above.

See first post for download.
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

Because the PB5.73 Beta 2 is released there is now an early update.
It will probably be uploaded after a last check.
There is also something new again.
Besides the usual small revisions all over,
the MagicGadgets_BF have been extended again.
You can now also easily output animated gif frames.

Inserting GIF is extremely easy - all buffers are automatically handled, the delay handling is very simplificated 8)

Very nice is, that you can use the gadget for automatically buffered
proportional and adjusted GIF or image output on a window or a canvas container.
If no text is calculated, it is very fast and can display three animated
GIF or images at the same time :o

Image
This is a clickable ButtonImageGadget.
You can add custom frames, moving or zooming the text, fading the images and the text with alpha blending,
changing the layers arrangement, coloring and resizing the images, resizing the ButtonImageGadget.
Changing the Gadget to a CanvasGadget and other nice things.

All on demand with the Function SetMagicTextGadget_BF()
This function accept for all parameters -1, this works same #PB_Ignore 8)
Last edited by Saki on Sat Oct 10, 2020 3:38 pm, edited 5 times in total.
地球上の平和
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Andre »

A new Wizzard package is online, see changes shown above 8)

For download see first post. Enjoy! :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

Thanks a lot Andre.

With the next update the MagicTextGadgets can also output as ImageGadgets with transparency,
alpha blending all over, included text and three different proportional fitted images or GIF.
So it is possible to place GIF, text or images proportional resizable exactly on a GUI.
There are no disortions or unwanted size changes in consensus to layout.

A little temporary hint for Linux users.
The latest demo codes and the MessageRequester_Magic_BF will also updated.
They are then more adapted to Linux and gtk3.
Further tests and updates with QT are not done at the moment.
If the known QT bugs are fixed everything should run on QT without problems.
gtk2 is mostly problem-free or handled.

In the demo codes you will also see a simple Wizzard solution to automatically adjust all output to gtk3

Linux subsystem gtk3 demo output MessageRequester_Magic_BF
Image

Magic ImageGadget directly on a Window with transparency and included ProgressBar
Image
Last edited by Saki on Tue Oct 13, 2020 11:40 pm, edited 3 times in total.
地球上の平和
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Andre »

The new GFX_Wizzard_BF archive with the updated module and example codes (mentioned above) is online now :-D
For download link see first post.
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Saki
Addict
Addict
Posts: 830
Joined: Sun Apr 05, 2020 11:28 am
Location: Pandora

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Saki »

Hi all,
there will be another small update.
Fixed is now a possible flickering of the MagicStretchText ImageGadgets during animations under Windows.
Now a 32 bit image is only used internally if a transparent output to the background is used.
The last demo codes _4 and _5 of the MagicStretchText() gadget have been adapted to Linux.
Fine adjustment of the clipping and text centering of this gadget.
As a small "easter egg", there is now a colored alpha channel and layer sensitive ProgressBar
that can be activated in these gadgets, which is very handy, because you don't need a separate one anymore.
This is demonstrated in demo code _5.
In the GIF a few postings above you can already see it.
It is gadget custom frame sensitive and can so be fitted in very nicely.


More is not needed for add the ProgressBar 8)
Image

Code: Select all

MagicStretchText_Add_ProgressBar_BF(precent_progress, $600000FF, layer)
SetMagicTextGadget_BF(gadget_1_ID)
This set a image or GIF frame

Code: Select all

; Set a GIF frame or image
MagicStretchText_Add_Image_1_BF(image_1_ID,  ; Image ID - deactivate = -1
                                        240, ; x
                                        0,   ; y
                                        50,  ; Image width  - percent
                                        50,  ; Image height - percent
                                        255, ; Image alpha
                                        1)   ; Sticky image)
        
 SetMagicTextGadget_BF(gadget_4_ID)  ; Draw the Gadget content
This only one line can handle the GIF delays, this is extremely simple and efficient.

Code: Select all

If Delay_BF(1, Get_Gif_FrameDelay_BF(image_2_ID, frame)) : frame+1 : refresh=1 : If frame=frames : frame=0 : EndIf : Else : refresh=0 : EndIf
Well, you might ask yourself how the MagicGadgets_BF work.
They work like many things in the Wizzard.
It is the union of 4 text functions of the Wizzard.
This is always constructive.
The basic function is the DrawVectorText.
Based on this, DrawTextVector_BF is realized.
The function MagicStretchText_BF is created.
MagicStretchText_Pro_BF is created from this.
From this the MagicStretchTextGadget_BF is created.
Internally the function from the Wizzard Sprite department is still working
for text size calculation and many PB functions.

If a bug occurs after a PB update, the individual functions can be checked, which simplifies things extremely.
There are currently more than 250 different demo codes, which immediately reveal 2D graphics-related bugs.
Also due to the complexity of the Main Code many bugs are detected immediately.
There is simply no other very large software for PB that runs on all OS.
For the localization of rudimentary bugs the Wizzard with its demo codes is unbeatable.
Last edited by Saki on Sat Oct 17, 2020 12:23 pm, edited 6 times in total.
地球上の平和
Post Reply