本文整理汇总了C++中GraphicView::Update方法的典型用法代码示例。如果您正苦于以下问题:C++ GraphicView::Update方法的具体用法?C++ GraphicView::Update怎么用?C++ GraphicView::Update使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GraphicView
的用法示例。
在下文中一共展示了GraphicView::Update方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitViewer
void FrameKit::InitViewer () {
Catalog* catalog = unidraw->GetCatalog();
const char* page_w = catalog->GetAttribute(page_width_attrib);
const char* page_h = catalog->GetAttribute(page_height_attrib);
const char* page_cols = catalog->GetAttribute(page_cols_attrib);
const char* page_rows = catalog->GetAttribute(page_rows_attrib);
const char* x_incr = catalog->GetAttribute(grid_x_incr);
const char* y_incr = catalog->GetAttribute(grid_y_incr);
GraphicView* view = (GraphicView*)((FrameEditor*)_ed)->_comp->Create(COMPONENT_VIEW);
((FrameEditor*)_ed)->_comp->Attach(view);
view->Update();
Style* style = Session::instance()->style();
boolean bookgeom = style->value_is_on("bookgeom");
float w = bookgeom ? 700 : Math::round(atof(page_w) * ivinches);
float h = bookgeom ? 906 : Math::round(atof(page_h) * ivinches);
if (page_cols && page_rows) {
int ncols = atoi(page_cols);
int nrows = atoi(page_rows);
if (ncols>0 && nrows>0) {
w = ncols;
h = nrows;
}
}
OverlayPage* page = new OverlayPage(w, h);
Grid* grid = new Grid(w, h, atof(x_incr), atof(y_incr));
grid->Visibility(false);
if (!bookgeom)
((FrameEditor*)_ed)->_viewer = new FrameViewer(_ed, view, page, grid);
else
((FrameEditor*)_ed)->_viewer = new FrameViewer(_ed, view, page, grid, (int) h+1, (int) w+1, Rotated);
}