[Shell编程] C语言中0x13模式下的画线画圆椭圆函数

[复制链接]
发表于 2022-9-23 23:25:02
C语言中的graphics图形函数库尽管好用,但效率太低,作出的动画常常有闪动景象,如果在0x13模式下直接使用写屏的方法画图,作用会大大提高。这是用图形学的算法和抄来的写屏技术,写出来的画直线、圆和椭圆的函数,其它的有待各位添加。说明:1、在主函数中需要调用Set_Video_Mode(0x13)初始化0x13图形模式(320
200),然后即可使用函数画图。2、Pixel画点可用函数实现,为提高效率,使用宏。(但画线函数未用到,直接用指针注入)。3、三个函数分别为Line、Circle、Ellipse,分别为库函数的首字母大写。4、画直线有水平、竖直、任意三种,分别用Horizontal_Line、Verticle_Line、BLine三个函数实现,为实现用户接口最简化准则,在将这三个函数都放在Line函数中,程序员不用回忆过多函数名。详细函数见附件。
C语言中0x13模式下的画线Line画圆Circle椭圆Ellipse函数.txt

(Although the graphics function library in C language is easy to use, its efficiency is too low, and the animations made often flicker. This is the function of drawing straight lines, circles and ellipses using graphics algorithms and copied screen writing techniques, and others are to be added by you. Description: 1. In the main function, you need to call Set_Video_Mode(0x13) to initialize the 0x13 graphics mode (320
200), and then you can use the function to draw. 2. Pixel drawing points can be implemented with functions. To improve efficiency, use macros. (But the line drawing function is not used, and the pointer is injected directly). 3. The three functions are Line, Circle, and Ellipse, which are the capital letters of the library functions. 4. There are three types of straight lines, horizontal, vertical, and arbitrary, which are implemented with three functions, Horizontal_Line, Vertical_Line, and BLine. In order to achieve the most simplified criterion for the user interface, these three functions are placed in the Line function, and the programmer does not need to Remember too many function names. See the attachment for detailed functions.
Line drawing Line drawing circle Circle Ellipse Ellipse function in 0x13 mode in C language.txt)

[下载]23250176770.rar




上一篇:XML详细的学习资料
下一篇:高质量C++编程 林锐

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表