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; procedure TCanvas.RealizeAntialiasing;
begin begin
if (FAntialiasingMode <> amDontCare) and HandleAllocated then if HandleAllocated then
begin begin
Changing; Changing;
case FAntialiasingMode of case FAntialiasingMode of
amOn: WidgetSet.DCSetAntialiasing(FHandle, True); amOn: WidgetSet.DCSetAntialiasing(FHandle, True);
amOff: WidgetSet.DCSetAntialiasing(FHandle, False); amOff: WidgetSet.DCSetAntialiasing(FHandle, False);
else
WidgetSet.DCSetAntialiasing(FHandle, Boolean(WidgetSet.GetLCLCapability(lcAntialiasingEnabledByDefault)) )
end; end;
Changed; Changed;
end; end;

View File

@ -77,7 +77,9 @@ type
lcApplicationWindow, // Application has a special root window lcApplicationWindow, // Application has a special root window
lcFormIcon, // Forms have icon lcFormIcon, // Forms have icon
lcModalWindow, // native modal windows support 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 type

View File

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