Ejemplo n.º 1
0
import matplotlib.pyplot as plt
from odpslides.presentation import Presentation

PC_CENTER = 0
PC_CONTENT = 0
PC_RIGHT = None  # [100,100,100,100,100]
#PC_RIGHT = [-100,-100,-100,-100,-100]
PC_UP = None  # [100,100,100,100,100]
#PC_UP = [-100,-100,-100,-100,-100]

P = Presentation(
    background_color='#ccffcc',
    background_image=
    r'D:\py_proj_2015\ODPSlides\odpslides\templates\image1.png',
    #grad_start_color='ff9999', grad_end_color="#ffffff",
    #grad_angle_deg=45, grad_draw_style='rectangle',
    footer='Gaea Trilogy',
    show_date=True)

P.add_title_chart(title='Titan, Wizard, Demon',
                  subtitle='John Varley',
                  pcent_stretch_center=PC_CENTER,
                  pcent_stretch_content=PC_CONTENT,
                  pcent_move_content_right=PC_RIGHT,
                  pcent_move_content_up=PC_UP)

P.add_titled_image(title='Locus, Nebula, Hugo',
                   image_file='Titan.jpg',
                   pcent_stretch_center=PC_CENTER,
                   pcent_stretch_content=PC_CONTENT,
                   pcent_move_content_right=PC_RIGHT,
Ejemplo n.º 2
0
from odpslides.presentation import Presentation

P = Presentation(grad_start_color='ff9999',
                 grad_end_color="#ffffff",
                 grad_angle_deg=45,
                 grad_draw_style='linear',
                 footer='Gaea Trilogy',
                 show_date=True)

P.add_title_chart(title='Titan, Wizard, Demon', subtitle='John Varley')

P.add_titled_image(title='Locus, Nebula, Hugo',
                   image_file='Titan.jpg',
                   image_2_file='Wizard.jpg',
                   image_3_file='Demon.jpg',
                   pcent_stretch_center=80,
                   pcent_stretch_content=80)

P.save(filename='varley.odp', launch=1)
Ejemplo n.º 3
0
from odpslides.presentation import Presentation

P = Presentation(background_color='darkseagreen', footer="slan example")

P.add_title_chart( title='Slan, from 1946', subtitle='A. E. van Vogt')

P.add_titled_outline_chart( title='Slans Are Evolved Humans', outline="""
The Slan are named after Samuel Lann
    The creator of Slans
There are two kinds of Slans
    With tendrils
        can read minds of ordinary humans
        can communicate telepathically with other Slans
    Without tendrils
        super intelligent
        no telepathy
        can hide thoughts from other Slan""")

P.add_titled_image( title='Ninth Big Printing', image_file='slan.png',
                    pcent_stretch_center=80, pcent_stretch_content=80)

P.save( filename='slan.odp', launch=1 )
Ejemplo n.º 4
0
    def test_save(self):
        """Check that save operates cleanly"""

        self.myclass = Presentation()

        self.myclass.save(filename=os.path.join(here, 'my_ppt'), launch=False)
Ejemplo n.º 5
0
 def setUp(self):
     unittest.TestCase.setUp(self)
     self.myclass = Presentation()
Ejemplo n.º 6
0
from odpslides.presentation import Presentation

P = Presentation(background_image='robot_bg_light.png',
                 title_font_color='dm',
                 subtitle_font_color='dm',
                 footer='Foundation Trilogy',
                 show_date=True,
                 date_font_color='i',
                 footer_font_color='i',
                 page_number_font_color="i")

P.add_title_chart(title='The Foundation Series', subtitle='Isaac Asimov')

P.add_titled_text_and_image(text_location='top',
                            title='"Best All-Time Series" in 1966',
                            title_font_color='',
                            outline=[
                                "Psychohistory", "    Hari Seldon's Invention",
                                "R. Daneel Olivaw", "    Humanity's Protector"
                            ],
                            text_font_color='dm',
                            image_file='Foundation_Series.jpg',
                            keep_aspect_ratio=True,
                            pcent_stretch_center=50,
                            pcent_stretch_content=100)

P.add_titled_image(title='Two Prequels, Two Sequels, Many Reprints',
                   image_file='Foudation_Series_v3.jpg',
                   image_2_file='foundation_x7.png',
                   image_3_file='Foudation_Series_v2.jpg',
                   image_4_file='r_daneel_olivaw.jpg',