Prev: VO DBFCDX eror
Next: Mesurement (Metrics/Imperial)
From: Fred Killet on 6 Jul 2010 01:20 Hi Jose, > 1. FixedText Transparency controls > 2. Show image on DataWindows > 3. Color Gradient on DataWindows > 4. Graphics ChartBar or ChartLine That all is possible with Graphics4VO. The best way to find out how to realize graphics in your own programs is to have a look to the Graphics4VO examples program. It is contained in the Graphics4VO download as an AEF source code. You can compile and run it on your own computer. A second step is to read the class, method and functions descriptions in the also contained detailed help file. As an example for FixedText Transparency controls you find in the help file for all graphics window classes the method setTransparent(lTransparent). For your points 2 to 4 use some of the plenty methods of the Graphics class in the paint()-method of your Graphics window. Here is the link to download the linkable Graphics4VO test-DLL, the examples program and the help file in English and German language: http://www.killetsoft.de/zip/graphdem.zip. Detailed information about Graphics4VO you find on the site http://www.killetsoft.de/p_gvoa_e.htm. Beginning with Graphics4VO needs some overhead. But ones you understand how it works, it is verry easy to develop your programs with excelent graphics interfaces. Hope it helps! Fred
From: Jose C on 6 Jul 2010 18:57 On 6 jul, 00:20, "Fred Killet" <killet-nos...(a)killetsoft.de> wrote: > Hi Jose, > > > 1. FixedText Transparency controls > > 2. Show image on DataWindows > > 3. Color Gradient on DataWindows > > 4. Graphics ChartBar or ChartLine > > That all is possible with Graphics4VO. The best way to find out how to > realize graphics in your own programs is to have a look to the Graphics4VO > examples program. It is contained in the Graphics4VO download as an AEF > source code. You can compile and run it on your own computer. > > A second step is to read the class, method and functions descriptions in the > also contained detailed help file. As an example for FixedText Transparency > controls you find in the help file for all graphics window classes the > method setTransparent(lTransparent). > > For your points 2 to 4 use some of the plenty methods of the Graphics class > in the paint()-method of your Graphics window. > > Here is the link to download the linkable Graphics4VO test-DLL, the examples > program and the help file in English and German language:http://www.killetsoft.de/zip/graphdem.zip. Detailed information about > Graphics4VO you find on the sitehttp://www.killetsoft.de/p_gvoa_e.htm. > > Beginning with Graphics4VO needs some overhead. But ones you understand how > it works, it is verry easy to develop your programs with excelent graphics > interfaces. > > Hope it helps! > > Fred Mr. Fred, When run Graphics4VO Examples is OK, but when I do on my DataWindows some things go bad. I want Color Gradient on DataWindows because is very nice, but in my DataWindows the Fixed Text and Fixed Icon no change or update their background color to Color Gradient. This is my method Paint() METHOD Paint() CLASS PanelWin LOCAL nWinW,nWinH AS WORD LOCAL nDrW,nDrH AS WORD LOCAL nColor AS INT // Variablen: LOCAL oGraphik AS graphics nColor:= GetSysColor(COLOR_BTNFACE) //(COLOR_BTNFACE + 1) // Clear screen *oGraphics:paintEraseCanvas() // Graphikobjekt zuweisen. oGraphik := SELF:_oGraphics *oGraphik:paintGradientCanvas(SELF:_iGradient,SELF:_iGradDir) *SELF:_oGraphics:setBackgroundColor(Color{GetRValue(nColor),GetGValue(nColor),GetBValue(nColor)})// G_COLORLIGHTCYAN) SELF:_oGraphics:setBackgroundColor(Color{187,187,187}) //150// G_COLORWHITE) *SELF:_oGraphics:setBackgroundColor(G_COLORLIGHTCYAN) *SELF:_oGraphics:paintGradientCanvas(10,G_DIRECTIONDOWN) *SELF:_oGraphics:paintSpotCanvas(10,G_DIRECTIONDOWN) nWinW := SELF:_oGraphics:getDeviceWidth() nWinH := SELF:_oGraphics:getDeviceHeight() nDrW := SELF:_oGraphics:getDeviceWidth() nDrH := SELF:_oGraphics:getDeviceHeight() SELF:_oGraphics:setWorldOrigin(nWinW / 2, nWinH / 2) //(662,13)// (nWinW / 2, nWinH / 2) SELF:_oGraphics:setStringFont(G_FONTTYPEROMAN, 40,120,G_FONTBOLD,G_FONTDIMFLEX,0.0) SELF:_oGraphics:setStringColor(G_COLORWHITE) SELF:_oGraphics:setStringShadow(6,G_COLORBLACK,G_DIRECTIONRIGHTDOWN) // Buttons. oGraphik:SetLineColor(G_COLORBLUE)//G_COLORLIGHTRED) oGraphik:SetFillColor(152)//118 oGraphik:PaintControl(SELF:oDCftPedir2,G_FORMFLOWER,G_OBJECTFILLED) *SELF:_oGraphics:paintStringShadow(0,nWinH * 0.2,"Graphics4VO",G_ORIGINCENTER) *oGraphik:paintBmpStretched(nDrW * 1,nDrH * 2, nDrW * 0,nDrH * 2,nDrW,nDrH,gcPfad + "mercury.bmp",; *oGraphik:paintBmpStretched(159,40, 336,256,"C:\DBOPTIMO\IMG \SAT00001.JPG") //,FALSE) *SELF:oDCIMG1:_oGraphics:= PaintBmpCanvas("C:\DBOPTIMO\IMG \SAT00001.JPG",FALSE) //,FALSE) // FixedText. oGraphik:SetLineColor(G_COLORLIGHTRED) oGraphik:PaintControl(SELF:oDCftTexto,G_FORMRECTROUND,G_OBJECTFRAME) RETURN NIL
From: Fred Killet on 7 Jul 2010 05:35 Jose, do not use FixedText and FixedIcon on your gradient background painted with .. It is not possible to syncronice the backgrounds of theese objects. Use insteed the graphics methods paintString(), paintStringShadow() for text and paintBmpDirect() or other paintBmp???() methods with transparent background for images. here is a short example for a paint() method with grandient background and some shadowed text on it. It is the start scrren of our geodetic program TRANSDAT: METHOD paint() CLASS winShell // Wird aufgerufen um die hier implementierte Graphik zu zeichnen. // Variablen: LOCAL nFenBreite,nFenHoehe AS WORD LOCAL oGraphik AS OBJECT LOCAL f AS FLOAT // Methode nur ausf�hren, wenn das Fenster sichtbar ist. IF SELF:IsIconic() .or. .not. SELF:isVisible() RETURN ENDIF // Graphikobjekt zuweisen. oGraphik := SELF:_oGraphics // Fensterbereich l�schen. oGraphik:setBackgroundColor(G_COLORLIGHTCYAN) oGraphik:paintGradientCanvas(10,G_DIRECTIONDOWN) // Fensterdimensionen ermitteln. nFenBreite := oGraphik:getDeviceWidth() nFenHoehe := oGraphik:getDeviceHeight() // Programmnamen schreiben. oGraphik:setWorldOrigin(nFenBreite / 2, nFenHoehe / 2) f := 30.0 oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * 2.0,G_FONTBOLD,G_FONTDIMFLEX,0.0) oGraphik:setStringColor(G_COLORWHITE) oGraphik:setStringShadow(6,G_COLORBLACK,G_DIRECTIONRIGHTDOWN) oGraphik:paintStringShadow(0,nFenHoehe * 0.2,"TRANSDAT",G_ORIGINCENTER) // Programmbeschreibung schreiben. f := 15.0 oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * 2.0,G_FONTBOLD + G_FONTITALIC,G_FONTDIMFLEX,0.0) oGraphik:setStringShadow(4,G_COLORBLACK,G_DIRECTIONRIGHTDOWN) oGraphik:paintStringShadow(0,nFenhoehe * 0.05,_aSpr[6],G_ORIGINCENTER) oGraphik:paintStringShadow(0,nFenHoehe * -0.05,_aSpr[7],G_ORIGINCENTER) // Firmennamen schreiben. oGraphik:setWorldOrigin(nFenBreite * 0.95,nFenHoehe * 0.1) oGraphik:setStringColor(G_COLORWHITE) f := 10.0 oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * 2.0,G_FONTBOLD + G_FONTITALIC,G_FONTDIMFLEX,0.0) oGraphik:paintString(0,0,"C. Killet Software Ing.-GbR",G_ORIGINBOTTOMRIGHT) RETURN SELF
From: Jose C on 15 Jul 2010 10:53 On 7 jul, 04:35, "Fred Killet" <killet-nos...(a)killetsoft.de> wrote: > Jose, > > do not use FixedText and FixedIcon on your gradient background painted with > . It is not possible to syncronice the backgrounds of theese objects. Use > insteed the graphics methods paintString(), paintStringShadow() for text > and paintBmpDirect() or other paintBmp???() methods with transparent > background for images. > > here is a short example for a paint() method with grandient background and > some shadowed text on it. It is the start scrren of our geodetic program > TRANSDAT: > > METHOD paint() CLASS winShell > // Wird aufgerufen um die hier implementierte Graphik zu zeichnen. > > // Variablen: > LOCAL nFenBreite,nFenHoehe AS WORD > LOCAL oGraphik AS OBJECT > LOCAL f AS FLOAT > > // Methode nur ausf hren, wenn das Fenster sichtbar ist. > IF SELF:IsIconic() .or. .not. SELF:isVisible() > RETURN > ENDIF > > // Graphikobjekt zuweisen. > oGraphik := SELF:_oGraphics > > // Fensterbereich l schen. > oGraphik:setBackgroundColor(G_COLORLIGHTCYAN) > oGraphik:paintGradientCanvas(10,G_DIRECTIONDOWN) > > // Fensterdimensionen ermitteln. > nFenBreite := oGraphik:getDeviceWidth() > nFenHoehe := oGraphik:getDeviceHeight() > > // Programmnamen schreiben. > oGraphik:setWorldOrigin(nFenBreite / 2, nFenHoehe / 2) > f := 30.0 > oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * > 2.0,G_FONTBOLD,G_FONTDIMFLEX,0.0) > oGraphik:setStringColor(G_COLORWHITE) > oGraphik:setStringShadow(6,G_COLORBLACK,G_DIRECTIONRIGHTDOWN) > oGraphik:paintStringShadow(0,nFenHoehe * 0.2,"TRANSDAT",G_ORIGINCENTER) > > // Programmbeschreibung schreiben. > f := 15.0 > oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * 2.0,G_FONTBOLD + > G_FONTITALIC,G_FONTDIMFLEX,0.0) > oGraphik:setStringShadow(4,G_COLORBLACK,G_DIRECTIONRIGHTDOWN) > oGraphik:paintStringShadow(0,nFenhoehe * 0.05,_aSpr[6],G_ORIGINCENTER) > oGraphik:paintStringShadow(0,nFenHoehe * -0.05,_aSpr[7],G_ORIGINCENTER) > > // Firmennamen schreiben. > oGraphik:setWorldOrigin(nFenBreite * 0.95,nFenHoehe * 0.1) > oGraphik:setStringColor(G_COLORWHITE) > f := 10.0 > oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * 2.0,G_FONTBOLD + > G_FONTITALIC,G_FONTDIMFLEX,0.0) > oGraphik:paintString(0,0,"C. Killet Software Ing.-GbR",G_ORIGINBOTTOMRIGHT) > RETURN SELF Mr. Fred, Thanks for your's reply. I have another question over Graphics the ChartBar or ChartLine I need show values en the ChartBar or ChartLine? regards
From: Fred Killet on 22 Jul 2010 11:13
Hi Jose, please have a look to the Graphics4VO examples program. AEF code is in the download (http://www.killetsoft.de/zip/graph4vo.zip or http://www.killetsoft.de/zip/graphdem.zip). There are multiple examples how to create different charts!! The charts were developed by Geoff Schaller and me some years ago. It is very easy to realize charts with Graphics4VO! Isnt it, Geoff? Kind regards Fred -- Fred Killet killet-nospam(a)killetsoft.de "Jose C" <jconradomx(a)gmail.com> schrieb im Newsbeitrag news:a032c870-582e-48e5-8dd7-71c0a63e4902(a)x24g2000pro.googlegroups.com... On 7 jul, 04:35, "Fred Killet" <killet-nos...(a)killetsoft.de> wrote: > Jose, > > do not use FixedText and FixedIcon on your gradient background painted > with > . It is not possible to syncronice the backgrounds of theese objects. Use > insteed the graphics methods paintString(), paintStringShadow() for text > and paintBmpDirect() or other paintBmp???() methods with transparent > background for images. > > here is a short example for a paint() method with grandient background and > some shadowed text on it. It is the start scrren of our geodetic program > TRANSDAT: > > METHOD paint() CLASS winShell > // Wird aufgerufen um die hier implementierte Graphik zu zeichnen. > > // Variablen: > LOCAL nFenBreite,nFenHoehe AS WORD > LOCAL oGraphik AS OBJECT > LOCAL f AS FLOAT > > // Methode nur ausf hren, wenn das Fenster sichtbar ist. > IF SELF:IsIconic() .or. .not. SELF:isVisible() > RETURN > ENDIF > > // Graphikobjekt zuweisen. > oGraphik := SELF:_oGraphics > > // Fensterbereich l schen. > oGraphik:setBackgroundColor(G_COLORLIGHTCYAN) > oGraphik:paintGradientCanvas(10,G_DIRECTIONDOWN) > > // Fensterdimensionen ermitteln. > nFenBreite := oGraphik:getDeviceWidth() > nFenHoehe := oGraphik:getDeviceHeight() > > // Programmnamen schreiben. > oGraphik:setWorldOrigin(nFenBreite / 2, nFenHoehe / 2) > f := 30.0 > oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * > 2.0,G_FONTBOLD,G_FONTDIMFLEX,0.0) > oGraphik:setStringColor(G_COLORWHITE) > oGraphik:setStringShadow(6,G_COLORBLACK,G_DIRECTIONRIGHTDOWN) > oGraphik:paintStringShadow(0,nFenHoehe * 0.2,"TRANSDAT",G_ORIGINCENTER) > > // Programmbeschreibung schreiben. > f := 15.0 > oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * 2.0,G_FONTBOLD + > G_FONTITALIC,G_FONTDIMFLEX,0.0) > oGraphik:setStringShadow(4,G_COLORBLACK,G_DIRECTIONRIGHTDOWN) > oGraphik:paintStringShadow(0,nFenhoehe * 0.05,_aSpr[6],G_ORIGINCENTER) > oGraphik:paintStringShadow(0,nFenHoehe * -0.05,_aSpr[7],G_ORIGINCENTER) > > // Firmennamen schreiben. > oGraphik:setWorldOrigin(nFenBreite * 0.95,nFenHoehe * 0.1) > oGraphik:setStringColor(G_COLORWHITE) > f := 10.0 > oGraphik:setStringFont(G_FONTTYPEROMAN,f,f * 2.0,G_FONTBOLD + > G_FONTITALIC,G_FONTDIMFLEX,0.0) > oGraphik:paintString(0,0,"C. Killet Software > Ing.-GbR",G_ORIGINBOTTOMRIGHT) > RETURN SELF Mr. Fred, Thanks for your's reply. I have another question over Graphics the ChartBar or ChartLine I need show values en the ChartBar or ChartLine? regards |