Use One-Time Initialization for glyph run caching to avoid duplicate glyph run genera...
[gdipp.git] / gdipp_config / client_config_static.cpp
blob8ed7d8aea468e7a696e5180bc70e26d1f7322c2c
1 #include "stdafx.h"
2 #include "client_config_static.h"
4 namespace gdipp
7 client_config_static::gamma_static::gamma_static()
8 : red(client_config::GAMMA_RED),
9 green(client_config::GAMMA_GREEN),
10 blue(client_config::GAMMA_BLUE)
14 client_config_static::shadow_static::shadow_static()
15 : offset_x(client_config::SHADOW_OFFSET_X),
16 offset_y(client_config::SHADOW_OFFSET_Y),
17 alpha(client_config::SHADOW_ALPHA)
21 client_config_static::client_config_static()
22 : painter(client_config::PAINTER),
23 pixel_geometry(client_config::PIXEL_GEOMETRY)
27 void client_config_static::parse(const config &cfg)
29 gamma.red = cfg.get_number(L"/gdipp/client/paint/gamma/red/text()", gamma.red);
30 gamma.green = cfg.get_number(L"/gdipp/client/paint/gamma/green/text()", gamma.green);
31 gamma.blue = cfg.get_number(L"/gdipp/client/paint/gamma/blue/text()", gamma.blue);
32 painter = static_cast<client_config::PAINTER_TYPE>(cfg.get_number(L"/gdipp/client/paint/painter/text()", static_cast<int>(painter)));
33 pixel_geometry = static_cast<client_config::PIXEL_GEOMETRY_TYPE>(cfg.get_number(L"/gdipp/client/paint/pixel_geometry/text()", static_cast<int>(pixel_geometry)));
34 shadow.offset_x = cfg.get_number(L"/gdipp/client/paint/shadow/offset_x/text()", shadow.offset_x);
35 shadow.offset_y = cfg.get_number(L"/gdipp/client/paint/shadow/offset_y/text()", shadow.offset_y);
36 shadow.alpha = cfg.get_number(L"/gdipp/client/paint/shadow/alpha/text()", static_cast<int>(shadow.alpha));