GFX_Wizzard_BF - [Modules - All OS]

Share your advanced PureBasic knowledge/code with the community.
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by walbus »

Codes updated d17 m05 y2018

SpriteTool_BF :
Fixes and enhancements

Added :
FloodFill and BucketFill for transparent color - For images with transparent color (As sample PNG)
Now you can also replace any colors with transparence - Supports color distance
The fill functions of SpriteTool_BF are very powerful
They also support textures, colored textures, resizable textures, tiling, output clipping
With multi frame BucketFill, you can recoloring any complete GIF or sheet with only one stepp

100% speed up for very large images
Before give free, i will test a little this new code.

Look simple from time to time for a new BF code packet, i annonce not little changes.

We want to see what the PB570 brings, then there may be extensions or adaptations, but I really don't know now.

A Tipp :
The SpriteTool_BF FloodFill and BucketFill texture autput is adjustable :wink:
The output begins exactely on the selection rectangle x, y coordinate
You can as sample create a colored ellipse
Then load a image as frame
You can also pre colorize the selection rectangle, then the image is automatically colorized
Also rotating, alpha blending and color distance is available for the loaded frame, try simple what you want have
Adjust and resize the image with the trackbars exactly over the ellipse
Shortly leave the GUI with the mouse, then you can very easily fit the image exactly
On you can also move the mouse over the color button, this make the frame temporary 50% invisible
Activate the texture fill function
Fill the ellipse
Now you have a exactely fitted image in the ellipse :o
Image
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by walbus »

Codes updated d22 m05 y2018

Fixes and enhancements for SpriteTool_BF
BucketFill for textures now also with alpha blending, combinable with color distance, available
So you can create now very nice softly overlays for images with and without alpha channel

A Hint:
You can load any GIF with the SpriteTool_BF and convert to BF SpriteSheets, full automatically

This sheets you can edit and change how ever you want with the SpriteTool_BF

The BF sprite sheets are also simplest runnable with the SheetMaster_BF Module, with any PB codes :wink:
http://www.purebasic.fr/english/viewtop ... 12&t=70554

So you can get many more abilities as with GIF using and you has a very simple and powerfull handling
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by walbus »

Codes updated d25 m05 y2018

SpriteTool enhanced again
BucketFill for add adjustable transparence added, also for additional textures with adjustable transparence
The SpriteTool is now complete

Now, we wait for PB570, for testing compatibility, enhancements and maybe adding new things.....
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by walbus »

The BF Texture caching

Code: Select all

NoCaching_BF(caching) ; Deactivate texture caching - You must activate again - Activated is presetted - This is a global function
  
Get_caching_state_BF() ; Check is BF caching on or off

FreeTextures_BF(mode=0) ; BF cache all used textures for highspeed sprite output
                        ; 0=give all free - 1=Get amount cached textures - 2=Get required size for caching all textures in bytes
                        ; This refresh the cache and can so primary fix for your eyes strange animation problems
                        ; Temporary used textures free selective with the function Free_selected_Texture_BF, this is the recommended way
                        ; This function works also with PB sprites and canvas
                        ; Exit give free automatically all used textures

Free_selected_Texture_BF(texture_ID, free=1) ; Delete a selected texture from texture cache and give free
                                             ; Presetted is a included PB FreeImage call
                                             ; free_image=0 = only remove from BF cache - free_image=1 = remove from BF cache and give the image free
                                             ; Ever a texture is used from a BF function, BF cache the texture automatic
                                             ; Sucks a animation, you must remove the image from the BF cache
                                             ; Change you a texture content, you must remove the old unchanged texture from the cache
                                             ; Is a texture not used from a BF core based function, you can give free with the PB FreeImage function
                                             ; This function works also with PB sprites and canvas

BF automatically caches all loaded textures, sprites, images, photos

This has enormous advantages
One of the most important advantages is that BF functions with activated BF cache can write in themselves
Therefore, source and target can primarily be identical even for complex functions, there is no undesired feedback
walbus
Addict
Addict
Posts: 929
Joined: Sat Mar 02, 2013 9:17 am

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by walbus »

d31 m05 y2018

Well, a first beta of PB570 is released.

