Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TImagePlugin.h
Go to the documentation of this file.
1// @(#)root/graf:$Id$
2// Author: Valeriy Onuchin 23/06/05
3
4/*************************************************************************
5 * Copyright (C) 2001-2002, Rene Brun, Fons Rademakers and Reiner Rohlfs *
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_TImagePlugin
13#define ROOT_TImagePlugin
14
15
16#include "TObject.h"
17
18#include "TString.h"
19
20#include "TROOT.h"
21
22class TImagePlugin : public TObject {
23
24protected:
25 TString fExtension; ///< file extension
26
27public:
28 TImagePlugin(const char *ext) { fExtension = ext; }
29 virtual ~TImagePlugin()
30 {
31 // Required since we overload TObject::Hash.
33 }
34
35 virtual unsigned char *ReadFile(const char *filename, UInt_t &w, UInt_t &h) = 0;
36 virtual Bool_t WriteFile(const char *filename, unsigned char *argb, UInt_t w, UInt_t h) = 0;
37 ULong_t Hash() const override { return fExtension.Hash(); }
38
39 ClassDefOverride(TImagePlugin, 0) // base class for different image format handlers(plugins)
40};
41
42#endif
#define h(i)
Definition RSha256.hxx:106
unsigned long ULong_t
Definition RtypesCore.h:55
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
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
TImagePlugin(const char *ext)
virtual unsigned char * ReadFile(const char *filename, UInt_t &w, UInt_t &h)=0
TString fExtension
file extension
virtual ~TImagePlugin()
virtual Bool_t WriteFile(const char *filename, unsigned char *argb, UInt_t w, UInt_t h)=0
ULong_t Hash() const override
Return hash value for this object.
Mother of all ROOT objects.
Definition TObject.h:41
Basic string class.
Definition TString.h:139
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
Definition TString.cxx:670
void CallRecursiveRemoveIfNeeded(TObject &obj)
call RecursiveRemove for obj if gROOT is valid and obj.TestBit(kMustCleanup) is true.
Definition TROOT.h:394