ph_location | R Documentation |
The function will return a list that complies with
expected format for argument location
of function ph_with
.
ph_location(
left = 1,
top = 1,
width = 4,
height = 3,
newlabel = "",
bg = NULL,
rotation = NULL,
ln = NULL,
geom = NULL,
...
)
left , top , width , height |
place holder coordinates in inches. |
newlabel |
a label for the placeholder. See section details. |
bg |
background color |
rotation |
rotation angle |
ln |
a |
geom |
shape geometry, see http://www.datypic.com/sc/ooxml/t-a_ST_ShapeType.html |
... |
unused arguments |
The location of the bounding box associated to a placeholder within a slide is specified with the left top coordinate, the width and the height. These are defined in inches:
left coordinate of the bounding box
top coordinate of the bounding box
width of the bounding box
height of the bounding box
In addition to these attributes, a label can be
associated with the shape. Shapes, text boxes, images and other objects
will be identified with that label in the Selection Pane of PowerPoint.
This label can then be reused by other functions such as ph_location_label()
.
It can be set with argument newlabel
.
Other functions for placeholder location:
ph_location_fullsize()
,
ph_location_id()
,
ph_location_label()
,
ph_location_left()
,
ph_location_right()
,
ph_location_template()
,
ph_location_type()
doc <- read_pptx()
doc <- add_slide(doc)
doc <- ph_with(doc, "Hello world",
location = ph_location(width = 4, height = 3, newlabel = "hello") )
print(doc, target = tempfile(fileext = ".pptx") )
# Set geometry and outline
doc <- read_pptx()
doc <- add_slide(doc)
loc <- ph_location(left = 1, top = 1, width = 4, height = 3, bg = "steelblue",
ln = sp_line(color = "red", lwd = 2.5),
geom = "trapezoid")
doc <- ph_with(doc, "", loc = loc)
print(doc, target = tempfile(fileext = ".pptx") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.