Removed obsolete files that served only one purpose: to #include different driver files. Updated CMake and Makefiles to reflect the changes. Build tested with: - MinGW + configure/make - MinGW + CMake/make - Visual Studio 2010 generated by CMake git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11092 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
103 lines
2.5 KiB
C++
103 lines
2.5 KiB
C++
//
|
|
// "$Id$"
|
|
//
|
|
// Rectangle drawing routines for the Fast Light Tool Kit (FLTK).
|
|
//
|
|
// Copyright 1998-2016 by Bill Spitzak and others.
|
|
//
|
|
// This library is free software. Distribution and use rights are outlined in
|
|
// the file "COPYING" which should have been included with this file. If this
|
|
// file is missing or damaged, see the license at:
|
|
//
|
|
// http://www.fltk.org/COPYING.php
|
|
//
|
|
// Please report all bugs and problems on the following page:
|
|
//
|
|
// http://www.fltk.org/str.php
|
|
//
|
|
|
|
/**
|
|
\file fl_rect.cxx
|
|
\brief Drawing and clipping routines for rectangles.
|
|
*/
|
|
|
|
// These routines from fl_draw.H are used by the standard boxtypes
|
|
// and thus are always linked into an fltk program.
|
|
// Also all fl_clip routines, since they are always linked in so
|
|
// that minimal update works.
|
|
|
|
#include <config.h>
|
|
#include "config_lib.h"
|
|
#include <FL/Fl.H>
|
|
#include <FL/Fl_Widget.H>
|
|
#include <FL/Fl_Printer.H>
|
|
#include <FL/fl_draw.H>
|
|
#include <FL/x.H>
|
|
|
|
#if defined(WIN32) || defined(__APPLE__)
|
|
#elif defined(FL_PORTING)
|
|
# pragma message "FL_PORTING: implement all the line drawing functions below"
|
|
#else
|
|
#endif
|
|
|
|
// fl_line_width_ must contain the absolute value of the current
|
|
// line width to be used for X11 clipping (see below).
|
|
// This is defined in src/fl_line_style.cxx
|
|
extern int fl_line_width_;
|
|
|
|
|
|
void Fl_Graphics_Driver::restore_clip() {
|
|
fl_clip_state_number++;
|
|
}
|
|
|
|
|
|
void Fl_Graphics_Driver::clip_region(Fl_Region r) {
|
|
Fl_Region oldr = rstack[rstackptr];
|
|
if (oldr) XDestroyRegion(oldr);
|
|
rstack[rstackptr] = r;
|
|
fl_restore_clip();
|
|
}
|
|
|
|
|
|
Fl_Region Fl_Graphics_Driver::clip_region() {
|
|
return rstack[rstackptr];
|
|
}
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
// Remove #ifndef FL_LIBRARY_CMAKE and the entire block of #include
|
|
// statements when the new build system is ready:
|
|
#ifndef FL_LIBRARY_CMAKE
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Apple Quartz driver in "drivers/Quartz/Fl_Quartz_Graphics_Driver_rect.cxx"
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
#ifdef FL_CFG_GFX_GDI
|
|
|
|
// # include "drivers/GDI/Fl_GDI_Graphics_Driver_rect.cxx"
|
|
|
|
#endif
|
|
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
#ifdef FL_CFG_GFX_XLIB
|
|
|
|
// # include "drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx"
|
|
|
|
#endif
|
|
|
|
// -----------------------------------------------------------------------------
|
|
#endif // FL_LIBRARY_CMAKE
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
//
|
|
// End of "$Id$".
|
|
//
|