* src/docgen/PSDrawDoc.py: Scaleable shadow
* src/docgen/OpenOfficeDoc.py: Scaleable shadow * src/docgen/KwordDoc.py (KwordDoc.close): handle KWord mime type * src/grampslib_wrap.c: handle NULL pointers svn: r2614
This commit is contained in:
parent
7c66298bf8
commit
02be6b99f1
@ -909,6 +909,7 @@ class OpenOfficeDoc(BaseDoc.BaseDoc):
|
||||
def draw_box(self,style,text,x,y):
|
||||
box_style = self.draw_styles[style]
|
||||
para_name = box_style.get_paragraph_style()
|
||||
shadow_width = box_style.get_shadow_space()
|
||||
|
||||
self.f.write('<draw:rect text:anchor-type="paragraph" ')
|
||||
self.f.write('draw:style-name="%s_shadow" ' % style)
|
||||
@ -916,8 +917,8 @@ class OpenOfficeDoc(BaseDoc.BaseDoc):
|
||||
self.f.write('draw:z-index="0" ')
|
||||
self.f.write('svg:width="%.3fcm" ' % box_style.get_width())
|
||||
self.f.write('svg:height="%.3fcm" ' % box_style.get_height())
|
||||
self.f.write('svg:x="%.3fcm" ' % (float(x)+0.2))
|
||||
self.f.write('svg:y="%.3fcm">\n' % (float(y)+0.2))
|
||||
self.f.write('svg:x="%.3fcm" ' % (float(x)+shadow_width))
|
||||
self.f.write('svg:y="%.3fcm">\n' % (float(y)+shadow_width))
|
||||
self.f.write('</draw:rect>\n')
|
||||
|
||||
self.f.write('<draw:rect text:anchor-type="paragraph" ')
|
||||
|
@ -332,9 +332,11 @@ class PSDrawDoc(BaseDoc.BaseDoc):
|
||||
bh = box_style.get_height()
|
||||
bw = box_style.get_width()
|
||||
self.f.write('gsave\n')
|
||||
# if box_style.get_shadow():
|
||||
|
||||
shadsize = box_style.get_shadow_space()
|
||||
if box_style.get_shadow():
|
||||
self.f.write('newpath\n')
|
||||
self.f.write('%f cm %f cm moveto\n' % self.translate(x+0.15,y+0.15))
|
||||
self.f.write('%f cm %f cm moveto\n' % self.translate(x+shadsize,y+shadsize))
|
||||
self.f.write('0 -%f cm rlineto\n' % bh)
|
||||
self.f.write('%f cm 0 rlineto\n' % bw)
|
||||
self.f.write('0 %f cm rlineto\n' % bh)
|
||||
@ -364,7 +366,7 @@ class PSDrawDoc(BaseDoc.BaseDoc):
|
||||
mar = 10/28.35
|
||||
f_in_cm = p.get_font().get_size()/28.35
|
||||
fs = f_in_cm * 1.2
|
||||
center = y + (bh + fs)/2.0 + (fs*0.2)
|
||||
center = y + (bh + fs)/2.0 + (fs*shadsize)
|
||||
ystart = center - (fs/2.0) * nlines
|
||||
for i in range(nlines):
|
||||
ypos = ystart + (i * fs)
|
||||
|
Loading…
Reference in New Issue
Block a user