Class: OpenXml::Pptx::Parts::Theme
- Inherits:
-
DrawingML::Parts::Theme
- Object
- DrawingML::Parts::Theme
- OpenXml::Pptx::Parts::Theme
- Includes:
- RelatablePart
- Defined in:
- lib/openxml/pptx/parts/theme.rb
Instance Attribute Summary
Attributes included from RelatablePart
Class Method Summary collapse
-
.office_theme ⇒ Object
Default theme.
Instance Method Summary collapse
Methods included from RelatablePart
#add_child_part, #add_override, #add_part, #add_relationship, #content_type, #file_name, included, #indexed_path, #initialize, #path, #path=, #relationship_type, #relationships, #relationships_by_path
Class Method Details
.office_theme ⇒ Object
Default theme
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 |
# File 'lib/openxml/pptx/parts/theme.rb', line 17 def self.office_theme new.tap do |theme| theme.theme_name = "Office Theme" theme.theme_elements.color_scheme.tap do |scheme| scheme.scheme_name = "Office" scheme.dark_one.system_color = :windowText scheme.dark_one.system_color.last_color = "000000" scheme.light_one.system_color = :window scheme.light_one.system_color.last_color = "FFFFFF" scheme.dark_two.rgb = "44546A" scheme.light_two.rgb = "E7E6E6" scheme.accent_one.rgb = "4472C4" scheme.accent_two.rgb = "ED7D31" scheme.accent_three.rgb = "A5A5A5" scheme.accent_four.rgb = "FFC000" scheme.accent_five.rgb = "5B9BD5" scheme.accent_six.rgb = "70AD47" scheme.hyperlink.rgb = "0563C1" scheme.followed_hyperlink.rgb = "954F72" end theme.theme_elements.font_scheme.tap do |scheme| scheme.scheme_name = "Office" scheme.major_font.latin_font = "Calibri Light" scheme.major_font.east_asian_font = "" scheme.major_font.complex_script_font = "" scheme.minor_font.latin_font = "Calibri" scheme.minor_font.east_asian_font = "" scheme.minor_font.complex_script_font = "" end theme.theme_elements.format_scheme.tap do |scheme| scheme.scheme_name = "Office" 3.times do scheme.fill_style_list << OpenXml::DrawingML::Properties::FillNone.new(true) scheme.line_style_list << OpenXml::DrawingML::Properties::Outline.new scheme.effect_style_list << OpenXml::DrawingML::Properties::EffectStyle.new.tap(&:effect_list) scheme.background_fill_style_list << OpenXml::DrawingML::Properties::FillNone.new(true) end end end end |
Instance Method Details
#relationships_path ⇒ Object
14 |
# File 'lib/openxml/pptx/parts/theme.rb', line 14 def relationships_path; end |