纺织中coordinateaxes print 什么意思

【招聘_】-前程无忧
抱歉,该职位已经过期或者不存在!
无忧工作网版权所有(C)51job.com(沪ICP备)The service is unavailable.Qt Print Support 5.11
Qt Print Support
Qt Print Support
Qt provides extensive cross-platform support for printing. Using the printing systems on each platform, Qt applications can print to attached printers and across networks to remote printers. Qt's printing system also supports PDF file generation, providing the foundation for basic report generation facilities.
Classes Supporting Printing
The following classes support the selecting and setting up of printers and printing output.
Base implementation for print dialogs used to configure printers
Defines an interface for how QPrinter interacts with a given printing subsystem
Paint device that paints on a printer
Gives access to information about existing printers
Configuration dialog for the page-related options on a printer
Dialog for specifying the printer's configuration
Dialog for previewing and configuring page layouts for printer output
Widget for previewing page layouts for printer output
Paint Devices and Printing
In Qt, printers are represented by , a paint device that provides functionality specific to printing, such as support for multiple pages and double-sided output. As a result, printing involves using a
to paint onto a series of pages in the same way that you would paint onto a custom widget or image.
Creating a QPrinter
objects can be constructed and set up without requiring user input, printing is often performed as a result of a for example, when the user selects the File|Print... menu item in a GUI application. In such cases, a newly-constructed
object is supplied to a , allowing the user to specify the printer to use, paper size, and other printing properties.
dialog(&printer, this);
dialog.setWindowTitle(tr("Print Document"));
if (editor-&textCursor().hasSelection())
dialog.addEnabledOption(::PrintSelection);
if (dialog.exec() != ::Accepted) {
It is also possible to set certain default properties by modifying the
before it is supplied to the print dialog. For example, applications that generate batches of reports for printing may set up the
by default rather than to a printer.
Painting onto a Page
object has been constructed and set up, a
can be used to perform painting operations on it. We can construct and set up a painter in the following way:
printer(::HighResolution);
printer.setOutputFileName("print.ps");
painter.begin(&printer);
for (int page = 0; page & numberOfP ++page) {
if (page != lastPage)
printer.newPage();
painter.end();
starts with a blank page, we only need to call the
function after drawing each page, except for the last page.
The document is sent to the printer, or written to a local file, when we call .
Coordinate Systems
provides functions that can be used to obtain information about the dimensions of the paper (the paper rectangle) and the dimensions of the printable area (the page rectangle). These are given in logical device coordinates that may differ from the physical coordinates used by the device itself, indicating that the printer is able to render text and graphics at a (typically higher) resolution than the user's display.
Although we do not need to handle the conversion between logical and physical coordinates ourselves, we still need to apply transformations to painting operations because the pixel measurements used to draw on screen are often too small for the higher resolutions of typical printers.
Printer and Painter Coordinate SystemsThe
functions provide information about the size of the paper used for printing and the area on it that can be painted on.
The rectangle returned by
usually lies inside the rectangle returned by . You do not need to take the positions and sizes of these area into account when using a
as the und the origin of the painter's coordinate system will coincide with the top-left corner of the page rectangle, and painting operations will be clipped to the bounds of the drawable part of the page.
The paint system automatically uses the correct device metrics when painting text but, if you need to position text using information obtained from font metrics, you need to ensure that the print device is specified when you construct
objects, or ensure that each
used is constructed using the form of the constructor that accepts a
Printing Widgets
To print a widget, you can use the () function. As mentioned, the printer's resolution is usually higher than the screen resolution, so you will have to scale the painter. You may also want to position the widget on the page. The following code sample shows how this may look.
painter.begin(&printer);
double xscale = printer.pageRect().width()/double(myWidget-&width());
double yscale = printer.pageRect().height()/double(myWidget-&height());
double scale = (xscale, yscale);
painter.translate(printer.paperRect().x() + printer.pageRect().width()/2,
printer.paperRect().y() + printer.pageRect().height()/2);
painter.scale(scale, scale);
painter.translate(-width()/2, -height()/2);
myWidget-&render(&painter);
This will center the widget on the page and scale it so that it fits the page.
Printing from Complex Widgets
Certain widgets, such as
and , display rich content that is typically managed by instances of other classes, such as
and . As a result, it is these content handling classes that usually provide printing functionality, either via a function that can be used to perform the complete task, or via a function that accepts an existing
object. Some widgets provide convenience functions to expose underlying printing features, avoiding the need to obtain the content handler just to call a single function.
The following table shows which class and function are responsible for printing from a selection of different widgets. For widgets that do not expose printing functionality directly, the content handling classes containing this functionality can be obtained via a function in the corresponding widget's API.
WidgetPrinting functionAccepts
QSvgWidgetQSvgRenderer::render()
requires a
rather than a
because it uses information about the configured page dimensions in order to insert page breaks at the most appropriate places in printed documents.
Licenses and Trademarks
The Qt Print Support module is available under commercial licenses from . In addition, it is available under free software licenses. Since Qt 5.4, these free software licenses are , or the . See
for further details.
Please note that Adobe(R) places restrictions on the use of its trademarks (including logos) in conjunction with PDF; e.g. "Adobe PDF". Please refer to
for guidelines.
(C) 2018 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the
as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd.
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.【招聘_】-前程无忧
抱歉,该职位已经过期或者不存在!
无忧工作网版权所有(C)51job.com(沪ICP备)坐标上升算法(Coordinate Ascent)及C++编程实现
编程实现:
#include &iostream&
using namespace
#define f(x1,x2,x3) (-x1*x1-2*x2*x2-3*x3*x3+2*x1*x2+2*x1*x3-4*x2*x3+6)
int main()
double x1=1;
double x2=1;
double x3=1;
double f0=f(x1,x2,x3);
double err=1.0e-10;
while (true)
x2=0.5*x1-x3;
x3=1.0/3*x1-2.0/3*x2;
double ft=f(x1,x2,x3);
if (abs(ft-f0)&err)
cout&&"@author:郑海波 email:"&&
cout&&"\nmax{f(x1,x2,x3)}="&&f(x1,x2,x3)&&
cout&&"取得最大值时的坐标:\n(x1,x2,x3)=("&&x1&&","&&x2&&","&&x3&&")"&&
优化算法——坐标上升法
一、坐标上升法算法原理坐标上升法(Coordinate Ascent)每次通过更新函数中的一维,通过多次的迭代以达到优化函数的目的。假设需要求解的优化问题的具体形式如下:maxαW(α1,α2,?,α...
SVM求解之坐标上升算法(Coordinate Ascent)
坐标上升算法(Coordinate Ascent)
坐标上升算法(Coordinate Ascent)及C++编程实现
坐标上升法算法
坐标上升法(Coordinate Ascent)每次通过更新函数中的一维,通过多次的迭代以达到优化函数的目的。
假设需要求解的优化问题的具体形式如下:
maxαW(α1,α2,?,...
Coordinate Descent Optimization (坐标下降优化方法)
申明:本文非笔者原创,原文转载自:http://blog.sina.com.cn/s/blog_890c6aa30100yhqy.html
坐标下降优化方法是一种非梯度优化算法。为了...
题目大意:
x1 = x – sqrt(y)
y1 = y – sqrt(x)
题目给出多个x1,y1.求出x,y。如果有多种可能的话,就输出x较小的那一对x,y。
思路:一开始我还以为是纯几...
从便于理解的角度结合图示介绍对偶上升法。
一直对齐次坐标这个概念的理解不够彻底,只见大部分的书中说道“齐次坐标在仿射变换中非常的方便”,然后就没有了后文,今天在一个叫做“三百年 重生”的博客上看到一篇关于透视投影变换的探讨的文章,其中有对齐次...
在讲EM算法之前,我们先从一个例子开始。例如,我们随机抽取了400个人的身高,如果男生为200人,我们可以单独得到一个分布,而女生为200人,也可以同样得到一个分布(假设身高服从高斯分布),如图1。
...
Block Coordinate Descent(块坐标下降)
问题的描述:给定一个可微的凸函数,如果在某一点x,使得f(x)在每一个坐标轴上都是最小值,那么f(x)是不是一个全局的最小值。
形式化的描述为:是不是对于所有的d,i都有
这里的代表第i个...
没有更多推荐了,

我要回帖

更多关于 coordinate什么意思中文 的文章

 

随机推荐