Class: Tioga::Transparency
- Inherits:
-
Object
- Object
- Tioga::Transparency
- Defined in:
- lib/Tioga/Transparency.rb
Overview
These are the attributes for using transparency in PDF graphics. The transparency is speficied by a fraction, with 1.0 for fully transparent and 0.0 for fully opaque. Since transparency can also be thought of in terms of opacity, there are accessors defined in those terms also. Thus, for example, setting fill_opacity to 0.2 is equivalent to setting fill_transparency to 0.8.
Instance Method Summary collapse
-
#fill_opacity ⇒ Object
:call-seq: fill_opacity fill_opacity = a_float.
-
#fill_transparency ⇒ Object
:call-seq: fill_transparency fill_transparency = a_float.
-
#opacity_for_fill ⇒ Object
:call-seq: opacity_for_fill opacity_for_fill = a_float.
-
#opacity_for_stroke ⇒ Object
:call-seq: opacity_for_stroke opacity_for_stroke = a_float.
-
#stroke_opacity ⇒ Object
:call-seq: stroke_opacity stroke_opacity = a_float.
-
#stroke_transparency ⇒ Object
:call-seq: stroke_transparency stroke_transparency = a_float.
-
#transparency_for_fill ⇒ Object
:call-seq: transparency_for_fill transparency_for_fill = a_float.
-
#transparency_for_stroke ⇒ Object
:call-seq: transparency_for_stroke transparency_for_stroke = a_float.
Instance Method Details
#fill_opacity ⇒ Object
:call-seq:
fill_opacity
fill_opacity = a_float
Defines the opacity to use for #fill and other non-stroke graphics operations including images. Valid values are between 1.0 (fully opaque) to 0.0 (fully transparent). Default is 1.0 (opaque).
Example: on left, fill_opacity = 1.0; on right fill_opacity = 0.6
36 37 |
# File 'lib/Tioga/Transparency.rb', line 36 def fill_opacity end |
#fill_transparency ⇒ Object
:call-seq:
fill_transparency
fill_transparency = a_float
Defines the transparency to use for #fill and other non-stroke graphics operations including images. Valid values are between 0.0 (fully opaque) to 1.0 (fully transparent). Default is 0.0 (opaque).
Example: on left, fill_transparency = 0.0; on right fill_transparency = 0.4
76 77 |
# File 'lib/Tioga/Transparency.rb', line 76 def fill_transparency end |
#opacity_for_fill ⇒ Object
:call-seq:
opacity_for_fill
opacity_for_fill = a_float
Alias for fill_opacity.
44 45 |
# File 'lib/Tioga/Transparency.rb', line 44 def opacity_for_fill end |
#opacity_for_stroke ⇒ Object
:call-seq:
opacity_for_stroke
opacity_for_stroke = a_float
Alias for stroke_opacity.
23 24 |
# File 'lib/Tioga/Transparency.rb', line 23 def opacity_for_stroke end |
#stroke_opacity ⇒ Object
:call-seq:
stroke_opacity
stroke_opacity = a_float
Defines the opacity to use for #stroke operations. Valid values are between 1.0 (fully opaque) to 0.0 (fully transparent). Default is 1.0 (opaque).
15 16 |
# File 'lib/Tioga/Transparency.rb', line 15 def stroke_opacity end |
#stroke_transparency ⇒ Object
:call-seq:
stroke_transparency
stroke_transparency = a_float
Defines the transparency to use for #stroke operations. Valid values are between 0.0 (fully opaque) to 1.0 (fully transparent). Default is 0.0 (opaque).
55 56 |
# File 'lib/Tioga/Transparency.rb', line 55 def stroke_transparency end |
#transparency_for_fill ⇒ Object
:call-seq:
transparency_for_fill
transparency_for_fill = a_float
Alias for fill_transparency.
84 85 |
# File 'lib/Tioga/Transparency.rb', line 84 def transparency_for_fill end |
#transparency_for_stroke ⇒ Object
:call-seq:
transparency_for_stroke
transparency_for_stroke = a_float
Alias for stroke_transparency.
63 64 |
# File 'lib/Tioga/Transparency.rb', line 63 def transparency_for_stroke end |