java is somewhat clumsy here, but it's just a few lines:
Mat mask = Mat.zeros(400,400,CvType.CV_8U); // all black
// your RotatedRect will come from minAreaRect(), this is just demo data !
RotatedRect rc = new RotatedRect(Point(200,200), new Size(200,100), 23);
// retrieve corner points:
Point[] p = Point[4];
rc.points(p);
// draw white, filled poly:
MatOfPoint mp = new MatOfPoint(p);
Imgproc.fillConvexPoly(mask, mp, new Scalar(255));
[edit]
usually you need a contour as input for minAreaRect(), see tutorial and some conversion code (sorry, untested):
List<MatOfPoint> contours = new ArrayList<>();
Imgproc.findContours(cannyOutput, contours, ...);
Point [] pts = contours.get(i).toArray();
RotatedRect rc = Imgproc.minAreaRect(new MatOfPoint2f(pts));
sorry, i was just trying out latest 4.0, where all drawing stuff was moved to Imgproc for consistency, but yes, it's likely in Core with your version