1998-03-20 10:42:24 +08:00
|
|
|
/*************************************************/
|
|
|
|
/* Compute a preview image and preview wireframe */
|
|
|
|
/*************************************************/
|
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
#include "config.h"
|
|
|
|
|
2000-02-18 21:59:18 +08:00
|
|
|
#include <gtk/gtk.h>
|
|
|
|
|
|
|
|
#include <libgimp/gimp.h>
|
2005-09-26 05:22:39 +08:00
|
|
|
#include <libgimp/gimpui.h>
|
2000-02-18 21:59:18 +08:00
|
|
|
|
2008-03-25 02:33:25 +08:00
|
|
|
#include "map-object-main.h"
|
|
|
|
#include "map-object-ui.h"
|
|
|
|
#include "map-object-image.h"
|
|
|
|
#include "map-object-apply.h"
|
|
|
|
#include "map-object-shade.h"
|
|
|
|
#include "map-object-preview.h"
|
|
|
|
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
gint x, y, w, h;
|
|
|
|
cairo_surface_t *image;
|
|
|
|
} BackBuffer;
|
|
|
|
|
1998-03-20 10:42:24 +08:00
|
|
|
gdouble mat[3][4];
|
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
gint lightx, lighty;
|
2011-02-13 17:00:48 +08:00
|
|
|
|
|
|
|
static BackBuffer backbuf = { 0, 0, 0, 0, NULL };
|
1998-03-20 10:42:24 +08:00
|
|
|
|
|
|
|
/* Protos */
|
|
|
|
/* ====== */
|
|
|
|
|
2011-02-13 21:12:08 +08:00
|
|
|
static void compute_preview (gint x,
|
|
|
|
gint y,
|
|
|
|
gint w,
|
|
|
|
gint h,
|
|
|
|
gint pw,
|
|
|
|
gint ph);
|
|
|
|
static void draw_light_marker (gint xpos,
|
|
|
|
gint ypos);
|
2000-12-30 08:23:34 +08:00
|
|
|
static void clear_light_marker (void);
|
|
|
|
|
1998-03-20 10:42:24 +08:00
|
|
|
/**************************************************************/
|
|
|
|
/* Computes a preview of the rectangle starting at (x,y) with */
|
2003-12-15 01:17:56 +08:00
|
|
|
/* dimensions (w,h), placing the result in preview_RGB_data. */
|
1998-03-20 10:42:24 +08:00
|
|
|
/**************************************************************/
|
|
|
|
|
2011-02-13 21:12:08 +08:00
|
|
|
static void
|
2000-02-18 21:59:18 +08:00
|
|
|
compute_preview (gint x,
|
|
|
|
gint y,
|
|
|
|
gint w,
|
|
|
|
gint h,
|
|
|
|
gint pw,
|
|
|
|
gint ph)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
gdouble xpostab[PREVIEW_WIDTH];
|
|
|
|
gdouble ypostab[PREVIEW_HEIGHT];
|
|
|
|
gdouble realw;
|
|
|
|
gdouble realh;
|
|
|
|
GimpVector3 p1, p2;
|
2001-01-15 08:06:43 +08:00
|
|
|
GimpRGB color;
|
|
|
|
GimpRGB lightcheck, darkcheck;
|
2000-12-30 08:23:34 +08:00
|
|
|
gint xcnt, ycnt, f1, f2;
|
2011-02-13 17:00:48 +08:00
|
|
|
guchar r, g, b;
|
2000-12-30 08:23:34 +08:00
|
|
|
glong index = 0;
|
|
|
|
|
|
|
|
init_compute ();
|
|
|
|
|
|
|
|
p1 = int_to_pos (x, y);
|
|
|
|
p2 = int_to_pos (x + w, y + h);
|
1998-03-20 10:42:24 +08:00
|
|
|
|
|
|
|
/* First, compute the linear mapping (x,y,x+w,y+h) to (0,0,pw,ph) */
|
|
|
|
/* ============================================================== */
|
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
realw = (p2.x - p1.x);
|
|
|
|
realh = (p2.y - p1.y);
|
|
|
|
|
|
|
|
for (xcnt = 0; xcnt < pw; xcnt++)
|
|
|
|
xpostab[xcnt] = p1.x + realw * ((gdouble) xcnt / (gdouble) pw);
|
|
|
|
|
|
|
|
for (ycnt = 0; ycnt < ph; ycnt++)
|
|
|
|
ypostab[ycnt] = p1.y + realh * ((gdouble) ycnt / (gdouble) ph);
|
1998-03-20 10:42:24 +08:00
|
|
|
|
|
|
|
/* Compute preview using the offset tables */
|
|
|
|
/* ======================================= */
|
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
if (mapvals.transparent_background == TRUE)
|
|
|
|
{
|
2001-01-02 02:35:09 +08:00
|
|
|
gimp_rgba_set (&background, 0.0, 0.0, 0.0, 0.0);
|
2000-12-30 08:23:34 +08:00
|
|
|
}
|
1998-03-20 10:42:24 +08:00
|
|
|
else
|
|
|
|
{
|
2004-09-23 02:43:09 +08:00
|
|
|
gimp_context_get_background (&background);
|
2001-01-15 08:06:43 +08:00
|
|
|
gimp_rgb_set_alpha (&background, 1.0);
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
|
2003-12-15 01:17:56 +08:00
|
|
|
gimp_rgba_set (&lightcheck,
|
2001-01-24 20:21:50 +08:00
|
|
|
GIMP_CHECK_LIGHT, GIMP_CHECK_LIGHT, GIMP_CHECK_LIGHT, 1.0);
|
2003-12-15 01:17:56 +08:00
|
|
|
gimp_rgba_set (&darkcheck,
|
2001-01-24 20:21:50 +08:00
|
|
|
GIMP_CHECK_DARK, GIMP_CHECK_DARK, GIMP_CHECK_DARK, 1.0);
|
2000-12-30 08:23:34 +08:00
|
|
|
gimp_vector3_set (&p2, -1.0, -1.0, 0.0);
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_surface_flush (preview_surface);
|
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
for (ycnt = 0; ycnt < ph; ycnt++)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2011-02-13 17:00:48 +08:00
|
|
|
index = ycnt * preview_rgb_stride;
|
2000-12-30 08:23:34 +08:00
|
|
|
for (xcnt = 0; xcnt < pw; xcnt++)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
p1.x = xpostab[xcnt];
|
|
|
|
p1.y = ypostab[ycnt];
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
p2 = p1;
|
|
|
|
color = (* get_ray_color) (&p1);
|
|
|
|
|
|
|
|
if (color.a < 1.0)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
f1 = ((xcnt % 32) < 16);
|
|
|
|
f2 = ((ycnt % 32) < 16);
|
|
|
|
f1 = f1 ^ f2;
|
1998-03-20 10:42:24 +08:00
|
|
|
|
|
|
|
if (f1)
|
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
if (color.a == 0.0)
|
2001-01-24 20:21:50 +08:00
|
|
|
color = lightcheck;
|
1998-03-20 10:42:24 +08:00
|
|
|
else
|
2003-12-15 01:17:56 +08:00
|
|
|
gimp_rgb_composite (&color, &lightcheck,
|
2001-01-24 20:21:50 +08:00
|
|
|
GIMP_RGB_COMPOSITE_BEHIND);
|
|
|
|
}
|
1998-03-20 10:42:24 +08:00
|
|
|
else
|
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
if (color.a == 0.0)
|
2001-01-24 20:21:50 +08:00
|
|
|
color = darkcheck;
|
1998-03-20 10:42:24 +08:00
|
|
|
else
|
2003-12-15 01:17:56 +08:00
|
|
|
gimp_rgb_composite (&color, &darkcheck,
|
2001-01-24 20:21:50 +08:00
|
|
|
GIMP_RGB_COMPOSITE_BEHIND);
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
gimp_rgb_get_uchar (&color, &r, &g, &b);
|
|
|
|
GIMP_CAIRO_RGB24_SET_PIXEL((preview_rgb_data + index), r, g, b);
|
|
|
|
index += 4;
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
}
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_surface_mark_dirty (preview_surface);
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************/
|
|
|
|
/* Check if the given position is within the */
|
|
|
|
/* light marker. Return TRUE if so, FALSE if not */
|
|
|
|
/*************************************************/
|
|
|
|
|
2000-02-18 21:59:18 +08:00
|
|
|
gint
|
|
|
|
check_light_hit (gint xpos,
|
|
|
|
gint ypos)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
gdouble dx, dy, r;
|
|
|
|
|
|
|
|
if (mapvals.lightsource.type == POINT_LIGHT)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
dx = (gdouble) lightx - xpos;
|
|
|
|
dy = (gdouble) lighty - ypos;
|
|
|
|
r = sqrt (dx * dx + dy * dy) + 0.5;
|
|
|
|
|
|
|
|
if ((gint) r > 7)
|
|
|
|
return FALSE;
|
1998-03-20 10:42:24 +08:00
|
|
|
else
|
2000-12-30 08:23:34 +08:00
|
|
|
return TRUE;
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
2000-12-30 08:23:34 +08:00
|
|
|
|
|
|
|
return FALSE;
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/****************************************/
|
|
|
|
/* Draw a marker to show light position */
|
|
|
|
/****************************************/
|
|
|
|
|
2000-02-18 21:59:18 +08:00
|
|
|
static void
|
|
|
|
draw_light_marker (gint xpos,
|
|
|
|
gint ypos)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2003-12-15 01:17:56 +08:00
|
|
|
GdkColor color;
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_t *cr, *cr_p;
|
|
|
|
gint pw, ph, startx, starty;
|
2003-12-15 01:17:56 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
if (mapvals.lightsource.type != POINT_LIGHT)
|
|
|
|
return;
|
|
|
|
|
|
|
|
pw = PREVIEW_WIDTH * mapvals.zoom;
|
|
|
|
ph = PREVIEW_HEIGHT * mapvals.zoom;
|
|
|
|
startx = (PREVIEW_WIDTH - pw) / 2;
|
|
|
|
starty = (PREVIEW_HEIGHT - ph) / 2;
|
|
|
|
|
|
|
|
cr = gdk_cairo_create (gtk_widget_get_window (previewarea));
|
|
|
|
|
|
|
|
cairo_set_line_width (cr, 1.0);
|
2003-12-15 01:17:56 +08:00
|
|
|
|
|
|
|
color.red = 0x0;
|
|
|
|
color.green = 0x4000;
|
|
|
|
color.blue = 0xFFFF;
|
2011-02-13 17:00:48 +08:00
|
|
|
gdk_cairo_set_source_color (cr, &color);
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
lightx = xpos;
|
|
|
|
lighty = ypos;
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
/* Save background */
|
|
|
|
/* =============== */
|
|
|
|
|
|
|
|
backbuf.x = lightx - 7;
|
|
|
|
backbuf.y = lighty - 7;
|
|
|
|
backbuf.w = 14;
|
|
|
|
backbuf.h = 14;
|
|
|
|
|
|
|
|
/* X doesn't like images that's outside a window, make sure */
|
|
|
|
/* we get the backbuffer image from within the boundaries */
|
|
|
|
/* ======================================================== */
|
|
|
|
|
|
|
|
if (backbuf.x < startx)
|
|
|
|
backbuf.x = startx;
|
|
|
|
else if ((backbuf.x + backbuf.w) > startx + pw)
|
|
|
|
backbuf.w = MAX(startx + pw - backbuf.x, 0);
|
|
|
|
if (backbuf.y < starty)
|
|
|
|
backbuf.y = starty;
|
|
|
|
else if ((backbuf.y + backbuf.h) > starty + ph)
|
|
|
|
backbuf.h = MAX(starty + ph - backbuf.y, 0);
|
|
|
|
|
|
|
|
if (backbuf.image)
|
|
|
|
cairo_surface_destroy (backbuf.image);
|
|
|
|
|
|
|
|
backbuf.image = cairo_surface_create_similar (preview_surface,
|
|
|
|
CAIRO_CONTENT_COLOR,
|
|
|
|
PREVIEW_WIDTH, PREVIEW_HEIGHT);
|
|
|
|
cr_p = cairo_create (backbuf.image);
|
|
|
|
cairo_rectangle (cr_p, backbuf.x, backbuf.y, backbuf.w, backbuf.h);
|
|
|
|
cairo_clip (cr_p);
|
|
|
|
cairo_set_source_surface (cr_p, preview_surface, startx, starty);
|
|
|
|
cairo_paint (cr_p);
|
|
|
|
cairo_destroy (cr_p);
|
|
|
|
|
|
|
|
cairo_arc (cr, lightx, lighty, 7, 0, 2 * M_PI);
|
|
|
|
cairo_fill (cr);
|
|
|
|
|
|
|
|
cairo_destroy (cr);
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
|
2000-02-18 21:59:18 +08:00
|
|
|
static void
|
|
|
|
clear_light_marker (void)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
|
|
|
/* Restore background if it has been saved */
|
|
|
|
/* ======================================= */
|
2000-12-30 08:23:34 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
gint pw, ph, startx, starty;
|
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
if (backbuf.image != NULL)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_t *cr;
|
2003-12-15 01:17:56 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cr = gdk_cairo_create (gtk_widget_get_window (previewarea));
|
2003-12-15 01:17:56 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_rectangle (cr, backbuf.x, backbuf.y, backbuf.w, backbuf.h);
|
|
|
|
cairo_clip (cr);
|
|
|
|
cairo_set_source_surface (cr, backbuf.image, 0.0, 0.0);
|
|
|
|
cairo_paint (cr);
|
2000-12-30 08:23:34 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_destroy (cr);
|
2003-12-15 01:17:56 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_surface_destroy (backbuf.image);
|
2000-12-30 08:23:34 +08:00
|
|
|
backbuf.image = NULL;
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
2011-02-13 17:00:48 +08:00
|
|
|
|
|
|
|
pw = PREVIEW_WIDTH * mapvals.zoom;
|
|
|
|
ph = PREVIEW_HEIGHT * mapvals.zoom;
|
|
|
|
|
|
|
|
if (pw != PREVIEW_WIDTH || ph != PREVIEW_HEIGHT)
|
|
|
|
{
|
|
|
|
startx = (PREVIEW_WIDTH - pw) / 2;
|
|
|
|
starty = (PREVIEW_HEIGHT - ph) / 2;
|
|
|
|
|
|
|
|
gdk_window_clear_area (gtk_widget_get_window (previewarea),
|
|
|
|
0, 0, startx, PREVIEW_HEIGHT);
|
|
|
|
gdk_window_clear_area (gtk_widget_get_window (previewarea),
|
|
|
|
startx, 0, pw, starty);
|
|
|
|
gdk_window_clear_area (gtk_widget_get_window (previewarea),
|
|
|
|
pw + startx, 0, startx, PREVIEW_HEIGHT);
|
|
|
|
gdk_window_clear_area (gtk_widget_get_window (previewarea),
|
|
|
|
startx, ph + starty, pw, starty);
|
|
|
|
}
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
|
2000-02-18 21:59:18 +08:00
|
|
|
static void
|
|
|
|
draw_lights (gint startx,
|
|
|
|
gint starty,
|
|
|
|
gint pw,
|
|
|
|
gint ph)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2000-12-30 08:23:34 +08:00
|
|
|
gdouble dxpos, dypos;
|
|
|
|
gint xpos, ypos;
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
clear_light_marker ();
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2000-12-30 08:23:34 +08:00
|
|
|
gimp_vector_3d_to_2d (startx, starty, pw, ph,
|
|
|
|
&dxpos, &dypos, &mapvals.viewpoint,
|
|
|
|
&mapvals.lightsource.position);
|
|
|
|
xpos = RINT (dxpos);
|
|
|
|
ypos = RINT (dypos);
|
|
|
|
|
2003-12-15 01:17:56 +08:00
|
|
|
if (xpos >= 0 && xpos <= PREVIEW_WIDTH &&
|
|
|
|
ypos >= 0 && ypos <= PREVIEW_HEIGHT)
|
2000-12-30 08:23:34 +08:00
|
|
|
draw_light_marker (xpos, ypos);
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************/
|
|
|
|
/* Update light position given new screen coords */
|
|
|
|
/*************************************************/
|
|
|
|
|
2000-02-18 21:59:18 +08:00
|
|
|
void
|
|
|
|
update_light (gint xpos,
|
|
|
|
gint ypos)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2005-09-26 05:22:39 +08:00
|
|
|
gint startx, starty, pw, ph;
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2005-11-21 20:00:56 +08:00
|
|
|
pw = PREVIEW_WIDTH * mapvals.zoom;
|
|
|
|
ph = PREVIEW_HEIGHT * mapvals.zoom;
|
2005-09-26 05:22:39 +08:00
|
|
|
startx = (PREVIEW_WIDTH - pw) / 2;
|
|
|
|
starty = (PREVIEW_HEIGHT - ph) / 2;
|
2000-12-30 08:23:34 +08:00
|
|
|
|
|
|
|
gimp_vector_2d_to_3d (startx, starty, pw, ph, xpos, ypos,
|
|
|
|
&mapvals.viewpoint, &mapvals.lightsource.position);
|
2011-02-13 15:59:02 +08:00
|
|
|
draw_lights (startx, starty, pw, ph);
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/******************************************************************/
|
|
|
|
/* Draw preview image. if DoCompute is TRUE then recompute image. */
|
|
|
|
/******************************************************************/
|
|
|
|
|
2000-02-18 07:48:13 +08:00
|
|
|
void
|
2011-02-13 21:12:08 +08:00
|
|
|
compute_preview_image (void)
|
|
|
|
{
|
|
|
|
GdkDisplay *display = gtk_widget_get_display (previewarea);
|
|
|
|
GdkCursor *cursor;
|
|
|
|
gint startx, starty, pw, ph;
|
|
|
|
|
|
|
|
pw = PREVIEW_WIDTH * mapvals.zoom;
|
|
|
|
ph = PREVIEW_HEIGHT * mapvals.zoom;
|
|
|
|
startx = (PREVIEW_WIDTH - pw) / 2;
|
|
|
|
starty = (PREVIEW_HEIGHT - ph) / 2;
|
|
|
|
|
|
|
|
cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
|
|
|
|
gdk_window_set_cursor (gtk_widget_get_window (previewarea), cursor);
|
|
|
|
gdk_cursor_unref (cursor);
|
|
|
|
|
|
|
|
compute_preview (0, 0, width - 1, height - 1, pw, ph);
|
|
|
|
|
|
|
|
cursor = gdk_cursor_new_for_display (display, GDK_HAND2);
|
|
|
|
gdk_window_set_cursor(gtk_widget_get_window (previewarea), cursor);
|
|
|
|
gdk_cursor_unref (cursor);
|
|
|
|
|
|
|
|
clear_light_marker ();
|
|
|
|
}
|
|
|
|
|
2011-02-13 21:16:32 +08:00
|
|
|
gboolean
|
|
|
|
preview_expose (GtkWidget *widget,
|
|
|
|
GdkEventExpose *eevent)
|
1998-03-20 10:42:24 +08:00
|
|
|
{
|
2000-02-18 07:48:13 +08:00
|
|
|
gint startx, starty, pw, ph;
|
2003-12-15 01:17:56 +08:00
|
|
|
GdkColor color;
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_t *cr;
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 21:16:32 +08:00
|
|
|
cr = gdk_cairo_create (eevent->window);
|
2003-12-15 01:17:56 +08:00
|
|
|
|
|
|
|
color.red = 0xFFFF;
|
|
|
|
color.green = 0xFFFF;
|
|
|
|
color.blue = 0xFFFF;
|
2011-02-13 17:00:48 +08:00
|
|
|
gdk_cairo_set_source_color (cr, &color);
|
2000-02-18 07:48:13 +08:00
|
|
|
|
2005-11-21 20:00:56 +08:00
|
|
|
pw = PREVIEW_WIDTH * mapvals.zoom;
|
|
|
|
ph = PREVIEW_HEIGHT * mapvals.zoom;
|
2005-09-26 05:22:39 +08:00
|
|
|
startx = (PREVIEW_WIDTH - pw) / 2;
|
|
|
|
starty = (PREVIEW_HEIGHT - ph) / 2;
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_set_source_surface (cr, preview_surface, startx, starty);
|
|
|
|
cairo_rectangle (cr, startx, starty, pw, ph);
|
|
|
|
cairo_clip (cr);
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_paint (cr);
|
1998-03-20 10:42:24 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
draw_lights (startx, starty, pw, ph);
|
2000-12-30 08:23:34 +08:00
|
|
|
|
2011-02-13 17:00:48 +08:00
|
|
|
cairo_destroy (cr);
|
2011-02-13 21:16:32 +08:00
|
|
|
|
|
|
|
return FALSE;
|
1998-03-20 10:42:24 +08:00
|
|
|
}
|