本文来自:http://en.wikipedia.org/wiki/BitBLT

Bit blit

From Wikipedia, the free encyclopedia

(Redirected from BitBLT )
Jump to: navigation , search

Bit blit (bitblt, blitting etc.) is a computer graphics operation in which several bitmap patterns are combined into one using a "raster operator".

Contents

[hide]

  • 1 Origins
  • 2 Bit blit techniques and uses
  • 3 Blitting vs. sprites
  • 4 See also
  • 5 External links

<script type="text/javascript"> // </script>

[edit] Origins

The name derives from the BitBLT machine instruction for the Xerox Alto computer, standing for "Bit Block Transfer". This operation was created by Diana Merry at Xerox PARC for the Smalltalk-72 system. For the Smalltalk-74 system, Dan Ingalls implemented a redesigned version in microcode.

The development of fast methods for various bit blit operations was key in the evolution of computer displays from using character graphics, to using bitmap graphics for everything. Machines that rely heavily on the performance of 2D graphics (such as video game consoles) come with a special-purpose chip called a blitter.

[edit] Bit blit techniques and uses

A classic use for blitting is to render transparent sprites onto a background. It is usually not feasible to go through every pixel and find out if it needs to be displayed, due to considerations of speed. For example, if we have the following background image:

and wish to display various sprites on top of it representing, for example, objects within a game to produce this:

What first is needed are the bitmaps for the sprites and the corresponding masks. The colours are very important as the sprite background and the mask foreground are black, stored in binary as 0's. The mask background is white, stored in binary as 1's.

The first blit uses the raster operator of AND with the background and the mask of the sprites. Because any value ANDed with 0 equals 0, and any value ANDed with 1 is unchanged, we can create black areas where the actual sprites will appear, and leave the rest of the background alone.

The second blit uses the raster operator of OR with the altered background and the actual sprite. Because any value OR'd with 0 is unchanged, the background is unaffected and the black areas are filled with the actual sprite image.

It is also possible to achieve the same effect using a sprite with a white background and a white-on-black mask. In this case, the mask would be ORed first, and the sprite ANDed next.

[edit] Blitting vs. sprites

Blitting is similar to hardware-sprite drawing, in that both systems reproduce a pattern, typically a square area, at different locations on the screen. Sprites have the advantage of being stored in separate memory, and therefore don't disturb the main display memory. This allows them to be moved about the display, covering the "background", with no effect on it.

Blitting moves the same types of patterns about the screen, but does so by writing into the same memory as the rest of the display. This means every time the pattern is placed on the screen, the display "under" it is overwritten, or "damaged". It is up to the software to clean this damage up by blitting twice, once to remove the damage, and then again to place the bit in its new location. However, there are several ways to optimize this. If large areas of the screen are taken over by the patterns, it may be more efficient to blit the background to the screen instead of erasing each pattern individually. A variation involves dividing the screen into segments and erasing only the segments where patterns have been drawn on. This technique is known as dirty rectangles.

As one might imagine, this makes blitting significantly slower than sprite manipulation. However blitting has one very big advantage: there's no physical limit to the number of patterns you can blit, or to the size of the patterns. Thus you can use blitting to display anything on the screen, including simulating sprites (through the double-write pattern noted above), or even text.

[edit] See also

  • Block-transfer instruction
  • Blitter

[edit] External links

  • Dan Ingall's November 19th 1975 BitBLT memo
  • Alan Kay. "The Early History of Smalltalk." 1993.
  • A BitBlt explanation
Retrieved from " http://en.wikipedia.org/wiki/Bit_blit "

Category: Computer graphics

