X-Git-Url: http://git.mutantstargoat.com?a=blobdiff_plain;f=src%2Fgfx.cc;h=b72e43bcf1fa67788a349c72366e73a6379aacde;hb=e2626c41c841dbbfb64ddf6341b4e23089036299;hp=f0be4605174b24fbb178f9218c19b2214550c4d7;hpb=5984d5479693fd7519674a5bc40ebf804f8d0a46;p=winnie
diff --git a/src/gfx.cc b/src/gfx.cc
index f0be460..b72e43b 100644
--- a/src/gfx.cc
+++ b/src/gfx.cc
@@ -1,3 +1,24 @@
+/*
+winnie - an experimental window system
+
+Copyright (C) 2013 Eleni Maria Stea
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see .
+
+Author: Eleni Maria Stea
+*/
+
#include
#include "geom.h"
@@ -47,6 +68,9 @@ void fill_rect(const Rect &rect, int r, int g, int b)
void blit(unsigned char *src_img, const Rect &src_rect, unsigned char* dest_img,
const Rect &dest_rect, int dest_x, int dest_y)
{
+ int red_offs, green_offs, blue_offs;
+ get_rgb_order(&red_offs, &green_offs, &blue_offs);
+
Rect irect = rect_intersection(get_clipping_rect(), dest_rect);
int width = src_rect.width;
@@ -82,7 +106,11 @@ void blit(unsigned char *src_img, const Rect &src_rect, unsigned char* dest_img,
unsigned char *dptr = dest_img + (dest_y * dest_rect.width + dest_x) * 4;
for(int i=0; i