@@ -1,8 +1,12 @@
|
||||
from __future__ import annotations
|
||||
from pyWebLayout.core.base import Renderable, Queriable
|
||||
from pyWebLayout.core.query import QueryResult
|
||||
from .box import Box
|
||||
from pyWebLayout.style import Alignment, Font, FontStyle, FontWeight, TextDecoration
|
||||
from pyWebLayout.abstract import Word
|
||||
from pyWebLayout.abstract.inline import LinkedWord
|
||||
from pyWebLayout.abstract.functional import Link
|
||||
from .functional import LinkText, ButtonText
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from typing import Tuple, Union, List, Optional, Protocol
|
||||
import numpy as np
|
||||
@@ -383,10 +387,6 @@ class Line(Box):
|
||||
- success: True if word/part was added, False if it couldn't fit
|
||||
- overflow_text: Remaining text if word was hyphenated, None otherwise
|
||||
"""
|
||||
# Import LinkedWord here to avoid circular imports
|
||||
from pyWebLayout.abstract.inline import LinkedWord
|
||||
from pyWebLayout.concrete.functional import LinkText
|
||||
|
||||
# First, add any pretext from previous hyphenation
|
||||
if part is not None:
|
||||
self._text_objects.append(part)
|
||||
@@ -399,7 +399,6 @@ class Line(Box):
|
||||
# LinkText constructor needs: (link, text, font, draw, source, line)
|
||||
# But LinkedWord itself contains the link properties
|
||||
# We'll create a Link object from the LinkedWord properties
|
||||
from pyWebLayout.abstract.functional import Link
|
||||
link = Link(
|
||||
location=word.location,
|
||||
link_type=word.link_type,
|
||||
@@ -572,9 +571,6 @@ class Line(Box):
|
||||
Returns:
|
||||
QueryResult from the text object at that point, or None
|
||||
"""
|
||||
from pyWebLayout.core.query import QueryResult
|
||||
from .functional import LinkText, ButtonText
|
||||
|
||||
point_array = np.array(point)
|
||||
|
||||
# Check each text object in this line
|
||||
|
||||
Reference in New Issue
Block a user