git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6253 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-03-17 23:49:56 +00:00
parent 32c6021fc8
commit 45b89294c8

View File

@ -134,6 +134,7 @@ const
SUBFONT_DIVISOR = 100; SUBFONT_DIVISOR = 100;
ARROW_LINE: array[boolean] of char = ('-', '='); ARROW_LINE: array[boolean] of char = ('-', '=');
ESCAPE_CHAR = '\'; ESCAPE_CHAR = '\';
HYDRATE_DOT = #$E2#$80#$A2;
function ChemTextHeight(ACanvas: TCanvas; const AText: String; function ChemTextHeight(ACanvas: TCanvas; const AText: String;
Arrow: TChemArrow = caAsciiSingle): Integer; Arrow: TChemArrow = caAsciiSingle): Integer;
@ -314,6 +315,12 @@ begin
subNos := false; subNos := false;
end; end;
'.':
begin
subNos := false;
DrawNormal(X, Y, HYDRATE_DOT);
end;
ESCAPE_CHAR: ESCAPE_CHAR:
escaping := true; escaping := true;
@ -321,7 +328,7 @@ begin
begin begin
j := i+1; j := i+1;
while (j <= Length(AText)) and while (j <= Length(AText)) and
not (AText[j] in ['0'..'9', '+', '-', '<', ESCAPE_CHAR]) not (AText[j] in ['0'..'9', '+', '-', '<', '.', ESCAPE_CHAR])
do do
inc(j); inc(j);
s := Copy(AText, i, j-i); s := Copy(AText, i, j-i);