"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "caca/triangle.c" between
libcaca-0.99.beta19.tar.gz and libcaca-0.99.beta20.tar.bz2

About: libcaca is a graphics library that outputs text instead of pixels, so that it can work on older video cards or text terminals (something like an advanced AAlib library).

triangle.c  (libcaca-0.99.beta19):triangle.c  (libcaca-0.99.beta20.tar.bz2)
/* /*
* libcaca Colour ASCII-Art library * libcaca Colour ASCII-Art library
* Copyright (c) 2002-2012 Sam Hocevar <sam@hocevar.net> * Copyright © 2002—2018 Sam Hocevar <sam@hocevar.net>
* All Rights Reserved * All Rights Reserved
* *
* This library is free software. It comes without any warranty, to * This library is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it * the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What the Fuck You Want * and/or modify it under the terms of the Do What the Fuck You Want
* to Public License, Version 2, as published by Sam Hocevar. See * to Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/ for more details. * http://www.wtfpl.net/ for more details.
*/ */
/* /*
* This file contains triangle drawing functions, both filled and outline. * This file contains triangle drawing functions, both filled and outline.
skipping to change at line 364 skipping to change at line 364
* \param cv The handle to the libcaca canvas. * \param cv The handle to the libcaca canvas.
* \param coords The coordinates of the triangle (3{x,y}) * \param coords The coordinates of the triangle (3{x,y})
* \param tex The handle of the canvas texture. * \param tex The handle of the canvas texture.
* \param uv The coordinates of the texture (3{u,v}) * \param uv The coordinates of the texture (3{u,v})
* \return This function return 0 if ok, -1 if canvas or texture are missing. * \return This function return 0 if ok, -1 if canvas or texture are missing.
*/ */
int caca_fill_triangle_textured(caca_canvas_t * cv, int caca_fill_triangle_textured(caca_canvas_t * cv,
int coords[6], int coords[6],
caca_canvas_t * tex, float uv[6]) caca_canvas_t * tex, float uv[6])
{ {
return caca_fill_triangle_textured_l(cv, return caca_fill_triangle_textured_l(cv,
coords[0], coords[1], coords[0], coords[1],
coords[2], coords[3], coords[2], coords[3],
coords[4], coords[5], coords[4], coords[5],
tex, tex,
uv[0], uv[1], uv[0], uv[1],
uv[2], uv[3], uv[4], uv[5]); uv[2], uv[3], uv[4], uv[5]);
} }
/*
* XXX: The following functions are aliases.
*/
int cucul_draw_triangle(cucul_canvas_t *, int, int, int, int, int,
int, uint32_t) CACA_ALIAS(caca_draw_triangle);
int cucul_draw_thin_triangle(cucul_canvas_t *, int, int, int, int,
int,
int) CACA_ALIAS(caca_draw_thin_triangle);
int cucul_fill_triangle(cucul_canvas_t *, int, int, int, int, int, int,
uint32_t) CACA_ALIAS(caca_fill_triangle);
 End of changes. 3 change blocks. 
4 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)