Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TASImage.cxx File Reference
#include "RConfigure.h"
#include "TArrayD.h"
#include "TArrayL.h"
#include "TASImage.h"
#include "TASImagePlugin.h"
#include "TBuffer.h"
#include "TColor.h"
#include "TEnv.h"
#include "TFrame.h"
#include "TGaxis.h"
#include "THashTable.h"
#include "TImageDump.h"
#include "TMath.h"
#include "TObjArray.h"
#include "TPluginManager.h"
#include "TPoint.h"
#include "TRandom.h"
#include "TROOT.h"
#include "TStyle.h"
#include "TSystem.h"
#include "TText.h"
#include "TTFhandle.h"
#include "TVectorD.h"
#include "TVirtualPad.h"
#include "TVirtualPadPainter.h"
#include "TVirtualPS.h"
#include "TVirtualX.h"
#include <iostream>
#include <vector>
#include <memory>
#include <cstdio>
#include <X11/Xlib.h>
#include <afterbase.h>
#include <afterimage.h>
#include <bmp.h>
#include <draw.h>
#include "TASPolyUtils.c"
Include dependency graph for TASImage.cxx:

Classes

struct  __argb32__
 
class  ASVisualHolder
 Holder of plain ASVisual instance (no any X11), destroyed when thread or application closed Only this instance must be used in all public operations with TASImage. More...
 
class  TASImageInteractive
 

Macros

#define _alphaBlend(bot, top)
 
#define _MEMSET_(dst, lng, val)
 
#define FillSpansInternal(npt, ppt, widths, color)
 

Functions

static ASDrawContext * create_draw_context_argb32 (ASImage *im, ASDrawTool *brush)
 Create draw context.
 
static void destroy_asdraw_context32 (ASDrawContext *ctx)
 Destroy asdraw context32.
 
static ARGB32 GetAverage (ARGB32 foreground, ARGB32 background)
 Get average.
 
static ARGB32 GetHilite (ARGB32 background)
 Calculate highlite color.
 
static int GetPolyYBounds (TPoint *pts, int n, int *by, int *ty)
 Get poly bounds along Y.
 
static ARGB32 GetShadow (ARGB32 background)
 Calculate shadow color.
 
static void init_icon_paths ()
 Set icons paths.
 
static CARD8 MakeComponentHilite (int cmp)
 Make component hilite.
 

Variables

static CARD32 gBrushCache [kBrushCacheSize *kBrushCacheSize]
 
static char * gIconPaths [7] = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr}
 
static unsigned long kAllPlanes = ~0
 
static const UInt_t kBrushCacheSize = 20
 
const Float_t kScale = 0.985
 
static const UInt_t NUMPTSTOBUFFER = 512
 

Macro Definition Documentation

◆ _alphaBlend

#define _alphaBlend ( bot,
top )
Value:
{\
__argb32__ *T = (__argb32__*)(top);\
__argb32__ *B = (__argb32__*)(bot);\
int aa = 255-T->a; /* NOLINT */ \
if (!aa) {\
*bot = *top;\
} else { \
B->a = ((B->a*aa)>>8) + T->a;\
B->r = (B->r*aa + T->r*T->a)>>8;\
B->g = (B->g*aa + T->g*T->a)>>8;\
B->b = (B->b*aa + T->b*T->a)>>8;\
}\
}\
unsigned char a
Definition TASImage.cxx:143
unsigned char b
Definition TASImage.cxx:146
unsigned char r
Definition TASImage.cxx:144
unsigned char g
Definition TASImage.cxx:145

Definition at line 152 of file TASImage.cxx.

◆ _MEMSET_

#define _MEMSET_ ( dst,
lng,
val )
Value:
do {\
for( UInt_t j=0; j < lng; j++) *((dst)+j) = val; } while (0)
double * dst
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:61

Definition at line 3691 of file TASImage.cxx.

◆ FillSpansInternal

#define FillSpansInternal ( npt,
ppt,
widths,
color )
Value:
do {\
UInt_t yy = ppt[0].fY*fImage->width;\
for (UInt_t i = 0; i < npt; i++) {\
_MEMSET_(&fImage->alt.argb32[Idx(yy + ppt[i].fX)], widths[i], color);\
yy += ((i+1 < npt) && (ppt[i].fY != ppt[i+1].fY) ? fImage->width : 0);\
}\
} while (0)

Definition at line 3696 of file TASImage.cxx.

Function Documentation

◆ create_draw_context_argb32()

static ASDrawContext * create_draw_context_argb32 ( ASImage * im,
ASDrawTool * brush )
static

Create draw context.

Definition at line 5454 of file TASImage.cxx.

◆ destroy_asdraw_context32()

static void destroy_asdraw_context32 ( ASDrawContext * ctx)
static

Destroy asdraw context32.

Definition at line 5471 of file TASImage.cxx.

◆ GetAverage()

static ARGB32 GetAverage ( ARGB32 foreground,
ARGB32 background )
static

Get average.

(used internally)

Definition at line 3184 of file TASImage.cxx.

◆ GetHilite()

static ARGB32 GetHilite ( ARGB32 background)
static

Calculate highlite color.

(used internally)

Definition at line 3163 of file TASImage.cxx.

◆ GetPolyYBounds()

static int GetPolyYBounds ( TPoint * pts,
int n,
int * by,
int * ty )
static

Get poly bounds along Y.

Definition at line 5034 of file TASImage.cxx.

◆ GetShadow()

static ARGB32 GetShadow ( ARGB32 background)
static

Calculate shadow color.

(used internally)

Definition at line 3175 of file TASImage.cxx.

◆ init_icon_paths()

static void init_icon_paths ( )
static

Set icons paths.

Definition at line 415 of file TASImage.cxx.

◆ MakeComponentHilite()

static CARD8 MakeComponentHilite ( int cmp)
static

Make component hilite.

(used internally)

Definition at line 3149 of file TASImage.cxx.

Variable Documentation

◆ gBrushCache

CARD32 gBrushCache[kBrushCacheSize *kBrushCacheSize]
static

Definition at line 5480 of file TASImage.cxx.

◆ gIconPaths

char* gIconPaths[7] = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr}
static

Definition at line 123 of file TASImage.cxx.

◆ kAllPlanes

unsigned long kAllPlanes = ~0
static

Definition at line 119 of file TASImage.cxx.

◆ kBrushCacheSize

const UInt_t kBrushCacheSize = 20
static

Definition at line 5479 of file TASImage.cxx.

◆ kScale

const Float_t kScale = 0.985

Definition at line 126 of file TASImage.cxx.

◆ NUMPTSTOBUFFER

const UInt_t NUMPTSTOBUFFER = 512
static

Definition at line 5270 of file TASImage.cxx.