Exemple #1
0
def LineTo(hd, size, value):
    vn = {0: "X", 1: "Y"}
    for i in range(2):
        add_iter(hd, vn[i],
                 "%.2f" % struct.unpack("<d", value[i * 9 + 1:i * 9 + 9]),
                 i * 9 + 1, 8, "<d")
    if len(value) > 20:
        vsdblock.parse5(hd, size, value, 20)
Exemple #2
0
def XForm1D(hd, size, value):
    vn = {0: "BeginX", 1: "BeginY", 2: "EndX", 3: "EndY"}
    for i in range(4):
        add_iter(hd, vn[i],
                 "%.2f" % struct.unpack("<d", value[i * 9 + 1:i * 9 + 9]),
                 i * 9 + 1, 8, "<d")
    if len(value) > 0x26:
        vsdblock.parse5(hd, size, value, 0x26)
Exemple #3
0
def MoveTo (hd, size, value):
	vn = {0:"X",1:"Y"}
	off = 0
	if ord(value[0]) < 32:
		off += 1
	for i in range(2):
		add_iter (hd, vn[i], "%.2f"%struct.unpack("<d",value[i*9+1+off:i*9+9+off]),i*9+1+off,8,"<d")
	if len(value) > 20:
		vsdblock.parse5(hd, size, value, 20)
Exemple #4
0
def MoveTo(hd, size, value):
    vn = {0: "X", 1: "Y"}
    off = 0
    if ord(value[0]) < 32:
        off += 1
    for i in range(2):
        add_iter(
            hd, vn[i], "%.2f" %
            struct.unpack("<d", value[i * 9 + 1 + off:i * 9 + 9 + off]),
            i * 9 + 1 + off, 8, "<d")
    if len(value) > 20:
        vsdblock.parse5(hd, size, value, 20)
Exemple #5
0
def TextField(hd, size, value):
    if len(value) > 0xe:
        vsdblock.parse5(hd, size, value, 0xe)
Exemple #6
0
def Misc(hd, size, value):
    if len(value) > 17:
        vsdblock.parse5(hd, size, value, 17)
Exemple #7
0
def LineTo (hd, size, value):
	vn = {0:"X",1:"Y"}
	for i in range(2):
		add_iter (hd, vn[i], "%.2f"%struct.unpack("<d",value[i*9+1:i*9+9]),i*9+1,8,"<d")
	if len(value) > 20:
		vsdblock.parse5(hd, size, value, 20)
Exemple #8
0
def XForm1D (hd, size, value):
	vn = {0:"BeginX",1:"BeginY",2:"EndX",3:"EndY"}
	for i in range(4):
		add_iter (hd, vn[i], "%.2f"%struct.unpack("<d",value[i*9+1:i*9+9]),i*9+1,8,"<d")
	if len(value) > 0x26:
		vsdblock.parse5(hd, size, value, 0x26)
Exemple #9
0
def TextField (hd, size, value):
	if len(value)>0xe:
		vsdblock.parse5(hd, size, value, 0xe)
Exemple #10
0
def Misc (hd, size, value):
	if len(value) > 17:
		vsdblock.parse5(hd, size, value, 17)