GFX_Wizzard_BF - [Modules - All OS]

Share your advanced PureBasic knowledge/code with the community.
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 »

New archive with updated module and demo codes is online!
Download 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, many thanks Andre.

Wizzard functions can be combined.
Here the ProgressBar_BF is projected into a MagicGadget_BF.
This is clickable like a normal button and can easily replace the OS ProgressBars.

It is also possible to show a running text instead of the progress,
a moved text banner with running or changing content, or more additional texts.
The abilities are nearly endless, nearly all on the Wizzard is combinable, this is the magic of the Wizzard. :wink:

Demo Code : "Progressbar_BF_on_MagicTextGadget_enhanced.pb"
Image
地球上の平和
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 :
Because of the great interest in the new Magic functions I added other really cool extensions.

All is ready and will come the next days :)

With the next update all MagicText functions and the MagicGadgets will be able to output embossed and unembossed text.
The embossing can be done in any color, which looks extremely good on any backgrounds.
The text quality is even higher, as example, DPI aware becomes razor sharp.
This new feature can simple be switched on or off for each or all Magic outputs.

Image

All Magic outputs, i.e. all functions including Magic Gadgets, can now output textured text.
This function can be activated for single texts or for all text and all MagicGadgets.
The textures can be resized on demand and both axes can be scrolled.
There is also an automatic tilling, so there are never gaps, it always fits, no matter what size you set for the texture

A similar background creating function with automatic tilling, resize function and full scrollable is also added now.
Image

Can outout textures and colors, with full adjustable clipping on free MagicText and all MagicGadgets :shock:

Embossed text with moved texture
Demo code : "Text_output_with_Magic_StretchText_BF_Moved_texture.pb" and other.
Image

All is combinable, also with alpha blending - This is a clickable free resizable Button :wink:
Image

Image

MagicText can output on all channels, also on screen.
As free text, fitted free text, proportional, non proportional, colored, textured, alpha blended
At the same as ImageButton, ButtonImageGadget, CanvasGadget
With full featured headletter mode, left, right, RTL, true vertical text.

These are not images that are enlarged or reduced.
The entire content is completely recalculated on demand.
This is the only way to always achieve the highest possible quality of the output.


When texts become very large, the margins usually become uncomfortably large,
which has a very negative effect on the layout of buttons or text boxes.
MagicGadgets have freely adjustable borders, this allows completely new button designs
Look, this is a button, the margins are set nearly to zero. :shock:
Image
地球上の平和
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, a little more patience.
Everything is ready and will only be checked finally, then it goes online.
It is a main update.

There were also fixes concerning DPI aware and the MagicGadgets.
These codes are meters long, something is quickly overlooked.
With the 573.b2 there are 1 pixel wide shifts, everything had to be adjusted.
But this is right now, before it was wrong.
Last edited by Saki on Wed Oct 28, 2020 2:35 pm, edited 2 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 »

New GFX_Wizzard archive with updated main module and 40+ new or revised demo codes - see announcements above - is online now. :D

For download see first post.
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
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 »

Thanks a lot to all people involed :)
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 »

Thank you Bitblazer, we wish you and all other users a lot of fun with the new Magic features.
地球上の平和
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 »

Many updates and enhancements

The new FontWizzard_BF with all demo codes is now included in the GFX_Wizzard_BF download archive.

The FontWizzard_BF is a stand alone tool that can be used independently or combined with the GFX_Wizzard_BF.

The codes have become too large to post separatelly on the forum.

Also, maintenance is too cumbersome and error prone when multiple different instances exist.
They should first exist as small single codes in the forum, but due to the great potential of the possibilities
and extensions quickly became too large and extensive.
Therefore only the codes contained in the GFX_Wizzard_BF are developed and maintained.

Everything is fully DPI aware and supports 4K.

The FontWizzard_BF has been greatly expanded and now also contains a complete ProgressBar of its own, which can be
displayed in the gadgets or outputs, vertically and horizontally.
Image frames and sub-frames can be inserted in multiple layers.
GIF frames can be output as well as images with and without alpha channel.
The frames are not simple frames, but they are font size sensitive.
This means that when framing an output, the text contained in the frame automatically recedes in front of the frame,
so it is automatically adjusted to the frame size.
Multiple sub-frames can be inserted into the design.
Sub-frames can be displayed as filled areas or frames with any frame thickness.
Text components can be framed or backed with them, as can images, in three layers.

