Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!alberta!edson!news From: jpenne@ee.ualberta.ca (Jerry Penner) Newsgroups: comp.graphics Subject: Re: Hexagonal bit maps Message-ID: <1991Jan14.073308.10370@ee.ualberta.ca> Date: 14 Jan 91 07:33:08 GMT References: <26275@uflorida.cis.ufl.EDU> <1942@umriscc.isc.umr.edu> Sender: news@ee.ualberta.ca Organization: University of Alberta Electrical Engineering Lines: 27 In article <26275@uflorida.cis.ufl.EDU> jdb@reef.cis.ufl.edu (Brian K. W. Hook) writes: > > 0011111100 > 0111111110 > 1111111111 > 0111111110 > 0011111100 [ How to draw hexagonal bitmaps? ] Well, What you do is make a bitmap that has 1 bits everywhere you want your hexagonal pattern to show through (ie. just like your example hexagon.) This I will call MASK. Your image I will call IMAGE. The data already on the screen I will call SCREEN. for each screen byte to modify get SCREEN xor IMAGE and MASK xor SCREEN now the screen data is put where mask == 0 and image data goes where mask == 1 put SCREEN Have fun. -- ------------- Jerry Penner alberta!bode!jpenne Edmonton, Alberta, Canada