libcamera: geometry: Give constructors to Rectangle
Rectangle, unlike Size, has no constructor, requiring the users to explicitly initialize the instances. This is error-prone, add constructors. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
@@ -752,12 +752,7 @@ int PipelineHandlerRPi::configure(Camera *camera, CameraConfiguration *config)
|
||||
}
|
||||
|
||||
/* Adjust aspect ratio by providing crops on the input image. */
|
||||
Rectangle crop = {
|
||||
.x = 0,
|
||||
.y = 0,
|
||||
.width = sensorFormat.size.width,
|
||||
.height = sensorFormat.size.height
|
||||
};
|
||||
Rectangle crop{ 0, 0, sensorFormat.size };
|
||||
|
||||
int ar = maxSize.height * sensorFormat.size.width - maxSize.width * sensorFormat.size.height;
|
||||
if (ar > 0)
|
||||
|
||||
Reference in New Issue
Block a user