• 1.摘要
  • 2.基本信息
  • 3.基本内容

getaspectratio

getaspectratio的功能是返回当前图形模式的纵横比。

基本信息

  • 外文名

    getaspectratio

  • 性质

    科学

  • 类别

    计算机学

  • 属于

    编程函数

基本内容

函数名: getaspectratio

功 能: 返回当前图形模式的纵横比

用 法: void far getaspectratio(int far *xasp, int far *yasp);

程序例:

#include <graphics.h>

#include

#include

#include

int main(void)

{

/* request auto detection */

int gdriver = DETECT, gmode, errorcode;

int xasp, yasp, midx, midy;

/* initialize graphics and local variables */

initgraph(&gdriver, &gmode, "");

/* read result of initialization */

errorcode = graphresult();

/* an error occurred */