GDI+

GDI+

Postby byte-one » Wed Sep 21, 2011 10:58 pm

I will test GDI+ as described in:
http://forums.fivetechsupport.com/viewtopic.php?p=63850
But many errors are shown!
Antonio, please test your example..
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: GDI+

Postby Antonio Linares » Thu Sep 22, 2011 5:01 am

Günther,

That example requires to compile using C++ mode. Add -P in samples\buildh.bat :

%bcdir%\bin\bcc32 -M -c -P @b32.bc

also you have to add this line to the example:

Code: Select all  Expand view
#include <hbapi.h>
#include <windows.h>
#include <Gdiplus.h>

using namespace Gdiplus;  // this one!

GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR  


And you have to link gdiplus.lib

With those changes it properly builds :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GDI+

Postby byte-one » Thu Sep 22, 2011 6:37 am

Thanks Antonio!
I found, fivewin should make some substantially routines (lines, rectangles, ellipses, etc.) also with GDI+ as standard! The quality from graphics are much better with antialiasing and so on.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: GDI+

Postby Antonio Linares » Thu Sep 22, 2011 7:34 am

Günther,

Unless there is a real need for it, my understanding is that GDI+ is an important overload for an application and thus we should avoid it.

I may be wrong, as I have never performed speed tests about this, but I think that a simple API function has to perform much faster that calling a whole OLE objects layer :-)

Also, the less our applications depend from external modules (DLLs, OLE, etc) the more robust applications that we get. FWH applications run on all Windows, have no need for lots of DLLs (like VB i.e.) and that means rock solid apps :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GDI+

Postby byte-one » Thu Sep 22, 2011 7:43 am

Antonio, you are right!
But I will do some tests with GDI+ and report here.
Greetings from Austria.
Antonio, if you visit Otto, please inform me also. My home are only 100km far from Otto! :)
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: GDI+

Postby Antonio Linares » Thu Sep 22, 2011 8:41 pm

Günther,

Surely we will meet very soon! :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GDI+

Postby byte-one » Thu Sep 22, 2011 8:55 pm

Antonio, this are great news!!

For the C-wrapper-routines i write for GDI+ :
Where are the function HB_ISNUM()? I found only ISNUM(). The same?
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: GDI+

Postby Antonio Linares » Thu Sep 22, 2011 9:00 pm

Its the same function, for Harbour HB_ISNUM() and for xHarbour ISNUM()
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GDI+

Postby byte-one » Mon Sep 26, 2011 8:38 am

A test-exe to show some GDI+....
http://byte-one.com/gdiplus_test.exe
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: GDI+

Postby hmpaquito » Mon Sep 26, 2011 9:16 am

Mr. byte-one,

would do you like to see mrftools.lib (espectaculars effeccts) from antolin ?

viewtopic.php?f=6&t=18292&hilit=mrftool

Regards
hmpaquito
 
Posts: 1482
Joined: Thu Oct 30, 2008 2:37 pm

Re: GDI+

Postby Antonio Linares » Mon Sep 26, 2011 9:19 am

Gunther,

Would you mind to share its source code ?

I am writting this from an iPad so no way to run the Windows EXE but I can review its source code :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GDI+

Postby byte-one » Mon Sep 26, 2011 3:43 pm

Antonio, yes, i send to you the code if it ok!
But at moment i need your help:
xharbour-parameter array {{x,y},{x,y},....} to c++-array with same structur
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: GDI+

Postby Bayron » Mon Sep 26, 2011 4:17 pm

Nice painting effects...

Antonio so you can see Günther's program:

Image

EDITED:
App is EXE self contained, 1.34 MB and it runs smoothly on a Core i5 with 4MB Ram
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: GDI+

Postby Antonio Linares » Mon Sep 26, 2011 4:48 pm

byte-one wrote:Antonio, yes, i send to you the code if it ok!
But at moment i need your help:
xharbour-parameter array {{x,y},{x,y},....} to c++-array with same structur


Günther,

How many elements the array has ? Is it known in advance ?
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42085
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: GDI+

Postby byte-one » Mon Sep 26, 2011 9:39 pm

Antonio,
How many elements the array has ? Is it known in advance ?

This are coordinate-points {{x,y},{x,y},....} nested in a array and the quantity from this points are known from side of (x)harbour.
Release from memory after???
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Silvio.Falconi and 97 guests