Announcement

Collapse
No announcement yet.

How to display graphics with a higher resolution?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to display graphics with a higher resolution?

    Is there a way to display a higher resolution graphics?
    Any special commands to enable graphics to be display with a much more sharper and higher resolution ?

    I have a program which displays a dial, but its resolution is quite poor, please see the following image
    The arc lines are not smooth enough


    Click image for larger version  Name:	North.PNG Views:	1 Size:	9.1 KB ID:	773584

  • #2
    I think what you need is anti-aliasing, rather than a higher resolution per se.

    A quick search turned up this discussion: https://forum.powerbasic.com/forum/u...sic-statements
    And this code: https://forum.powerbasic.com/forum/u...ith-stretchblt
    Dan

    Comment


    • #3
      Doing away with the black border might help. It only seems to emphasize the effect.
      Rod
      "To every unsung hero in the universe
      To those who roam the skies and those who roam the earth
      To all good men of reason may they never thirst " - from "Heaven Help the Devil" by G. Lightfoot

      Comment


      • #4
        The text "Dashboard2" and "Degrees North" does not look too bad.

        Makes me wonder if the code drawing the dial and pointer is using multiple screen pixels for it's "pixels" (like 2x2 or 3x3 screen pixels for each step in the lines) to get the size (and line thickness) you want?

        Any "special codes" would be in the program doing the drawing (in my best guess).

        Cheers,
        Dale

        Comment


        • #5
          Originally posted by Dale Yarker View Post
          The text "Dashboard2" and "Degrees North" does not look too bad.

          Makes me wonder if the code drawing the dial and pointer is using multiple screen pixels for it's "pixels" (like 2x2 or 3x3 screen pixels for each step in the lines) to get the size (and line thickness) you want?

          Any "special codes" would be in the program doing the drawing (in my best guess)

          Cheers,
          The "Degrees North" and numerals are anti-aliased when they are written (not drawn) to the screen. The other lines are drawn so no anti-aliasing and suffer from the classic "jaggies".

          Click image for larger version  Name:	antialias.jpg Views:	1 Size:	33.3 KB ID:	773589

          To achieve anti-aliasing for drawn items, Dan's second link has the solution. Draw your graphic on a much larger hidden bitmap then copy it to the window.

          "
          ' This program demonstrates antialiasing by resampling a larger image to a ' smaller size.
          ...
          ' Basicly we are drawing the scene at lScale * %SCREENsize and
          ' using StretchBlt to scale the image to 1 * %SCREENsize. The real key is to
          ' make sure you set the StretchBltMode to %HALFTONE and that will take care
          ' of blending the image with the surrounding colors."
          --
          [URL="http://www.camcopng.com"]CAMCo - Applications Development & ICT Consultancy[/URL][URL="http://www.hostingpng.com"]
          PNG Domain Hosting[/URL]

          Comment


          • #6
            Anne

            See the old tachometer demo from 2006, there:
            https://forum.powerbasic.com/forum/u...ns/29050-gauge

            and i have more here
            http://www.zapsolution.com/DW/US/gcorner.html

            See also the compass demo that is a mix of 2D and 3D altogether…

            And the Dashboard project there
            http://www.jose.it-berater.org/smffo...sg9956#msg9956
            Patrice Terrier
            www.zapsolution.com
            www.objreader.com
            Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

            Comment


            • #7
              The "Degrees North" and numerals are anti-aliased when they are written (not drawn) to the screen. The other lines are drawn so no anti-aliasing and suffer from the classic "jaggies".
              If you want to pick nits; I might say "written" to Windows, then Windows "draws" to screen, but call it what you want. ((in pre-GUI tech I would consider it as "written" to the screen.))

              I agree smoothing/anti-aliasing is happening on the text. I still contend the "program" refered to by Anne may be using multipixel "steps" for it's "construction" of dial and "Degrees North" (even though the text also has anti-aliasing).
              Dale

              Comment


              • #8
                Anne,

                I just had a play with Mark Smit's code and it works well. Depends on your needs, you could make a custom control with it where you saved the dial interface to a back buffer, blit it to another back buffer then blit the pointer over it. There is another option, make the dial interface as a bitmap, blit it onto the client area then blit the pointer over it. The image can be an RGB image with an alpha channel so you can get a very smooth appearance. I use Axialis Icon Workshop for making anti aliased images and I imagine you would have some decent drawing tools of your own.
                hutch at movsd dot com
                The MASM Forum

                www.masm32.com

                Comment


                • #9
                  Thanks so much guys. I will try converting my code to antialiasing

                  Comment


                  • #10
                    Originally posted by Dale Yarker View Post
                    I agree smoothing/anti-aliasing is happening on the text. I still contend the "program" refered to by Anne may be using multipixel "steps" for it's "construction" of dial and "Degrees North" (even though the text also has anti-aliasing).
                    No it's not using multipixel steps.. I copied Anne's image and zoomed it in Irfan view. They are definitely single pixel steps. The blue dots inside the arc are single pixels that i painted on the image (zoomed for clarity).

                    You can also see the red and blue anti-aliased single pixels around the number 30.
                    Click image for larger version  Name:	blluedots.jpg Views:	1 Size:	11.7 KB ID:	773596

                    --
                    [URL="http://www.camcopng.com"]CAMCo - Applications Development & ICT Consultancy[/URL][URL="http://www.hostingpng.com"]
                    PNG Domain Hosting[/URL]

                    Comment


                    • #11
                      Here's the failing code

                      Code:
                      ' ================================================================
                      
                      ' dashboard2.bas
                      ' https://forum.powerbasic.com/forum/user-to-user-discussions/source-code/749747-dashboard-graphic?_=1465764116677
                      #COMPILE EXE
                      #DIM ALL
                      
                      TYPE Tipo_Dboard
                          Desc        AS ASCIIZ *48 ' description of the variable and unit
                          Xloc        AS LONG     ' Dashboard center X position (pixels)
                          Yloc        AS LONG     ' Dashboard center Y position (pixels)
                          Radius      AS LONG     ' Max radius of dashboard (pixels)
                          Ntic        AS LONG     ' Number of tics (max 10)
                          Tic(10)     AS SINGLE   ' Numerical values for tics (user units)
                                                  ' (the first value is considered the minimum of range, the last one the maximum)
                          Ncolors     AS LONG     ' Number of colors
                          Values(10)  AS SINGLE   ' Values (user units) corresponding to:
                                                  ' 1. Colors() if GradFlag=1; 2. the start of color sector if GradFlag=0
                          Colors(10)  AS LONG     ' Colors in RGB values
                          Strip       AS SINGLE   ' Thickness of colored strip (as a fraction of maximum Radius)
                          Pivot       AS SINGLE   ' Pivot radius as fraction of dashboard Radius
                          GradFlag    AS LONG     ' GradFlag=1, color gradient; GradFlag=0, sectors
                      END TYPE
                      
                      
                      
                      
                      '==========================================
                      FUNCTION PBMAIN () AS LONG
                      
                          LOCAL hWin AS DWORD
                          LOCAL SelVpoint, vpp AS SINGLE  ' pointed value
                          LOCAL MaxVpoint AS SINGLE
                          DIM Dabo AS Tipo_Dboard
                      
                          GRAPHIC WINDOW "Dashboard2", 200,100, 400, 300 TO hWin
                          GRAPHIC ATTACH hWin, 0
                      
                         ' Text description of dial
                          Dabo.Desc="Degrees  North"
                      
                         ' Location of the dial within the dialog
                          Dabo.Xloc= 200
                          Dabo.Yloc= 200
                         ' radius of the dial
                          Dabo.Radius= 100  '120  '150
                      
                          Dabo.Ncolors=4 '3
                      
                       '   Dabo.GradFlag=1    ' Gradient
                       '   Dabo.Values(1)=0
                        '  Dabo.Values(2)=50
                        '  Dabo.Values(3)=100
                      
                      
                        ' color gradient on dial
                          Dabo.GradFlag=1
                      
                          Dabo.Values(1)=10
                          Dabo.Values(2)=36
                          Dabo.Values(3)=68
                          Dabo.Values(4)=100
                      
                          Dabo.Colors(1)=%GREEN
                          Dabo.Colors(2)=%RGB_LIGHTGREEN
                          Dabo.Colors(3)=%RGB_YELLOW     ' %YELLOW
                          Dabo.Colors(4)=%RGB_LIGHTYELLOW      '%RED
                      
                      
                      
                         ' max Vpoint value
                           MaxVpoint = 180
                      
                        ' Tics on the scale
                          Dabo.Ntic=7
                          Dabo.Tic(1)=0
                          Dabo.Tic(2)=30
                          Dabo.Tic(3)=60
                          Dabo.Tic(4)=90
                          Dabo.Tic(5)=120
                          Dabo.Tic(6)=150
                        ' set to max Vpoint value at the final scale
                          Dabo.Tic(7)=MaxVpoint
                      
                      
                      
                      
                         ' dial's semi circular strip width
                          Dabo.Strip= 0.16 '0.25
                        ' size of the dial's solid circle
                          Dabo.Pivot= 0.10
                      
                          ' Selected value by the user ************************************
                             SelVpoint=160   ' pointed value
                      
                      
                        ' this loop will move the pointer slowly round the dial
                        ' until it reaches the final value ( animation )
                          FOR Vpp=0 TO SelVpoint STEP 5
                              CALL DrawDashboard(Vpp,Dabo)
                              SLEEP 20
                          NEXT Vpp
                      
                          MSGBOX "end"
                      
                      END FUNCTION
                      
                      
                      
                      '======================================
                      SUB DrawDashboard(BYVAL dVpoint AS SINGLE, BYVAL Dabo AS Tipo_Dboard)
                          LOCAL I, Colore AS LONG
                          LOCAL V, V1, RaPivot,A1 AS SINGLE
                          LOCAL x1,x2,x3,x4,x5,x6,y1,y2,y3,y4,y5,y6 AS LONG
                          LOCAL xv, yv, Xdx, Ydx, Xsx, Ysx AS LONG
                          LOCAL xt1, yt1, xt2, yt2 AS LONG
                          LOCAL Xloc, Yloc AS SINGLE
                          LOCAL FracStrip, FracPivot, Raggio, Passo, FontSize AS SINGLE
                          LOCAL Angle, Ac AS SINGLE
                          LOCAL hFontTic, hFontLabel AS LONG
                          LOCAL xText AS LONG, yText AS LONG, Wtext AS LONG, Htext AS LONG
                          LOCAL testo AS STRING
                      
                          ' Dial numbers color
                          GRAPHIC COLOR %RGB_DARKBLUE , -2  ' %WHITE  %BLACK
                      
                          ' ==== fonts ================
                          Raggio=Dabo.Radius
                          FontSize=3.06+0.08*Raggio
                          FONT NEW "Calibri", FontSize+1, 0  TO hFontTic
                          FONT NEW "Calibri", FontSize  , 0  TO hFontLabel
                      
                          LOCAL Pig AS DOUBLE     ' Pi Greek
                          Pig=4*ATN(1)      ' note that  Pi = 4 * Atn(1)   this is Pi
                      
                          ' ===== find min and max and angle coefficient ====
                          Ac=Pig/(Dabo.Tic(Dabo.Ntic)-Dabo.Tic(1))  ' multiply user units by this to give radians
                          FracPivot=Dabo.Pivot
                        '  FracStrip=1 -Dabo.Strip
                          FracStrip=.9 -Dabo.Strip
                          Xloc=Dabo.Xloc
                          Yloc=Dabo.Yloc
                      
                          x1=Xloc-Raggio
                          y1=Yloc-Raggio
                          x2=Xloc+Raggio
                          y2=Yloc+Raggio
                      
                         ' the 1.15 factor is to make the circular strip thinner
                          x3=Xloc-Raggio*FracStrip  * 1.15
                          y3=Yloc-Raggio*FracStrip  * 1.15
                          x4=Xloc+Raggio*FracStrip  * 1.15
                          y4=Yloc+Raggio*FracStrip  * 1.15
                      
                          x5=Xloc-Raggio*FracPivot
                          y5=Yloc-Raggio*FracPivot
                          x6=Xloc+Raggio*FracPivot
                          y6=Yloc+Raggio*FracPivot
                      
                      
                          ' ==== draw the coloured strip ========================
                      
                          IF Dabo.GradFlag THEN
                              ' - gradient
                              DIM Ang(1 TO Dabo.Ncolors) AS SINGLE
                              DIM Cs(1 TO Dabo.Ncolors) AS LONG
                              FOR I=1 TO Dabo.Ncolors
                                  Ang(I)=(Dabo.Values(I)-Dabo.Tic(1))*Ac
                                  Cs(I)=Dabo.Colors(Dabo.Ncolors-I+1)   ' reversed colors
                              NEXT I
                              Passo=Pig/80
                              FOR V=0.01 TO Pig+0.1 STEP Passo
                                  Colore=SfumaColore(Dabo.Ncolors,Ang(),Cs(), V)
                                  GRAPHIC PIE (x1,y1)-(x2,y2), V1,V, Colore, Colore, 0
                                  V1=V
                              NEXT V
                          ELSE
                              ' - sectors
                              V1=Pig-Dabo.Tic(1)*Ac
                              FOR I=1 TO Dabo.Ncolors
                                  Colore=Dabo.Colors(I)
                                  V=Pig-Dabo.Values(I)*Ac
                                  GRAPHIC PIE (x1,y1)-(x2,y2), V,V1, Colore, Colore, 0
                                  V1=V
                                NEXT I
                          END IF
                      
                      
                      
                      
                          ' - White inner part
                           GRAPHIC WIDTH 2
                           GRAPHIC PIE (x3,y3)-(x4,y4), 0, Pig, %WHITE, %WHITE
                      
                          ' - Boxes below
                           GRAPHIC BOX  (x1,Yloc)-(x2,y6+3)  ,  0, %WHITE, %WHITE
                      
                         ' draw the box containing the text
                          GRAPHIC BOX  (x1,y6+17)-(x2,y6+Raggio*Dabo.Strip*2.8), 25,%CYAN ,%RGB_WHITE
                      
                      
                      
                          ' Display the bottom box text
                           GRAPHIC WIDTH 1
                           GRAPHIC SET FONT hFontLabel
                           Testo=Dabo.Desc
                           GRAPHIC TEXT SIZE Testo TO Wtext, Htext
                           xText=(x1+x2)/2
                           yText=(y6+17+y6+Raggio*Dabo.Strip*2.8)/2
                           GRAPHIC SET POS (xText-Wtext/2,yText-Htext/2)
                           GRAPHIC PRINT Testo
                      
                          ' - Pivot  ( dial centre)
                          GRAPHIC ELLIPSE (x5,y5)-(x6,y6), %BLACK, %BLACK
                      
                          ' - semicircular Bords
                          GRAPHIC ARC (x1,y1)-(x2,y2), 0, Pig, %BLACK
                          GRAPHIC ARC (x3,y3)-(x4,y4), 0, Pig, %BLACK
                      
                      
                          ' ==== draw tics ====================================
                          GRAPHIC SET FONT hFontTic
                          GRAPHIC WIDTH 2
                      
                          FOR I=1 TO Dabo.Ntic
                              Angle=Pig-Dabo.Tic(I)*Ac
                              ' - Main tics
                              yt1=Yloc-Raggio*SIN(Angle)*0.95
                              yt2=Yloc-Raggio*SIN(Angle)*1.05
                              IF I>1 AND I<Dabo.Ntic THEN
                                  xt1=Xloc+Raggio*COS(Angle)*0.95
                                  xt2=Xloc+Raggio*COS(Angle)*1.05
                              ELSE
                                  xt1=Xloc+Raggio*(1-FracStrip)*COS(Angle)*0.95
                                  xt2=Xloc+Raggio*COS(Angle)*1.05
                              END IF
                              GRAPHIC LINE (xt1,yt1)-(xt2,yt2), %BLACK
                      
                              ' - Tic labels
                              Testo=LTRIM$(STR$(Dabo.Tic(I)))
                              GRAPHIC TEXT SIZE Testo TO Wtext, Htext
                              xText=Xloc+Raggio*COS(Angle)*1.15
                              IF  I >= 6 THEN
                             '   push the text right wards slightly to
                             '   avoid the tick marks
                                 xText= xText+5
                              END IF
                              yText=Yloc-Raggio*SIN(Angle)*1.15
                              GRAPHIC SET POS (xText-Wtext/2,yText-Htext/2)
                              GRAPHIC PRINT Testo
                      
                              ' - Middle tics
                              IF I>1 THEN
                                  Angle=Pig-Ac*(Dabo.Tic(I)+Dabo.Tic(I-1))/2
                                  xt1=Xloc+Raggio*COS(Angle)*0.95
                                  xt2=Xloc+Raggio*COS(Angle)
                                  yt1=Yloc-Raggio*SIN(Angle)*0.95
                                  yt2=Yloc-Raggio*SIN(Angle)
                              GRAPHIC LINE (xt1,yt1)-(xt2,yt2), %BLACK
                              END IF
                      
                          NEXT I
                      
                          ' ============== draw pointer ========================
                          GRAPHIC WIDTH 1
                          ' - Pointer (triangle from the vertex to the pivot)
                          RaPivot=Raggio*FracPivot/2
                      
                          ' - Pointer vertex
                          ' the factor 1.3 is to almost reach the dial's outer line
                          Angle=Pig-dVpoint*Ac
                          xv=Xloc+Raggio*FracStrip*COS(Angle)*1.3     '0.98
                          yv=Yloc-Raggio*FracStrip*SIN(Angle)*1.3    ' 0.98
                      
                          A1=Angle-Pig/2  ' base angle of the pointer
                          Xdx=Xloc+RaPivot*COS(A1)
                          Ydx=Yloc-RaPivot*SIN(A1)
                          Xsx=Xloc-RaPivot*COS(A1)
                          Ysx=Yloc+RaPivot*SIN(A1)
                      
                          GRAPHIC LINE (xv,yv)-(Xdx,Ydx), %RED
                          GRAPHIC LINE (xv,yv)-(Xsx,Ysx), %RED
                          GRAPHIC LINE (xv,yv)-(Xsx,Ysx), %RED
                          GRAPHIC PAINT ((xv+2*Xdx+2*Xsx)/5,(yv+2*Ydx+2*Ysx)/5), %RED, %WHITE   ' inner point closer to the base
                      
                      END SUB
                      
                      
                      
                      '===========================
                      FUNCTION SfumaColore(NColors AS LONG,            _ ' N. of pairs value/colors
                                           ValoriSoglia() AS SINGLE,   _ ' Vector of numerical values corresponding to colors
                                           ColorsSoglia() AS LONG,     _ ' Vector of colors (RGB)
                                           Valore AS SINGLE _            ' Input value
                                           ) AS LONG                     ' Output color
                          ' === Give color gradient ===
                          ' - Vor values outside limits,  maintains extreme colors
                          LOCAL I AS LONG
                          LOCAL ColorMin&, ColorMax&
                          LOCAL R1 AS BYTE, R2 AS BYTE, G1 AS BYTE, G2 AS BYTE, B1 AS BYTE, B2 AS BYTE
                          LOCAL Rosso&,Verde&,Blu&
                          LOCAL BufR!,BufG!,BufB!
                          LOCAL ValMin AS SINGLE, ValMax AS SINGLE
                          LOCAL RangeVal AS SINGLE
                      
                          IF NColors<2                     THEN FUNCTION=RGB(10,10,10)         : EXIT FUNCTION  ' black
                          IF Valore<=ValoriSoglia(1)       THEN FUNCTION=ColorsSoglia(1)       : EXIT FUNCTION  ' first color
                          IF Valore>=ValoriSoglia(NColors) THEN FUNCTION=ColorsSoglia(NColors) : EXIT FUNCTION  ' last color
                      
                          ' === Find color range ===
                          FOR I=2 TO NColors
                              IF Valore<ValoriSoglia(I) THEN
                                  ValMin=ValoriSoglia(I-1)
                                  ValMax=ValoriSoglia(I)
                                  ColorMin&=ColorsSoglia(I-1)
                                  ColorMax&=ColorsSoglia(I)
                                  EXIT FOR
                              END IF
                          NEXT I
                      
                          ' === Get color ===
                          CALL ExtractRGB(ColorMin&,R1, G1, B1)
                          CALL ExtractRGB(ColorMax&,R2, G2, B2)
                      
                          RangeVal=ValMax-ValMin
                      
                          IF RangeVal>0 THEN
                              BufR!=(R2-R1)/RangeVal
                              BufG!=(G2-G1)/RangeVal
                              BufB!=(B2-B1)/RangeVal
                              Rosso&=R1+(Valore-ValMin)*BufR!
                              Verde&=G1+(Valore-ValMin)*BufG!
                              Blu&=  B1+(Valore-ValMin)*BufB!
                          ELSE
                              Rosso&=10
                              Verde&=10
                              Blu&=  10
                          END IF
                      
                          FUNCTION=RGB(Rosso&,Verde&,Blu&)
                      
                      END FUNCTION
                      
                      
                      SUB ExtractRGB(BYVAL rgbColor AS LONG,Red AS BYTE,Green AS BYTE,Blue AS BYTE)
                          ' by Mark Smit
                          !mov eax,rgbColor
                          !mov ebx,Red
                          !mov [ebx],al
                          !shr eax,8
                          !mov ebx,Green
                          !mov [ebx],al
                          !shr eax,8
                          !mov ebx,Blue
                          !mov [ebx],al
                      END SUB

                      Comment


                      • #12
                        Originally posted by Anne Wilson View Post
                        Here's the failing code
                        It's not "failing".

                        The code you grabbed from Franscesco's post used a radius of 150. You are using a radius of 100, so your "jaggies" are bound to be much worse than in Fransesco's image.
                        --
                        [URL="http://www.camcopng.com"]CAMCo - Applications Development & ICT Consultancy[/URL][URL="http://www.hostingpng.com"]
                        PNG Domain Hosting[/URL]

                        Comment


                        • #13
                          Also, you changed Fransesco's
                          GRAPHIC WIDTH 1
                          ' - White inner part

                          To:

                          ' - White inner part
                          GRAPHIC WIDTH 2

                          Change that back to 1 and it looks a lot better,
                          --
                          [URL="http://www.camcopng.com"]CAMCo - Applications Development & ICT Consultancy[/URL][URL="http://www.hostingpng.com"]
                          PNG Domain Hosting[/URL]

                          Comment


                          • #14
                            You can achieve a blended dither effect by stretching to an image one pixel smaller and then back.
                            Code:
                            #COMPILE EXE
                            #DIM ALL
                            ENUM ctrls SINGULAR
                                grfx = 500
                                fuzz
                            END ENUM
                            
                            FUNCTION PBMAIN () AS LONG
                                LOCAL hWin, xitcode AS LONG
                                DIALOG NEW PIXELS, 0, "Fuzzy Wuzzy", , , 800, 600, %WS_BORDER OR %WS_CAPTION OR %WS_SYSMENU TO hWin
                                CONTROL ADD GRAPHIC, hWin, %grfx, "", 0, 50, 800, 550
                                GRAPHIC ATTACH hWin, %grfx
                                GRAPHIC CLEAR %BLACK
                                CONTROL ADD BUTTON, hWin, %fuzz, "Fuzzy", 10, 10, 80, 30
                                DIALOG SHOW MODAL hWin, CALL dlgproc() TO xitcode
                                FUNCTION = xitcode
                            END FUNCTION
                            CALLBACK FUNCTION dlgproc()
                                SELECT CASE CB.MSG
                                    CASE %WM_INITDIALOG
                                        GRAPHIC ATTACH CB.HNDL, %grfx
                                        GRAPHIC ELLIPSE (200, 100)-(600, 450), %BLUE, %WHITE
                                        GRAPHIC ELLIPSE (300, 150)-(500, 400), %BLUE, %BLACK
                                        GRAPHIC WIDTH 3
                                        GRAPHIC LINE (0, 0)-(799, 549), %WHITE
                                        GRAPHIC LINE (50, 0)-(799, 499), %GREEN
                                        GRAPHIC LINE (0, 40)-(749, 549), %RED
                                        GRAPHIC WIDTH 1
                                    CASE %WM_COMMAND
                                        SELECT CASE CB.CTL
                                            CASE %fuzz
                                                LOCAL x, y AS LONG, hBMP AS DWORD
                                                CONTROL GET SIZE CB.HNDL, %grfx TO x, y
                                                GRAPHIC BITMAP NEW x - 1, y - 1 TO hBMP
                                                GRAPHIC ATTACH hBMP, 0
                                                GRAPHIC STRETCH PAGE CB.HNDL, %grfx, 0, %HALFTONE
                                                GRAPHIC ATTACH CB.HNDL, %grfx, REDRAW
                                                GRAPHIC STRETCH PAGE hBMP, 0, 0, %HALFTONE
                                                GRAPHIC REDRAW
                                        END SELECT
                                END SELECT
                            END FUNCTION
                            The world is strange and wonderful.*
                            I reserve the right to be horrifically wrong.
                            Please maintain a safe following distance.
                            *wonderful sold separately.

                            Comment


                            • #15
                              PowerBASIC is based on the deprecated 24-bit GDI32.
                              GDIPLUS that is vailable since more than 16 years now, has built-in antialias features, and the same is also available in OpenGL 2.0+.
                              I couldn't understand why people here are so reluctant to learn and use the current API, and why they keep using the DDT GRAPHIC paradigm to write new applications.
                              Patrice Terrier
                              www.zapsolution.com
                              www.objreader.com
                              Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                              Comment


                              • #16
                                Thanks so much Kurt, this is amazing

                                Comment


                                • #17
                                  Originally posted by Patrice Terrier View Post
                                  I couldn't understand why people here are so reluctant to learn and use the current API, and why they keep using the DDT GRAPHIC paradigm to write new applications.
                                  For me, it's beacuse it does enough. If it falls short, I can use GDIPlus, etc., but that seldom happens.

                                  Also, the GRAPHIC toolset allows me to ignore the Windows coding model and common controls almost completely, which is great.

                                  Comment


                                  • #18
                                    I'm the same as Chris, 99% of what llittle graphic work I I need to do can be done with the simple built-in GRAPHIC statements. I need to use GDI+ very rarely.
                                    --
                                    [URL="http://www.camcopng.com"]CAMCo - Applications Development & ICT Consultancy[/URL][URL="http://www.hostingpng.com"]
                                    PNG Domain Hosting[/URL]

                                    Comment


                                    • #19
                                      Originally posted by Patrice Terrier View Post
                                      PowerBASIC is based on the deprecated 24-bit GDI32.
                                      GDIPLUS that is vailable since more than 16 years now, has built-in antialias features, and the same is also available in OpenGL 2.0+.
                                      I couldn't understand why people here are so reluctant to learn and use the current API, and why they keep using the DDT GRAPHIC paradigm to write new applications.
                                      Well, then... Let us hope that PB11 has native support for GDIPLUS OpenGL and Direct2D.
                                      The world is strange and wonderful.*
                                      I reserve the right to be horrifically wrong.
                                      Please maintain a safe following distance.
                                      *wonderful sold separately.

                                      Comment


                                      • #20
                                        There is no reason to encapsulate the existing API, just learn how to use it.
                                        There are plainty of places to learn from, of course MSDN, but for PB the most obvious one is
                                        http://www.jose.it-berater.org/smfforum/index.php
                                        Plainty of tutorials there written long ago, showing how to take control of your window(s)…
                                        Patrice Terrier
                                        www.zapsolution.com
                                        www.objreader.com
                                        Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                                        Comment

                                        Working...
                                        X