mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2026-01-22 17:14:14 +00:00
button
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@28 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
@@ -57,6 +57,14 @@ void MilskoLLPolygon(MilskoLL handle, MilskoPoint* points, int points_count, Mil
|
||||
MilskoLLColor MilskoLLAllocColor(MilskoLL handle, int r, int g, int b) {
|
||||
MilskoLLColor c = malloc(sizeof(*c));
|
||||
XColor xc;
|
||||
|
||||
if(r > 255) r = 255;
|
||||
if(g > 255) g = 255;
|
||||
if(b > 255) b = 255;
|
||||
if(r < 0) r = 0;
|
||||
if(g < 0) g = 0;
|
||||
if(b < 0) b = 0;
|
||||
|
||||
xc.red = 256 * r;
|
||||
xc.green = 256 * g;
|
||||
xc.blue = 256 * b;
|
||||
|
||||
Reference in New Issue
Block a user