The FontWizzard_BF allows all PB standard gadgets, which are font size sensitive, to be automatically filled with fitting texts (fonts).
Custom gadgets are not necessary.

All existing gadgets in a code, including CanvasGadget, ButtonGadget, ButtonImageGadget, can be added to FontWizzard without any
changes to an existing code into FontWizzard_BF gadgets.

Buttons, CanvasGadget, ButtonGadget and ButtonImageGadget can be created normally, even with a visual designer or a dynamic GUI.
A simple SetGadget_FW call will create FontWizzard_BF gadgets and ColorButtons which can output and resize any text
automatically and can be resized.
Including text, images, GIF, icons, frames and backgrounds in four layers.
For all outputs including text semi-transparency is supported, i.e. the Alpha Channel.

Output can also be directly to Screen, Images, Sprites, Canvas and Window, with no size limit.
Complex objects can be created, which can output the above contents with a single Call
can be output arbitrarily.
These objects can be combined in turn.
A complex output with several colored texts in different sizes, including pictures, frames and colorizations
can be created and ported arbitrarily.

No fonts have to be loaded, it is sufficient to specify the name of the desired font and the appropriate font flag.
A functionality similar to #PB_Ignore is also supported, parameters that are not needed are replaced with -1
and automatically set to default values.

It is sufficient to specify the ID of the output channel or the desired gadget.
It will then automatically detect if it is an ImageGadget, ButtonImageGadget or CanvasGadget.
For free output on images, canvas, sprites it is the same.
For Screen Output only a flag is activated.

Designs and content can also be inherited automatically like the text cursor position.

This opens up completely new possibilities for text output and design.

The Rabbit FileCrypter_FW and the MessageRequester_FW enhanced by the FontWizzard_BF is also included.

The Rabbit_FileCrypter_FW can encrypt thousands of files or folders in seconds.
It has an automatic undo function which can reverse an accidental encryption or decryption of thousands of files or folders.
The integrity of encrypted files or folders can be verified.
This small crypter does not create any temporary files and is incredibly fast.
It is very easy to use by dragging and dropping.
It can create key-files and also preload them.

This is a wonderful little tool for small needs.
The Rabbit Algorythm is considered unbroken and safe.

Using the great Rabbit ASM Crypter by Wilbert.
viewtopic.php?f=27&t=76197&start=30

Update 28_12_2020 : Three-Rabbit Crypter added - Multi stage 256 bit effective key length

Image

Image

Image

Image
地球上の平和
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 »

Image

The FontWizzard_BF included in the GFX_Wizzard_BF archive has been completely reworked and greatly extended.
Several bugs, mostly concerning Alpha Channel support for output to screen and canvas on different OS have been fixed.
A comprehensive and bug-free function for output to the OpenGLGadget(), also DPI aware !, has been added.
Special demo codes for demonstrating the output on Screen, OpenGLGadget, CanvasGadget,
ImageGadget, ButtonImageGadget are added or updated.
There is now no misbehavior to be found on any OS.
Complex outputs can be created, which can be attached to a
CanvasGadget or OpenGLGadget or any coordinate of an output channel.
This means that, for example, a single output to a CanvasGadget generates
different content, which can then be automatically scaled and displayed on any location of the canvas.
And many more...

A few more tips.
Those who are not familiar with it will probably be surprised, but it is actually the case
that the text output on screen becomes extremely better by using DPI aware.
You can also see that the DPI aware font is larger,
if there is no adjustable padding possible this will quickly cause problems. :wink:
Image

Image

Have Fun
地球上の平和
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 »

The FontWizzard_BF is reworked, enhanced and debugged.

LinearGradient Text is now also available.

The associated demo codes are extended and adapted for the new features.

The complex outputs of the FontWizzard_BF can now also be created directly as images or PB sprites.

This allows for example complex text, including images, textures, multiple frames and backgrounds,
as well as an arbitrarily addable colored ProgressBar, directly with one call
as a PB sprite on screen.

This makes text design on Screen extremely easy.
Yes, on the OpenGLGadget, it works just as easily as on Canvas,
ButtonImageGadgets and ImageGadgets.

And many more... :wink:

Image
地球上の平和
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 »

The FontWizzard_BF has been extended again and now also supports the creation of TextImages with transparency and GradientColor.

With these new TextImages you can simply define a color which should be transparent.
This is very easy and offers nice possibilities.
Then real 32Bit images with transparency are created,
which can be processed as you like.

