bitmaps trasparents

Re: bitmaps trasparents

Postby ukoenig » Mon May 10, 2010 10:56 pm

I think it is a good Foundation, to carry on with testing.
I disabled the Dialog-Frame, to show a defined Drawing-Area.
I hope we will find a Solution to show the Bitmaps interleaved, to make it complete.

The new Download :

http://www.pflegeplus.com/fw_downloads/Draw1.zip

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: bitmaps trasparents

Postby ukoenig » Tue May 11, 2010 1:25 pm

I changed the Popup-menu to xBrowse with a small Problem.

The defined xBrowse-LostFocus-Color doesn't work.
oBrw:bClrSelect = { || { 0, 16638387 } }
Image

Changes for a xBrowse-Popup-menu :

// Round Table
// -------------------
oBmp[7]:bPainted := {|hDC| DRAW_TXT( oBmp[7], hDC, oBtnFont, "7", 0, 128 ) }
oBmp[7]:bRClicked := { || ShowPopUp( oDlg, oBmp[7]:nTop + 100, oBmp[7]:nLeft + 70, "ROUND" ), ;
nMENPOS[7] := nSelect, BMP_CHANGE( nSelect, 7, "ROUND"), ;
IIF( nSelect = 6, ( oBmp[7]:nLeft := 880, oBmp[7]:nTop := 25, ; // Stop
oBmp[7]:LoadBMP( "Round1.bmp" ), oBmp[7]:Refresh() ), NIL ) }

// Square Table
// -------------------
oBmp[1]:bPainted := {|hDC| DRAW_TXT( oBmp[1], hDC, oBtnFont, "1", 0, 128 ) }
oBmp[1]:bRClicked := { || ShowPopUp( oDlg, oBmp[1]:nTop + 100, oBmp[1]:nLeft + 70, "SQUARE" ), ;
nMENPOS[1] := nSelect, BMP_CHANGE( nSelect, 1, "SQUARE"), ;
IIF( nSelect = 6, ( oBmp[1]:nLeft := 800, oBmp[1]:nTop := 25, ; // Stop
oBmp[1]:LoadBMP( "Square1.bmp" ), oBmp[1]:Refresh() ), NIL ) }

// --------------------------------------

FUNCTION ShowPopup( oDlg, nRow, nCol, cStyle )
LOCAL oDlg1, oBrw, aArray:={}

IF cSTYLE = "SQUARE"
aadd( aArray, { "", " 1", "Free", "Square1.bmp", 255 } )
aadd( aArray, { "", " 2", "Occupated", "Square2.bmp", 255 } )
aadd( aArray, { "", " 3", "Cash", "Square3.bmp", 255 } )
aadd( aArray, { "", " 4", "Attending", "Square4.bmp", 255 } )
aadd( aArray, { "", " 5", "Reservation", "Square5.bmp", 255 } )
aadd( aArray, { "", " 6", "Stop", "Reset.bmp", 255 } )
ELSE
aadd( aArray, { "", " 1", "Free", "Round1.bmp", 255 } )
aadd( aArray, { "", " 2", "Occupated", "Round2.bmp", 255 } )
aadd( aArray, { "", " 3", "Cash", "Round3.bmp", 255 } )
aadd( aArray, { "", " 4", "Attending", "Round4.bmp", 255 } )
aadd( aArray, { "", " 5", "Reservation", "Round5.bmp", 255 } )
aadd( aArray, { "", " 6", "Stop", "Reset.bmp", 255 } )
ENDIF

DEFINE DIALOG oDlg1 FROM nRow, nCol TO nRow + 270, nCol + 200 OF oDlg Title "Table-Options" PIXEL

@ 0,0 XBROWSE oBrw OF oDlg1 columns {1, 2, 3, 4 };
Array aArray sizes {40, 25, 90 } LINES SIZE 100, 135

oBrw:nMarqueeStyle := 4
oBrw:nRowHeight := 40
oBrw:lFooter := .F.
oBrw:lHScroll := .F.
oBrw:lVScroll := .T.
oBrw:aCols[ 1 ]:cHeader = "Table"

oBrw:aCols[ 1 ]:nEditType := TYPE_IMAGE
oBrw:aCols[ 1 ]:lBmpStretch := .f.
oBrw:aCols[ 1 ]:lBmpTransparent := .t.
oBrw:aCols[ 1 ]:bStrImage := {|oCol, oBrw| oBrw:aRow[ 4 ] }
oBrw:aCols[ 1 ]:nDataBmpAlign := AL_CENTER
oBrw:aCols[ 1 ]:bAlphaLevel := { | o | o:oBrw:aRow[ 5 ] }

oBrw:aCols[ 2]:cHeader = "No"
oBrw:aCols[ 3]:cHeader = "Option"

oBrw:bLClicked := { | nRow, nCol | ( nSelect := oBrw:nRowSel, oDlg1:End() ) }

oBrw:bClrSelFocus = { || { 0, 16638387 } }

// Shows a Black Color, pressing a Window-Button !!!
oBrw:bClrSelect = { || { 0, 16638387 } }

oBrw:SetBackGround( "Marble.bmp" )

oDlg1:oClient := oBrw

oBrw:CreateFromCode()

