@@ -1958,24 +1958,31 @@ function ParseHtml(NOD, XML:TXML_Nod; nodx,nody, lvl:integer; zm1:double; ARgh:s
1958
1958
n1 := n1.Next;
1959
1959
end ;
1960
1960
1961
+ if Bkg<>nil then
1962
+ Bkg.Attribute [' transform' ] := ' translate(' +IntToStr(nodx)+' ,' +IntToStr(nody)+' )' ;
1961
1963
1962
1964
if pos(' valign:' ,fmt)>0 then
1963
1965
begin
1964
1966
// valign="top | middle | bottom | baseline"
1965
1967
1966
1968
if pos(' valign:top' , fmt)> 0 then
1967
1969
begin
1968
- Result := ' <g transform="translate(' +IntToStr(nodx)+' ,' +IntToStr(nody)+' ) scale(' +SvgFloat(ZoomValue)+' )">' + RST.Nodes.xml + ' </g>'
1970
+ Result := ' <g transform="translate(' +IntToStr(nodx)+' ,' +IntToStr(nody)+' ) scale(' +SvgFloat(ZoomValue)+' )">' + RST.Nodes.xml + ' </g>' ;
1969
1971
end
1970
1972
else
1971
1973
if pos(' valign:middle' , fmt)> 0 then
1972
1974
begin
1973
- Result := ' <g transform="translate(' +IntToStr(nodx)+' ,' +IntToStr(nody+(StrToIntDef(NOD.Attribute [' height' ],0 )-round(hgh*ZoomValue)) div 2 )+' ) scale(' +SvgFloat(ZoomValue)+' )">' + RST.Nodes.xml + ' </g>'
1975
+
1976
+ Result := ' <g transform="translate(' +IntToStr(nodx)+' ,' +IntToStr(nody+(StrToIntDef(NOD.Attribute [' height' ],0 )-round(hgh*ZoomValue)) div 2 )+' ) scale(' +SvgFloat(ZoomValue)+' )">' + RST.Nodes.xml + ' </g>' ;
1977
+ if (Bkg<>nil ) and (lvl=1 ) then
1978
+ Bkg.Attribute [' transform' ] := ' translate(' +IntToStr(nodx)+' ,' +IntToStr(nody+(StrToIntDef(NOD.Attribute [' height' ],0 )-round(hgh*ZoomValue)) div 2 )+' )' ;
1974
1979
end
1975
1980
else
1976
1981
if pos(' valign:bottom' , fmt)> 0 then
1977
1982
begin
1978
- Result := ' <g transform="translate(' +IntToStr(nodx)+' ,' +IntToStr(nody+(StrToIntDef(NOD.Attribute [' height' ],0 )-round(hgh*ZoomValue)) )+' ) scale(' +SvgFloat(ZoomValue)+' )">' + RST.Nodes.xml + ' </g>'
1983
+ Result := ' <g transform="translate(' +IntToStr(nodx)+' ,' +IntToStr(nody+(StrToIntDef(NOD.Attribute [' height' ],0 )-round(hgh*ZoomValue)) )+' ) scale(' +SvgFloat(ZoomValue)+' )">' + RST.Nodes.xml + ' </g>' ;
1984
+ if (Bkg<>nil ) and (lvl=1 ) then
1985
+ Bkg.Attribute [' transform' ] := ' translate(' +IntToStr(nodx)+' ,' +IntToStr(nody+(StrToIntDef(NOD.Attribute [' height' ],0 )-round(hgh*ZoomValue)) )+' )' ;
1979
1986
end
1980
1987
end
1981
1988
else
@@ -1987,7 +1994,8 @@ function ParseHtml(NOD, XML:TXML_Nod; nodx,nody, lvl:integer; zm1:double; ARgh:s
1987
1994
if Bkg<>nil then
1988
1995
begin
1989
1996
// Bkg.Attribute['transform'] := 'translate('+IntToStr(nodx)+','+IntToStr(nody)+') scale('+SvgFloat(ZoomValue)+')';
1990
- Bkg.Attribute [' transform' ] := ' translate(' +IntToStr(nodx)+' ,' +IntToStr(nody)+' )' ;
1997
+
1998
+
1991
1999
Result := ' <g>' + bkg.xml + Result + ' </g>' ;
1992
2000
Bkg.Free;
1993
2001
end ;
0 commit comments