Optimal for outputs with transparency and gradient color on screen or OpenGLGadget,
or any post processing.

The picture below shows such an output.

Furthermore, the speed of the calculation of the dynamic fonts in the GFX_Wizzard_BF Core
module, as well as in FontWizzard_BF has been extremely increased.


The speed increase for the usual small font sizes is approx. 300%.
The calculation of required font sizes is now in fact always blazingly fast.

MagicText_BF works differently, completely vector based, here the font calculation is pixel accurate and highly complex.

The FontWizzard_BF does not use the Vector Lib at all.
This results in extreme text sharpness at all font sizes and desktop scaling.

The method shown here in the code gives the text a very fine embossing pattern.
It then no longer looks flat, which enhances it enormously.
To do this, set the background color to be made transparent to black or dark gray.

These sophisticated text effects are only available in the Wizzard_BF codes. :wink:

Image
地球上の平和
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 »

The FontWizzard_BF is updated again

H E A D L E T T E R mode added, all available fonts supported.

SubFrame Fix and better SubFrame Handling.
Again high speed up for calculating very big fonts, also on the GFX_Wizzard_BF core module.
Latest Demo codes updated and new codes added.

The FontWizzard_BF now also supports freely adjustable headletter texts.
A magic and cool new feature ! 8)
This means that the spacing of the letters and text lines can be set freely for each text output.
The distance of the letters to each other and the lines can be adjusted pixel-exactly.
Including full automatic text scaling, fitting and adjusting.

Furthermore text lines can now be set to different colors.

This makes it easy to create real MultiColor buttons.

With this multi color feature you can for example
make a text line of a button blink red, or change the status by switching between red, black and green.

These two new features are very sophisticated and allow completely new designs. :wink:

And again,
the FontWizzard_BF is a stand alone module which has absolutely nothing to do with the GFX_Wizzard_BF.
Nevertheless, both modules can work together and complement each other seamlessly.

Image
Image
地球上の平和
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 important code enhancement.
The FontWizzard_BF MultiColor function has been revised and greatly expanded.
Hundreds of lines of text can now be colored simplest as desired.
The demo codes have been adapted and optimized to this new feature.

Have fun with it.
Last edited by Saki on Wed Jan 27, 2021 10:20 am, edited 1 time in total.
地球上の平和
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 »

Formatted Lists

Here a code example for very easily creating formatted lists with the FontWizzard_BF.
DPI aware, all available scalings supported.

Image

This small and very simple code is all that is needed to do this :wink:
The size and position of the entire list can be set using only 3 parameters.

Activate DPI aware !

Code: Select all

; FontWizzard_BF - Demo code - Formatted lists
XIncludeFile("./FontWizzard_BF.pbi")
EnableExplicit

Define DR.f=DesktopResolutionX(), i

Define scaling.f=1.0    ; List output size
Define x=100*scaling*DR ; List output x pos
Define y=80*scaling*DR  ; List output y pos

