forked from rozenasf/Matlab2Powerpoint
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAddLineToSlide.m
More file actions
44 lines (42 loc) · 1.3 KB
/
AddLineToSlide.m
File metadata and controls
44 lines (42 loc) · 1.3 KB
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
function U = AddLineToSlide(Slide,Info)
% U = Slide.Shapes.AddTextbox(1,Info.Left,Info.Top,Info.Width,Info.Height);
U = Slide.Shapes.AddLine(Info.P1(1),Info.P1(2),Info.P2(1),Info.P2(2));
if(isfield(Info, 'Weight'));
U.Line.Weight = Info.Weight;
else
U.Line.Weight = 3;
end
if(isfield(Info, 'Color'));
U.Line.ForeColor.RGB = RGB_int(Color);
else
U.Line.ForeColor.RGB = RGB_int([0,0,0]);
end
% U.Line.ForeColor.RGB = RGB_int([255,0,0])
% if(isfield(Info, 'Text'));
% U.TextFrame.TextRange.Text = Info.Text;
% end
%
% if(isfield(Info, 'Name'));
% U.TextFrame.TextRange.Font.Name = Info.Name;
% else
% U.TextFrame.TextRange.Font.Name = 'Times New Roman';
% end
%
% if(isfield(Info, 'Size'));
% U.TextFrame.TextRange.Font.Size = Info.Size;
% else
% U.TextFrame.TextRange.Font.Size = 24;
% end
%
% if(isfield(Info, 'Color'));
% U.TextFrame.TextRange.Font.Color.RGB = RGB_int(Info.Color);
% end
%
% if(isfield(Info, 'Spacing'));
% U.TextFrame2.TextRange.Font.Spacing=Info.Spacing;
% % else
% % U.TextFrame2.TextRange.Font.Spacing = 0.8;
% end
% U.TextFrame.TextRange.ParagraphFormat.Alignment = 'ppAlignCenter';
Slide.invoke;
end