Bit blit----From Wikipedia相关推荐

  1. craigslist_Craigslist,Wikipedia和丰富经济

    craigslist You've heard it before. Maybe you've even said it. "There's no such thing as a free ...

  2. 父爱动画代码python_pygame用blit()实现动画效果的示例代码

    pygame的的实现动画的方法有很多,但是都是围绕着表面进行的,也就是说实现动画的方式不同,但是本质其实都是对表面的不同处理方式而已. 原理其实很简单,有点像我们做地铁的时候隧道里的广告一样.我们设置 ...

  3. NLP之word2vec:利用 Wikipedia Text(中文维基百科)语料+Word2vec工具来训练简体中文词向量

    NLP之word2vec:利用 Wikipedia Text(中文维基百科)语料+Word2vec工具来训练简体中文词向量 目录 输出结果 设计思路 1.Wikipedia Text语料来源 2.维基 ...

  4. Large-Scale Named Entity Disambiguation Based on Wikipedia Data

    Large-Scale Named Entity Disambiguation Based on Wikipedia Data 基于维基百科数据的大规模命名实体消岐 1.引言 1.1. 概念 实体(e ...

  5. 论文《learning to link with wikipedia》

    learning to link with wikipedia 一.本文目标: 如何自动识别非结构化文本中提到的主题,并将其链接到适当的Wikipedia文章中进行解释. 二.主要借鉴论文: Miha ...

  6. 如果是你你会如何重新设计和定义维基百科(wikipedia)?

    日期:2012-8-11  来源:GBin1.com 最近一家设计公司发布了一个关于如何重新定义和设计维基百科的网站,在这里网站里详细的刨析了如何重新设计维基百科的话,如何做品牌设计和网站设计,整个设 ...

  7. spotify 数据分析_没有数据? 没问题! 如何从Wikipedia和Spotify收集重金属数据

    spotify 数据分析 For many data science students, collecting data is seen as a solved problem. It's just ...

  8. python下雨动画特效_pygame用blit()实现动画效果

    pygame的的实现动画的方法有很多,但是都是围绕着表面进行的,也就是说实现动画的方式不同,但是本质其实都是对表面的不同处理方式而已. 原理其实很简单,有点像我们做地铁的时候隧道里的广告一样.我们设置 ...

  9. 维基百科(wikipedia)数据下载(含地理数据)

    维基百科的资料非常不错,所以准备下载一些下来,本来以为都要自己抓取,但结果维基百科自己开放了所有的数据给你下载,具体可以参见这个页面: 维基百科的开放的态度是出乎我的意料的: 维基百科提供所有完整内容 ...

最新文章

  1. 《几何与代数导引》习题1.35.4
  2. 8种最坑的SQL错误用法,第一个就很坑?
  3. Linux学习(十一)---进程管理
  4. 计算机还是数学竞赛内容吗,除了AMC,数学牛娃还能参加什么高含金量的数学竞赛...
  5. 使用TestNG的弹簧测试支持
  6. 交换机的基本原理配置(一)
  7. 大数据技术之Hadoop3.1.2版本完全分布式部署搭建
  8. solr之搭建企业搜索平台,配置文件详细solrconfig.xml
  9. 池流程图_干货收藏 | Java程序员必备的一些流程图
  10. 我年龄大了还学的动it吗
  11. php正则表达式提取url,php 正则表达式提取图片url程序
  12. 系统学习深度学习(十八)--NIN模型
  13. 堆(基本介绍,代码实现,以及例题)
  14. 嵌入式软件工程师_嵌入式软件工程师适合去芯片公司吗?
  15. PGM学习之四 Factor,Reasoning
  16. 电机速度曲线规划1:梯形速度曲线设计与实现
  17. 图灵奖得主(麦卡锡\霍尔)
  18. 输入法自定义短语笔记/md常用配置/搜狗输入法自定义词库推荐
  19. java实现图灵机器人的接入_调用图灵机器人API实现聊天机器人
  20. 车牌识别 瞬间启动 快速抓拍 超低功耗 的4G智能摄像头方案

热门文章

  1. linux正在等待声音系统响应,linux声音系统较好的解决方案alsa+esd
  2. matlab 利用polyfitpolyval函数进行基线矫正【matlab程序】
  3. DDoS 攻击防御方法
  4. win7命令更新补丁
  5. 基辛格等分享: ChatGPT 预示着一场智能革命,而人类还没有准备好
  6. 运动会分数统计系统(数据结构)C++
  7. HTML5-俄罗斯方块
  8. 进行拨测的主要目的都有哪些?
  9. 人人都来写算法 之 插入排序
  10. 【考试记录】Apsara Clouder基础技能认证:阿里巴巴编码规范(Java)