GRAPH-painter Rel. 1.2 ( Update )

GRAPH-painter Rel. 1.2 ( Update )

Postby ukoenig » Fri Jul 11, 2014 8:57 am

Hello,

I finished the new GRAPH-painter with the included changes, done in class TGRAPH.
Real graph-design at runtime is possible, to get the best result of
a combination of over 40 possible settings in a short time.
It will save much time for testing.
Doing it with a step by step value-testing, would be a hard job.
All settings / selections can be saved.
From the PROJECT.DBF, You can skip to a different project.
I'm still planning some extensions.

5 projects are predefined.
Just use the SKIP-buttons to view the different styles.


Download ( 4 MB ) :

http://www.pflegeplus.com/DOWNLOADS/Graphpaint1.zip

Image

All settings and selections are displayed inside a multiline-get and You can
copy and past all results to Your project.

Image

The DIALOG-settings, to find a good combination between the 2 backgrounds.

Image

The MAIN-graph-setting-page
selecting < FROM DIALOG > will use the dialog-selections ( color, gradient and brush )
for the graph-background, otherwise the selected graph-color and brush will be used.
Using this option You get a TRANSPARENT-effect because of the same color or brush.

Image

The second graph-setting-page

Image

The first graph-FONT-page

Image

The second graph-FONT-page

Image

The PROJECT-manager
A right mouseclick selects the project, You want to be shown at next start.

Image

In method Paint I added a TRANSPARENT - section
but there is something wrong, to get a TRANSPARENT graph
it would be nice, to get it working like gradient and brush !
Code: Select all  Expand view

...
...
IF UPPER ( ::cBitmap ) = "COLOR"
     hBru := CreateSolidBrush( ::nClrBack )
     hOld := SelectObject( ::hDC, hBru )
     FillRect( ::hDC, { 0, 0, ::nHeight, ::nWidth }, hBru )
     SelectObject( ::hDC, hOld )
     DeleteObject( hBru )
ELSEIF UPPER ( ::cBitmap ) = "GRADIENT"
     hBru := GradientBrush( ::hDC, 0, 0, ::nWidth, ::nHeight, ;
     { { 0, LightColor( 175, ::nClrBack ), ::nClrBack } }, .T. )
     hOld := SelectObject( ::hDC, hBru )
     FillRect( ::hDC,{ 0, 0, ::nHeight, ::nWidth }, hBru )
     SelectObject( ::hDC, hOld )
     DeleteObject( hBru )
ELSEIF File( ::cBitmap ) // Brush
     DEFINE BITMAP oNewbrush FILENAME ::cBitmap
     nHeight := oNewbrush:nHeight
     nWidth := oNewbrush:nWidth
     IF ::nWidth > 0
          DO WHILE nRow < ::nHeight
               nCol = 0
               DO WHILE nCol < ::nWidth
                    PalBmpDraw( ::hDC, nRow, nCol, oNewbrush:hBitmap )
                    nCol += nHeight
              ENDDO
              nRow += nWidth
         ENDDO
     ENDIF
     oNewbrush:End()
ELSEIF UPPER ( ::cBitmap ) = "TRANSPARENT"
     nOldMode := SetBkMode( ::hDC, 1 )
     hBru := TBrush():New( "NULL" )
     hOldBrush := SelectObject( ::hDC, hBru )
     FillRect( ::hDC,{ 0, 0, ::nHeight, ::nWidth }, hBru )
     SelectObject( ::hDC, hOldBrush )
     SetBkMode( ::hDC, nOldMode )
     DeleteObject( hBru )
ENDIF
 


Best regards
Uwe :lol:
Last edited by ukoenig on Sat Jul 12, 2014 11:41 am, edited 3 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: GRAPH-painter Rel. 1.1 ( Download )

Postby ukoenig » Fri Jul 11, 2014 7:29 pm

I found a bug in section Pie.
wrong fontcolor defined ( it seems some more mixed ) :

aFont[8] belongs to color nClrV

nColr := IF(aValrs[nCount]<0,CLR_RED, ::nClrV ) // nClrX
IF ::lViewVal
::Say(aPt3[2]-(nSizeY/2)+nSepY+nPosV,aPt3[1]-(nSizeX/2)+nSepX,cText,::aFont[8],nColr)
cVals := Tran( aValrs[nCount],::cPicture )
IF Len(::aYVals)>0
::Say(aPt3[2]+(nSizeY/2)+nYSep-10,aPt3[1]-(nSizeX/2)-nXSep,::aYVals[nCount],::aFont[8],nColr)
ENDIF
::Say(aPt3[2]+(nSizeY/2)+nYSep,aPt3[1]-(nSizeX/2)-nXSep,cVals, ::aFont[8],nColr)
ENDIF

Image

Best regards
Uwe :lol:
Last edited by ukoenig on Sat Jul 12, 2014 11:47 am, edited 2 times in total.
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: GRAPH-painter Rel. 1.2 ( Download )

Postby ukoenig » Sat Jul 12, 2014 11:29 am

Download Update 1.2 ( 4 MB ) :
some fixes in project-scrolling and page-display

Because I'm sure, there will be some more changes,
I will add a extra download for only the EXE-file.

Complete :
http://www.pflegeplus.com/DOWNLOADS/Graphpaint2.zip

Testing the color / Gardient - switch from dialog to graph
that works on runtime now

using the defined graph gradient or color

I'm still looking for a working solution using < Background TRANSPARENT >

Image

using the defined dialog gradient or color

Image

Another change in TGraph-section Pie, to enable different fonts and colors

Result of changes in tGraph-section pie
I added 2 pixel ( Y ) to the space between values and text +nYSep-12

Image

aFont[7] belongs to nClrYT

Code: Select all  Expand view

nColr1 := IF(aValrs[nCount]<0,CLR_RED,::nClrV)
nColr2 := IF(aValrs[nCount]<0,CLR_RED,::nClrY)
IF ::lViewVal
     ::Say(aPt3[2]-(nSizeY/2)+nSepY+nPosV,aPt3[1]-(nSizeX/2)+nSepX,cText,::aFont[8],nColr1)
     cVals := Tran( aValrs[nCount],::cPicture )
     IF Len(::aYVals)>0
          ::Say(aPt3[2]+(nSizeY/2)+nYSep-12,aPt3[1]-(nSizeX/2)-nXSep,::aYVals[nCount],::aFont[3],nColr2)
     ENDIF
     ::Say(aPt3[2]+(nSizeY/2)+nYSep,aPt3[1]-(nSizeX/2)-nXSep,cVals,::aFont[8],nColr1)
ENDIF
 


Best regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: GRAPH-painter Rel. 1.2 ( Update )

Postby ukoenig » Sun Jul 13, 2014 12:08 pm

Now it is possible, to use any background-image
( will be included in next update.
I'm still looking for a TRANSPARENT-solution )

Image

Image

Best regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: GRAPH-painter Rel. 1.2 ( Update )

Postby ukoenig » Wed Jul 16, 2014 9:32 am

Added optional 3D and BORDER to all barstyles :

Color
gradient horizontal
gradient vertical
BORLAND
BRICKS
TILED


BORLAND, BRICKS and TILED are using the defined colors as shadow to make them different.

still the TRANSPARENT background and it will be finished !

Image

Best regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 49 guests