use std::path::Path;
use std::hash::Hash;
use crate::internal_representation::*;
use crate::to_image::extract::context_aware_extractor::ContextAwareInteractionDrawingInstructionsExtractor;
use crate::to_image::draw::context_aware_drawer::ContextAwareInteractionDrawer;
use crate::to_image::extract::extract::extract_drawing_information;
use crate::to_image::draw::draw::make_image_from_display_information;
pub fn draw_interaction_as_sequence_diagram<CioII,LI,Extractor,Drawer> (
int_repr : &InteractionInternalRepresentation<CioII>,
extractor : &Extractor,
palette : &Drawer,
file_path : &Path,
)
where
CioII : CommonIoInteractionInterface,
LI : Eq + Hash + Copy + Clone,
Extractor : ContextAwareInteractionDrawingInstructionsExtractor<CioII,LI>,
Drawer : ContextAwareInteractionDrawer<LI>
{
let display_info = extract_drawing_information::<CioII,LI,Extractor>(
extractor,
int_repr
);
let image = make_image_from_display_information::<LI,Drawer>(
palette,
&display_info
);
let _ = image.save(file_path);
}