Skip to content

Commit

Permalink
Fix #1319, close #124.
Browse files Browse the repository at this point in the history
  • Loading branch information
VladiStep committed Apr 13, 2023
1 parent 70403f9 commit 35d49f6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<UserControl.Resources>
<local:UndertaleCachedImageLoader x:Key="UndertaleCachedImageLoader"/>
</UserControl.Resources>
<Canvas Width="{Binding BoundingWidth, Mode=OneWay}" Height="{Binding BoundingHeight, Mode=OneWay}" SnapsToDevicePixels="True">
<Canvas Width="{Binding BoundingWidth, Mode=OneWay}" Height="{Binding BoundingHeight, Mode=OneWay}"
SnapsToDevicePixels="True">
<Border Canvas.Left="{Binding TargetX, Mode=OneWay}" Canvas.Top="{Binding TargetY, Mode=OneWay}"
Width="{Binding TargetWidth, Mode=OneWay}" Height="{Binding TargetHeight, Mode=OneWay}"
BorderBrush="DarkCyan" BorderThickness="1" Name="RenderAreaBorder" SnapsToDevicePixels="True" RenderOptions.BitmapScalingMode="NearestNeighbor">
BorderBrush="DarkCyan" BorderThickness="1" Name="RenderAreaBorder" RenderOptions.BitmapScalingMode="NearestNeighbor">
<Border.Background>
<ImageBrush
ImageSource="{Binding ., Mode=OneWay, Converter={StaticResource UndertaleCachedImageLoader}, ConverterParameter=nocache}"
TileMode="None"
Stretch="UniformToFill">
TileMode="None" Stretch="None">
</ImageBrush>
</Border.Background>
</Border>
Expand Down
20 changes: 16 additions & 4 deletions UndertaleModTool/Editors/UndertaleFontEditor.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,24 @@
<local:TextBoxDark Grid.Row="10" Grid.Column="1" Margin="3" Text="{Binding SDFSpread}"/>

<Viewbox Grid.Row="11" Grid.ColumnSpan="2" Margin="3,30,3,3" Stretch="Uniform" StretchDirection="DownOnly">
<Border>
<Border.Background>
<Grid>
<Grid.Background>
<SolidColorBrush Color="Black"/>
</Border.Background>
</Grid.Background>
<local:UndertaleTexturePageItemDisplay DataContext="{Binding Texture, Mode=OneWay}"/>
</Border>

<Canvas Name="GlyphsOverlayCanvas" UseLayoutRounding="True" SnapsToDevicePixels="True">
<Rectangle Name="GlyphRectangle" Stroke="#FFB23131" Panel.ZIndex="50" StrokeThickness="1"
Canvas.Left="{Binding SelectedItem.SourceX, ElementName=GlyphsGrid, Mode=OneWay, TargetNullValue=-1, FallbackValue=-1}"
Canvas.Top="{Binding SelectedItem.SourceY, ElementName=GlyphsGrid, Mode=OneWay, TargetNullValue=-1, FallbackValue=-1}"
Width="{Binding SelectedItem.SourceWidth, ElementName=GlyphsGrid, Mode=OneWay, TargetNullValue=0, FallbackValue=0}"
Height="{Binding SelectedItem.SourceHeight, ElementName=GlyphsGrid, Mode=OneWay, TargetNullValue=0, FallbackValue=0}">
<Rectangle.Fill>
<SolidColorBrush Color="Red" Opacity=".1"/>
</Rectangle.Fill>
</Rectangle>
</Canvas>
</Grid>
</Viewbox>

<TextBlock Grid.Row="12" Grid.Column="0" Margin="3">Glyphs:</TextBlock>
Expand Down

0 comments on commit 35d49f6

Please sign in to comment.