Rename GP_Pixel_Access to GP_GetPutPixel
[gfxprim.git] / libs / core / GP_GetPutPixel.c
blobfe37216be22b124dfc83e79cca00a95006669022
1 /*****************************************************************************
2 * This file is part of gfxprim library. *
3 * *
4 * Gfxprim is free software; you can redistribute it and/or *
5 * modify it under the terms of the GNU Lesser General Public *
6 * License as published by the Free Software Foundation; either *
7 * version 2.1 of the License, or (at your option) any later version. *
8 * *
9 * Gfxprim is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12 * Lesser General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with gfxprim; if not, write to the Free Software *
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17 * Boston, MA 02110-1301 USA *
18 * *
19 * Copyright (C) 2011 Tomas Gavenciak <gavento@ucw.cz> *
20 * *
21 *****************************************************************************/
23 #include "GP_GetPutPixel.h"
24 #include "GP_Transform.h"
26 GP_Pixel GP_GetPixel(GP_Context *context, int x, int y)
28 GP_TRANSFORM_POINT(context, x, y);
29 if (GP_PIXEL_IS_CLIPPED(context, x, y))
30 return 0;
31 return GP_GetPixel_Raw(context, x, y);
34 void GP_PutPixel(GP_Context *context, int x, int y, GP_Pixel p)
36 GP_TRANSFORM_POINT(context, x, y);
37 if (! GP_PIXEL_IS_CLIPPED(context, x, y))
38 GP_PutPixel_Raw(context, x, y, p);