oBrw:SetFont( oBrwFont )

ACTIVATE DIALOG oDlg1

RETURN NIL

I think, setting the Focus to the Row of the Table-Selection ( not on Top at Start ) will be better.
Would be Row Number 4 at Start in this Situation.

ShowPopUp( oDlg, oBmp[11]:nTop + 100, oBmp[11]:nLeft + 70, "ROUND", nMENPOS[11] )

// ----------------

FUNCTION ShowPopup( oDlg, nRow, nCol, cStyle, nMenPos )
LOCAL oDlg1, oBrw, aArray:={}, oBrwFont
oBrwFont := TFont():New("Arial", ,-14,.F.,.T. , , , ,.T. )
..
oBrw:nArrayAt := nMenPos
oBrw:nRowSel := nMenPos

..
oBrw:SetFont( oBrwFont )
ACTIVATE DIALOG oDlg1
oBrwFont:End()
RETURN NIL

Image

A Table-Position ( Table 11 ) on Bottom of the Drawing-Area, will adjust the Top of the Popup-Menu
to a higher Screen-position in Relation to the Table, to show the full Menu-Size.

IF nRow > 450
DEFINE DIALOG oDlg1 FROM nRow - 70, nCol TO nRow + 200, nCol + 220 OF oDlg Title "Table-Options" PIXEL
ELSE
DEFINE DIALOG oDlg1 FROM nRow, nCol TO nRow + 270, nCol + 220 OF oDlg Title "Table-Options" PIXEL
ENDIF
@ 0,0 XBROWSE oBrw OF oDlg1 columns {1, 2, 3, 4 };
Array aArray sizes {45, 30, 110 } LINES SIZE 110, 140


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: bitmaps trasparents

Postby MdaSolution » Wed May 12, 2010 8:15 am

Nice...
on zip not are all bmps ( green.bmp) then How you made the border around ( WALL) ?
and on planner.prg there is not the menu and other source( when you change colors)
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: bitmaps trasparents

Postby ukoenig » Wed May 12, 2010 5:09 pm

Here is a new Download with all Changes.
In case, something is still missing, just let me know.

Yellow Drawing-Area ( a Dialog with no Border )

nMainStyle = nOR( WS_OVERLAPPED | WS_VISIBLE )
DEFINE DIALOG oDlg FROM 60,10 TO 550, 1000 OF oWnd STYLE nMainStyle PIXEL BRUSH oBrush

The Walls You can change to a Gradient ( I use only 1 Color RED )

ACTIVATE DIALOG oDlg NOWAIT ;
ON INIT PLACE_BMP() ;
ON PAINT ( GradientFill( hDC, 20, 20, 40, oDlg:nWidth, aGrad1, .T. ), ; // Wall Top
GradientFill( hDC, 20, 20, oDlg:nHeight - 30, 40, aGrad1, .T. ), ; // Wall Left
GradientFill( hDC, 20, oDlg:nWidth - 20, oDlg:nHeight - 30, oDlg:nWidth , aGrad1, .T. ), ; // Wall Right
GradientFill( hDC, 280, oDlg:nWidth - 350, 260, oDlg:nWidth - 180, aGrad1, .T. ), ; // Wall Horizont. part
GradientFill( hDC, oDlg:nHeight - 30 , 30, oDlg:nHeight - 50, oDlg:nWidth, aGrad1, .T. ), ; // Wall Bottom
GradientFill( hDC, 30, oDlg:nWidth - 200, oDlg:nHeight - 30, oDlg:nWidth - 180, aGrad1, .T. ) ) // Middle-Wall Vertical

Download ( 1 MB )
http://www.pflegeplus.com/fw_downloads/draw3.zip

New :
1. Walls adjusted ( looks much bettet now )
2. The missing Doors added
3. Table-Positions adjusted
4. On RESET, only Tables are replaced to the Storage-Area

On Reset

Image

Table-Positions and Properties.

Image

Some more Ideas :
1. Adding the Table-No, Date, Info-field and a Numeric Field ( business done ) to the xbrowse.
2. Now You can add a Reservation-date, Number of Persons ..... for a selected Table.
3. On the End of a day, save ( append ) the DBF to a Main-database.
4. On Month-End, You get a complete overview from the Main-database.
I will include the needed Changes, to show what I mean.


Something like :
Image
Total will count all Input-Values of a day.

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: bitmaps trasparents

Postby MdaSolution » Sun May 23, 2010 12:38 pm

Attention for all !!!
the bitmaps ( tables,piano,flowers ..) used in this sample test are Copyrights of MdaSoluciones .
All are included on an application of MdaSoluciones
FWH .. BC582.. xharbour
User avatar
MdaSolution
 
Posts: 401
Joined: Tue Jan 05, 2010 2:33 pm

Re: bitmaps trasparents

Postby ukoenig » Sun May 23, 2010 3:03 pm

I don't know, if there is something to be worried about ???.
I created / repainted all Tables , Tree and Desk to Alpha-blended BMP's to show a Solution,
comes close to Your Screenshot.
Sometimes I spend much Time, to find a working Solution.
There is no Necessity for me, to help somebody to get Problem-results.
I don't see something special and I got other better looking Images, in case I would need them.

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

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 93 guests