当前位置: 首页>>代码示例>>C++>>正文


C++ Label::Translate方法代码示例

本文整理汇总了C++中Label::Translate方法的典型用法代码示例。如果您正苦于以下问题:C++ Label::Translate方法的具体用法?C++ Label::Translate怎么用?C++ Label::Translate使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Label的用法示例。


在下文中一共展示了Label::Translate方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GraphicsInitialize

/*
 * Primordial root object creation and initialization function.  A pointer
 * to this function is passed to the object manager constructor.
 */
void GraphicsInitialize (RefList* root) {
    Picture* pict = new Picture;
    FullGraphic dfault;
	    
    InitPPaint();
    root->Append(new RefList(pict));

    dfault.FillBg(true);
    dfault.SetColors(pblack, pwhite);
    dfault.SetPattern(psolid);
    dfault.SetBrush(psingle);
    dfault.SetFont(pstdfont);

    Line* line = new Line (0, 0, 75, 75, &dfault);
    MultiLine* multiline = new MultiLine (x, y, 6, &dfault);
    BSpline* spline = new BSpline (x, y, 6, &dfault);
    Rect* rect = new Rect (0, 0, 100, 100, &dfault);
    FillRect* frect = new FillRect (0, 0, 100, 100, &dfault);
    Circle* circle = new Circle (0, 0, 50, &dfault);
    FillCircle* fcircle = new FillCircle (0, 0, 50, &dfault);
    Polygon* poly = new Polygon (x, y, 6, &dfault);
    FillPolygon* fpoly = new FillPolygon (x, y, 6, &dfault);
    ClosedBSpline* cspline = new ClosedBSpline (x, y, 6, &dfault);
    FillBSpline* fspline = new FillBSpline (x, y, 6, &dfault);
    Label* label = new Label ("Type 'q' to quit this program.", &dfault);
    Stencil* stencil = new Stencil(new Bitmap(iv_bits, iv_width, iv_height));
    RasterRect* raster = new RasterRect(CreateRaster());

    line->Translate(0, 300);
    multiline->Translate(100, 300);
    spline->Translate(250, 300);
    rect->Translate(100, 150);
    frect->Translate(100, 0);
    circle->Scale(1.0, 0.6);
    circle->Translate(0, 150);
    fcircle->Scale(1.0, 0.6);
    poly->Translate(250, 150);
    fpoly->Translate(250, 0);
    cspline->Translate(400, 150);
    fspline->Translate(400, 0);
    label->Translate(350, 175);
    stencil->Translate(400, 300);
    raster->Scale(5, 5);
    raster->Translate(350, 350);

    pict->Append(line, multiline, spline, rect);
    pict->Append(frect, circle, fcircle, poly);
    pict->Append(fpoly, cspline, fspline, label);
    pict->Append(stencil, raster);
}
开发者ID:axelmuhr,项目名称:Helios-NG,代码行数:54,代码来源:graphics.c


注:本文中的Label::Translate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。