====== Map:CopyArea filter ====== ===== Filter info ===== ^ Description | Copy an area (rectangle) of pixels from one map to another. | ^ Author | [[user>Aaron]] | ^ Plugin | [[bundywiki>plugins:calc:ZG_map|ZG_map]] ^ ===== Looks like ===== | {{:plugins:calc:zeograph:filters:map_copyarea.png|:plugins:calc:zeograph:filters:map_copyarea.png}} | ===== Input pins ===== ^ Name ^ Type ^ Default value ^ Description ^ | //hSrc// | hvar | N/A | A handle to the source map. | | //sx0// | int | 0 | The x-axis pixel coordinate, in the source map, of the left edge of the source rectangle to be copied. | | //sy0// | int | 0 | The y-axis pixel coordinate, in the source map, of the lower edge of the source rectangle to be copied. | | //snx// | int | 0 | The width of the rectangle to be copied from the source map. | | //sny// | int | 0 | The height of the rectangle to be copied from the source map. | | //hDest// | hvar | N/A | A handle to the destination map. | | //dx0// | int | 0 | The x-axis pixel coordinate, in the destination map, of the left edge of the destination rectangle. | | //dy0// | int | 0 | The y-axis pixel coordinate, in the destination map, of the lower edge of the destination rectangle. | Pixel coordinates in L3DT are measured with the origin at the lower left corner of the map (i.e. pixel 0,0 is the lower left corner.) ===== Output pins ===== ^ Name ^ Type ^ Description ^ | //hSrc// | hvar | A handle to the source map (handle is passed through from input to output). | | //hDest// | hvar | A handle to the destination map (handle is passed through from input to output). | ===== Options ===== This filter has no options. ===== Comments ===== ==== BitBlt ==== This filter is modelled on the [[http://msdn.microsoft.com/en-us/library/aa930997.aspx|BitBlt]] Win32 API function, with handles to device contexts replaced by handles to maps, and the raster operation fixed at SRCCOPY. ==== Heightfield:CombineMaps ==== For copying heightfield maps, users may prefer to use the [[plugins:calc:zeograph:filters:hf_combinemaps|Heightfield:CombineMaps]] filter with the //operation// option set to 'replace'. That filter provides more options for aligning the source/destination areas, including left/centre/right and top/centre/bottom.