Recent

Author Topic: whats the equivalent of GDI in mac osx  (Read 7610 times)

airpas

  • Full Member
  • ***
  • Posts: 179
whats the equivalent of GDI in mac osx
« on: March 13, 2013, 04:28:29 pm »
hi every one

i just want to know whats the library in mac osx that used for drawing lines , rects , .. just like GDI in windows . if yes then are there any pascal header for it ?

another thing , i know for linux its x11 lib , but is it in all linux distros ?

thanks

airpas


Leledumbo

  • Hero Member
  • *****
  • Posts: 8757
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: whats the equivalent of GDI in mac osx
« Reply #1 on: March 13, 2013, 04:43:25 pm »
Quote
i just want to know whats the library in mac osx that used for drawing lines , rects , .. just like GDI in windows .
Carbon (a bit old) or Cocoa (the new one).
Quote
if yes then are there any pascal header for it ?
How do you think Lazarus can run on Mac with Carbon interface (and probably Cocoa in the future)?
Quote
another thing , i know for linux its x11 lib , but is it in all linux distros ?
No, Linux practically has no underlying GUI library. Despite nearly all Linux distros are distributed with it, X11 is not part of Linux. When Wayland (and that another new effort from Ubuntu team) makes its way to enter Linux world deeply, X11 might be history.

airpas

  • Full Member
  • ***
  • Posts: 179
Re: whats the equivalent of GDI in mac osx
« Reply #2 on: March 13, 2013, 08:38:56 pm »
thanks Leledumbo
Quote
How do you think Lazarus can run on Mac with Carbon interface (and probably Cocoa in the future)?
sorry i didn't understand  , do you mean its possible to use Carbon and Cocoa functions ?

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: whats the equivalent of GDI in mac osx
« Reply #3 on: March 13, 2013, 08:53:47 pm »
More information on the Mac OS X API is available from

Usually, however, you don't have to care in Lazarus as the LCL provides a broad spectrum of funtionality. For special purposes it may be useful to consult pages like the two from above.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: whats the equivalent of GDI in mac osx
« Reply #4 on: March 13, 2013, 08:56:05 pm »
thanks Leledumbo
Quote
How do you think Lazarus can run on Mac with Carbon interface (and probably Cocoa in the future)?
sorry i didn't understand  , do you mean its possible to use Carbon and Cocoa functions ?
I think that Leledumbo wanted to say that Lazarus (that is a Carbon app in the current Mac version) couldn't run on a Mac, if there were no header files.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

airpas

  • Full Member
  • ***
  • Posts: 179
Re: whats the equivalent of GDI in mac osx
« Reply #5 on: March 13, 2013, 10:44:03 pm »
thank you jwdietrich

i've found what i was looking for . thanks to xproger
http://code.google.com/p/joim/source/browse/trunk/src/jsys.pas

especially TCanvas class.

 

TinyPortal © 2005-2018