127
128
if (bbox) d = *bbox;
130
d *= Geom::Scale(Inkscape::Util::Quantity::Convert(1, "px", "in"));
131
d *= Geom::Scale(Inkscape::Util::Quantity::convert(1, "px", "in"));
132
133
float dwInchesX = d.width();
133
134
float dwInchesY = d.height();
194
195
snprintf(buff, sizeof(buff)-1, "Screen=%dx%dpx, %dx%dmm", PixelsX, PixelsY, MMX, MMY);
195
196
GdiComment(hdc, strlen(buff), (BYTE*) buff);
197
snprintf(buff, sizeof(buff)-1, "Drawing=%.1lfx%.1lfpx, %.1lfx%.1lfmm", _width, _height, dwInchesX * Inkscape::Util::Quantity::Convert(1, "in", "mm"), dwInchesY * Inkscape::Util::Quantity::Convert(1, "in", "mm"));
198
snprintf(buff, sizeof(buff)-1, "Drawing=%.1lfx%.1lfpx, %.1lfx%.1lfmm", _width, _height, dwInchesX * Inkscape::Util::Quantity::convert(1, "in", "mm"), dwInchesY * Inkscape::Util::Quantity::convert(1, "in", "mm"));
198
199
GdiComment(hdc, strlen(buff), (BYTE*) buff);
304
305
double scale = sqrt( (p[X]*p[X]) + (p[Y]*p[Y]) ) / sqrt(2);
306
DWORD linewidth = MAX( 1, (DWORD) (scale * style->stroke_width.computed * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI) );
307
DWORD linewidth = MAX( 1, (DWORD) (scale * style->stroke_width.computed * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI) );
308
309
if (style->stroke_linecap.computed == 0) {
309
310
linecap = PS_ENDCAP_FLAT;
340
341
n_dash = style->stroke_dash.n_dash;
341
342
dash = new DWORD[n_dash];
342
343
for (i = 0; i < style->stroke_dash.n_dash; i++) {
343
dash[i] = (DWORD) (style->stroke_dash.dash[i] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
344
dash[i] = (DWORD) (style->stroke_dash.dash[i] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
544
545
Geom::Point p0 = pit->initialPoint();
546
p0[X] = (p0[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
547
p0[Y] = (p0[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
547
p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
548
p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
549
550
LONG const x0 = (LONG) round(p0[X]);
550
551
LONG const y0 = (LONG) round(rc.bottom-p0[Y]);
563
564
//Geom::Point p0 = cit->initialPoint();
564
565
Geom::Point p1 = cit->finalPoint();
566
//p0[X] = (p0[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
567
p1[X] = (p1[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
568
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
569
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
567
//p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
568
p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
569
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
570
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
571
572
//LONG const x0 = (LONG) round(p0[X]);
572
573
//LONG const y0 = (LONG) round(rc.bottom-p0[Y]);
585
586
Geom::Point p2 = points[2];
586
587
Geom::Point p3 = points[3];
588
//p0[X] = (p0[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
589
p1[X] = (p1[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
590
p2[X] = (p2[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
591
p3[X] = (p3[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
592
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
593
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
594
p2[Y] = (p2[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
595
p3[Y] = (p3[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
589
//p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
590
p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
591
p2[X] = (p2[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
592
p3[X] = (p3[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
593
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
594
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
595
p2[Y] = (p2[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
596
p3[Y] = (p3[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
597
598
//LONG const x0 = (LONG) round(p0[X]);
598
599
//LONG const y0 = (LONG) round(rc.bottom-p0[Y]);
716
717
Geom::Point p0 = pit->initialPoint();
718
p0[X] = (p0[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
719
p0[Y] = (p0[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
719
p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
720
p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
721
722
LONG const x0 = (LONG) round(p0[X]);
722
723
LONG const y0 = (LONG) round(rc.bottom-p0[Y]);
733
734
//Geom::Point p0 = cit->initialPoint();
734
735
Geom::Point p1 = cit->finalPoint();
736
//p0[X] = (p0[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
737
p1[X] = (p1[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
738
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
739
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
737
//p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
738
p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
739
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
740
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
741
742
//LONG const x0 = (LONG) round(p0[X]);
742
743
//LONG const y0 = (LONG) round(rc.bottom-p0[Y]);
753
754
Geom::Point p2 = points[2];
754
755
Geom::Point p3 = points[3];
756
//p0[X] = (p0[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
757
p1[X] = (p1[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
758
p2[X] = (p2[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
759
p3[X] = (p3[X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
760
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
761
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
762
p2[Y] = (p2[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
763
p3[Y] = (p3[Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
757
//p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
758
p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
759
p2[X] = (p2[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
760
p3[X] = (p3[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
761
//p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
762
p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
763
p2[Y] = (p2[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
764
p3[Y] = (p3[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
765
766
//LONG const x0 = (LONG) round(p0[X]);
766
767
//LONG const y0 = (LONG) round(rc.bottom-p0[Y]);
828
829
LOGFONTW *lf = (LOGFONTW*)g_malloc(sizeof(LOGFONTW));
829
830
g_assert(lf != NULL);
831
lf->lfHeight = -style->font_size.computed * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI;
832
lf->lfHeight = -style->font_size.computed * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI;
833
834
lf->lfEscapement = rot;
834
835
lf->lfOrientation = rot;
877
878
SetBkMode(hdc, TRANSPARENT);
879
880
Geom::Point p2 = p * tf;
880
p2[Geom::X] = (p2[Geom::X] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
881
p2[Geom::Y] = (p2[Geom::Y] * Inkscape::Util::Quantity::Convert(1, "px", "in") * dwDPI);
881
p2[Geom::X] = (p2[Geom::X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
882
p2[Geom::Y] = (p2[Geom::Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI);
883
884
LONG const xpos = (LONG) round(p2[Geom::X]);
884
885
LONG const ypos = (LONG) round(rc.bottom - p2[Geom::Y]);