logo       

Sponsor
FREE Network Mapping Tool for Microsoft® Office Visio® Professional 2007
Don't map your network by hand - let LANsurveyor Exx press for Microsoft Visio Professional 2007 automatically create network diagrams for you!

Re: A simple question on XCBGCFunction (when value[0] = XCBGXxor): msg#00107

freedesktop.xcb

Subject: Re: A simple question on XCBGCFunction (when value[0] = XCBGXxor)

Oh, and the other thing you need is an XCBFlush(c) after your drawing commands.

Ian

On May 18, 2006, at 8:02 AM, Ian Osgood wrote:

Hi, Osmo!

I was not able to get this to work unless I used XCBLineStyleDoubleDash. Then xor did the right thing. You can also verify this behavior using the "xgc" app.

Dashed lines have very complex behavior, which seems to be affected by many GC params, including Function, Foreground, Background, LineStyle, LineWidth, DashOffset, DashList, and Stipple. I'm not sure what the best combination is for this kind of interactive bounding box.

(BTW, you want to use XCBCoordModeOrigin below.)

Ian

On May 18, 2006, at 2:04 AM, Osmo Maatta wrote:

Hello,

I try to create a GC (graphic context) to draw some rubber lines using the XOR pen.

I do this:

XCBGCONTEXT sel_rect;
....

sel_rect = XCBGCONTEXTNew (c);
mask = XCBGCFunction | XCBGCForeground | XCBGCLineStyle | XCBGCGraphicsExposures;
values[0] = XCBGXxor; values[1] = screen->black_pixel;
values[2] = XCBLineStyleOnOffDash;
values[3] = 0;
XCBCreateGC (c, sel_rect, win, mask, values);


and later in

case XCBExpose:
{
printf("Debug expose\n");

XCBPolyRectangle (c, win, sel_rect, 2, rectangles);
XCBPolyLine (c, CoordModeOrigin, win, sel_rect, 4, polyline);

break;
}
---------------------------------
But it does not draw anything. Only the debug line appears on the console.
-------------------

I have even tried with XCBGXcopy value as XCBGCFunction.

values[0] = XCBGXcopy;
Xlib manual says that GXcopy is the default GCFunction. I suppose it's the same in XCB.
But it does not work.

It works (draws lines in a window) if I remove XCBGCFunction from the mask and remove the value[0]= line.
How to use the values for XCBGCFunction mask ?
-------------------------------------------------------------------

I follow this tutorial
http://www.iecn.u-nancy.fr/~torri/files/xcb/doc/

Many TIA.
Osmo

_______________________________________________
Xcb mailing list
Xcb-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@xxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/xcb


_______________________________________________
Xcb mailing list
Xcb-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@xxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/xcb






Only community members can participate in forum threads. You must Register or log in to contribute.

<Prev in Thread] Current Thread [Next in Thread>
Sponsor
FREE Network Mapping Tool for Microsoft® OfficeVisio Professional 2007
Don't map your network by hand - let LANsurveyor Express for Microsoft Visio Professional 2007
automatically create network diagrams for you!
Google Custom Search

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation

Home | sitemap | advertise | OSDir is an inevitable website. super tiny logo