Recent

Author Topic: Почему в Лазарусе до сих пор нет заголовочников для GDI+ / Gdiplus / GDI Plus ?  (Read 10393 times)

MinGW2018

  • Newbie
  • Posts: 4
Вот пишу я тут кое-что для Windows - понадобилось использовать [ GDI+ | Gdiplus | Gdip | GDI Plus ] - а его и нету!
Да мне и не нужны обёртки в виде всяких классов/интерфейсов, мне нужен только Flat GDI+! Объявления типов, макросов и функций. И всё!
Это же часть WinAPI! Почему нету заголовков?!

Handoko

  • Hero Member
  • *****
  • Posts: 5122
  • My goal: build my own game engine using Lazarus
Hello MinGW2018,
Welcome to the forum.

OP's post translated using Google Translate:
Quote
Here I am writing something for Windows - I needed to use [GDI | Gdiplus | Gdip | GDI Plus] - and it's not there!
Yes, I do not need wrappers in the form of any classes interfaces, I need only Flat GDI! Declarations of types, macros, and functions. And that's it!
This is part of WinAPI! Why are there no headlines ?!

Maybe this links can be useful for you:
https://forum.lazarus.freepascal.org/index.php?topic=6423.0
https://forum.lazarus.freepascal.org/index.php?topic=22085.0
http://wiki.lazarus.freepascal.org/fpGUI
« Last Edit: June 23, 2018, 09:07:52 pm by Handoko »


MinGW2018

  • Newbie
  • Posts: 4
Quote from: Handoko
Hello MinGW2018,
Welcome to the forum.

Hello! Many thanks!

Quote from: Google.Translate
I am writing something for Windows - and I need to use [ GDI+ | Gdiplus | Gdip | GDI Plus ] - and there is no headers in Lazarus!
I do not need classes/interfaces wrappers. I need only "flat GDI+"! Declarations of types, macros, and functions.
This is part of WinAPI! Why are there no headers?!

Please, add it into LCL!


Topic: 6423.0: GDI plus in Lazarus? - dead link.
Topic: 15746.0: Is it possible to uses GDI+PLUS With lazarus? - no information.
Topic: 22085.0: GDI+ Library - dead link & old attach.


sash

  • Sr. Member
  • ****
  • Posts: 366
> Это же часть WinAPI! Почему нету заголовков?!

Потому и нету (я так думаю), что код который работает только на Windows, для Lazarus (являющийся кроссплатформенным) являет малую ценность/приоритет. Так, только в качестве дополнения, в частном порядке, и уж никак не в LCL.


Handoko дал тебе ссылки на темы, там есть вложение .rar, обнови, дополни, выложи, поможешь другим заинтересованным.

P.S. А зачем тебе вообще gdiplus?
Lazarus 2.0.10 FPC 3.2.0 x86_64-linux-gtk2 @ Ubuntu 20.04 XFCE

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11352
  • FPC developer.
I do not need classes/interfaces wrappers. I need only "flat GDI+"! Declarations of types, macros, and functions.
This is part of WinAPI! Why are there no headers?!

It is not. "GDI" is winapi, GDI+ is an additional library introduced with Windows XP.

GDIplus mostly adds some multimedia handlers, and is notoriously slow and buggy. What is so crucial in GDI+ that you need it? And why don't you just use it together with the GDI backend, why must the whole backend be GDI+ (which IMHO is not very realistic)

Quote
Please, add it into LCL!

The LCL is a GDI backend library.

Quote
Topic: 22085.0: GDI+ Library - dead link & old attach.


(I assume you mean this attach: https://forum.lazarus.freepascal.org/index.php/topic,22085.msg129802.html#msg129802 )

So what that it is old? So is gdiplus?
« Last Edit: July 03, 2018, 08:26:16 pm by marcov »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Topic: 22085.0: GDI+ Library - dead link & old attach.
that old attach works perfectly for me. I'm using it to add support for gdi+ in a number of components. Did you tried it and had problems?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

MinGW2018

  • Newbie
  • Posts: 4
It is not "additional", it is "OS subsystem". Yeah, it is "new library introduced...". But it is OS part. Just new part. Like "Userenv.dll", like "Magnification.dll", like "Advapi32.dll".
Contrariwise, function AlphaBlend() or GradientFill() is not part of GDI32, it is from additional library "Msimg32.dll" introduced with/for IE. But it is declared in Lazarus.


Didn't get your words about together/realistic, sorry.

and is notoriously slow and buggy.

erm... GDI+ is not slow. GDI32 is slow. I have checked. Also, GDI+ supports highest quality than GDI32.
I have ever faced the only one bug: with GdipCreateHBITMAPFromBitmap() from a JPG image.

So what that it is old? So is gdiplus?

GdipBitmapConvertFormat() - not declared.
GdipBitmapApplyEffect() - not declared.
GdipDrawImageFX() - not declared.
GdipCreateEffect() - not declared.
e.t.c.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11352
  • FPC developer.
It is not "additional", it is "OS subsystem". Yeah, it is "new library introduced...". But it is OS part. Just new part. Like "Userenv.dll", like "Magnification.dll", like "Advapi32.dll".

Well, afaik gdiplus was meant to be the graphical backend of Winforms originally. That's why it contains duplicates with GDI while those other subsystems that you name do not.

Quote
Contrariwise, function AlphaBlend() or GradientFill() is not part of GDI32, it is from additional library "Msimg32.dll" introduced with/for IE. But it is declared in Lazarus.
If you look carefully, it is declared in Jedi libs, not in the core headers.

Quote
and is notoriously slow and buggy.

erm... GDI+ is not slow. GDI32 is slow. I have checked. Also, GDI+ supports highest quality than GDI32.
I have ever faced the only one bug: with GdipCreateHBITMAPFromBitmap() from a JPG image.

I do have to confess most of my experience was from XP times.

Anyway, I checked if there is a 3rd party Delphi project that translated the header, but unfortunately it has an incompatible header (BSD with advocacy clause). http://www.bilsen.com/gdiplus/index.shtml


Thaddy

  • Hero Member
  • *****
  • Posts: 14169
  • Probably until I exterminate Putin.
Specialize a type, not a var.

MinGW2018

  • Newbie
  • Posts: 4
... it is declared in Jedi libs, not in the core headers.
So... Let's paraphrase my "Please, add it into LCL!" as "Please, add it into Jedi libs!":D

Also, I can't find a lot of "Interfaces" in Lazarus... For example, IShellItemImageFactory...

..., but unfortunately it has an incompatible header (BSD with advocacy clause). http://www.bilsen.com/gdiplus/index.shtml
Thanks! A'll check it!

I did one for KOL. Still works.
Is it "GDIPVER>=0x0110"? Where can I get the latest version? Thanks!

Thaddy

  • Hero Member
  • *****
  • Posts: 14169
  • Probably until I exterminate Putin.
I did one for KOL. Still works.
Is it "GDIPVER>=0x0110"? Where can I get the latest version? Thanks!
There isn't any and I will not update it. But it still works. It is highly stable even on Windows 10.+
Reason: Time and lost interest in KOL -because Vladimir Kladov dropped development and support -. Although I will answer KOL questions....
« Last Edit: July 15, 2018, 07:10:33 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018