Skip to content
Open
5 changes: 5 additions & 0 deletions core/base/inc/TVirtualPS.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
#include "TAttText.h"
#include "TAttMarker.h"

class TImage;

class TVirtualPS : public TNamed, public TAttLine, public TAttFill, public TAttMarker, public TAttText {

private:
Expand Down Expand Up @@ -54,6 +56,9 @@ class TVirtualPS : public TNamed, public TAttLine, public TAttFill, public TAttM
virtual void CellArrayFill(Int_t r, Int_t g, Int_t b) = 0;
virtual void CellArrayPng(char * /* buffer */, int /* size */) {}
virtual void CellArrayEnd() = 0;

virtual void DrawImage(TImage * /* img */, Int_t /* x */, Int_t /* y */ , Int_t /* flags */ = 0) {}

virtual void Close(Option_t *opt="") = 0;
virtual void DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2) = 0;
virtual void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt,
Expand Down
3 changes: 3 additions & 0 deletions core/base/inc/TVirtualPadPainter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

class TVirtualPad;
class TVirtualPS;
class TImage;
class TAttFill;
class TAttLine;
class TAttMarker;
Expand Down Expand Up @@ -151,6 +152,8 @@ class TVirtualPadPainter {

virtual void DrawTextUrl(Double_t x, Double_t y, const char *text, const char *url);

virtual void DrawImage(TImage *img, Int_t x, Int_t y, Int_t flags = 0);

//gif, jpg, png, bmp output.
virtual void SaveImage(TVirtualPad *pad, const char *fileName, Int_t type) const = 0;

Expand Down
7 changes: 7 additions & 0 deletions core/base/src/TVirtualPadPainter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,10 @@ void TVirtualPadPainter::SetCursor(Int_t device, ECursor cursor)
gVirtualX->SetCursor(device, cursor);
}


////////////////////////////////////////////////////////////////////////////////
/// Draw image, need to be implemented in correspondent

void TVirtualPadPainter::DrawImage(TImage *, Int_t, Int_t, Int_t)
{
}
3 changes: 3 additions & 0 deletions graf2d/asimage/inc/TASImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,9 @@ class TASImage : public TImage {
void SetPaletteEnabled(Bool_t on = kTRUE) override; // *TOGGLE*
void SavePrimitive(std::ostream &out, Option_t *option = "") override;

std::vector<unsigned char> GetMaskBits(UInt_t &w, UInt_t &h) override;
void DrawX11(Drawable_t wid, void *gc, Int_t x, Int_t y) override;

static const ASVisual *GetVisual();
static UInt_t AlphaBlend(UInt_t bot, UInt_t top);
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 = "");
Expand Down
Loading
Loading