Can cairo work with win32 SetMapMode

"fiveight" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <B5.6F.24368.13403F35@bjzjm-antispam1>
Hi All:

I am using cairo on win7 with MFC.

In OnDraw function, I call SetMapMode with MM_LOMETRIC parameter, like this:

void CCairoWindowView::OnDraw(CDC* pDC)
{
	pDC->SetMapMode(MM_LOMETRIC);
	
	cairo_surface_t* surface =
		cairo_win32_surface_create(pDC->GetSafeHdc());
	cairo_t *cr =
		cairo_create (surface);
	cairo_set_source_rgb (cr, 0.0, 0.0, 1.0);
	double x1 = 0;
	double y1 = 0;
	cairo_device_to_user(cr,&x1,&y1);
	cairo_move_to(cr,x1,y1);
	double x2 = 400;
	double y2 = -400;
	cairo_device_to_user(cr,&x2,&y2);
	cairo_line_to(cr,x2,y2);
	cairo_stroke(cr);
	cairo_destroy(cr);
	cairo_surface_destroy (surface);

}

But there is nothing displayed in client.

Can cairo work with win32 SetMapMode?
 				

        fiveight
        [email protected]
          2014-08-19
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.