Skip to content

Commit

Permalink
- Increased affix areas
Browse files Browse the repository at this point in the history
  • Loading branch information
josdemmers committed Sep 18, 2023
1 parent 889f7f7 commit 9e1a330
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
16 changes: 8 additions & 8 deletions D4Companion.Services/ScreenProcessHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ private bool FindTooltips(Bitmap currentScreenBitmap)
_currentTooltip.Location = itemTooltip.Location;
_currentTooltip.Offset = scanPosX;

CvInvoke.Rectangle(currentScreen, itemTooltip.Location, new MCvScalar(0, 0, 255), 5);
CvInvoke.Rectangle(currentScreen, itemTooltip.Location, new MCvScalar(0, 0, 255), 2);

// Skip foreach after the first valid tooltip is found.
break;
Expand Down Expand Up @@ -429,7 +429,7 @@ private bool FindItemTypes()

_currentTooltip.ItemType = itemType.Name;

CvInvoke.Rectangle(currentScreenTooltip, itemType.Location, new MCvScalar(0, 0, 255), 5);
CvInvoke.Rectangle(currentScreenTooltip, itemType.Location, new MCvScalar(0, 0, 255), 2);

// Skip foreach after the first valid item type is found.
break;
Expand Down Expand Up @@ -511,7 +511,7 @@ private bool FindItemAffixLocations()
{
_currentTooltip.ItemAffixLocations.Add(itemAffixLocation.Location);

CvInvoke.Rectangle(currentScreenTooltip, itemAffixLocation.Location, new MCvScalar(0, 0, 255), 5);
CvInvoke.Rectangle(currentScreenTooltip, itemAffixLocation.Location, new MCvScalar(0, 0, 255), 2);
}

_eventAggregator.GetEvent<ScreenProcessItemAffixLocationsReadyEvent>().Publish(new ScreenProcessItemAffixLocationsReadyEventParams
Expand Down Expand Up @@ -611,7 +611,7 @@ private void FindItemAffixAreas()
_currentTooltip.ItemAffixAreas.Add(new Rectangle(
areaStartPoints[i].X, areaStartPoints[i].Y - offsetAffixTop,
_settingsManager.Settings.TooltipWidth - areaStartPoints[i].X - offsetAffixWidth,
areaStartPoints[i + 1].Y - areaStartPoints[i].Y));
areaStartPoints[i + 1].Y - (areaStartPoints[i].Y- offsetAffixTop)));
}

if (_currentTooltip.ItemAspectLocation.IsEmpty)
Expand All @@ -625,7 +625,7 @@ private void FindItemAffixAreas()
var currentScreenTooltip = _currentScreenTooltipFilter.Convert<Bgr, byte>();
foreach (var area in _currentTooltip.ItemAffixAreas)
{
CvInvoke.Rectangle(currentScreenTooltip, area, new MCvScalar(0, 0, 255), 5);
CvInvoke.Rectangle(currentScreenTooltip, area, new MCvScalar(0, 0, 255), 2);
}

_eventAggregator.GetEvent<ScreenProcessItemAffixAreasReadyEvent>().Publish(new ScreenProcessItemAffixAreasReadyEventParams
Expand Down Expand Up @@ -692,7 +692,7 @@ private bool FindItemAffixes()
markedLocation.Width = itemAffix.Location.Width;
markedLocation.Height = itemAffix.Location.Height;

CvInvoke.Rectangle(currentScreenTooltip, markedLocation, new MCvScalar(0, 0, 255), 5);
CvInvoke.Rectangle(currentScreenTooltip, markedLocation, new MCvScalar(0, 0, 255), 2);

// Skip if itemAffix already added
if (_currentTooltip.ItemAffixes.Any(affix => affix.Item1 == itemAffix.AreaIndex && affix.Item2.Id.Equals(itemAffix.ItemAffix.Id))) continue;
Expand Down Expand Up @@ -809,7 +809,7 @@ private bool FindItemAspectLocations()
if (itemAspectLocation.Location.IsEmpty) continue;

_currentTooltip.ItemAspectLocation = itemAspectLocation.Location;
CvInvoke.Rectangle(currentScreenTooltip, itemAspectLocation.Location, new MCvScalar(0, 0, 255), 5);
CvInvoke.Rectangle(currentScreenTooltip, itemAspectLocation.Location, new MCvScalar(0, 0, 255), 2);

// Skip foreach after the first valid aspect location is found.
break;
Expand Down Expand Up @@ -903,7 +903,7 @@ private bool FindItemAspects()
foreach (var itemAspect in itemAspectsResults)
{
// Add results to image
CvInvoke.Rectangle(currentScreenTooltip, itemAspect.Location, new MCvScalar(0, 0, 255), 5);
CvInvoke.Rectangle(currentScreenTooltip, itemAspect.Location, new MCvScalar(0, 0, 255), 2);

// Skip if itemAspect already added
if (_currentTooltip.ItemAspect.Id.Equals(itemAspect.ItemAspect.Id)) continue;
Expand Down
4 changes: 2 additions & 2 deletions D4Companion/common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<FileVersion>2.0.0.0</FileVersion>
<Version>2.0.0.0</Version>
<FileVersion>2.0.1.0</FileVersion>
<Version>2.0.1.0</Version>
<Copyright>Copyright © 2023</Copyright>
<TargetFramework>net6.0-windows</TargetFramework>
</PropertyGroup>
Expand Down

0 comments on commit 9e1a330

Please sign in to comment.