59e13a3f06
* Simplified the subpixel related methods for the AGG "pixel format" template interface, the ones for the solid cover simply pass through the existing methods, so only one subpixel blending function is left which does the actual work (this removes a lot of the previously added code) * Implemented a new rasterizer based on the original AGG rasterizer which implements subpixel anti-aliasing for any generic AGG vector pipelines. It is now optionally used in Painter and AGGTextRenderer (for vector fonts, ie rotated, sheared or big enough fonts) depending on the global subpixel setting. * Put all subpixel variables into the new GlobalSubpixelSettings.h|cpp * Simplified DesktopSettings related classes a bit and renamed previous FontSubpixelAntialiasing to just SubpixelAntialiasing. * The private libbe functions for subpixel related settings moved from Font.cpp to InterfaceDefs.cpp where other such functions live. They are not related to fonts only anymore. * Removed the subpixel related settings again from the Fonts preflet and added them to the Appearance preflet instead. All of the above implements subpixel anti-aliasing on a global scale, which to my knowledge no other OS is doing at the moment. Any vector rendering can optionally use subpixel anti-aliasing in Haiku now. The bitmap cached fonts are still affected by the Freetype complile time #define to enable the patented subpixel rasterization (three times wide glyphs). Vector fonts and shapes are not affected though at the moment. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26755 a95241bf-73f2-0310-859d-f6bbb57e9c96
93 lines
2.2 KiB
C++
93 lines
2.2 KiB
C++
/*
|
|
* Copyright 2001-2007, Haiku.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Axel Dörfler, axeld@pinc-software.de
|
|
* Andrej Spielmann, <andrej.spielmann@seh.ox.ac.uk>
|
|
*/
|
|
#ifndef DESKTOP_SETTINGS_H
|
|
#define DESKTOP_SETTINGS_H
|
|
|
|
|
|
#include <InterfaceDefs.h>
|
|
#include <Menu.h>
|
|
#include <Message.h>
|
|
|
|
class Desktop;
|
|
class DesktopSettingsPrivate;
|
|
class ServerFont;
|
|
|
|
|
|
static const int32 kMaxWorkspaces = 32;
|
|
|
|
enum {
|
|
kAllSettings = 0xff,
|
|
kWorkspacesSettings = 0x01,
|
|
kFontSettings = 0x02,
|
|
kAppearanceSettings = 0x04,
|
|
kMouseSettings = 0x08,
|
|
kDraggerSettings = 0x10,
|
|
};
|
|
|
|
class DesktopSettings {
|
|
public:
|
|
DesktopSettings(Desktop* desktop);
|
|
|
|
status_t Save(uint32 mask = kAllSettings);
|
|
|
|
void GetDefaultPlainFont(ServerFont& font) const;
|
|
void GetDefaultBoldFont(ServerFont& font) const;
|
|
void GetDefaultFixedFont(ServerFont& font) const;
|
|
|
|
void GetScrollBarInfo(scroll_bar_info& info) const;
|
|
void GetMenuInfo(menu_info& info) const;
|
|
|
|
mode_mouse MouseMode() const;
|
|
bool FocusFollowsMouse() const;
|
|
|
|
bool ShowAllDraggers() const;
|
|
|
|
int32 WorkspacesCount() const;
|
|
const BMessage* WorkspacesMessage(int32 index) const;
|
|
|
|
rgb_color UIColor(color_which which) const;
|
|
|
|
bool SubpixelAntialiasing() const;
|
|
bool Hinting() const;
|
|
uint8 SubpixelAverageWeight() const;
|
|
bool IsSubpixelOrderingRegular() const;
|
|
|
|
protected:
|
|
DesktopSettingsPrivate* fSettings;
|
|
};
|
|
|
|
class LockedDesktopSettings : public DesktopSettings {
|
|
public:
|
|
LockedDesktopSettings(Desktop* desktop);
|
|
~LockedDesktopSettings();
|
|
|
|
void SetDefaultPlainFont(const ServerFont& font);
|
|
void SetDefaultBoldFont(const ServerFont& font);
|
|
void SetDefaultFixedFont(const ServerFont& font);
|
|
|
|
void SetScrollBarInfo(const scroll_bar_info& info);
|
|
void SetMenuInfo(const menu_info& info);
|
|
|
|
void SetMouseMode(mode_mouse mode);
|
|
|
|
void SetShowAllDraggers(bool show);
|
|
|
|
void SetUIColor(color_which which, const rgb_color color);
|
|
|
|
void SetSubpixelAntialiasing(bool subpix);
|
|
void SetHinting(bool hinting);
|
|
void SetSubpixelAverageWeight(uint8 averageWeight);
|
|
void SetSubpixelOrderingRegular(bool subpixelOrdering);
|
|
|
|
private:
|
|
Desktop* fDesktop;
|
|
};
|
|
|
|
#endif /* DESKTOP_SETTINGS_H */
|