// see if the size of the colorbuffer is larger than the size // of a single page. if this is the case we divide the // colorbuffer into as many surfaces as we need to get the // whole area distributed. otherwise (the colorbuffer is // smaller than the size of a single page) we search for free // pages or create a new one. // the incoming image is too large to fit into a single // page. strategy: we split the image into rectangular // areas that are as large as the maximum page size // dictates and follow the strategy for fitting images.
size_t dwNumSurfaces(0); for(sal_Int32 y=0; y<aImageSizeY; y+=aPageSizeY) for(sal_Int32 x=0; x<aImageSizeX; x+=aPageSizeX)
++dwNumSurfaces;
maSurfaceList.reserve(dwNumSurfaces);
for(sal_Int32 y=0; y<aImageSizeY; y+=aPageSizeY)
{ for(sal_Int32 x=0; x<aImageSizeX; x+=aPageSizeX)
{ // the current surface is located at the position [x,y] // and has the size [min(restx,pagesizex),min(resty,pagesizey)
::basegfx::B2IPoint aOffset(x,y);
::basegfx::B2ISize aSize( std::min( aImageSize.getWidth()-x,
aPageSize.getWidth() ),
std::min( aImageSize.getHeight()-y,
aPageSize.getHeight() ) );
// we have now an explicit ::B2DTriangle and ::B2DTriangleVector, // but I do not know enough about 'drawWithClip' or 'clipTriangleListOnRange' // to adapt to that. Convert back to old three-point-in-polygon convention
::basegfx::B2DPolygon aTriangulatedPolygon;
aTriangulatedPolygon.reserve(aTriangulatedVector.size() * 3);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.