Pelles C forum
C language => Work in progress => Topic started by: frankie on May 17, 2016, 08:00:04 PM
-
The use of GDI+ is mainly limited because of the lacking of header to use the so called flat API's.
Searching around some hackings can be found, but they are old and in some cases limited.
I made a fast workout of last SDK and this is the result.
I'll look forward for comments and suggestions to make it a final release.
P.S. The test program of course is based on the historic GdiPlus demo.
EDIT: Removed some bugs and added 64bits version (see note in newer post).
EDIT: I forgot to put inside the fGdiPlus.h >:(. Updated
EDIT: Updated version
-
Nice job with the header 'fGdiPlusFlat.h'
John
-
Thanks John :)
I have updated the project, I've found problems compiling for 64bits:
- Allocations made with malloc were erroneously deallocated with GdipFree and crashed under 64bits. Corrected using GdipAlloc for allocation.
- GUID's for Imaging are'nt defined in GdiPlus.Dll under 64bits. Added symbol to force instantiation.
If somebody can check for other problems I'll be glad.
If there are no more problems I'll publish under contributions.
-
Yes you're right about malloc, well done.
John
-
Can you post a link to fGdiPlusFlat.h?
http://forum.pellesc.de/index.php?topic=4165.msg21438#msg21438 is not the right one.
-
Attached.
John
-
JJ It was my wrong. I forgot to add the include file.
I have update the download with the last version, that is slightly different from the older previous one supplied by John.
Thanks John anyway.
-
In your new download you have
#include <fGdiPlusFlat.h>
instead of
#include "fGdiPlusFlat.h"
John
-
Yes because I have put the fGdiPlusFlat.h in "PellesC\include\win" to use it in more projects that I'm testing.
If the file works this should be the final location, to copy it in each project is not effective.
I'll update the download.
-
'if the file works'! Of course it'll work. :)
John
-
I have update the download with the last version, that is slightly different from the older previous one supplied by John.
Thanks to both of you.
Btw it chokes with main.c(33): fatal error #1035: Can't find include file <fGdiPlusFlat.h>, but that can be "healed" by using quotes instead of brackets:
#include "fGdiPlusFlat.h"
Apparently <file.h> searches the default include folder, while "file.h" searches in the current folder - see this SOF thread (http://stackoverflow.com/questions/21593/what-is-the-difference-between-include-filename-and-include-filename).
-
Thanks John. I have updated the download, maybe you want add it to your site together with the old GDI+ sample.
JJ As I told to John in my former post I used <> because I have put my copy in the PellesC include directory. Anyway I updated the sample. Now is correct.
-
Yes, I will add it to my site.
EDIT: Ok, done.
John
-
So, to anyone doing GdiPlus demo(s) you are welcome to have it on my web site! :)
EDIT: Using Frankie's new header of course.
John
-
attached you'll find the last version of fGdiPlusFlat.h with the first part of a paper on use of GDI+ under C and a test program.
The examples in the paper are coded in the example program.
Let me know your comments.
-
Good work, I look forward to "GDI+ Made flat - part 2.pdf" and maybe
GDI+ Made flat - part 3.pdf :)
John
-
So, to anyone doing GdiPlus demo(s) you are welcome to have it on my web site! :)
Try this one (http://masm32.com/board/index.php?topic=5076.msg54975#msg54975), John. Hint: It's not GfaBasic :)
-
So, to anyone doing GdiPlus demo(s) you are welcome to have it on my web site! :)
Try this one (http://masm32.com/board/index.php?topic=5076.msg54975#msg54975), John. Hint: It's not GfaBasic :)
The image looks good however it would have to be written in PellesC - use Frankies new header and most importantly one needs to be able to unzip the file, which I can't do.
John
-
one needs to be able to unzip the file, which I can't do.
Oops, sorry 8) - source & exe added (http://masm32.com/board/index.php?topic=5076.msg54975#msg54975), for your inspiration (the *.asc opens in WordPad). Translating to Pelles C shouldn't be difficult for the expert, it's just under 70 lines, but for me it's too difficult.
-
one needs to be able to unzip the file, which I can't do.
Oops, sorry 8) - source & exe added (http://masm32.com/board/index.php?topic=5076.msg54975#msg54975), for your inspiration (the *.asc opens in WordPad). Translating to Pelles C shouldn't be difficult for the expert, it's just under 70 lines, but for me it's too difficult.
AVG says the EXE has a virus, the .asc file looks horrendous!
Who will translate into PellesC - not me.
John
-
AVG says the EXE has a virus
Yeah, that's a serious problem (https://virusscan.jotti.org/en-US/filescanjob/us4a0n4m5s) 8)
-
Try this one (http://masm32.com/board/index.php?topic=5076.msg54975#msg54975), John. Hint: It's not GfaBasic :)
Jochen,
Have you a problem with GfaBasic? That's the second time you've mentioned it.
John
-
No, on the contrary. Gfa was a modern language at its time, inspired by C and Pascal, and I used it a lot until a few years ago (the "real" Gfa is 16-bit, difficult with 64-bit Windows). In fact, MasmBasic has stolen a lot of its syntax from Gfa, such as Recall (http://www.webalice.it/jj2006/MasmBasicQuickReference.htm#Mb1172).
-
Can it be that fgdiplusflat.h is not included in version 10? Or did I miss something? I now downloaded it from this post and it works, so not a bug deal, just wondering.
Thnx
-
Can it be that fgdiplusflat.h is not included in version 10? Or did I miss something? I now downloaded it from this post and it works, so not a bug deal, just wondering.
Thnx
fgdiplusflat.h isn't part of the standard PellesC SDK.
It is part of my fSDK, available on PellesC forum (https://forum.pellesc.de/index.php?topic=7017.msg26620#msg26620) or directly from GitHub (https://github.com/Frankie-PellesC/fSDK) ;).
And... yes I haven't updated it from more than one year :-[. I'll do it for PellesC 10 (because there is an annoying warning due to change of version. :(
-
Thnx for letting me know. I found the header file somewhere here in this forum and so far it works fine. Thanks for your contribution,
-
:-[. I'll do it for PellesC 10 (because there is an annoying warning due to change of version. :(
Interesting I've used it under V10 and did not see any version warning. I'll check again.
John Z
-
:-[. I'll do it for PellesC 10 (because there is an annoying warning due to change of version. :(
Interesting I've used it under V10 and did not see any version warning. I'll check again.
John Z
Maybe my beta version???? :o
I made some changes never published. I have to check ???
I'm so busy, and this work require full attention and commitment that's why I decided to pause it for a while...