~ubuntu-branches/ubuntu/jaunty/plotutils/jaunty

« back to all changes in this revision

Viewing changes to libplot/i_point.c

  • Committer: Bazaar Package Importer
  • Author(s): Floris Bruynooghe
  • Date: 2007-05-10 19:48:54 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20070510194854-mrr3lgwzpxd8hovo
Tags: 2.5-2
Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the GNU plotutils package.  Copyright (C) 1995,
 
2
   1996, 1997, 1998, 1999, 2000, 2005, Free Software Foundation, Inc.
 
3
 
 
4
   The GNU plotutils package is free software.  You may redistribute it
 
5
   and/or modify it under the terms of the GNU General Public License as
 
6
   published by the Free Software foundation; either version 2, or (at your
 
7
   option) any later version.
 
8
 
 
9
   The GNU plotutils package is distributed in the hope that it will be
 
10
   useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
   General Public License for more details.
 
13
 
 
14
   You should have received a copy of the GNU General Public License along
 
15
   with the GNU plotutils package; see the file COPYING.  If not, write to
 
16
   the Free Software Foundation, Inc., 51 Franklin St., Fifth Floor,
 
17
   Boston, MA 02110-1301, USA. */
 
18
 
1
19
/* The internal point-drawing function, which point() is a wrapper around.
2
20
   It draws a point at the current location.  There is no standard
3
21
   definition of `point', so any Plotter is free to implement this as it
8
26
#include "xmi.h"
9
27
 
10
28
void
11
 
#ifdef _HAVE_PROTOS
12
 
_i_paint_point (S___(Plotter *_plotter))
13
 
#else
14
 
_i_paint_point (S___(_plotter))
15
 
     S___(Plotter *_plotter;)
16
 
#endif
 
29
_pl_i_paint_point (S___(Plotter *_plotter))
17
30
{
18
31
  double xx, yy;
19
32
  int ixx, iyy;
33
46
      iyy = IROUND(yy);
34
47
      
35
48
      /* compute background and foreground color for miGC */
36
 
      _i_set_pen_color (S___(_plotter));
 
49
      _pl_i_set_pen_color (S___(_plotter));
37
50
      bgPixel.type = MI_PIXEL_INDEX_TYPE;
38
51
      bgPixel.u.index = _plotter->drawstate->i_bg_color_index;
39
52
      fgPixel.type = MI_PIXEL_INDEX_TYPE;
44
57
      /* construct an miGC (graphics context for the libxmi module); copy
45
58
         attributes from the Plotter's GC to it */
46
59
      pGC = miNewGC (2, pixels);
47
 
      _set_common_mi_attributes (_plotter->drawstate, (voidptr_t)pGC);
 
60
      _set_common_mi_attributes (_plotter->drawstate, (void *)pGC);
48
61
      
49
62
      point.x = ixx;
50
63
      point.y = iyy;