123 void Pad(
const char *color =
"#00FFFFFF",
UInt_t left = 0,
132 void Append(
const TImage *im,
const char * option =
"+",
const char *color =
"#00000000");
133 void Gradient(
UInt_t angle = 0,
const char *
colors =
"#FFFFFF #000000",
const char *offsets = 0,
139 const char *fore_file = 0,
Float_t angle = 0);
164 void FloodFill(
Int_t x,
Int_t y,
const char *col,
const char *min_col,
const char *max_col = 0);
void SetTitle(const char *title="")
Set a title for an image.
Double_t * Vectorize(UInt_t max_colors=256, UInt_t dither=4, Int_t opaque_threshold=1)
Reduce color-depth of an image and fills vector of "scientific data" [0...1].
void DrawDashZTLine(UInt_t x1, UInt_t y1, UInt_t x2, UInt_t y2, UInt_t nDash, const char *pDash, UInt_t col, UInt_t thick)
Draw a dashed line with thick pixel width.
void PutPixel(Int_t x, Int_t y, const char *col="#000000")
Draw a point at the specified position.
static Bool_t InitVisual()
Static function to initialize the ASVisual.
void SetPaletteEnabled(Bool_t on=kTRUE)
Switch on/off the image palette.
void DrawBox(Int_t x1, Int_t y1, Int_t x2, Int_t y2, const char *col="#000000", UInt_t thick=1, Int_t mode=0)
Draw a box.
static const ASVisual * GetVisual()
Return visual.
EImageFileTypes GetFileType(const char *ext)
Return file type depending on specified extension.
void Draw(Option_t *option="")
Draw image.
char * GetObjectInfo(Int_t px, Int_t py) const
Get image pixel coordinates and the pixel value at the mouse pointer.
void DrawRectangle(UInt_t x, UInt_t y, UInt_t w, UInt_t h, const char *col="#000000", UInt_t thick=1)
Draw a rectangle.
void CopyArea(TImage *dst, Int_t xsrc, Int_t ysrc, UInt_t w, UInt_t h, Int_t xdst=0, Int_t ydst=0, Int_t gfunc=3, EColorChan chan=kAllChan)
Copy source region to the destination image.
UInt_t GetScaledWidth() const
Return width of the displayed image not of the original image.
UInt_t GetHeight() const
Return height of original image not of the displayed image.
Bool_t fEditable
! kTRUE image can be resized, moved by resizing/moving gPad
UInt_t * GetArgbArray()
Return a pointer to internal array[width x height] of ARGB32 values This array is directly accessible...
void StartPaletteEditor()
Start palette editor.
void ReadImage(const char *file, EImageFileTypes type=TImage::kUnknown)
Read specified image file.
UInt_t GetWidth() const
Return width of original image not of the displayed image.
void Zoom(UInt_t offX, UInt_t offY, UInt_t width, UInt_t height)
The area of an image displayed in a pad is defined by this function.
void FromPad(TVirtualPad *pad, Int_t x=0, Int_t y=0, UInt_t w=0, UInt_t h=0)
Create an image from the given pad, afterwards this image can be saved in any of the supported image ...
An abstract interface to image processing library.
void Browse(TBrowser *)
Browse image.
void CreateThumbnail()
Create image thumbnail.
void DrawLine(UInt_t x1, UInt_t y1, UInt_t x2, UInt_t y2, const char *col="#000000", UInt_t thick=1)
Draw a line.
void DrawCubeBezier(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t x3, Int_t y3, const char *col="#000000", UInt_t thick=1)
Draw a cubic bezier line.
UInt_t * GetScanline(UInt_t y)
Return a pointer to scan-line.
void DrawTextTTF(Int_t x, Int_t y, const char *text, Int_t size, UInt_t color, const char *font_name, Float_t angle)
Draw text using TrueType fonts.
Double_t * GetVecArray()
Return a pointer to internal array[width x height] of double values [0,1].
Bool_t SetImageBuffer(char **buffer, EImageFileTypes type=TImage::kPng)
Create image from compressed buffer.
static THashTable * fgPlugList
! hash table containing loaded plugins
void PolyPoint(UInt_t npt, TPoint *ppt, const char *col="#000000", TImage::ECoordMode mode=kCoordModeOrigin)
Draw a poly point.
void SetEditable(Bool_t on=kTRUE)
Int_t DistancetoPrimitive(Int_t px, Int_t py)
Is the mouse in the image ?
void Paint(Option_t *option="")
Paint image.
static const double x2[5]
Int_t Idx(Int_t idx)
Return a valid index in fImage tables to avoid seg-fault by accessing out of indices out of array's r...
THashTable implements a hash table to store TObject's.
ASImage * GetImage() const
#define ClassDef(name, id)
void BeginPaint(Bool_t fast=kTRUE)
BeginPaint initializes internal array[width x height] of ARGB32 pixel values.
void EndPaint()
EndPaint does internal RLE compression of image data.
void DrawCellArray(Int_t x1, Int_t y1, Int_t x2, Int_t y2, Int_t nx, Int_t ny, UInt_t *ic)
Draw a cell array.
void MapFileTypes(EImageFileTypes &type, UInt_t &astype, Bool_t toas=kTRUE)
Map file type to/from AfterImage types.
TArrayD * GetArray(UInt_t w=0, UInt_t h=0, TImagePalette *pal=gWebImagePalette)
In case of vectorized image return an associated array of doubles otherwise this method creates and r...
UInt_t fZoomOffY
! Y - offset for zooming im image pixels
void Gray(Bool_t on=kTRUE)
Convert RGB image to Gray image and vice versa.
static UInt_t AlphaBlend(UInt_t bot, UInt_t top)
Return alpha-blended value computed from bottom and top pixel values.
void WriteImage(const char *file, EImageFileTypes type=TImage::kUnknown)
Write image to specified file.
Base class for several text objects.
void DrawFillArea(UInt_t npt, TPoint *ppt, const char *col="#000000", const char *stipple=0, UInt_t w=16, UInt_t h=16)
Fill a polygon (any type convex, non-convex).
TVirtualPad is an abstract base class for the Pad and Canvas classes.
void Scale(UInt_t width, UInt_t height)
Scale the original image.
void DrawGlyph(void *bitmap, UInt_t color, Int_t x, Int_t y)
Draw glyph bitmap.
R__EXTERN TImagePalette * gWebImagePalette
void Pad(const char *color="#00FFFFFF", UInt_t left=0, UInt_t right=0, UInt_t top=0, UInt_t bottom=0)
Enlarge image, padding it with specified color on each side in accordance with requested geometry...
Int_t fPaintMode
! 1 - fast mode, 0 - low memory slow mode
void SavePrimitive(std::ostream &out, Option_t *option="")
Save a primitive as a C++ statement(s) on output stream "out".
TArrayL * GetPixels(Int_t x=0, Int_t y=0, UInt_t w=0, UInt_t h=0)
Return 2D array of machine dependent pixel values.
void DrawDashZLine(UInt_t x1, UInt_t y1, UInt_t x2, UInt_t y2, UInt_t nDash, const char *pDash, UInt_t col)
Draw a dashed line with one pixel width.
void DrawDashHLine(UInt_t y, UInt_t x1, UInt_t x2, UInt_t nDash, const char *pDash, UInt_t col, UInt_t thick)
Draw a dashed horizontal line.
void GetZoomPosition(UInt_t &x, UInt_t &y, UInt_t &w, UInt_t &h) const
Return the zoom parameters.
Bool_t SetJpegDpi(const char *name, UInt_t dpi=72)
Set an image printing resolution in Dots Per Inch units.
void FillSpans(UInt_t npt, TPoint *ppt, UInt_t *widths, const char *col="#000000", const char *stipple=0, UInt_t w=16, UInt_t h=16)
Fill spans with specified color or/and stipple.
Using a TBrowser one can browse all ROOT objects.
void DrawCircle(Int_t x, Int_t y, Int_t r, const char *col="#000000", Int_t thick=1)
Draw a circle.
RooArgSet S(const RooAbsArg &v1)
void UnZoom()
Un-zoom the image to original size.
void FillRectangleInternal(UInt_t col, Int_t x, Int_t y, UInt_t width, UInt_t height)
Fill rectangle of size (width, height) at position (x,y) within the existing image with specified col...
Bool_t fIsGray
! kTRUE if image is gray
void SetImage(const Double_t *imageData, UInt_t width, UInt_t height, TImagePalette *palette=0)
Deletes the old image and creates a new image depending on the values of imageData.
void Append(const TImage *im, const char *option="+", const char *color="#00000000")
Append image.
void SetPalette(const TImagePalette *palette)
Set a new palette to an image.
void DrawWideLine(UInt_t x1, UInt_t y1, UInt_t x2, UInt_t y2, UInt_t col, UInt_t thick)
Draw wide line.
Double_t fMaxValue
! max value in image
UInt_t GetScaledHeight() const
Return height of the displayed image not of the original image.
const char * GetTitle() const
Title is used to keep 32x32 xpm image's thumbnail.
void Merge(const TImage *im, const char *op="alphablend", Int_t x=0, Int_t y=0)
Merge two images.
void FromWindow(Drawable_t wid, Int_t x=0, Int_t y=0, UInt_t w=0, UInt_t h=0)
Create an image (screenshot) from specified window.
void FloodFill(Int_t x, Int_t y, const char *col, const char *min_col, const char *max_col=0)
Flood fill.
void CropPolygon(UInt_t npt, TPoint *ppt)
Crop a convex polygon.
void CropSpans(UInt_t npt, TPoint *ppt, UInt_t *widths)
Crop spans.
void Slice(UInt_t xStart, UInt_t xEnd, UInt_t yStart, UInt_t yEnd, UInt_t toWidth, UInt_t toHeight)
Another method of enlarging images where corners remain unchanged, but middle part gets tiled...
Pixmap_t GetMask()
Returns image mask pixmap (alpha channel).
Array of longs (32 or 64 bits per element).
void GetFillAreaSpans(UInt_t npt, TPoint *ppt, UInt_t *nspans, TPoint **firstPoint, UInt_t **firstWidth)
void FillPolygon(UInt_t npt, TPoint *ppt, const char *col="#000000", const char *stipple=0, UInt_t w=16, UInt_t h=16)
Fill a convex polygon with background color or bitmap.
void Blur(Double_t hr=3, Double_t vr=3)
Perform Gaussian blur of the image (useful for drop shadows).
UInt_t fZoomOffX
! X - offset for zooming in image pixels
void MapQuality(EImageQuality &quality, UInt_t &asquality, Bool_t toas=kTRUE)
Map quality to/from AfterImage quality.
Bool_t IsEditable() const
void Flip(Int_t flip=180)
Flip image in place.
virtual ~TASImage()
Image destructor, clean up image and visual.
TASImage * fScaledImage
! temporary scaled and zoomed image produced from original image
void FillRectangle(const char *col=0, Int_t x=0, Int_t y=0, UInt_t width=0, UInt_t height=0)
Fill rectangle of size (width, height) at position (x,y) within the existing image with specified col...
void HSV(UInt_t hue=0, UInt_t radius=360, Int_t H=0, Int_t S=0, Int_t V=0, Int_t x=0, Int_t y=0, UInt_t width=0, UInt_t height=0)
This function will tile original image to specified size with offsets requested, and then it will go ...
UInt_t * GetRgbaArray()
Return a pointer to an array[width x height] of RGBA32 values.
void Tile(UInt_t width, UInt_t height)
Tile the original image.
Int_t fZoomUpdate
! kZoom - new zooming required, kZoomOps - other ops in action, kNoZoom - no zooming or ops ...
void DrawText(Int_t x=0, Int_t y=0, const char *text="", Int_t size=12, const char *color=0, const char *font="fixed", EText3DType type=TImage::kPlain, const char *fore_file=0, Float_t angle=0)
Draw text of size (in pixels for TrueType fonts) at position (x, y) with color specified by hex strin...
void Bevel(Int_t x=0, Int_t y=0, UInt_t width=0, UInt_t height=0, const char *hi="#ffdddddd", const char *lo="#ff555555", UShort_t thick=1, Bool_t pressed=kFALSE)
Bevel is used to create 3D effect while drawing buttons, or any other image that needs to be framed...
void DrawPolyLine(UInt_t nn, TPoint *xy, const char *col="#000000", UInt_t thick=1, TImage::ECoordMode mode=kCoordModeOrigin)
Draw a polyline.
static const double x1[5]
void Crop(Int_t x=0, Int_t y=0, UInt_t width=0, UInt_t height=0)
Crop an image.
void Mirror(Bool_t vert=kTRUE)
Mirror image in place.
void DrawEllips(Int_t x, Int_t y, Int_t rx, Int_t ry, Int_t angle, const char *col="#000000", Int_t thick=1)
Draw an ellipse.
void PaintImage(Drawable_t wid, Int_t x, Int_t y, Int_t xsrc=0, Int_t ysrc=0, UInt_t wsrc=0, UInt_t hsrc=0, Option_t *opt="")
Draw image on the drawable wid (pixmap, window) at x,y position.
UInt_t fZoomHeight
! hight of zoomed image in image pixels
const char * GetIconName() const
Returns mime type name of object.
void DrawDashLine(UInt_t x1, UInt_t y1, UInt_t x2, UInt_t y2, UInt_t nDash, const char *pDash, const char *col="#000000", UInt_t thick=1)
Draw a dashed line.
void GetImageBuffer(char **buffer, int *size, EImageFileTypes type=TImage::kPng)
Return in-memory buffer compressed according image type.
void FromGLBuffer(UChar_t *buf, UInt_t w, UInt_t h)
Creates an image (screenshot) from a RGBA buffer.
A class to define a conversion from pixel values to pixel color.
void DrawLineInternal(UInt_t x1, UInt_t y1, UInt_t x2, UInt_t y2, UInt_t col, UInt_t thick)
Internal line drawing.
void SetImage(ASImage *image)
TObject * Clone(const char *newname) const
Clone image.
Array of doubles (64 bits per element).
Mother of all ROOT objects.
Double_t fMinValue
! min value in image
void DrawDashVLine(UInt_t x, UInt_t y1, UInt_t y2, UInt_t nDash, const char *pDash, UInt_t col, UInt_t thick)
Draw a dashed vertical line.
static ASVisual * fgVisual
pointer to visual structure
TASImage()
Default image constructor.
static Bool_t fgInit
global flag to init afterimage only once
void DrawEllips2(Int_t x, Int_t y, Int_t rx, Int_t ry, Int_t angle, const char *col="#000000", Int_t thick=1)
Draw an ellipse.
const char * TypeFromMagicNumber(const char *file)
Guess the file type from the first byte of file.
void DrawSegments(UInt_t nseg, Segment_t *seg, const char *col="#000000", UInt_t thick=1)
Draw segments.
void DrawStraightEllips(Int_t x, Int_t y, Int_t rx, Int_t ry, const char *col="#000000", Int_t thick=1)
Draw a straight ellipse.
TASImage & operator=(const TASImage &img)
Image assignment operator.
float type_of_call hi(const int &, const int &)
void flip(struct mesh *m, struct behavior *b, struct otri *flipedge)
UInt_t fZoomWidth
! width of zoomed image in image pixels
ASImage * fGrayImage
! gray image
void DestroyImage()
Destroy image.
TImage * GetScaledImage() const
void DrawHLine(UInt_t y, UInt_t x1, UInt_t x2, UInt_t col, UInt_t thick)
Draw an horizontal line.
Pixmap_t GetPixmap()
Returns image pixmap.
ASImage * fImage
! pointer to image structure of original image
Bool_t GetPolygonSpans(UInt_t npt, TPoint *ppt, UInt_t *nspans, TPoint **firstPoint, UInt_t **firstWidth)
The code is based on Xserver/mi/mipolycon.c "Copyright 1987, 1998 The Open Group".
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute mouse events.
void SetDefaults()
Set default parameters.
static void Image2Drawable(ASImage *im, Drawable_t wid, Int_t x, Int_t y, Int_t xsrc=0, Int_t ysrc=0, UInt_t wsrc=0, UInt_t hsrc=0, Option_t *opt="")
Draw asimage on drawable.
void Gradient(UInt_t angle=0, const char *colors="#FFFFFF #000000", const char *offsets=0, Int_t x=0, Int_t y=0, UInt_t width=0, UInt_t height=0)
Render multipoint gradient inside rectangle of size (width, height) at position (x,y) within the existing image.
static const double x3[11]
void DrawVLine(UInt_t x, UInt_t y1, UInt_t y2, UInt_t col, UInt_t thick)
Draw a vertical line.