G gangwang Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-23 #1 我想在一个有木纹的棋盘上画一个漂亮的棋子,可一直没找到办法,(是不是太苯了):(
H hustmouse Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-23 #4 我手头没有delphi, 但我记得Timage有个透明色的属性, 你的棋子假定是黑,白色,你就可以用红色(当然其他颜色也可以,只要不与 黑,白相同就可以了)作为透明色,做好图片后,放到Timage中, 再显示此Timage就可以了(在棋盘的canvas上) 你试一下,很简单的
我手头没有delphi, 但我记得Timage有个透明色的属性, 你的棋子假定是黑,白色,你就可以用红色(当然其他颜色也可以,只要不与 黑,白相同就可以了)作为透明色,做好图片后,放到Timage中, 再显示此Timage就可以了(在棋盘的canvas上) 你试一下,很简单的
J JohnsonGuo Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #10 CopyMode:=cmSrcAnd; Draw(x,y,MaskBmp); //先画一个Mask位图 CopyMode:=cmSrcPaint; Draw(x,y,Bmp); //再画一个实际要画的位图
CopyMode:=cmSrcAnd; Draw(x,y,MaskBmp); //先画一个Mask位图 CopyMode:=cmSrcPaint; Draw(x,y,Bmp); //再画一个实际要画的位图
W wumeng Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #11 http://www.csdn.net/delphi/ -->图形图像 也许会有帮助.
G gangwang Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #12 JohnsonGuo的方法好象有道理,但我没尝试过,hustmouse的方法对下面的图片不好使, 不过我已经找到一种办法了,我想考一下各位。 下面是一个黑棋子的图片,各位可以试一下 MIME-Version: 1.0 Content-Type: application/octet-stream; name="154b.bmp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="154b.bmp" Qk1eBgAAAAAAADYEAAAoAAAAFwAAABcAAAABAAgAAAAAACgCAADEDgAAxA4AAAAAAAAAAAAAFBMT ABwbGwAdHBwAQkBAACYlJQA8OzsAubi4AK+urgARDg0AGRYVACUiIQB/fHsAhoOCAKekowARDQsA Eg4MABEPDgASE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AAAAP//MwDM/2YA//+ZAP//zABmZv8AZv9m AGb//wD/ZmYA/2b/AP//ZgAhAKUAX19fAHd3dwCGhoYAlpaWAMvLywCysrIA19fXAN3d3QDj4+MA 6urqAPHx8QD4+PgA8Pv/AKSgoACAgIAAAAD/AAD/AAAA//8A/wAAAP8A/wD//wAA////AP39/f39 /f39/f39/f39/f39/f39/f39AP39/f39/f1Je4GEhoRSe3D9/f39/f39AP39/f39Pn3cEdzc3NwJ AtQ5Pv39/f39AP39/f1wLA/c3Nzc3NwC1NDQi3D9/f39AP39/S/c3Nzc3Nzc3AIC1NTQzNBp/f39 AP39ciwR3Nzc3AICAgLU1NTQ0MyLdv39AP39fQ/c3NwCAgLU1NTU1NTU0NAUOf39AP1v3NwCAgLU 1NTQ0NDQ1NTU1NTQ1C/9AP0xG9TU1NDQ0NDQ0NDQ0NTU1NTUHzL9AP040NDQzMzMzMzMzMzQ0NTU 1AICG1L9AP0rxMQFBQUFBQUFzMzQ0NDUAgLc3Fr9AP1gubm8wMTExAUFBczM0NDUAtzc3Cz9AP0u rq6utbzAxMTEBczM0NTUAtzc3Ib9AP07DKOjq7W8wMTEBczM0NQC3NzcEYH9AP1Wog2anqu1vMDE BczM0NQC3NzcDzX9AP397ZeVmKOxucDEBczQ1ALc3Nzc3C/9AP39XJiVmKOuucDEBczQ1ALc3NwP fv39AP39/Y0NnqOuucDEzNDUAtzc3Nwsbv39AP39/U6sDKuxvMAFzNAC3Nzc3Nx0/f39AP39/f1F Xri5wMTM0ALc3NwRLHD9/f39AP39/f39/TXLzNDUAtzcD9w5Tv39/f39AP39/f39/f1FelMsiIeB e2n9/f39/f39AP39/f39/f39/f39/f39/f39/f39/f39AA==
JohnsonGuo的方法好象有道理,但我没尝试过,hustmouse的方法对下面的图片不好使, 不过我已经找到一种办法了,我想考一下各位。 下面是一个黑棋子的图片,各位可以试一下 MIME-Version: 1.0 Content-Type: application/octet-stream; name="154b.bmp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; fil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f39/f39AA==
H hustmouse Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-24 #13 不可能的,只要你的图片中有未使用的颜色,并把它作为透明色,肯定可以完美 的显示出来,不信你把它发给我。
吕 吕雪松 Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-25 #14 其实不要把问题搞复杂,这一类图形擦除、重画、无闪烁问题都要用到双缓冲技术, 也就是你要在内存中保存背景,擦除后再重画出来就行了。
H hustmouse Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-25 #15 to 吕雪松:呵呵,其实你理解错了他的意思,事情不是你想象中的那样。。。
G gangwang Unregistered / Unconfirmed GUEST, unregistred user! 2000-07-25 #16 谢谢 hustmouse 的热心帮助,问题已经解决了