BCX v8.2.1 is available for download

Started by MrBcx, January 29, 2025, 08:12:30 AM

Previous topic - Next topic

MrBcx

#4
Quote from: Robert on January 29, 2025, 03:58:15 PM
Nice tweaks and upgrades.

The gradient example in the Bcx_Revisions.Txt is weird when green on the bottom is replaced by black,

The reference to "green on the bottom" is the "32" in the BCX_Gradient example code line

BCX_GRADIENT (0,  RGB(255, 255, 255), RGB(0, 32, 0), hDestDC)

White on top, black on the bottom looks, to me, pretty much all black.

Yup ... I just noticed a couple more flaws with BCX_GRADIENT that I missed during testing weeks ago.

The runtime is homegrown and doesn't depend on the API function GradientFill() nor its dependence on Msimg32.dll. 
Both methods result in gradients that are affected by the height of the DC being drawn and, in the case of FillGradient,
also the width of the DC.

I'll give BCX_GRADIENT some more attention and will upload a new version when I'm satisfied with the results.


Robert

Nice tweaks and upgrades.

The gradient example in the Bcx_Revisions.Txt is weird when green on the bottom is replaced by black,

The reference to "green on the bottom" is the "32" in the BCX_Gradient example code line

BCX_GRADIENT (0,  RGB(255, 255, 255), RGB(0, 32, 0), hDestDC)

White on top, black on the bottom looks, to me, pretty much all black.




Quin


MrBcx

#1
BCX 8.2.1 has been released.     This is a minor update.

https://bcxbasiccoders.com/archives/YahooGroups/Bcx_Files_New/Bcx821.zip

~ MrBcx ~

REVISIONS:

*********************************************************************************************
2025/01/29       Changes in 8.2.1 from 8.2.0
********************************************************************************************* 
Kevin Diggins  : New!     Added BCX_GRADIENT  to the list of BCX graphics commands
                 Syntax:  BCX_GRADIENT (HWND, Top_RGB_Color, Bottom_RGB_Color[,hDestDC])   
                 Example:
                          GUI "BCX_Gradient"
                          GLOBAL AS HWND Form, Canvas
                         
                          SUB FORMLOAD
                              Form = BCX_FORM("BCX_GRADIENT Demo", 0, 0, 360, 250)
                              MODSTYLE(Form, 0, WS_SIZEBOX|WS_MAXIMIZEBOX)
                              Canvas = BCX_BITMAP(0, Form, 1, 10, 5, 340, 230)
                              CENTER(Form)
                              SHOW(Form)
                              CALL Drawit
                          END SUB

                          BEGIN EVENTS
                          END EVENTS

                          SUB Drawit
                             DIM RAW hDestDC AS HDC
                             hDestDC = STARTDRAW(Canvas)
                             '*************************************************************
                             BCX_GRADIENT (0,  RGB(255, 255, 255), RGB(0, 32, 0), hDestDC)
                             '*************************************************************
                             BCX_RECTANGLE(0, 40, 40, 100, 100, QBCOLOR(1), TRUE, hDestDC)
                             BCX_ELLIPSE(0, 350, 100, 60, 200, QBCOLOR(3), TRUE, hDestDC)
                             ENDDRAW(Canvas, hDestDC)
                         END SUB


Kevin Diggins  : Promoted RND2() to DOUBLE and its arguments to DOUBLES.  Lesser precision
                 arguments ( SINGLES, INTS, LONGS ) are still allowed.

Kevin Diggins  : Changed LCLICK and RCLICK to use bitwise comparisons for key state

Kevin Diggins  : The "OPTION BASE" directive would corrupt initialized arrays. For example:
                DIM RAW A[] = {1,2,3} will now be translated correctly when OPTION BASE 1
                 is specified.

Kevin Diggins  : Updated the internal IsHexNumber function                                   

Kevin Diggins  : Updated the GETBMP() function as follows:
                 If the 3rd or 4th argument exceeds the size of the client area of the parent,
                 or if the 3rd or 4th argument equals zero, then the client area size is used.
                 This will improve the quality of the resulting bitmap and it provides an 
                 easy way to capture the entire client area of the parent HWND.   Example:
                 
                     DIM AS HDC hdc
                     hdc = GETBMP (0, 0, 0, 0, Form1)  ' Fetch the entire client area of Form1
                     SAVEBMP(hdc, "c:\temp\test.bmp")   
                 
Kevin Diggins  : Updated MSGBOX statement behavior.
                 MSGBOX statements that do not explicitly include the 3rd argument(types)
                 will be given the MB_TOPMOST and MB_SYSTEMMODAL properties by BCX.  Example:
                 MSGBOX "Hello World", "Messagebox Titlebar"   ' MB_TOPMOST and MB_SYSTEMMODAL

                 If you want the same behavior when using MSGBOX as a FUNCTION, you still have
                 to include those properties yourself.  Example:
                 
                   DIM i
                   i = MSGBOX ("Hello World", "The Titlebar", MB_OK|MB_TOPMOST|MB_SYSTEMMODAL)
                   PRINT i
                   PAUSE