What changes for BF ?

Nothing !

The PB570 could have incompatibilities to BF was not expected.

There are no improvements which could be added to BF.

But, everything works as it should.

Tested at the moment only with Win x64.
For a final test with all OS it is still too early, I think.

Just check from time to time for a new download package regarding minor fixes or optimizations.
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 »

Codes updated: 16th Nov. 2018

Werner Albus contributed several improvements and an update for the GFX_Wizzard_BF include file, new code examples, and especially a new and powerful MessageRequester with following functions:
  • * Arbitrary large buttons with arbitrary text, both with any font and font size
    * Text with Linear Gradient support
    * Centered text (internally adjustable to left, right, RTL)
    * Freely scalable images and GIF can be inserted and freely positioned in the text area
    * Animated GIF with and without invisible color
    * Images and animated GIF as text background
    * Colorable background and text area
    * Automatic adaption of the MessageRequesters according to the used font and font size
    * Alpha channel support & Alpha blending
    * Automatic GIF detection, Alpha channel detection and Animation support
Download on http://www.PureArea.net - direct link see also first post!
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
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 »

Code updated: 24th Nov. 2018

Werner contributed several small fixes/improvements, including a new ColorButton_BF function:
  • - Automatic multi line support
    - Automatic text size
    - Automatic text adjustment
    - Outputs all fonts with edge smoothing
Download on http://www.PureArea.net - direct link see also first post!
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
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 »

Codes updated: 6th Dec. 2018 - see download in first post.

Werner revised nearly the complete package, with improvements and bug-fixes, and he added several new example codes. For instance completely automatic adapted button sizes with font sizes related to the button size.
Try out! :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
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 »

Codes updated: 14th Dec. 2018

Werner contributed an updated and extended version of his GFX package :D

New highlight is the extension with a fully resizable GUI, which automatically adapts all included gadgets with their content to the new window size. Font size, image sizes etc. are automatically adapted.
Try out for instance this new Demo code: _MAIN_Dynamic_GUI_Developing_Module_with_GIF_BF.pb

All included codes could be easily combined to create GIF players and other multimedia applications! 8)

Download see first post.
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Lord »

Andre wrote:...
New highlight is the extension with a fully resizable GUI, which automatically adapts all included gadgets with their content to the new window size. Font size, image sizes etc. are automatically adapted.
Try out for instance this new Demo code: _MAIN_Dynamic_GUI_Developing_Module_with_GIF_BF.pb
...
Not useable. Flickers like hell when resizing. :shock:
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 »

Lord wrote:
Andre wrote:...
New highlight is the extension with a fully resizable GUI, which automatically adapts all included gadgets with their content to the new window size. Font size, image sizes etc. are automatically adapted.
Try out for instance this new Demo code: _MAIN_Dynamic_GUI_Developing_Module_with_GIF_BF.pb
...
Not useable. Flickers like hell when resizing. :shock:
Could you tell us a bit more about your system / OS and used PB version?

When I tested it here with PB5.70 beta it runs smooth on Win10 :)
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
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 »

Code "_MAIN_Dynamic_GUI_Developing_Module_with_GIF_BF" updated and enhanced again, the download archive is updated.

Note: Codes using GIF functions need PB5.60+
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Lord
Addict
Addict
Posts: 847
Joined: Tue May 26, 2009 2:11 pm

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by Lord »

Andre wrote:Code "_MAIN_Dynamic_GUI_Developing_Module_with_GIF_BF" updated and enhanced again, the download archive is updated.
...
Same as before. Flickering. Not useable.
Tested with PB5.62(x64) and PB5.70LTSbeta3(x64)
Image
User avatar
RSBasic
Moderator
Moderator
Posts: 1218
Joined: Thu Dec 31, 2009 11:05 pm
Location: Gernsbach (Germany)
Contact:

Re: GFX_Wizzard_BF - [Modules - All OS]

Post by RSBasic »

+1
Image
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 »

Again - here on Win10 (latest updates) nothing is flickering.
It's known, that Win7 can make some problems, which are OS specific.

What OS versions do you use?

Anyone else, who tested the package? Thanks for any feedback! :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Post Reply