richedit: Documented paragraph border widths are in points not pixels.

James McKenzie jjmckenzie51 at earthlink.net
Sun Feb 28 12:09:35 CST 2010


Dylan Smith wrote:
> The border widths documented by msdn are in points which are 72 dpi, which
> is not equivalent to pixels (normally 96 dpi). I pre-converted all the
> border widths to 96 dpi resolution since this avoids needed to store
> fractions, and often avoids the need for convertion to the displays
> resolution.
> ---
>  dlls/riched20/editor.h |    2 +-
>  dlls/riched20/paint.c  |   57 ++++++++++++++++++++++-------------------------
>  dlls/riched20/wrap.c   |    2 +-
>  3 files changed, 29 insertions(+), 32 deletions(-)
>   
> ------------------------------------------------------------------------
>
>
Dylan:

git apply complains about whitespace errors:

0001-richedit-Documented-paragraph-border-widths-are-in-p.patch:10:
trailing whitespace.
int ME_GetParaBorderWidth(ME_Context *c, int flags);
0001-richedit-Documented-paragraph-border-widths-are-in-p.patch:35:
trailing whitespace.
/* The documented widths are in points (72 dpi), but converting them to
0001-richedit-Documented-paragraph-border-widths-are-in-p.patch:36:
trailing whitespace.
 * 96 dpi (standard display resolution) avoids dealing with fractions. */
0001-richedit-Documented-paragraph-border-widths-are-in-p.patch:37:
trailing whitespace.
static const struct {unsigned width : 8, pen_style : 4, dble : 1;}
border_details[] = {
0001-richedit-Documented-paragraph-border-widths-are-in-p.patch:38:
trailing whitespace.
  /* none */            {0, PS_SOLID, FALSE},
error: patch failed: dlls/riched20/editor.h:229
error: dlls/riched20/editor.h: patch does not apply
error: patch failed: dlls/riched20/paint.c:461
error: dlls/riched20/paint.c: patch does not apply
error: patch failed: dlls/riched20/wrap.c:522
error: dlls/riched20/wrap.c: patch does not apply

Current git as of this morning.

James McKenzie




More information about the wine-devel mailing list