File: m_mark.c

package info (click to toggle)
plotutils 2.4.1-15
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 11,072 kB
  • ctags: 6,952
  • sloc: ansic: 76,305; cpp: 12,402; sh: 8,475; yacc: 2,604; makefile: 894; lex: 144
file content (36 lines) | stat: -rw-r--r-- 1,070 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* The paint_marker method, which is an internal function that is called
   when the marker() method is invoked.  It plots an object: a marker of a
   specified type, at a specified size, at the current location.

   If this returns `false', marker() will construct the marker from other
   libplot primitives, in a generic way. */

#include "sys-defines.h"
#include "extern.h"

bool
#ifdef _HAVE_PROTOS
_m_paint_marker (R___(Plotter *_plotter) int type, double size)
#else
_m_paint_marker (R___(_plotter) type, size)
     S___(Plotter *_plotter;)
     int type;
     double size;
#endif
{
  _m_set_attributes (R___(_plotter) 
		     PL_ATTR_TRANSFORMATION_MATRIX 
		     | PL_ATTR_PEN_COLOR | PL_ATTR_PEN_TYPE);
  _m_emit_op_code (R___(_plotter) O_FMARKER);
  _m_emit_float (R___(_plotter) _plotter->drawstate->pos.x);
  _m_emit_float (R___(_plotter) _plotter->drawstate->pos.y);
  _m_emit_integer (R___(_plotter) type);
  _m_emit_float (R___(_plotter) size);
  _m_emit_terminator (S___(_plotter));

  _plotter->meta_pos = _plotter->drawstate->pos;

  return true;
}