It is currently Sun Dec 16, 2018 7:35 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: [PB v.5.62] DrawVectorImage() offset/size incorrect!
PostPosted: Fri Nov 02, 2018 11:08 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sun Sep 11, 2016 2:17 pm
Posts: 275
PB v.5.62 x64 (not tested with other Versions!)

There should be no pink border when the image is drawn.
It should take up exact the same space as the pink box.

Sample:
Code:
EnableExplicit

UsePNGImageDecoder()

Global Image.i

Image = CatchImage(#PB_Any,?TestImg)

If Image
  If OpenWindow(0,0,0,800,580,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
    Debug WindowWidth(0,#PB_Window_InnerCoordinate)
    Debug WindowHeight(0,#PB_Window_InnerCoordinate)
    If StartVectorDrawing(WindowVectorOutput(0))
      VectorSourceColor($FFFF00FF)
      AddPathBox(0,0,800,580)
      FillPath()
      MovePathCursor(0,0)
      DrawVectorImage(ImageID(Image),$FF,800,580);wont draw the image correctly (pink 1 pixel border!)
    EndIf
    Repeat
    Until WaitWindowEvent() = #PB_Event_CloseWindow
    CloseWindow(0)
  EndIf
  FreeImage(Image)
EndIf

End

DataSection
  TestImg:
  ;{ File: testimg.png - Size: 2206 Bytes
  !dw 05089h, 0474Eh, 00A0Dh, 00A1Ah, 00000h, 00D00h, 04849h, 05244h, 00000h, 06802h, 00000h, 0B601h, 00208h, 00000h, 04400h, 0ED51h, 000DCh, 00800h, 04965h, 04144h, 07854h, 0EDDAh, 03BDDh, 01B72h, 0103Bh, 05140h, 0A5D1h, 03925h, 0CA67h, 03B25h, 0CE75h, 02945h, 02A98h, 01395h, 0E68Fh, 00683h, 081BAh, 0D273h, 08B27h, 00063h
  !dw 0CBEAh, 033E1h, 0C7A9h, 0F5F3h, 000FEh, 08E00h, 065F9h, 00009h, 03840h, 04001h, 00138h, 03840h, 04001h, 00138h, 03840h, 04001h, 02D38h, 00001h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 025A7h, 00000h, 004E1h, 0E100h, 00004h, 004E1h, 0E100h, 00004h, 004E1h, 0E100h, 004B4h, 02000h, 0009Ch, 09C20h
  !dw 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 00096h, 08400h, 00013h, 01384h, 08400h, 00013h, 01384h, 08400h, 00013h, 0D384h, 00012h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 05A70h, 00002h, 04E10h, 01000h, 0004Eh, 04E10h, 01000h, 0004Eh, 04E10h, 01000h, 04B4Eh, 00000h, 009C2h, 0C200h, 00009h
  !dw 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00969h, 04000h, 00138h, 03840h, 04001h, 00138h, 03840h, 04001h, 00138h, 03840h, 0012Dh, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 0A708h, 00025h, 0E100h, 00004h, 004E1h, 0E100h, 00004h, 004E1h, 0E100h, 00004h, 0B4E1h, 00004h, 09C20h, 02000h, 0009Ch, 09C20h
  !dw 02000h, 0009Ch, 09C20h, 02000h, 0969Ch, 00000h, 01384h, 08400h, 00013h, 01384h, 08400h, 00013h, 01384h, 08400h, 012D3h, 08000h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 0025Ah, 01000h, 0004Eh, 04E10h, 01000h, 0004Eh, 04E10h, 01000h, 0004Eh, 04E10h, 0004Bh, 0C200h, 00009h, 009C2h, 0C200h, 00009h
  !dw 009C2h, 0C200h, 00009h, 069C2h, 00009h, 03840h, 04001h, 00138h, 03840h, 04001h, 00138h, 03840h, 04001h, 02D38h, 00001h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 025A7h, 00000h, 004E1h, 0E100h, 00004h, 004E1h, 0E100h, 00004h, 004E1h, 0E100h, 004B4h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h
  !dw 02000h, 0009Ch, 09C20h, 00096h, 08400h, 00013h, 01384h, 08400h, 00013h, 01384h, 08400h, 00013h, 0D384h, 00012h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 05A70h, 00002h, 04E10h, 01000h, 0004Eh, 04E10h, 01000h, 0004Eh, 04E10h, 01000h, 04B4Eh, 00000h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h
  !dw 009C2h, 0C200h, 00969h, 04000h, 00138h, 03840h, 04001h, 00138h, 03840h, 04001h, 00138h, 03840h, 0012Dh, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 0A708h, 00025h, 0E100h, 00004h, 004E1h, 0E100h, 00004h, 004E1h, 0E100h, 00004h, 0B4E1h, 00004h, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h
  !dw 02000h, 0969Ch, 00000h, 01384h, 08400h, 00013h, 01384h, 08400h, 00013h, 01384h, 08400h, 012D3h, 08000h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 0025Ah, 03800h, 0D3EEh, 09012h, 0DFD6h, 0BF3Fh, 0BFF7h, 0F9E0h, 05B7Ah, 08A25h, 05E9Eh, 0B8C7h, 087AEh, 01B3Dh, 0A3F2h, 0E712h, 00DC7h, 070EDh, 07791h
  !dw 0D50Eh, 0CBE5h, 0F83Bh, 025A0h, 028F6h, 01CF4h, 0785Eh, 053F4h, 0D68Bh, 0A479h, 0BAA4h, 026B6h, 0CBA7h, 0164Ch, 0D54Eh, 035CCh, 0BB97h, 0645Dh, 074F4h, 0F6BEh, 025B8h, 0A8F6h, 039C3h, 0F53Ch, 0D7E8h, 0AD16h, 060C3h, 073C9h, 04161h, 0CAE7h, 04E70h, 0FFCBh, 094E3h, 014F6h, 0D617h, 0DAEAh, 07E1Ah, 0EE2Bh, 0999Ch, 05DE8h
  !dw 07248h, 0A161h, 0CDE7h, 01661h, 0E84Eh, 06137h, 01B8Dh, 0D44Fh, 03D0Ah, 093DBh, 0E14Fh, 0B304h, 0D895h, 01DFDh, 06C7Bh, 00C94h, 044E1h, 02135h, 0A1FBh, 0C3F5h, 09C22h, 01060h, 0EF50h, 038E4h, 008B4h, 0AA27h, 0BD89h, 06876h, 04E11h, 0D500h, 09224h, 00E4Fh, 0E66Ah, 07AF9h, 0F0AFh, 0FAE6h, 0D7FBh, 07670h, 0FE95h, 0DDF7h
  !dw 0AC2Eh, 03DB6h, 0B012h, 00FFEh, 0E55Ah, 0C5BDh, 06708h, 0818Dh, 0FCD8h, 0EABDh, 0CD93h, 0FDF4h, 0F98Bh, 0AFFEh, 09FA1h, 0931Dh, 08F70h, 0D62Ah, 0EEAEh, 04512h, 0CC7Fh, 0BFC2h, 0295Fh, 055A2h, 0A978h, 0F296h, 042CFh, 0AF9Eh, 074B7h, 081B9h, 0B88Eh, 06B92h, 06AAFh, 0BE5Ch, 0ED8Ch, 03ACFh, 0C2CCh, 00D09h, 0BF9Eh, 01D9Fh
  !dw 04658h, 094CFh, 09EFBh, 086FFh, 0D5ACh, 093C1h, 0E4CFh, 054BCh, 054CBh, 0C803h, 061B8h, 0EC54h, 09F9Bh, 0EDBDh, 06E1Bh, 0E197h, 0BB60h, 004E3h, 0D13Ch, 09C69h, 0B1B1h, 08969h, 0747Bh, 09F77h, 009C2h, 081B8h, 0ED9Bh, 0856Ah, 0384Dh, 05001h, 0844Dh, 02813h, 08FDBh, 0AFCEh, 01ED3h, 0DDBFh, 04D54h, 084E1h, 0BC2Ch, 0CDA1h
  !dw 082B6h, 08270h, 08B21h, 06C9Bh, 01384h, 093B4h, 090E0h, 07DA4h, 0169Dh, 084E1h, 0B38Ch, 014D5h, 064F3h, 0EDC8h, 0C226h, 0A709h, 0AD47h, 00A7Ch, 080ADh, 09C21h, 09F20h, 09213h, 08431h, 07213h, 0D6CDh, 09F2Dh, 03A0Ah, 04DF7h, 06BA4h, 03923h, 0559Fh, 09B4Bh, 0D1C1h, 056F9h, 007C3h, 03A78h, 0038Dh, 0800Fh, 02783h, 0D09Ch
  !dw 0C666h, 0FA9Dh, 06045h, 07F0Dh, 0865Dh, 09629h, 015EDh, 01F85h, 0B737h, 06FF4h, 0ECE8h, 00B7Fh, 084EBh, 0E367h, 05AA5h, 08D86h, 086D7h, 0C9B3h, 06C2Bh, 05ACCh, 00FCDh, 0202Fh, 0270Bh, 03D04h, 0368Fh, 0565Ch, 0CEABh, 0F752h, 08E61h, 070B7h, 05442h, 0CD3Bh, 02A97h, 06ADBh, 010A7h, 0484Eh, 04ED1h, 0D913h, 0160Dh, 02708h
  !dw 0B44Bh, 0CBD3h, 08CB6h, 0BE7Dh, 0C205h, 0EAC9h, 050A3h, 0F33Bh, 0A6EFh, 0423Dh, 03138h, 0D328h, 07ADDh, 09152h, 092A0h, 0F79Ch, 01271h, 0DB78h, 0F377h, 06E1Ah, 0D00Eh, 0DE75h, 0E82Ch, 0A694h, 04EBDh, 0024Fh, 01384h, 0CC06h, 03BC7h, 047A3h, 0933Bh, 06367h, 00DFAh, 0F83Ah, 0D3B7h, 05AD7h, 054BCh, 0814Bh, 023D1h, 0EB7Eh
  !dw 0F128h, 04DF6h, 0139Dh, 0904Eh, 0004Fh, 044E1h, 0DD3Eh, 0241Ch, 0AFD8h, 01B53h, 07C34h, 03CB3h, 04339h, 05938h, 01C77h, 0EB63h, 03841h, 000C1h, 0FF9Dh, 0B3A6h, 0AF0Ah, 00864h, 08027h, 08114h, 0E270h, 013A6h, 01E3Bh, 028F6h, 02F4Ah, 0009Ch, 052C3h, 04224h, 02708h, 0FCC0h, 05EF4h, 00138h, 0DF0Ah, 056B6h, 02C7Ch, 01384h
  !dw 0AD60h, 0B914h, 014E9h, 0084Eh, 0329Fh, 006ADh, 0C1CDh, 0E3EFh, 081EEh, 0D2E8h, 0A76Bh, 04270h, 073F8h, 086F3h, 044F9h, 0DCC6h, 02277h, 0B89Ch, 034FBh, 0C4A7h, 0DEAFh, 07B05h, 0283Ah, 0909Ch, 09F37h, 0BFC7h, 0EBDEh, 08AB4h, 0D33Bh, 02679h, 0BF09h, 0938Fh, 03FF6h, 017C3h, 0DD26h, 0E3F7h, 0FCEEh, 0F359h, 0FE85h, 0BECDh
  !dw 0EA76h, 0679Ch, 084E1h, 053D3h, 0F2E3h, 0425Dh, 069C3h, 076E2h, 09A73h, 0D50Eh, 066BDh, 09C75h, 09792h, 0816Ah, 0DDD4h, 00D72h, 02708h, 07618h, 04E38h, 02708h, 07318h, 0BD4Ch, 00E35h, 0C215h, 0D189h, 0AD8Ch, 0B474h, 04E10h, 09F96h, 04683h, 0D11Bh, 06C07h, 019C8h, 0B073h, 01385h, 09CEDh, 0A267h, 060B1h, 03A03h, 0361Fh
  !dw 03B07h, 06F1Bh, 05947h, 0606Bh, 0F865h, 0F1C7h, 014DBh, 07B68h, 02625h, 0BE8Bh, 071CEh, 09D92h, 012EAh, 0F61Eh, 0AC66h, 09FFDh, 088BAh, 0E9DDh, 0CED0h, 01F6Eh, 0DD90h, 0F4E7h, 0DFF6h, 054A3h, 01C17h, 0D7F7h, 0F9DFh, 041CEh, 036DFh, 0BF74h, 07D46h, 00878h, 089C2h, 011A7h, 00B26h, 09C4Bh, 0E764h, 03859h, 06001h, 0FE09h
  !dw 01071h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 00800h, 00027h, 02708h, 00800h
  !dw 00027h, 02708h, 00800h, 00027h, 02708h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 08000h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 00002h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h
  !dw 00800h, 00027h, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 02000h, 0009Ch
  !dw 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 08000h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 00002h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 09C20h, 02000h, 0009Ch, 09C20h, 02000h
  !dw 0009Ch, 09C20h, 02000h, 0009Ch, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h
  !dw 08000h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 07080h, 00002h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 07080h, 08002h, 00270h
  !dw 07080h, 08002h, 00270h, 07080h, 08002h, 00270h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 00800h, 00027h, 02708h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 02000h, 0009Ch, 09C20h, 08000h, 00270h, 07080h, 08002h, 00270h, 07080h, 08002h
  !dw 00270h, 07080h, 00002h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 009C2h, 0C200h, 00009h, 0017Ch, 039CFh, 0E730h, 0401Fh, 0E94Dh, 00000h, 00000h, 04549h, 0444Eh, 042AEh, 08260h
  ;}
EndDataSection


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye