lcl: implement setting amDontCare mode for TCanvas. The actual value set is based on WS.GetLCLCapability

git-svn-id: trunk@25416 -
This commit is contained in:
dmitry 2010-05-15 11:32:32 +00:00
parent 6544ff1533
commit 403c0fde87
3 changed files with 8 additions and 2 deletions

View File

@ -166,12 +166,14 @@ end;
procedure TCanvas.RealizeAntialiasing;
begin
if (FAntialiasingMode <> amDontCare) and HandleAllocated then
if HandleAllocated then
begin
Changing;
case FAntialiasingMode of
amOn: WidgetSet.DCSetAntialiasing(FHandle, True);
amOff: WidgetSet.DCSetAntialiasing(FHandle, False);
else
WidgetSet.DCSetAntialiasing(FHandle, Boolean(WidgetSet.GetLCLCapability(lcAntialiasingEnabledByDefault)) )
end;
Changed;
end;

View File

@ -77,7 +77,9 @@ type
lcApplicationWindow, // Application has a special root window
lcFormIcon, // Forms have icon
lcModalWindow, // native modal windows support
lcDragDockStartOnTitleClick // ability to start drag/dock events on title bar click
lcDragDockStartOnTitleClick,// ability to start drag/dock events on title bar click
lcAntialiasingEnabledByDefault
// is amDontCare = amOn for the widgetset
);
type

View File

@ -1155,6 +1155,8 @@ begin
lcApplicationTitle,
lcFormIcon:
Result := LCL_CAPABILITY_NO;
lcAntialiasingEnabledByDefault:
Result := LCL_CAPABILITY_YES;
else
Result := inherited;
end;