Extract action for items drawing and optimize dimensions calculations