Thread (2 messages) flat view 2 messages, 2 authors, 2002-08-22

Re: drawings ops structures

From: James Simmons <hidden>
Date: 2002-08-22 17:45:09

Then I start to wonder ...
  - why are dx and dy in struct fb_image of type __u16, while they are of type
   __u32 in struct fb_copyarea and struct fb_fillrect?
  - why is the order of the fields different for each structure?
    Wouldn't it be better to always use the same order for the common fields,
    e.g.

	__u32 dx;
	__u32 dy;
	__u32 width;
	__u32 height;
I cleaned it up. We have now:

struct fb_copyarea {
        __u32 sx;       /* screen-relative */
        __u32 sy;
        __u32 dx;
        __u32 dy;
        __u32 width;
        __u32 height;
};

struct fb_fillrect {
        __u32 dx;       /* screen-relative */
        __u32 dy;
        __u32 width;
        __u32 height;
        __u32 color;
        __u32 rop;
};

struct fb_image {
        __u32 dx;       /* Where to place image */
        __u32 dy;
        __u32 width;    /* Size of image */
        __u32 height;
        __u32 fg_color; /* Only used when a mono bitmap */
        __u32 bg_color;
        __u8  depth;    /* Dpeth of the image */
        char  *data;    /* Pointer to image data */
};



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help