Define window_ID=OpenWindow(#PB_Any, 0, 0, 950*scaling, 600*scaling, "Font_Wizzard_BF", #PB_Window_ScreenCentered|#PB_Window_SystemMenu|#PB_Window_Invisible)
Define canvas_ID=CanvasGadget(#PB_Any, 0, 0, WindowWidth(window_ID), WindowHeight(window_ID))
SetGadgetColor(canvas_ID, #PB_Gadget_BackColor, $CDCDCD)

PresetMaxFontsize_FW(12*scaling)
SetCursor_Y_FW(y)
For i=1 To 10
  AddFrame_FW(2*scaling*DR, #Black)
  DrawText_FW(canvas_ID,                     ; output_ID
              "",                            ; Font$
              0,                             ; font_flag
              x,                             ; output_x
              GetCursor_Y_FW()-2*DR*scaling, ; output_y
              50*scaling*DR,                 ; output_width
              45*scaling*DR,                 ; output_height
              #Blue,                         ; text_color
              0,                             ; text_adjustment
              #White,                        ; background_color -1 = invisible
              Str(i),                        ; text$
              -16,                           ; padding_x
              0,                             ; padding_y
              1)                             ; resize_factor.f
Next i

TextColor_Line_FW(1, #Blue) ; Set Line 1 blue
Define x=GetCursor_X_FW()-2*DR*scaling
SetCursor_Y_FW(y)
For i=1 To 10
  If i>3 : TextColor_Line_FW(1, -1) : EndIf ; Deactivate again
  AddFrame_FW(2*scaling*DR, #Black)
  DrawText_FW(canvas_ID,                     ; output_ID
              "",                            ; Font$
              0,                             ; font_flag
              x,                             ; output_x
              GetCursor_Y_FW()-2*DR*scaling, ; output_y
              150*scaling*DR,                ; output_width
              45*scaling*DR,                 ; output_height
              #Black,                        ; text_color
              1,                             ; text_adjustment
              #Yellow,                       ; background_color -1 = invisible
              "Hello World",                 ; text$
              -16,                           ; padding_x
              -5,                            ; padding_y
              1)                             ; resize_factor.f
Next i

Define x=GetCursor_X_FW()-2*DR*scaling
SetCursor_Y_FW(y)
For i=1 To 10
  AddFrame_FW(2*scaling*DR, #Black)
  DrawText_FW(canvas_ID,                     ; output_ID
              "",                            ; Font$
              0,                             ; font_flag
              x,                             ; output_x
              GetCursor_Y_FW()-2*DR*scaling, ; output_y
              150*scaling*DR,                ; output_width
              45*scaling*DR,                 ; output_height
              #Black,                        ; text_color
              1,                             ; text_adjustment - 0=center - 1=left - 2=right
              #Green,                        ; background_color - -1 = invisible
              "How are you",                 ; text$
              -16,                           ; padding_x
              -5,                            ; padding_y
              1)                             ; resize_factor.f
Next i

TextColor_Line_FW(2, #Red)
Define x=GetCursor_X_FW()-2*DR*scaling
SetCursor_Y_FW(y)
Define text$="Hey"+#LF$+"We hope you are well"
For i=1 To 10
  AddFrame_FW(2*scaling*DR, #Black)
  DrawText_FW(canvas_ID,                     ; output_ID
              "",                            ; Font$
              0,                             ; font_flag
              x,                             ; output_x
              GetCursor_Y_FW()-2*DR*scaling, ; output_y
              150*scaling*DR,                ; output_width
              45*scaling*DR,                 ; output_height
              #Black,                        ; text_color
              1,                             ; text_adjustment - 0=center - 1=left - 2=right
              #Yellow,                       ; background_color - -1 = invisible
              text$,                         ; text$
              -16,                           ; padding_x
              -5,                            ; padding_y
              1)                             ; resize_factor.f
Next i

TextColor_Line_FW(2, #Blue)
Define x=GetCursor_X_FW()-2*DR*scaling
SetCursor_Y_FW(y)
For i=1 To 10
  Select i
    Case 1
      Define text$="Created with FontWizzard_BF" 
    Case 2
      Define text$="A new way for text output on PB"
    Case 3
      Define text$="All you can eat"+#LF$+"Many advanced features"
  EndSelect
  AddFrame_FW(2*scaling*DR, #Black)
  DrawText_FW(canvas_ID,                     ; output_ID
              "",                            ; Font$
              0,                             ; font_flag
              x,                             ; output_x
              GetCursor_Y_FW()-2*DR*scaling, ; output_y
              250*scaling*DR,                ; output_width
              45*scaling*DR,                 ; output_height
              #White,                        ; text_color
              1,                             ; text_adjustment - 0=center - 1=left - 2=right
              #Red,                          ; background_color - -1 = invisible
              text$,                         ; text$
              -16,                           ; padding_x
              -5,                            ; padding_y
              1)                             ; resize_factor.f
Next i

HideWindow(window_ID, 0)
Repeat
Until WaitWindowEvent()=#PB_Event_CloseWindow
地球上の平和
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 comprehensive update is online.

The FontWizzard_BF was originally planned to provide any PB gadgets with matching fonts
and to provide all image based PB gadgets with colored text images and various content.

However, it quickly turned out to be much more.

There is now a new command to create FW Color Gadgets directly.
You just specify if it should be a CanvasGadget, an ImageGadget, or a ButtonImageGadget,
simply with a flag.


In addition, a command set is now included that can also read the text from the gadgets,
including the text color, background color, the padding used, the font size used,
the headletter stretchfactor and the text images.


A list can now also as sample be easily created based on ColorGadgets,
Just click on the buttons in the new list demo code,
then the content of the gadgets will be displayed in the debugger, can be evaluated and recreated.

Are many nice new things and primarily very useful.

Have fun.

Image
地球上の平和
Post Reply