Commit Graph

130 Commits

Author SHA1 Message Date
Birunthan Mohanathas
d1d47b384e Add project directory to AdditionalIncludeDirectories to fix IntelliSense warning for StdAfx.h includes in subdirectories 2014-01-05 13:23:05 +02:00
Birunthan Mohanathas
76b2ce47bc Common: Use PCH 2014-01-05 13:21:23 +02:00
Birunthan Mohanathas
82d753891f Move Gfx code into Common project 2014-01-05 12:52:36 +02:00
Birunthan Mohanathas
7164dddefd Disable copy constructors and copy assignment operators 2014-01-05 12:07:22 +02:00
Birunthan Mohanathas
27164b8e75 Rename EscapeUrl to EncodeUrl 2014-01-04 21:47:45 +02:00
Birunthan Mohanathas
cf62c509a1 Add support for [Measure:EscapeUrl] to perform URL encoding 2014-01-04 19:19:10 +02:00
Birunthan Mohanathas
9b5871f4dc Move EscapeRegExp into StringUtil 2014-01-04 19:17:41 +02:00
Birunthan Mohanathas
a78de13d7b Remove unnecessary includes 2013-12-24 11:52:28 +00:00
Birunthan Mohanathas
da92def9fc Define WIN32_LEAN_AND_MEAN globally 2013-12-24 11:20:19 +00:00
Birunthan Mohanathas
c196396ad0 Unignore and fix warnings elsewhere 2013-12-23 19:44:42 +00:00
Birunthan Mohanathas
106e1664c3 Revert changes to TextFormatD2D_Test.cpp in 729b145 2013-12-23 16:20:45 +00:00
Birunthan Mohanathas
729b145653 Fix assert parameter order in tests 2013-12-23 16:19:19 +00:00
Birunthan Mohanathas
dd38ed10e9 MathParser: Use std::trunc instead of custom implementation 2013-12-23 16:09:18 +00:00
Birunthan Mohanathas
9e5a1f4a8f MathParser: Add namespace blocks to avoid issues like 223231f 2013-12-23 16:05:15 +00:00
jsmorley
223231f96e Calc: Rename round to round2 for VS2013 compatibility 2013-12-23 01:53:47 -05:00
jsmorley
d804b4a5c1 Common: Rename trunc in MathParser.cpp to trunc2 for VS2013 compatibility 2013-11-29 11:41:12 -05:00
Birunthan Mohanathas
3cfdc8c0b3 Gfx: Add missing HRESULT check 2013-11-24 15:43:37 +02:00
Birunthan Mohanathas
1be1381e7b Common: Add Timer.h 2013-11-06 15:54:17 +02:00
Birunthan Mohanathas
e1872e67bb Move .props files to Build\VS\ 2013-11-03 20:18:42 +02:00
Birunthan Mohanathas
3d9a605117 Gfx: Fix incorrect IID to DWriteCreateFactory (IDWriteFactory instead of IDWriteFactory1) 2013-11-02 18:13:50 +02:00
Birunthan Mohanathas
f99418dd2d Enable /LTCG to go along with ab431fa 2013-10-20 22:14:55 +03:00
Birunthan Mohanathas
ca41a4575c Gfx: Handle failed creation of D2D text layout 2013-10-15 17:09:41 +03:00
Birunthan Mohanathas
6d243711a6 Gfx: Fix D2D crash with negative width/height on String meters 2013-10-15 17:09:40 +03:00
Birunthan Mohanathas
67948705f4 Gfx: Improve D2D compatibility with GDI+ with zero height text when calculating lines 2013-10-08 20:15:36 +03:00
Brian Ferguson
35f2e1591e Gfx: Fix non-zero height for empty strings with D2D
http://rainmeter.net/forum/viewtopic.php?p=92801
2013-10-08 20:10:57 +03:00
Birunthan Mohanathas
15c65384f6 Gfx: Try to load D2D only on Win7+ 2013-10-06 19:14:32 +03:00
Birunthan Mohanathas
2fb733ef75 Gfx: Remove __D2DParams 2013-10-06 17:07:00 +03:00
Birunthan Mohanathas
6df7d5d509 Add "Use D2D rendering" option to skin context menu 2013-10-06 10:57:24 +03:00
Birunthan Mohanathas
21d9c0698f Gfx: Additional changes to d003db6 2013-09-29 17:57:21 +03:00
Birunthan Mohanathas
d003db6531 Gfx: Add __D2DParams option to allow testing D2D text rendering options 2013-09-29 11:28:28 +03:00
Birunthan Mohanathas
c1aa191235 Gfx: Use GDI+ instead of D2D when drawing scaled images 2013-09-28 17:51:42 +03:00
Birunthan Mohanathas
61bcb92dee Gfx: Make D2D draw lines if they will be clipped by at most 2 pixels 2013-08-12 18:52:51 +03:00
Birunthan Mohanathas
db9e220207 Gfx: Minor tweaks 2013-08-12 18:51:27 +03:00
Birunthan Mohanathas
12e0564f3e Gfx: Avoid clipping with D2D when not needed 2013-08-12 18:50:24 +03:00
Birunthan Mohanathas
a8467674fe Add missing file in 79b9af3 2013-08-11 14:31:16 +03:00
Birunthan Mohanathas
79b9af3320 Common: Add UnitTest.h 2013-08-11 14:29:07 +03:00
Birunthan Mohanathas
0afbdac9fe Gfx: Add some tests for TextFormatD2D 2013-08-11 14:12:23 +03:00
Birunthan Mohanathas
180adbc759 Gfx: Fix text Y position for D2D with vertical Center/Bottom alignments 2013-08-11 11:42:23 +03:00
Birunthan Mohanathas
027feabf86 Gfx: Make bottom overhanging characters visible with D2D 2013-08-10 17:01:48 +03:00
Birunthan Mohanathas
b8333dc66d Gfx: Fix clipping with D2D when a transformation has been applied 2013-08-10 16:58:30 +03:00
Birunthan Mohanathas
42e8d5ee22 Gfx: Additional changes to 56218f7 2013-08-10 15:29:09 +03:00
Birunthan Mohanathas
56218f7af4 Gfx: Improve line trimming with D2D when one line is visible 2013-08-10 15:26:50 +03:00
Birunthan Mohanathas
34abccc29b Gfx: Check for errors in TextFormatD2D::SetProperties 2013-08-10 15:25:36 +03:00
Birunthan Mohanathas
2e2ced7403 Gfx: Additional change to 6e04fd9 2013-08-10 14:14:02 +03:00
Birunthan Mohanathas
aa4c4a6dfc Gfx: Make AccurateText=1 more consistent with GDI+ for D2D when a newline character is the last character of the text 2013-08-10 13:58:54 +03:00
Birunthan Mohanathas
6e04fd983f Gfx: Make AccurateText=0 more consistent with GDI+ for D2D
The height is now based on a formula that should be exactly equal to that provided by GDI+. The padding should now be equal on the left and right sides now. There may be some discrepancies in overall width, but it should always be reasonably to close to GDI+.

In addition, this makes D2D behavior match GDI+ when a newline character is the last character of the text.
2013-08-10 13:54:53 +03:00
Birunthan Mohanathas
63f5eed742 Fix build bustage caused by 38ec6c3 2013-08-10 13:13:04 +03:00
Birunthan Mohanathas
616f986181 Gfx: Make D2D clip text that overflows the bounding box similarly to GDI+ 2013-08-10 12:13:59 +03:00
Birunthan Mohanathas
38ec6c3832 Gfx: Fix incorrect text X-position for StringAlign=Center with D2D 2013-08-10 12:08:15 +03:00
Birunthan Mohanathas
21f5ff1303 Gfx: Fix incorrect text height/width with D2D in some cases due to typo 2013-08-10 12:03:40 +03:00