It is done by specifying the alpha value of a given color. For instance
changes the ellipse fill color to the index 9 with an alpha value of 0.571. 0. would be fully transparent (invisible) and 1. completely opaque (the default).
void transparency()
{
c1->Range(-0.125,-0.125,1.125,1.125);
TLatex *tex =
new TLatex(0.06303724,0.0194223,
"This text is opaque and this line is transparent");
0.5232808, 0.8724928, 0.9280086, 0.7059456, 0.7399714,
0.4659742, 0.8241404, 0.4838825, 0.7936963, 0.743553};
0.7290837, 0.9631474, 0.4775896, 0.6494024, 0.3555777,
0.622012, 0.7938247, 0.9482072, 0.3904382, 0.2410359};
graph->SetLineColorAlpha(46, 0.1);
TEllipse *ellipse =
new TEllipse(0.1740688,0.8352632,0.1518625,0.1010526,0,360,0);
ellipse =
new TEllipse(0.2985315,0.7092105,0.1566977,0.1868421,0,360,0);
tex =
new TLatex(0.04871059,0.1837649,
"This text is transparent");
}
Draw all kinds of Arrows.
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillColorAlpha(Color_t fcolor, Float_t falpha)
Set a transparent fill color.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
Set a transparent line color.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextColorAlpha(Color_t tcolor, Float_t talpha)
Set a transparent marker color.
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void Draw(Option_t *option="")
Draw this ellipse with its current attributes.
A Graph is a graphics object made of two arrays X and Y with npoints each.
To draw Mathematical Formula.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.