File: Transparency.rb

package info (click to toggle)
libtioga-ruby 1.8-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 9,956 kB
  • ctags: 3,257
  • sloc: ansic: 31,801; ruby: 16,346; sh: 172; makefile: 114
file content (89 lines) | stat: -rw-r--r-- 2,874 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
#  Transparency.rb

module Tioga

# 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. 

class Transparency < Doc < FigureMaker

# :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).
   def stroke_opacity
   end
   
# :call-seq:
#               opacity_for_stroke                                     
#               opacity_for_stroke = a_float
#
# Alias for stroke_opacity.
   def opacity_for_stroke
   end
   
# :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
#
# link:images/Squares.png
   def fill_opacity
   end
   
# :call-seq:
#               opacity_for_fill                                     
#               opacity_for_fill = a_float
#
# Alias for fill_opacity.
   def opacity_for_fill
   end
   
   
   
# :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).
   def stroke_transparency
   end
   
# :call-seq:
#               transparency_for_stroke                                     
#               transparency_for_stroke = a_float
#
# Alias for stroke_transparency.
   def transparency_for_stroke
   end
   
# :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
#
# link:images/Squares.png
   def fill_transparency
   end
   
# :call-seq:
#               transparency_for_fill                                     
#               transparency_for_fill = a_float
#
# Alias for fill_transparency.
   def transparency_for_fill
   end
   

end # class
end # module Tioga