summaryrefslogtreecommitdiff
path: root/src/drivers/Xlib
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2016-02-09 18:52:21 +0000
committerMatthias Melcher <fltk@matthiasm.com>2016-02-09 18:52:21 +0000
commit4272f32b6b90c3238e4252d8588e1843504e4c7f (patch)
treeb5c16ff583d9f08d02e21942e11156596f0414a1 /src/drivers/Xlib
parente02b3631b300141077870cd637793fde0760b97b (diff)
Fix typos for Linux from previous check-in.
- The previous check-in for OS X moved a few files and symbols around - Fixing for Linux what I broke in my previous commit - Fixing stuff for MSWindows next - CodeBlocks IDE file generation via CMake works git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11140 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Xlib')
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx8
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx3
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx9
-rw-r--r--src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx14
4 files changed, 17 insertions, 17 deletions
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx
index 429e6fc7e..8bc9bfc66 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx
@@ -16,12 +16,8 @@
// http://www.fltk.org/str.php
//
-#ifndef FL_CFG_GFX_XLIB_ARCI_CXX
-#define FL_CFG_GFX_XLIB_ARCI_CXX
-
+#include "Fl_Xlib_Graphics_Driver.h"
#include <FL/fl_draw.H>
-#include <config.h>
-#include "../../config_lib.h"
/**
\file xlib_arci.cxx
@@ -39,8 +35,6 @@ void Fl_Xlib_Graphics_Driver::pie(int x,int y,int w,int h,double a1,double a2) {
XFillArc(fl_display, fl_window, fl_gc, x,y,w-1,h-1, int(a1*64),int((a2-a1)*64));
}
-#endif // FL_CFG_GFX_XLIB_ARCI_CXX
-
//
// End of "$Id$".
//
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx
index fecd840a4..b36ce8a41 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx
@@ -31,6 +31,7 @@
// being used to index arrays. So I always copy them to an integer
// before use.
+#include "Fl_Xlib_Graphics_Driver.h"
# include "../../Fl_XColor.H"
# include <FL/Fl.H>
# include <FL/x.H>
@@ -218,7 +219,7 @@ ulong fl_xpixel(Fl_Color i) {
xmap.r = realcolor(r, fl_redmask);
xmap.g = realcolor(g, fl_greenmask);
xmap.b = realcolor(b, fl_bluemask);
- return xmap.pixel =
+ return xmap.pixel =
(((r&fl_redmask) << fl_redshift)+
((g&fl_greenmask)<<fl_greenshift)+
((b&fl_bluemask)<< fl_blueshift)
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
index 019c0d57f..274b6ec68 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx
@@ -18,6 +18,7 @@
// Select fonts from the FLTK font table.
#include "../../flstring.h"
+#include "Fl_Xlib_Graphics_Driver.h"
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include <FL/x.H>
@@ -836,7 +837,7 @@ void Fl_Xlib_Graphics_Driver::text_extents(const char *c, int n, int &dx, int &d
// If this code fails to load the requested font, it falls back through a
// series of tried 'n tested alternatives, ultimately resorting to what the
// original fltk code did.
-// NOTE: On my test boxes (FC6, FC7, FC8, ubuntu8.04, 9.04, 9.10) this works
+// NOTE: On my test boxes (FC6, FC7, FC8, ubuntu8.04, 9.04, 9.10) this works
// well for the fltk "built-in" font names.
static XFontStruct* load_xfont_for_xft2(Fl_Graphics_Driver *driver) {
XFontStruct* xgl_font = 0;
@@ -883,9 +884,9 @@ static XFontStruct* load_xfont_for_xft2(Fl_Graphics_Driver *driver) {
}
snprintf(xlfd, 128, "-*-*%s*-%s-%c-*--*-%d-*-*-*-*-*-*", name, weight, slant, (size*10));
xgl_font = XLoadQueryFont(fl_display, xlfd);
- }
+ }
free(pc); // release our copy of the font name
-
+
// if we have nothing loaded, try a generic proportional font
if(!xgl_font) {
snprintf(xlfd, 128, "-*-helvetica-*-%c-*--*-%d-*-*-*-*-*-*", slant, (size*10));
@@ -999,7 +1000,7 @@ void Fl_Xlib_Graphics_Driver::draw(const char *str, int n, int x, int y) {
color.color.green = ((int)g)*0x101;
color.color.blue = ((int)b)*0x101;
color.color.alpha = 0xffff;
-
+
const wchar_t *buffer = utf8reformat(str, n);
#ifdef __CYGWIN__
XftDrawString16(draw_, &color, font_descriptor()->font, x, y, (XftChar16 *)buffer, n);
diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
index 479696b77..924ddec3e 100644
--- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
+++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx
@@ -45,11 +45,13 @@
////////////////////////////////////////////////////////////////
+#include "Fl_Xlib_Graphics_Driver.h"
# include <FL/Fl.H>
# include <FL/fl_draw.H>
# include <FL/x.H>
# include "../../Fl_XColor.H"
# include "../../flstring.h"
+#include <X11/Xregion.h>
static XImage xi; // template used to pass info to X
static int bytes_per_pixel;
@@ -693,9 +695,9 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i
*dstptr++ = (srcb * srca + dstb * dsta) >> 8;
}
}
-
+
fl_draw_image(dst, X, Y, W, H, 3, 0);
-
+
delete[] dst;
}
@@ -814,16 +816,18 @@ void Fl_Xlib_Graphics_Driver::draw(Fl_Pixmap *pxm, int XP, int YP, int WP, int H
else copy_offscreen(X, Y, W, H, pxm->id_, cx, cy);
}
+extern uchar **fl_mask_bitmap; // if non-zero, create bitmap and store pointer here
+
fl_uintptr_t Fl_Xlib_Graphics_Driver::cache(Fl_Pixmap *img, int w, int h, const char *const*data) {
Fl_Offscreen id;
- id = fl_create_offscreen(w(), h());
+ id = fl_create_offscreen(w, h);
fl_begin_offscreen(id);
uchar *bitmap = 0;
fl_mask_bitmap = &bitmap;
- fl_draw_pixmap(data(), 0, 0, FL_BLACK);
+ fl_draw_pixmap(data, 0, 0, FL_BLACK);
fl_mask_bitmap = 0;
if (bitmap) {
- img->mask_ = (fl_uintptr_t)fl_create_bitmask(w(), h(), bitmap);
+ img->mask_ = (fl_uintptr_t)fl_create_bitmask(w, h, bitmap);
delete[] bitmap;
}
fl_end_offscreen();