@@ -645,6 +645,7 @@ def get_height_rect(self, x: int, y: int, width: int, height: int, string: str)
645645 string_ = string .encode ("utf-8" )
646646 return int (lib .TCOD_console_get_height_rect_n (self .console_c , x , y , width , height , len (string_ ), string_ ))
647647
648+ @deprecated ("""Replace with 'console.draw_rect(x, y, width, height, ch=..., fg=..., bg=..., bg_blend=...)'""" )
648649 def rect ( # noqa: PLR0913
649650 self ,
650651 x : int ,
@@ -677,6 +678,9 @@ def rect( # noqa: PLR0913
677678 self .__deprecate_defaults ("draw_rect" , bg_blend , clear = bool (clear ))
678679 lib .TCOD_console_rect (self .console_c , x , y , width , height , clear , bg_blend )
679680
681+ @deprecated (
682+ """Replace with 'console.draw_rect(x, y, width=width, height=1, ch=ord("─"), fg=..., bg=..., bg_blend=...)'"""
683+ )
680684 def hline (
681685 self ,
682686 x : int ,
@@ -686,7 +690,7 @@ def hline(
686690 ) -> None :
687691 """Draw a horizontal line on the console.
688692
689- This always uses ord('─' ), the horizontal line character.
693+ This always uses ord("─" ), the horizontal line character.
690694
691695 Args:
692696 x (int): The x coordinate from the left.
@@ -704,6 +708,9 @@ def hline(
704708 self .__deprecate_defaults ("draw_rect" , bg_blend )
705709 lib .TCOD_console_hline (self .console_c , x , y , width , bg_blend )
706710
711+ @deprecated (
712+ """Replace with 'console.draw_rect(x, y, width=1, height=height, ch=ord("│"), fg=..., bg=..., bg_blend=...)'"""
713+ )
707714 def vline (
708715 self ,
709716 x : int ,
@@ -713,7 +720,7 @@ def vline(
713720 ) -> None :
714721 """Draw a vertical line on the console.
715722
716- This always uses ord('│' ), the vertical line character.
723+ This always uses ord("│" ), the vertical line character.
717724
718725 Args:
719726 x (int): The x coordinate from the left.
@@ -1130,15 +1137,16 @@ def draw_frame( # noqa: PLR0913
11301137
11311138 Example::
11321139
1140+ >>> from tcod import libtcodpy
11331141 >>> console = tcod.console.Console(12, 6)
11341142 >>> console.draw_frame(x=0, y=0, width=3, height=3)
11351143 >>> console.draw_frame(x=3, y=0, width=3, height=3, decoration="╔═╗║ ║╚═╝")
11361144 >>> console.draw_frame(x=6, y=0, width=3, height=3, decoration="123456789")
11371145 >>> console.draw_frame(x=9, y=0, width=3, height=3, decoration="/-\\| |\\-/")
11381146 >>> console.draw_frame(x=0, y=3, width=12, height=3)
1139- >>> console.print_box(x=0, y=3, width=12, height=1, string=" Title ", alignment=tcod .CENTER)
1147+ >>> console.print_box(x=0, y=3, width=12, height=1, string=" Title ", alignment=libtcodpy .CENTER)
11401148 1
1141- >>> console.print_box(x=0, y=5, width=12, height=1, string="┤Lower├", alignment=tcod .CENTER)
1149+ >>> console.print_box(x=0, y=5, width=12, height=1, string="┤Lower├", alignment=libtcodpy .CENTER)
11421150 1
11431151 >>> print(console)
11441152 <┌─┐╔═╗123/-\
0 commit comments