~ubuntu-branches/ubuntu/jaunty/gimp/jaunty-security

« back to all changes in this revision

Viewing changes to plug-ins/MapObject/mapobject_preview.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Holbach
  • Date: 2007-05-02 16:33:03 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070502163303-bvzhjzbpw8qglc4y
Tags: 2.3.16-1ubuntu1
* Resynchronized with Debian, remaining Ubuntu changes:
  - debian/rules: i18n magic.
* debian/control.in:
  - Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
* debian/patches/02_help-message.patch,
  debian/patches/03_gimp.desktop.in.in.patch,
  debian/patches/10_dont_show_wizard.patch: updated.
* debian/patches/04_composite-signedness.patch,
  debian/patches/05_add-letter-spacing.patch: dropped, used upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include <gtk/gtk.h>
8
8
 
9
9
#include <libgimp/gimp.h>
 
10
#include <libgimp/gimpui.h>
10
11
 
11
12
#include "mapobject_main.h"
12
13
#include "mapobject_ui.h"
394
395
update_light (gint xpos,
395
396
              gint ypos)
396
397
{
397
 
  gint startx, starty, pw, ph;
 
398
  gint    startx, starty, pw, ph;
398
399
 
399
 
  pw     = PREVIEW_WIDTH  >> mapvals.preview_zoom_factor;
400
 
  ph     = PREVIEW_HEIGHT >> mapvals.preview_zoom_factor;
401
 
  startx = (PREVIEW_WIDTH  - pw) >> 1;
402
 
  starty = (PREVIEW_HEIGHT - ph) >> 1;
 
400
  pw     = PREVIEW_WIDTH * mapvals.zoom;
 
401
  ph     = PREVIEW_HEIGHT * mapvals.zoom;
 
402
  startx = (PREVIEW_WIDTH  - pw) / 2;
 
403
  starty = (PREVIEW_HEIGHT - ph) / 2;
403
404
 
404
405
  gimp_vector_2d_to_3d (startx, starty, pw, ph, xpos, ypos,
405
406
                        &mapvals.viewpoint, &mapvals.lightsource.position);
429
430
  gdk_gc_set_function (gc, GDK_COPY);
430
431
  linetab[0].x1 = -1;
431
432
 
432
 
  pw = PREVIEW_WIDTH >> mapvals.preview_zoom_factor;
433
 
  ph = PREVIEW_HEIGHT >> mapvals.preview_zoom_factor;
434
 
  startx = (PREVIEW_WIDTH - pw) >> 1;
435
 
  starty = (PREVIEW_HEIGHT - ph) >> 1;
 
433
  pw = PREVIEW_WIDTH * mapvals.zoom;
 
434
  ph = PREVIEW_HEIGHT * mapvals.zoom;
 
435
  startx = (PREVIEW_WIDTH - pw) / 2;
 
436
  starty = (PREVIEW_HEIGHT - ph) / 2;
436
437
 
437
438
  if (docompute == TRUE)
438
439
    {
470
471
void
471
472
draw_preview_wireframe (void)
472
473
{
473
 
  gint startx, starty, pw, ph;
 
474
  gint      startx, starty, pw, ph;
474
475
  GdkColor  color;
475
476
 
476
477
  color.red   = 0x0;
485
486
 
486
487
  gdk_gc_set_function (gc, GDK_INVERT);
487
488
 
488
 
  pw     = PREVIEW_WIDTH  >> mapvals.preview_zoom_factor;
489
 
  ph     = PREVIEW_HEIGHT >> mapvals.preview_zoom_factor;
490
 
  startx = (PREVIEW_WIDTH  - pw) >> 1;
491
 
  starty = (PREVIEW_HEIGHT - ph) >> 1;
 
489
  pw     = PREVIEW_WIDTH  * mapvals.zoom;
 
490
  ph     = PREVIEW_HEIGHT * mapvals.zoom;
 
491
  startx = (PREVIEW_WIDTH  - pw) / 2;
 
492
  starty = (PREVIEW_HEIGHT - ph) / 2;
492
493
 
493
494
  clear_wireframe ();
494
495
  draw_wireframe (startx, starty, pw, ph);