Skip to content

Commit

Permalink
3779: Дефолтный размер шрифта в SAS 11-й
Browse files Browse the repository at this point in the history
  • Loading branch information
zedxxx committed Aug 24, 2021
1 parent 8febd10 commit d86e752
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion PUBLIC/vsagps_public_kml.pas
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ interface
//south: Double; // 37.46543388598137 for LatLonBox
tessellate: Byte; // 0 or 1
textColor: DWORD; // ff000000 for BalloonStyle // for <LabelStyle><color>
tileSize: DWORD; // for ImagePyramid // for <LabelStyle><scale> (double*14)
tileSize: DWORD; // for ImagePyramid // for <LabelStyle><scale> (double*11)
//tilt: Double; // 65.74454495876547
//topFov: Double; // for ViewVolume
visibility: Byte; // 0 or 1
Expand Down
10 changes: 6 additions & 4 deletions PUBLIC/vsagps_public_xml_parser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ function VSAGPS_Parse_BYTE(
{$ifend}

{$if defined(VSAGPS_USE_SOME_KIND_OF_XML_IMPORT)}
function VSAGPS_Parse_Scale14(
function VSAGPS_Parse_LabelScale(
const ADOMNode: IDOMNode;
const ABuffer: PDWORD;
const fs: TFormatSettings
Expand All @@ -408,8 +408,10 @@ function VSAGPS_Parse_Scale14(
Exit;
if VSAGPS_WideString_to_Double(VValue, VResult, fs) then begin
Inc(Result);
if (ABuffer <> nil) then begin
ABuffer^ := Round(VResult*14);
if (ABuffer <> nil) then begin
// http://www.sasgis.org/mantis/view.php?id=3779
// TODO: return scale as absolute Double value
ABuffer^ := Round(VResult*11);
end;
end;
end;
Expand Down Expand Up @@ -1041,7 +1043,7 @@ function VSAGPS_LoadAndParseXML(const pUserObjPointer: Pointer;
end else if WideSameText(V_sub_Name, 'scale') then begin
// scale
if (pData^.kml_data.current_tag = kml_LabelStyle) then begin
if VSAGPS_Parse_Scale14(ASubNode, @(pData^.kml_data.fValues.tileSize), AFS) then begin
if VSAGPS_Parse_LabelScale(ASubNode, @(pData^.kml_data.fValues.tileSize), AFS) then begin
Include(pData^.kml_data.fAvail_params, kml_tileSize);
end;
end else begin
Expand Down

0 comments on commit d86e752

Please sign in to comment.