7 Commits
djes ... master

Author SHA1 Message Date
djes
a32fd4d093 Merge pull request #20 from djes/thyphoon
Thyphoon desktop centering fixes
2021-09-01 10:09:05 +02:00
djes
873f25d0fe Merge branch 'master' into thyphoon 2021-09-01 10:08:26 +02:00
b108b8b385 DPI Aware
Add compatible with DPI Scaling (4k screen)
2021-08-22 14:48:55 +02:00
djes
7049aa5738 Merge pull request #19 from djes/djes
Demo separated from module
2021-01-17 11:35:17 +01:00
djes
878c6a0408 Merge pull request #18 from djes/djes
Faulty PNG tiles fixes
2019-07-19 13:46:13 +02:00
djes
848b817403 Merge pull request #17 from djes/djes
Major update
2018-06-11 23:07:27 +02:00
djes
8300e02bba Merging typhoon and djes branches 2017-07-04 09:21:00 +02:00
2 changed files with 14 additions and 11 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
PBMap.pb.bak
*.exe

View File

@@ -2037,7 +2037,7 @@ Module PBMap
Protected Text.s = "© OpenStreetMap contributors"
VectorFont(FontID(*PBMap\StandardFont), 12)
VectorSourceColor(RGBA(0, 0, 0, 80))
MovePathCursor(GadgetWidth(*PBMap\Gadget) - VectorTextWidth(Text), GadgetHeight(*PBMap\Gadget) - 20)
MovePathCursor(DesktopScaledX(GadgetWidth(*PBMap\Gadget)) - VectorTextWidth(Text), GadgetHeight(*PBMap\Gadget) - 20)
DrawVectorText(Text)
EndProcedure
@@ -2052,8 +2052,8 @@ Module PBMap
*PBMap\Dirty = #False
*PBMap\Redraw = #False
; *** Precalc some values
*Drawing\RadiusX = GadgetWidth(*PBMap\Gadget) / 2
*Drawing\RadiusY = GadgetHeight(*PBMap\Gadget) / 2
*Drawing\RadiusX = DesktopScaledX(GadgetWidth(*PBMap\Gadget)) / 2
*Drawing\RadiusY = DesktopScaledY(GadgetHeight(*PBMap\Gadget)) / 2
*Drawing\GeographicCoordinates\Latitude = *PBMap\GeographicCoordinates\Latitude
*Drawing\GeographicCoordinates\Longitude = *PBMap\GeographicCoordinates\Longitude
LatLon2TileXY(*Drawing\GeographicCoordinates, *Drawing\TileCoordinates, *PBMap\Zoom)
@@ -2107,10 +2107,10 @@ Module PBMap
DrawDebugInfos(MapGadget, *Drawing)
EndIf
If *PBMap\Options\ShowScale
DrawScale(MapGadget, *Drawing, 10, GadgetHeight(*PBMap\Gadget) - 20, 192)
DrawScale(MapGadget, *Drawing, 10, DesktopScaledY(GadgetHeight(*PBMap\Gadget)) - 20, 192)
EndIf
If *PBMap\Options\ShowZoom
DrawZoom(MapGadget, GadgetWidth(*PBMap\Gadget) - 30, 5) ; ajout YA - affiche le niveau de zoom
DrawZoom(MapGadget, DesktopScaledX(GadgetWidth(*PBMap\Gadget)) - 30, 5) ; ajout YA - affiche le niveau de zoom
EndIf
If OSMCopyright
DrawOSMCopyright(MapGadget, *Drawing)
@@ -2490,8 +2490,8 @@ Module PBMap
; StopVectorDrawing()
Select EventType()
Case #PB_EventType_Focus
*PBMap\Drawing\RadiusX = GadgetWidth(*PBMap\Gadget) / 2
*PBMap\Drawing\RadiusY = GadgetHeight(*PBMap\Gadget) / 2
*PBMap\Drawing\RadiusX = DesktopScaledX(GadgetWidth(*PBMap\Gadget)) / 2
*PBMap\Drawing\RadiusY = DesktopScaledY(GadgetHeight(*PBMap\Gadget)) / 2
Case #PB_EventType_KeyUp
Select GetGadgetAttribute(*PBMap\Gadget, #PB_Canvas_Key)
Case #PB_Shortcut_Delete
@@ -2808,8 +2808,8 @@ Module PBMap
BindGadgetEvent(*PBMap\Gadget, @CanvasEvents())
AddWindowTimer(*PBMap\Window, *PBMap\Timer, *PBMap\Options\TimerInterval)
BindEvent(#PB_Event_Timer, @TimerEvents())
*PBMap\Drawing\RadiusX = GadgetWidth(*PBMap\Gadget) / 2
*PBMap\Drawing\RadiusY = GadgetHeight(*PBMap\Gadget) / 2
*PBMap\Drawing\RadiusX = DesktopScaledX(GadgetWidth(*PBMap\Gadget)) / 2
*PBMap\Drawing\RadiusY = DesktopScaledY(GadgetHeight(*PBMap\Gadget)) / 2
EndProcedure
; Creates a canvas and attach our map
@@ -2873,8 +2873,10 @@ EndModule
; IDE Options = PureBasic 5.73 LTS (Windows - x64)
; CursorPosition = 35
; IDE Options = PureBasic 6.00 Alpha 3 (Windows - x64)
; CursorPosition = 2657
; FirstLine = 766
; Folding = --------------------
; EnableThread
; EnableXP