r3 - 13 Aug 2009 - 10:15:36 - YiZhengYou are here: TWiki >  Products Web > MGPlusV12PG > MGPlusArchitecturePGV101Section1

2 体系架构介绍

MGPlus 架构

MGPlusGraphics? 概述

  • MiniGUI 可以通过两种方式来使用 MGPlus:
    • 首先创建好一个内存 DC ,直接把 DC 提供给 MGPlus,MGPlus 直接在该 DC 上进行渲染。
    • 直接使用 MGPlus,完全由 MGPlus 自己来渲染,最后通过接口函数来获取渲染好的 DC。
  • MGPlus 在内部提供一个核心的数据结构 MGPlusGraphics ,该结构包含了图形所有的数据,包括路径、渐变、变化矩阵等渲染所需的信息。该数据结构是不对外公开的,对外只公开一个句柄(指针)。
  • 围绕 MGPlusGraphics 结构,将提供一系列的函数接口来操作,包括初始化、参数修改、各种方式的渲染,以及各种2D 坐标变化(比如线性变化)。
  • MGPlus 包括以下模块:
    • 画笔(pen)
    • 画刷(brush)
    • 路径(path)
    • 转换矩阵(matrix)
    • 图片(image)
    • 字体(font)
    • 文本(text)
  • 在底层,将使用 AGG 的数据和接口来实现。

MGPlus 框架图

  • MGPlus 主要由以上9个大类组成,Graphic 类实现绘制相关的一切操作,包括颜色渐变,颜色组合,抗锯齿等,其他8个大类与 Graphic 是单向关联;
  • Matrix 类与 Path 类,Image 类与 Bitmap 类,Font 类与Text 类是单向关联。

  • mgplus rebuild framework:
    mgplus_framework.jpeg

-- QiJinrong - 19 Jun 2009

Topic attachments
I Attachment Action Size Date Who Comment
jpgjpeg mgplus_framework.jpeg manage 53.6 K 19 Jun 2009 - 14:08 QiJinrong  
Edit | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r3 < r2 < r1 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the Feynman Software and/or the contributing authors. All material on this collaboration platform is the property of Feynman Software and/or the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback