Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TImageDump.h
Go to the documentation of this file.
1// @(#)root/postscript:$Id$
2// Author: Valeriy Onuchin 29/04/2005
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TImageDump
13#define ROOT_TImageDump
14
15
16#include "TVirtualPS.h"
17
18class TImage;
19class TColor;
20class TPoint;
21
22class TImageDump : public TVirtualPS {
23protected:
24 TImage *fImage{nullptr}; ///< Image
25 Int_t fType{0}; ///< PostScript workstation type
26 Int_t fX0{0}, fY0{0}; ///< offset of selected pad to canvas
27
28 std::vector<UInt_t> fCellArrayColors;
36
40 const char* pDash, const char* col, UInt_t thick);
41
42public:
43 TImageDump();
44 TImageDump(const char *filename, Int_t type = -111);
45 ~TImageDump() override;
46
48 void CellArrayFill(Int_t r, Int_t g, Int_t b) override;
49 void CellArrayEnd() override;
50 void Close(Option_t *opt = "") override;
53 Int_t mode, Int_t border, Int_t dark, Int_t light) override;
54 void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) override;
55 void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y) override;
56 void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override;
57 void DrawPS(Int_t n, Double_t *xw, Double_t *yw) override;
58 void NewPage() override;
59 void Open(const char *filename, Int_t type = -111) override;
60 void Text(Double_t x, Double_t y, const char *string) override;
61 void Text(Double_t x, Double_t y, const wchar_t *string) override;
62 void TextUrl(Double_t x, Double_t y, const char *string, const char *url) override;
63 void SetColor(Float_t r, Float_t g, Float_t b) override;
64 void *GetStream() const override { return (void*)fImage; }
65 void SetType(Int_t type = -111) override { fType = type; }
66 Int_t GetType() const override { return fType; }
67 TImage *GetImage() const { return fImage; }
68
69 ClassDefOverride(TImageDump,0) // create image in batch mode
70};
71
72#endif
#define b(i)
Definition RSha256.hxx:100
#define g(i)
Definition RSha256.hxx:105
int Int_t
Signed integer 4 bytes (int)
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int)
Definition RtypesCore.h:60
float Float_t
Float 4 bytes (float)
Definition RtypesCore.h:71
double Double_t
Double 8 bytes.
Definition RtypesCore.h:73
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
#define ClassDefOverride(name, id)
Definition Rtypes.h:348
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint DrawPolyMarker
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char y1
The color creation and management class.
Definition TColor.h:22
Save canvas as an image (GIF, JPEG, PNG, XPM, TIFF etc.).
Definition TImageDump.h:22
Int_t fCellArrayY1
Definition TImageDump.h:33
void NewPage() override
new page
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override
Draw a Box.
void CellArrayEnd() override
Cell array end.
std::vector< UInt_t > fCellArrayColors
Definition TImageDump.h:28
void SetType(Int_t type=-111) override
Definition TImageDump.h:65
void DrawDashPolyLine(Int_t npoints, TPoint *pt, UInt_t nDash, const char *pDash, const char *col, UInt_t thick)
draw dashed polyline
TImageDump()
Default constructor.
Int_t YtoPixel(Double_t y)
y to pixel
TImage * fImage
Image.
Definition TImageDump.h:24
void CellArrayFill(Int_t r, Int_t g, Int_t b) override
Cell array fill.
~TImageDump() override
destructor
Int_t fCellArrayX1
Definition TImageDump.h:31
Int_t GetType() const override
Definition TImageDump.h:66
void Open(const char *filename, Int_t type=-111) override
Open a image file.
Int_t fX0
Definition TImageDump.h:26
void Close(Option_t *opt="") override
Close a image file.
Int_t fCellArrayX2
Definition TImageDump.h:32
Int_t fCellArrayH
Definition TImageDump.h:30
Int_t fCellArrayY2
Definition TImageDump.h:34
void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override
not used
UInt_t fCellArrayIdx
Definition TImageDump.h:35
void Text(Double_t x, Double_t y, const char *string) override
Draw text.
void * GetStream() const override
Definition TImageDump.h:64
TImage * GetImage() const
Definition TImageDump.h:67
void SetColor(Float_t r, Float_t g, Float_t b) override
Set color with its R G B components.
Int_t fCellArrayW
Definition TImageDump.h:29
void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light) override
Draw a Frame around a box.
Int_t fType
PostScript workstation type.
Definition TImageDump.h:25
Int_t XtoPixel(Double_t x)
x to pixel
Int_t fY0
offset of selected pad to canvas
Definition TImageDump.h:26
void TextUrl(Double_t x, Double_t y, const char *string, const char *url) override
Draw text with URL.
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2) override
cell array begin
An abstract interface to image processing library.
Definition TImage.h:29
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
Definition TVirtualPS.h:30
TPaveText * pt
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17
const Int_t n
Definition legend1.C:16
#define H(x, y, z)