fltk  1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
  Fossies Dox: fltk-1.3.5-source.tar.bz2  ("inofficial" and yet experimental doxygen-generated source code documentation)  

fl_draw_image.cxx File Reference
#include <FL/Fl.H>
#include <FL/fl_draw.H>
#include <FL/x.H>
#include "Fl_XColor.H"
#include "flstring.h"
Include dependency graph for fl_draw_image.cxx:

Go to the source code of this file.

Macros

#define OUTTYPE   uchar
 
#define OUTSIZE   2
 
#define OUTASSIGN(v)   int tt=v; t[0] = uchar(tt>>8); t[1] = uchar(tt)
 
#define STORETYPE   U32
 
#define INNARDS32(f)   U32 *t = (U32*)to; for (; w--; from += delta) *t++ = f
 
#define MAXBUFFER   0x40000
 

Functions

static void color16_converter (const uchar *from, uchar *to, int w, int delta)
 
static void mono16_converter (const uchar *from, uchar *to, int w, int delta)
 
static void c565_converter (const uchar *from, uchar *to, int w, int delta)
 
static void m565_converter (const uchar *from, uchar *to, int w, int delta)
 
static void rgb_converter (const uchar *from, uchar *to, int w, int delta)
 
static void bgr_converter (const uchar *from, uchar *to, int w, int delta)
 
static void rrr_converter (const uchar *from, uchar *to, int w, int delta)
 
static void rgbx_converter (const uchar *from, uchar *to, int w, int delta)
 
static void xbgr_converter (const uchar *from, uchar *to, int w, int delta)
 
static void xrgb_converter (const uchar *from, uchar *to, int w, int delta)
 
static void argb_premul_converter (const uchar *from, uchar *to, int w, int delta)
 
static void bgrx_converter (const uchar *from, uchar *to, int w, int delta)
 
static void rrrx_converter (const uchar *from, uchar *to, int w, int delta)
 
static void xrrr_converter (const uchar *from, uchar *to, int w, int delta)
 
static void color32_converter (const uchar *from, uchar *to, int w, int delta)
 
static void mono32_converter (const uchar *from, uchar *to, int w, int delta)
 
static void figure_out_visual ()
 
static void innards (const uchar *buf, int X, int Y, int W, int H, int delta, int linedelta, int mono, Fl_Draw_Image_Cb cb, void *userdata, const bool alpha)
 
void fl_rectf (int x, int y, int w, int h, uchar r, uchar g, uchar b)
 

Variables

static XImage xi
 
static int bytes_per_pixel
 
static int scanline_add
 
static int scanline_mask
 
static void(* converter )(const uchar *from, uchar *to, int w, int delta)
 
static void(* mono_converter )(const uchar *from, uchar *to, int w, int delta)
 
static int dir
 
static int ri
 
static int gi
 
static int bi
 

Macro Definition Documentation

◆ INNARDS32

#define INNARDS32 (   f)    U32 *t = (U32*)to; for (; w--; from += delta) *t++ = f

Definition at line 303 of file fl_draw_image.cxx.

◆ MAXBUFFER

#define MAXBUFFER   0x40000

Definition at line 457 of file fl_draw_image.cxx.

◆ OUTASSIGN

#define OUTASSIGN (   v)    int tt=v; t[0] = uchar(tt>>8); t[1] = uchar(tt)

Definition at line 146 of file fl_draw_image.cxx.

◆ OUTSIZE

#define OUTSIZE   2

Definition at line 145 of file fl_draw_image.cxx.

◆ OUTTYPE

#define OUTTYPE   uchar

Definition at line 144 of file fl_draw_image.cxx.

◆ STORETYPE

#define STORETYPE   U32

Definition at line 302 of file fl_draw_image.cxx.

Function Documentation

◆ argb_premul_converter()

static void argb_premul_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 319 of file fl_draw_image.cxx.

References INNARDS32.

Referenced by innards().

◆ bgr_converter()

static void bgr_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 265 of file fl_draw_image.cxx.

Referenced by figure_out_visual().

◆ bgrx_converter()

static void bgrx_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 326 of file fl_draw_image.cxx.

References INNARDS32.

Referenced by figure_out_visual().

◆ c565_converter()

static void c565_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 207 of file fl_draw_image.cxx.

References b, bi, dir, gi, OUTASSIGN, OUTSIZE, OUTTYPE, and ri.

Referenced by figure_out_visual().

◆ color16_converter()

static void color16_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

◆ color32_converter()

static void color32_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 339 of file fl_draw_image.cxx.

References fl_blueshift, fl_greenshift, fl_redshift, and INNARDS32.

Referenced by figure_out_visual().

◆ figure_out_visual()

◆ innards()

static void innards ( const uchar buf,
int  X,
int  Y,
int  W,
int  H,
int  delta,
int  linedelta,
int  mono,
Fl_Draw_Image_Cb  cb,
void *  userdata,
const bool  alpha 
)
static

◆ m565_converter()

static void m565_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 231 of file fl_draw_image.cxx.

References dir, OUTASSIGN, OUTSIZE, OUTTYPE, and ri.

Referenced by figure_out_visual().

◆ mono16_converter()

static void mono16_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

◆ mono32_converter()

static void mono32_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 345 of file fl_draw_image.cxx.

References fl_blueshift, fl_greenshift, fl_redshift, and INNARDS32.

Referenced by figure_out_visual().

◆ rgb_converter()

static void rgb_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 256 of file fl_draw_image.cxx.

Referenced by figure_out_visual(), and innards().

◆ rgbx_converter()

static void rgbx_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 307 of file fl_draw_image.cxx.

References INNARDS32.

Referenced by figure_out_visual(), and innards().

◆ rrr_converter()

static void rrr_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 275 of file fl_draw_image.cxx.

Referenced by figure_out_visual().

◆ rrrx_converter()

static void rrrx_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 330 of file fl_draw_image.cxx.

References INNARDS32.

Referenced by figure_out_visual().

◆ xbgr_converter()

static void xbgr_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 311 of file fl_draw_image.cxx.

References INNARDS32.

Referenced by figure_out_visual(), and innards().

◆ xrgb_converter()

static void xrgb_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 315 of file fl_draw_image.cxx.

References INNARDS32.

Referenced by figure_out_visual().

◆ xrrr_converter()

static void xrrr_converter ( const uchar from,
uchar to,
int  w,
int  delta 
)
static

Definition at line 334 of file fl_draw_image.cxx.

References INNARDS32.

Referenced by figure_out_visual().

Variable Documentation

◆ bi

◆ bytes_per_pixel

int bytes_per_pixel
static

◆ converter

void(* converter) (const uchar *from, uchar *to, int w, int delta)
static

Definition at line 64 of file fl_draw_image.cxx.

Referenced by figure_out_visual(), and innards().

◆ dir

◆ gi

int gi
static

Definition at line 68 of file fl_draw_image.cxx.

Referenced by c565_converter(), and color16_converter().

◆ mono_converter

void(* mono_converter) (const uchar *from, uchar *to, int w, int delta)
static

Definition at line 65 of file fl_draw_image.cxx.

Referenced by figure_out_visual(), and innards().

◆ ri

◆ scanline_add

int scanline_add
static

Definition at line 61 of file fl_draw_image.cxx.

Referenced by figure_out_visual(), and innards().

◆ scanline_mask

int scanline_mask
static

Definition at line 62 of file fl_draw_image.cxx.

Referenced by figure_out_visual(), and innards().

◆ xi

XImage xi
static

Definition at line 59 of file fl_draw_image.cxx.

Referenced by figure_out_visual(), and innards().