~ubuntu-branches/ubuntu/trusty/lmms/trusty

« back to all changes in this revision

Viewing changes to plugins/zynaddsubfx/fltk/src/fl_line_style.cxx

  • Committer: Charlie Smotherman
  • Date: 2012-12-05 22:08:38 UTC
  • mfrom: (33.1.7 lmms_0.4.13)
  • Revision ID: cjsmo@cableone.net-20121205220838-09pjfzew9m5023hr
* New  Upstream release.
  - Minor tweaking to ZynAddSubFX, CALF, SWH plugins  and Stefan Fendt's RC
    filters.
  - Added UI fixes: Magnentic effect of knobs and Piano-roll fixes
  - Updated German localization and copyright year
* debian/lmms-common.install:
  - added /usr/share/applications so the lmms.desktop file will correctly
    install (LP: #863366)
  - This should also fix the Software Center not displaying lmms in sound
    and video (LP: #824231)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//
2
 
// "$Id: fl_line_style.cxx 7644 2010-06-15 21:16:27Z manolo $"
 
2
// "$Id: fl_line_style.cxx 8190 2011-01-05 10:21:45Z manolo $"
3
3
//
4
4
// Line style code for the Fast Light Tool Kit (FLTK).
5
5
//
6
 
// Copyright 1998-2009 by Bill Spitzak and others.
 
6
// Copyright 1998-2010 by Bill Spitzak and others.
7
7
//
8
8
// This library is free software; you can redistribute it and/or
9
9
// modify it under the terms of the GNU Library General Public
37
37
#include "flstring.h"
38
38
#include <stdio.h>
39
39
 
 
40
// We save the current line width (absolute value) here.
 
41
// This is currently used only for X11 clipping, see src/fl_rect.cxx.
 
42
// FIXME: this would probably better be in class Fl::
 
43
int fl_line_width_ = 0;
 
44
 
40
45
#ifdef __APPLE_QUARTZ__
41
46
float fl_quartz_line_width_ = 1.0f;
42
47
static enum CGLineCap fl_quartz_line_cap_ = kCGLineCapButt;
53
58
 
54
59
void Fl_Graphics_Driver::line_style(int style, int width, char* dashes) {
55
60
 
 
61
  // save line width in global variable for X11 clipping
 
62
  if (width == 0) fl_line_width_ = 1;
 
63
  else fl_line_width_ = width>0 ? width : -width;
 
64
 
56
65
#if defined(USE_X11)
57
66
  int ndashes = dashes ? strlen(dashes) : 0;
58
67
  // emulate the WIN32 dash patterns on X
118
127
  fl_quartz_line_width_ = (float)width; 
119
128
  fl_quartz_line_cap_ = Cap[(style>>8)&3];
120
129
  // when printing kCGLineCapSquare seems better for solid lines
121
 
  if ( Fl_Surface_Device::surface()->type() == Fl_Printer::device_type && style == FL_SOLID && dashes == NULL ) {
 
130
  if ( Fl_Surface_Device::surface()->class_name() == Fl_Printer::class_id && style == FL_SOLID && dashes == NULL ) {
122
131
    fl_quartz_line_cap_ = kCGLineCapSquare;
123
132
    }
124
133
  fl_quartz_line_join_ = Join[(style>>12)&3];
161
170
 
162
171
 
163
172
//
164
 
// End of "$Id: fl_line_style.cxx 7644 2010-06-15 21:16:27Z manolo $".
 
173
// End of "$Id: fl_line_style.cxx 8190 2011-01-05 10:21:45Z manolo $".
165
174
//