Animated Vector Graphics Scene Graph

Share your advanced PureBasic knowledge/code with the community.
User avatar
idle
Always Here
Always Here
Posts: 6000
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Animated Vector Graphics Scene Graph

Post by idle »

mk-soft wrote: Fri Oct 17, 2025 5:20 pm macOS:

No circles are displayed in macOS !?
I still have to apply fix ups for DPI scaling from the recent changes
scale unscale, rescale descale, left = right, up = down, forward = backwards, -1 = 1, a dyslexics nightmare of opposites :lol:

Fixed;

I will keep it at 125% for now and added bonus I can see.
User avatar
mk-soft
Always Here
Always Here
Posts: 6300
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Animated Vector Graphics Scene Graph

Post by mk-soft »

Unfortunately, I still don't see any circles here under macOS (Intel). :(

But I didn't find out why ...
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
Mindphazer
Enthusiast
Enthusiast
Posts: 482
Joined: Mon Sep 10, 2012 10:41 am
Location: Savoie

Re: Animated Vector Graphics Scene Graph

Post by Mindphazer »

No circles here neither (MacOS M4)
And the switch button is grey and stays grey even when clicked
MacBook Pro 16" M4 Pro - 24 Gb - MacOS 15.4.1 - Iphone 15 Pro Max - iPad at home
...and unfortunately... Windows at work...
Mesa
Enthusiast
Enthusiast
Posts: 445
Joined: Fri Feb 24, 2012 10:19 am

Re: Animated Vector Graphics Scene Graph

Post by Mesa »

So fine :D

To scale the drawing with the wheel mouse, canvas has to have the #PB_Canvas_Keyboard flag (Windows only).


M.
User avatar
idle
Always Here
Always Here
Posts: 6000
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Animated Vector Graphics Scene Graph

Post by idle »

Mindphazer wrote: Sat Oct 18, 2025 9:35 am No circles here neither (MacOS M4)
And the switch button is grey and stays grey even when clicked
Is that with version 0.2.6a?
here is what it should look like
https://atomicwebserver.com/avgscenegraph.mp4

and the latest version 0.2.7a

I've changed how it does grouped objects so the offset is relative to the parent, so this
Global switchID = AVGCreateObject(*scene,112,480,"Switch")
Global knobID = AVGCreateObject(*scene,23,25,"SwitchKnob", switchID)
vs
Global switchID = AVGCreateObject(*scene,112,480,"Switch")
Global knobID = AVGCreateObject(*scene,-89,-455,"SwitchKnob", switchID)

It sets both the object parameter and cursor to the correct offset

I don't know why you're not seeing any circles?
does commenting out line 2795 to 2797 make any difference?

Code: Select all

  ;AVGAddPathCircle(*scene, circle1, 0, 0, 20)
 ; AVGVectorSourceColor(*scene, circle1, RGBA(128, 128, 255, 255),RGBA(255, 255, 0, 255))
 ; AVGFillPath(*scene, circle1) 
User avatar
mk-soft
Always Here
Always Here
Posts: 6300
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Animated Vector Graphics Scene Graph

Post by mk-soft »

Found ...

macOS need right EndAngle.

Line 1513:

Code: Select all

Procedure AVGAddPathCircle(*scene.AVGScene, objectID, x.d, y.d, radius.d, StartAngle.d=0, EndAngle.d=360, flags=#PB_Path_Default,*userdata=0)
Line 1555:

Code: Select all

Procedure AVGAddPathEllipse(*scene.AVGScene, objectID, x.d, y.d, Rx.d, ry.d, sa.d=0, ed.d=360, flags=#PB_Path_Default,*userdata=0)
Last edited by mk-soft on Sat Oct 18, 2025 11:10 am, edited 2 times in total.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
User avatar
idle
Always Here
Always Here
Posts: 6000
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Animated Vector Graphics Scene Graph

Post by idle »

mk-soft wrote: Sat Oct 18, 2025 10:53 am Found ...

macOS need right EndAngle.

Line 1513:

Code: Select all

Procedure AVGAddPathCircle(*scene.AVGScene, objectID, x.d, y.d, radius.d, StartAngle.d=0, EndAngle.d=360, flags=#PB_Path_Default,*userdata=0)
Line 1555:

Code: Select all

Procedure AVGAddPathEllipse(*scene.AVGScene, objectID, x.d, y.d, Rx.d, ry.d, sa.d=0, ed.d=360, flags=#PB_Path_Default,*userdata=0)
Thanks and good find. I will add it in the morning
User avatar
mk-soft
Always Here
Always Here
Posts: 6300
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Animated Vector Graphics Scene Graph

Post by mk-soft »

I think its a bug on windows and linux 8)
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Post Reply