I find dependency injection explanations and open / closed to confuse. That should not be so. Let's take a look at the article you are referencing: http://www.oodesign.com/open-close-principle.html
GraphicsEditor . , , GraphicsEditor : drawShape; DrawCircle; DrawRectangle.
, Parallelogram? Parallelogram , GraphicsEditor, drawParallelogram.
"", : , . Shape (Parallelogram) GraphicsEditor (drawParallelogram).
, . , 20 . -, , , , : . , , , . -, , , GraphicsEditor. . . , .:-) ( .)
, , GraphicsEditor. , .
. . GraphicsEditor , "Shape" "draw". GraphicsEditor , . GraphicsEditor. GraphicsEditor "". , " " - . .
- . , : http://sourcemaking.com/design_patterns/visitor. , .