本文整理汇总了C++中Draw::Dots方法的典型用法代码示例。如果您正苦于以下问题:C++ Draw::Dots方法的具体用法?C++ Draw::Dots怎么用?C++ Draw::Dots使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Draw
的用法示例。
在下文中一共展示了Draw::Dots方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetPixelsPerMeter
Size GetPixelsPerMeter(const Draw& draw)
{
if(draw.Dots())
return Size(DOTS_PER_METER_INT, DOTS_PER_METER_INT);
else
return iscale(draw.GetPagePixels(), Size(1000, 1000), max(draw.GetPageMMs(), Size(1, 1)));
}
示例2: DrawImageBandRLE
void DrawImageBandRLE(Draw& w, int x, int y, const Image& m, int minp)
{
int xi = 0;
int cx = m.GetWidth();
int ccy = m.GetHeight();
Buffer<bool> todo(cx, true);
#ifdef BENCHMARK_RLE
sTotal += cx;
#endif
while(xi < cx) {
int xi0 = xi;
while(w.Dots() && IsWhiteColumn(m, xi) && xi < cx)
xi++;
if(xi - xi0 >= 16) {
#ifdef BENCHMARK_RLE
sRle += xi - xi0;
#endif
w.DrawRect(x + xi0, y, xi - xi0, ccy, White);
Fill(~todo + xi0, ~todo + xi, false);
}
xi++;
}
xi = 0;
while(xi < cx)
if(todo[xi]) {
int xi0 = xi;
while(xi < cx && todo[xi] && xi - xi0 < 2000)
xi++;
w.DrawImage(x + xi0, y, m, RectC(xi0, 0, xi - xi0, ccy));
}
else
xi++;
}
示例3: HorzPixelsToDots
int HorzPixelsToDots(const Draw& draw, int dots)
{
return draw.Dots() ? dots : fround(dots / GetHorzPixelsPerDot(draw));
}
示例4: PixelsToDots
Size PixelsToDots(const Draw& draw, Size size)
{
return draw.Dots() ? size
: iscale(size, Size(DOTS_PER_METER_INT, DOTS_PER_METER_INT), GetPixelsPerMeter(draw));
}
示例5: VertDotsToPixels
int VertDotsToPixels(const Draw& draw, int dots)
{
return draw.Dots() ? dots : fround(dots * GetVertPixelsPerDot(draw));
}
示例6: GetAvgPixelsPerDot
double GetAvgPixelsPerDot(const Draw& draw)
{
if(draw.Dots())
return 1;
return GetAvgPixelsPerMeter(draw) / DOTS_PER_METER_DBL;
}
示例7: GetVertPixelsPerDot
double GetVertPixelsPerDot(const Draw& draw)
{
return draw.Dots() ? 1 : GetVertPixelsPerMeter(draw) / DOTS_PER_METER_DBL;
}
示例8: GetVertPixelsPerMeter
int GetVertPixelsPerMeter(const Draw& draw)
{
return draw.Dots() ? DOTS_PER_METER_INT : 96 * DOTS_PER_METER_INT / 600;
}
示例9: PointsToPixels
Size PointsToPixels(const Draw& draw, Size points)
{
if(draw.Dots())
return points * 600 / 72;
return iscale(points, draw.GetPixelsPerInch(), Size(72, 72));
}
示例10: PixelsToPoints
Size PixelsToPoints(const Draw& draw, Size pixels)
{
if(draw.Dots())
return pixels * 72 / 600;
return iscale(pixels, Size(72, 72), draw.GetPixelsPerInch());
}