@@ -420,12 +420,12 @@ impl<'a, R: femtovg::Renderer + TextureImporter> ItemRenderer for GLItemRenderer
420420
421421 let layout = sharedparley:: layout (
422422 text. text ( ) . as_str ( ) ,
423- self . scale_factor . get ( ) ,
423+ self . scale_factor ,
424424 sharedparley:: LayoutOptions {
425425 horizontal_align,
426426 vertical_align,
427427 max_height : Some ( max_height) ,
428- max_physical_width : Some ( max_width * self . scale_factor ) ,
428+ max_width : Some ( max_width) ,
429429 stroke : stroke_paint. is_some ( ) . then_some ( stroke_style) ,
430430 font_request : Some ( font_request) ,
431431 text_wrap : text. wrap ( ) ,
@@ -485,9 +485,9 @@ impl<'a, R: femtovg::Renderer + TextureImporter> ItemRenderer for GLItemRenderer
485485
486486 let layout = sharedparley:: layout (
487487 & text,
488- self . scale_factor . get ( ) ,
488+ self . scale_factor ,
489489 sharedparley:: LayoutOptions {
490- max_physical_width : Some ( width * self . scale_factor ) ,
490+ max_width : Some ( width) ,
491491 max_height : Some ( height) ,
492492 vertical_align : text_input. vertical_alignment ( ) ,
493493 font_request : Some ( font_request) ,
@@ -509,15 +509,15 @@ impl<'a, R: femtovg::Renderer + TextureImporter> ItemRenderer for GLItemRenderer
509509 ) ;
510510
511511 selection. geometry_with ( & layout, |rect, _| {
512- let mut cursor_rect = femtovg:: Path :: new ( ) ;
513- cursor_rect . rect (
512+ let mut selection_path = femtovg:: Path :: new ( ) ;
513+ selection_path . rect (
514514 rect. min_x ( ) as _ ,
515515 rect. min_y ( ) as f32 + layout. y_offset ,
516516 rect. width ( ) as _ ,
517517 rect. height ( ) as _ ,
518518 ) ;
519519 canvas. fill_path (
520- & cursor_rect ,
520+ & selection_path ,
521521 & femtovg:: Paint :: color ( to_femtovg_color ( & text_input. selection_background_color ( ) ) ) ,
522522 ) ;
523523 } ) ;
@@ -532,15 +532,15 @@ impl<'a, R: femtovg::Renderer + TextureImporter> ItemRenderer for GLItemRenderer
532532 ) ;
533533 let rect = cursor. geometry ( & layout, ( text_input. text_cursor_width ( ) ) . get ( ) ) ;
534534
535- let mut cursor_rect = femtovg:: Path :: new ( ) ;
536- cursor_rect . rect (
535+ let mut cursor_path = femtovg:: Path :: new ( ) ;
536+ cursor_path . rect (
537537 rect. min_x ( ) as _ ,
538538 rect. min_y ( ) as f32 + layout. y_offset ,
539539 rect. width ( ) as _ ,
540540 rect. height ( ) as _ ,
541541 ) ;
542542 canvas. fill_path (
543- & cursor_rect ,
543+ & cursor_path ,
544544 & femtovg:: Paint :: color ( to_femtovg_color ( & visual_representation. cursor_color ) ) ,
545545 ) ;
546546 }
@@ -971,7 +971,7 @@ impl<'a, R: femtovg::Renderer + TextureImporter> ItemRenderer for GLItemRenderer
971971 }
972972
973973 fn draw_string ( & mut self , string : & str , color : Color ) {
974- let layout = sharedparley:: layout ( string, self . scale_factor . get ( ) , Default :: default ( ) ) ;
974+ let layout = sharedparley:: layout ( string, self . scale_factor , Default :: default ( ) ) ;
975975 let paint = femtovg:: Paint :: color ( to_femtovg_color ( & color) ) ;
976976 let mut canvas = self . canvas . borrow_mut ( ) ;
977977 draw_glyphs ( & layout, & mut canvas, & paint) ;
0 commit comments