Skip to content

FEATURE REQUEST: Custom Shape Drawing to page base on user need #190

@dineshnaikb

Description

@dineshnaikb

Custom Shape Drawing: The ability to freely draw custom shapes (lines, rectangles, circles, etc.) directly on the PDF page. This would allow users to highlight specific areas or add annotations for better clarity.

i have tried doing this but I have to do it more smooth...
image

onInteractionUpdate: (details) {
              setState(() {
                points.add(details.localFocalPoint);
              });
            },
            onInteractionStart: (details) {
              setState(() {
                points.add(details.localFocalPoint);
              });
            },
 pagePaintCallbacks: [
              textSearcher.pageTextMatchPaintCallback,
              _paintMarkers,
              penpointer,
            ],



 final List<Offset> points = [];
  
penpointer(Canvas canvas, Rect pageRect, PdfPage page) {

      Paint paint = Paint()
        ..color = Colors.black
        ..strokeCap = StrokeCap.round
        ..strokeWidth = 5.0;
      for (Offset point in points) {
        canvas.drawCircle(point, 5.0, paint); // Draw a circle with radius 5
      }
    // }

  }

base on pages to page and scroll issue to fix ...... and also keep track for undo...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions