📄 66427
字号:
Path: cantaloupe.srv.cs.cmu.edu!crabapple.srv.cs.cmu.edu!fs7.ece.cmu.edu!europa.eng.gtefsd.com!howland.reston.ans.net!wupost!uunet!math.fu-berlin.de!irz401!irzr17.inf.tu-dresden.de!beckFrom: beck@irzr17.inf.tu-dresden.de (Andre Beck)Newsgroups: comp.windows.xSubject: Re: Drawing colour pixmaps - not rectangularDate: 6 Apr 1993 14:43:59 GMTOrganization: Dept. of Computer Science, TU Dresden, Germany.Lines: 27Distribution: worldMessage-ID: <1ps4vf$msl@irz401.inf.tu-dresden.de>References: <1993Mar31.022947.149@etrog.se.citri.edu.au>Reply-To: Andre_Beck@IRS.Inf.TU-Dresden.DENNTP-Posting-Host: irzr17.inf.tu-dresden.deIn article <1993Mar31.022947.149@etrog.se.citri.edu.au>, jck@catt.citri.edu.au (Justin Kibell) writes:|> I am writing a program which needs to draw colour XPM pixmap files onto a background without having the borders show up. I cannot do xor as the colours all stuff up. I cannot use XCopyPlane() as that is for single planes only. I want to be able to specify a colour in the pixmap to be used as the opaque colour. Is this possible. |> |> Games such as xjewel have the same problem. How does the mouse pointer do it?|> |> Any help would be helpful? :-)|> You wanna do masking. Build a bitmap (pixmap of depth one) where all pixelsyou name "opaque" are 1 (that get copied) and the others are 0. Use thisbitmap as the clip_mask in the gc used for XCopyArea(), and remember toadjust the clip_origin coordinates to the XCopyArea() blit origin.The Mouse pointer (besides from that it is driven using RAMDAC analogmapping on most hardwares) uses a mask, too.But be warned: blitting through a mask and especially moving around this maskis annoying slow on most xservers... it flickers even at 40 MIPS...--+-o-+--------------------------------------------------------------+-o-+| o | \\\- Brain Inside -/// | o || o | ^^^^^^^^^^^^^^^ | o || o | Andre' Beck (ABPSoft) mehl: Andre_Beck@IRS.Inf.TU-Dresden.de | o |+-o-+--------------------------------------------------------------+-o-+
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -