Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!amdahl!oliveb!sun!david@sun.com From: david@sun.com (Pixrects are *EVIL*) Newsgroups: comp.windows.x Subject: Re: How do I dynamically convert Sun Pixrects to X Pixmaps? Message-ID: <90163@sun.uucp> Date: 16 Feb 89 22:41:48 GMT References: <242@tityus.UUCP> Sender: david@sun.uucp Lines: 21 In article <242@tityus.UUCP> jim@athsys.uucp (Jim Becker) writes: > ximage->bitmap_pad = 16; > ximage->bytes_per_line = (w + 7) / 8; Here are the memory pixrect padding rules for various SunOS releases: release architecture width padding ------- ------------ ----- ------- all Sun-2 all 16 bit <= 3.5 Sun-3 all 16 bit >= 4.0 Sun-3 2 bytes 16 bit >= 4.0 Sun-3 >= 4 bytes 32 bit all Sun-4 2 bytes 16 bit all Sun-4 >= 4 bytes 32 bit You should always use mpr_mdlinebytes(pr) instead of computing bytes_per_line from pr->pr_width. For details refer to the (4.0) pixrect manual. -- David DiGiacomo, Sun Microsystems, Mt. View, CA sun!david david@sun.com