Documentation
¶
Overview ¶
Package render turns selected .pptx slides into PNG images using a Puppt-owned Open XML interpretation path.
Index ¶
- func Render(ctx context.Context, inputPath string, options Options) (model.CommandResult, error)
- func SlideCount(ctx context.Context, inputPath string) (int, error)
- type ObjectDebugOptions
- type ObjectDebugRenderMode
- type ObjectEMUPointBounds
- type ObjectFloatBounds
- type ObjectFloatPoint
- type ObjectPixelBounds
- type ObjectStyleSummary
- type ObjectUnsupported
- type Options
- type PaintedObject
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ObjectDebugOptions ¶
type ObjectDebugOptions struct {
Mode ObjectDebugRenderMode
TargetZOrder int
HasFlatBackground bool
FlatBackground color.RGBA
ArtifactDir string
Records []PaintedObject
// contains filtered or unexported fields
}
type ObjectDebugRenderMode ¶
type ObjectDebugRenderMode string
const ( ObjectDebugRenderNormal ObjectDebugRenderMode = "" ObjectDebugRenderBefore ObjectDebugRenderMode = "before" ObjectDebugRenderObjectOnly ObjectDebugRenderMode = "object" ObjectDebugRenderThrough ObjectDebugRenderMode = "through" )
type ObjectEMUPointBounds ¶
type ObjectFloatBounds ¶
type ObjectFloatPoint ¶
type ObjectPixelBounds ¶
type ObjectStyleSummary ¶
type ObjectStyleSummary struct {
Geometry string `json:"geometry,omitempty"`
CustomPathPoints int `json:"custom_path_points,omitempty"`
CustomPathCoordinates []ObjectFloatPoint `json:"custom_path_coordinates,omitempty"`
CustomPathBounds *ObjectFloatBounds `json:"custom_path_bounds,omitempty"`
CustomPathCommands int `json:"custom_path_commands,omitempty"`
CustomPathUnsupported []string `json:"custom_path_unsupported,omitempty"`
Fill string `json:"fill,omitempty"`
PatternFill string `json:"pattern_fill,omitempty"`
Line string `json:"line,omitempty"`
Text string `json:"text,omitempty"`
FontFamily string `json:"font_family,omitempty"`
FontFamilies []string `json:"font_families,omitempty"`
FontSize int `json:"font_size,omitempty"`
ParagraphFontSize int `json:"paragraph_font_size,omitempty"`
Bold bool `json:"bold,omitempty"`
Italic bool `json:"italic,omitempty"`
TextColor string `json:"text_color,omitempty"`
TextAlign string `json:"text_align,omitempty"`
TextBox bool `json:"text_box,omitempty"`
TextBodyProperties []string `json:"text_body_properties,omitempty"`
TextParagraphProperties []string `json:"text_paragraph_properties,omitempty"`
Description string `json:"description,omitempty"`
Title string `json:"title,omitempty"`
CreationID string `json:"creation_id,omitempty"`
NonVisualProperties []string `json:"non_visual_properties,omitempty"`
NonVisualLocks []string `json:"non_visual_locks,omitempty"`
Placeholder string `json:"placeholder,omitempty"`
EmbedID string `json:"embed_id,omitempty"`
SVGEmbedID string `json:"svg_embed_id,omitempty"`
Image string `json:"image,omitempty"`
ImageCrop string `json:"image_crop,omitempty"`
ImageEffects []string `json:"image_effects,omitempty"`
ImageUnsupported []string `json:"image_unsupported,omitempty"`
EffectUnsupported []string `json:"effect_unsupported,omitempty"`
Table bool `json:"table,omitempty"`
TableStyleID string `json:"table_style_id,omitempty"`
TableProperties []string `json:"table_properties,omitempty"`
TableColumnIDs []string `json:"table_column_ids,omitempty"`
TableRowIDs []string `json:"table_row_ids,omitempty"`
TableUnsupported []string `json:"table_unsupported,omitempty"`
Shadow bool `json:"shadow,omitempty"`
ShadowColor string `json:"shadow_color,omitempty"`
ShadowBlur int64 `json:"shadow_blur_emu,omitempty"`
ShadowDistance int64 `json:"shadow_distance_emu,omitempty"`
ShadowDirection int64 `json:"shadow_direction,omitempty"`
ShadowAlignment string `json:"shadow_alignment,omitempty"`
ShadowScaleX int64 `json:"shadow_scale_x,omitempty"`
ShadowScaleY int64 `json:"shadow_scale_y,omitempty"`
ShadowSkewX int64 `json:"shadow_skew_x,omitempty"`
ShadowSkewY int64 `json:"shadow_skew_y,omitempty"`
GradientFill bool `json:"gradient_fill,omitempty"`
NoFill bool `json:"no_fill,omitempty"`
NoLine bool `json:"no_line,omitempty"`
}
type ObjectUnsupported ¶
type Options ¶
type Options struct {
SlideNumber int
OutputPath string
DPI int
ObjectDebug *ObjectDebugOptions
}
type PaintedObject ¶
type PaintedObject struct {
SlidePart string `json:"slide_part"`
SourcePart string `json:"source_part"`
XMLPath string `json:"xml_path,omitempty"`
CNvPrID string `json:"cnv_pr_id,omitempty"`
CNvPrName string `json:"cnv_pr_name,omitempty"`
CNvPrDescription string `json:"cnv_pr_description,omitempty"`
CNvPrTitle string `json:"cnv_pr_title,omitempty"`
CNvPrCreationID string `json:"cnv_pr_creation_id,omitempty"`
Kind string `json:"kind"`
ZOrder int `json:"z_order"`
Bounds ObjectEMUPointBounds `json:"bounds_emu,omitempty"`
ResolvedStyle ObjectStyleSummary `json:"resolved_style"`
PixelBounds ObjectPixelBounds `json:"pixel_bounds,omitempty"`
FractionalBounds ObjectFloatBounds `json:"fractional_pixel_bounds,omitempty"`
OutputPixelBounds *ObjectPixelBounds `json:"output_pixel_bounds,omitempty"`
BeforeArtifactPath string `json:"before_artifact_path,omitempty"`
ObjectArtifactPath string `json:"object_artifact_path,omitempty"`
ThroughArtifactPath string `json:"through_artifact_path,omitempty"`
Unsupported []ObjectUnsupported `json:"unsupported,omitempty"`
Painted bool `json:"painted"`
}
Source Files
¶
- doc.go
- render.go
- render_background.go
- render_cache.go
- render_color.go
- render_fonts.go
- render_geometry.go
- render_gradient.go
- render_inheritance_theme.go
- render_object_debug.go
- render_output.go
- render_paint.go
- render_paint_style.go
- render_parse.go
- render_pictures.go
- render_scene.go
- render_shape_parse.go
- render_tables.go
- render_text_layout.go
- render_text_parse.go
- render_text_shaping.go
- render_transform.go
- render_types.go
- render_unsupported.go
- render_xml.go
Click to show internal directories.
Click to hide internal directories.