导航:  GdiPlus Classes > GdiPlus Classes > CGpGraphics Class > Graphics Object >

Constructor (Image)

上一页返回章节概述下一页

描述

 

创建一个Graphics对象与指定设备上下文关联.

 

C++ Syntax

 

Graphics(

[in]  Image* image

);

 

FreeBASIC 语法

 

CONSTRUCTOR CGpGraphics (BYVAL pImage AS CGpImage PTR)

 

参数

 

pImage

 

[in]指针指向一个Image对象将与新Graphics对象关联.

 

备注

 

如果Image对象是基于图元文件,打开此构造函数失败.的Image(文件)和Metafile(文件)构造函数打开文件阅读.为记录打开图元文件,使用Metafile构造函数接收设备上下文句柄.

如果图像使用下列像素格式之一,此构造函数也会失败:

PixelFormatUndefined

PixelFormatDontCare

PixelFormat1bppIndexed

PixelFormat4bppIndexed

PixelFormat8bppIndexed

PixelFormat16bppGrayScale

PixelFormat16bppARGB1555

 

引用文件

 

CGpBitmap.inc (include CGdiPlus.inc)