You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: vector_image.rs
    path of file: ./repos/Fyrox/fyrox-ui/src
    
    the code of the file until where you have to start completion: //! Vector image is used to create images, that consists from a fixed set of basic primitives, such as lines,
//! triangles, rectangles, etc. It could be used to create simple images that can be infinitely scaled without
//! aliasing issues. See [`VectorImage`] docs for more info and usage examples.

#![warn(missing_docs)]

use crate::{
    core::{
        algebra::Vector2, color::Color, math::Rect, math::Vector2Ext, pool::Handle,
        reflect::prelude::*, type_traits::prelude::*, visitor::prelude::*,
    },
    draw::{CommandText
    
    fn measure_override(&self, _ui: &UserInterface, _available_size: Vector2<f32>) -> Vector2<f32> {
        if self.primitives.is_empty() {
            Default::default()
        } else {
            let mut max = Vector2::new(-f32::MAX, -f32::MAX);
            let mut min = Vector2::new(f32::MAX, f32::MAX);

            for primitive in self.primitives.iter() {
                let (pmin, pmax) = primitive.bounds();
                min = min.per_component_min(&pmin);
                max = max.per_component_max(&pmax);
            }

            max - min
        }
    }