1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-11 20:05:03 -05:00
Simba/Units/MMLAddon/PSInc/Wrappers/colourconv.inc

64 lines
1.2 KiB
PHP
Raw Normal View History

2010-04-18 11:14:19 -04:00
procedure ps_ColorToRGB(Color: integer; var r, g, b: Integer);extdecl;
var
RR,GG,BB : byte;
2010-04-07 17:03:39 -04:00
begin
2010-04-18 11:14:19 -04:00
colour_conv.ColorToRGB(color,rr,gg,bb);
r := rr;
g := gg;
b := bb;
2010-04-07 17:03:39 -04:00
end;
2010-04-18 11:14:19 -04:00
function ps_RGBtoColor(r, g, b: Integer): TColor;extdecl;
2010-04-07 17:03:39 -04:00
begin
result := RGBtoColor(r,g,b);
end;
procedure ps_ColorToHSL(Color: Integer; var h, s, l: Extended); extdecl;
begin
ColorToHSL(color,h,s,l);
end;
function ps_HSLToColor(H, S, L: Extended): TColor; extdecl;
begin
result := HSLToColor(h,s,l);
end;
procedure ps_ColorToXYZ(Color: Integer; var x, y, z: Extended); extdecl;
begin
ColorToXYZ(Color,x,y,z)
end;
function ps_XYZToColor(X, Y, Z: Extended): TColor; extdecl;
begin
result := XYZToColor(x,y,z);
end;
2010-04-18 11:14:19 -04:00
procedure ps_RGBToHSL(R, G, B: Integer; var h, s, l: Extended);extdecl;
2010-04-07 17:03:39 -04:00
begin
RGBToHSL(r,g,b,h,s,l);
end;
2010-04-18 11:14:19 -04:00
procedure ps_HSLtoRGB(H, S, L: extended; var R, G ,B: Integer);extdecl;
var
RR,GG,BB : byte;
2010-04-07 17:03:39 -04:00
begin
2010-04-18 11:14:19 -04:00
HSLtoRGB(h,s,l,rr,gg,bb);
r := rr;
g := gg;
b := bb;
2010-04-07 17:03:39 -04:00
end;
2010-04-18 11:14:19 -04:00
procedure ps_RGBToXYZ(R, G, B: Integer;var x, y ,z: Extended);extdecl;
2010-04-07 17:03:39 -04:00
begin
RGBToXYZ(r,g,b,x,y,z);
end;
2010-04-18 11:14:19 -04:00
procedure ps_XYZToRGB(X, Y, Z: Extended; var R, G, B: Integer);extdecl;
var
RR,GG,BB : byte;
begin;
XYZToRGB(x,y,z,rr,gg,bb);
r := rr;
g := gg;
b := bb;
2010-04-07 17:03:39 -04:00
end;