How would I create an operator to perform a paint stroke?

I’m trying to build a custom operator to perform paint strokes. I’m aware of the existing operator for this “paint.image_paint” and I understand how to create and edit keymaps. I want to build a custom operator which can perform bpy.ops.paint.image_paint along with several other things.

It seems accomplishing this requires the use of modal functions, but how to implement this I have no clue. I’ve tried several configurations and function return values {‘RUNNING MODAL’}. I’m really confused though. So to sum up, can anyone show me what an operator class for this would look like? Thanks.

EDIT: Just to clear this up, I don’t mean perform some strokes at certain positions, I just want to be able to run the operator and it do some stuff along with allowing me to then use my mouse to make the stroke. Operators can be easily nestled into other operators. I’m basically just curious as to how you create an operator and run it as a modal.