1414from ._border import get_box , render_border_label , render_row
1515from ._context import active_app
1616from ._opacity import _apply_opacity
17- from ._segment_tools import line_pad , line_trim
17+ from ._segment_tools import apply_hatch , line_pad , line_trim
1818from .color import Color
1919from .constants import DEBUG
2020from .filter import LineFilter
@@ -311,6 +311,17 @@ def render_line(
311311 inner = from_color (bgcolor = (base_background + background ).rich_color )
312312 outer = from_color (bgcolor = base_background .rich_color )
313313
314+ def line_post (segments : Iterable [Segment ]) -> Iterable [Segment ]:
315+ """Apply effects to segments inside the border."""
316+ if styles .has_rule ("hatch" ):
317+ character , color = styles .hatch
318+ if character != " " and color .a > 0 :
319+ hatch_style = Style .from_color (
320+ (background + color ).rich_color , background .rich_color
321+ )
322+ return apply_hatch (segments , character , hatch_style )
323+ return segments
324+
314325 def post (segments : Iterable [Segment ]) -> Iterable [Segment ]:
315326 """Post process segments to apply opacity and tint.
316327
@@ -320,6 +331,7 @@ def post(segments: Iterable[Segment]) -> Iterable[Segment]:
320331 Returns:
321332 New list of segments
322333 """
334+
323335 try :
324336 app = active_app .get ()
325337 ansi_theme = app .ansi_theme
@@ -421,6 +433,7 @@ def post(segments: Iterable[Segment]) -> Iterable[Segment]:
421433 line = [make_blank (width - 1 , background_style ), right ]
422434 else :
423435 line = [make_blank (width , background_style )]
436+ line = line_post (line )
424437 else :
425438 # Content with border and padding (C)
426439 content_y = y - gutter .top
@@ -433,7 +446,7 @@ def post(segments: Iterable[Segment]) -> Iterable[Segment]:
433446 line = Segment .apply_style (line , inner )
434447 if styles .text_opacity != 1.0 :
435448 line = TextOpacity .process_segments (line , styles .text_opacity )
436- line = line_pad (line , pad_left , pad_right , inner )
449+ line = line_post ( line_pad (line , pad_left , pad_right , inner ) )
437450
438451 if border_left or border_right :
439452 # Add left / right border
0 commit comments