# Draggable vector graphics example

**URL:** <https://forum.xojo.com/t/draggable-vector-graphics-example/88024>\
**Category:** Getting Started\
**Created:** [April 6, 2026, 2:17am UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024 "2026-04-06T02:17:09Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nicholas\_Loveday](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@Nicholas\_Loveday](https://forum.xojo.com/u/Nicholas_Loveday)\
**Post date:** [April 6, 2026, 2:17am UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/1 "2026-04-06T02:17:10Z")

</div>

Something for beginners to play with demonstrating how to use curveShape and Group2D to make an object that can be dragged, and scrolled …

[Vector graphics demo.xojo\_binary\_project.zip](https://forum.xojo.com/uploads/short-url/qdVyeU5uKD0JKNpHPg1EjvEScsm.zip) (9.1 KB)

---

<div class="post-metadata">

**Author:** ![RudolfJ](https://forum.xojo.com/user_avatar/forum.xojo.com/rudolfj/32/644_2.png) [@RudolfJ](https://forum.xojo.com/u/RudolfJ)\
**Post date:** [April 6, 2026, 5:15am UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/2 "2026-04-06T05:15:30Z")

</div>

Hello,  
Nicholas  
my attempt to draw 2D objects and save them in SQLite  
[Canvas-Objekt-DEMO.xojo\_binary\_project.zip](https://forum.xojo.com/uploads/short-url/fV92qhGBC7vQhkDeqJNarzdRqeN.zip) (198.6 KB)

---

<div class="post-metadata">

**Author:** ![Jeff\_Tullin](https://forum.xojo.com/user_avatar/forum.xojo.com/jeff_tullin/32/693_2.png) [@Jeff\_Tullin](https://forum.xojo.com/u/Jeff_Tullin)\
**Post date:** [April 6, 2026, 6:41am UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/3 "2026-04-06T06:41:22Z")

</div>

And still not available in iOS after all these years

---

<div class="post-metadata">

**Author:** ![Nicholas\_Loveday](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@Nicholas\_Loveday](https://forum.xojo.com/u/Nicholas_Loveday)\
**Post date:** [April 6, 2026, 9:35am UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/5 "2026-04-06T09:35:05Z")

</div>

Hi Rudolf, I all the data as packed binary in my own format … no SQL used. The app does everything with internal data structures, not SQL.

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [April 6, 2026, 12:38pm UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/6 "2026-04-06T12:38:28Z")

</div>

you can build something with iOS …

 ![image](https://forum.xojo.com/uploads/default/original/3X/3/f/3f2bce03bbf2f43a84c0aa8a5c0b0722015d4238.jpeg)  
or macos  
 ![image](https://forum.xojo.com/uploads/default/original/3X/4/0/4006f523d2cf3bb351f541043fba2f67d8da4f71.jpeg)  
or windows  
 ![image](https://forum.xojo.com/uploads/default/original/3X/3/0/30529e43096606a1cf19535a189f95d0bc6afc9a.png)  
or web app  
 ![image](https://forum.xojo.com/uploads/default/original/3X/9/c/9c54addc4e98b97cb6268af6c0ee6eb93ada3fc9.png)

---

<div class="post-metadata">

**Author:** ![Jeff\_Tullin](https://forum.xojo.com/user_avatar/forum.xojo.com/jeff_tullin/32/693_2.png) [@Jeff\_Tullin](https://forum.xojo.com/u/Jeff_Tullin)\
**Post date:** [April 6, 2026, 1:00pm UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/7 "2026-04-06T13:00:15Z")

</div>

Object2d isnt available in iOS…?

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [April 6, 2026, 1:08pm UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/8 "2026-04-06T13:08:07Z")

</div>

I’m rebuilding it all from scratch to have the same classes among all platforms  
still strugling with android because of stupid kotlin errors it seems.  
the code works on all other platforms

---

<div class="post-metadata">

**Author:** ![Jean-Yves\_Pochez](https://forum.xojo.com/user_avatar/forum.xojo.com/jean-yves_pochez/32/21769_2.png) [@Jean-Yves\_Pochez](https://forum.xojo.com/u/Jean-Yves_Pochez)\
**Post date:** [April 6, 2026, 2:35pm UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/9 "2026-04-06T14:35:29Z")

</div>

well it’s now also working on android !

 ![image](https://forum.xojo.com/uploads/default/original/3X/b/d/bdd85cd4a379dd602ae49f006c1a0483fbe8c5fe.jpeg)  
 ![image](https://forum.xojo.com/uploads/default/original/3X/5/9/590df25354b62f368d13fcf4c01ddcba9aa49eb3.jpeg)  
 ![image](https://forum.xojo.com/uploads/default/original/3X/b/9/b95df3596d691f171293eb6a536946d5512772e3.jpeg)  
 ![image](https://forum.xojo.com/uploads/default/original/3X/f/f/ffd38bdecb1fd5d2ad95cd42d75f5393027d9ce3.jpeg)  
 ![image](https://forum.xojo.com/uploads/default/original/3X/7/d/7d6e25e9da9dd410d3e77e44ba147d81964ece6a.jpeg)

---

<div class="post-metadata">

**Author:** ![Nicholas\_Loveday](https://forum.xojo.com/letter_avatar_proxy/v4/letter/n/f1d935/32.png) [@Nicholas\_Loveday](https://forum.xojo.com/u/Nicholas_Loveday)\
**Post date:** [April 7, 2026, 3:37am UTC](https://forum.xojo.com/t/draggable-vector-graphics-example/88024/10 "2026-04-07T03:37:49Z")

</div>

Jean-Yves,

The app I was working on was originally done long ago - it used bitmaps, which was fine until recently when I was asked to add something. Selecting/dragging simple objects (ovals, rectangles) is easy, because a “contains” method is trivial.

What wasn’t trivial in bitmaps was finding a way to select and drag/reshape an arbitrary open curve, in a complex drawing with many overlapping objects - there is no function to determine if you have clicked within say 3 pixels of an individual curve.

However there is a way with vector graphics - the graphicsPath objects have a “contains” function. So, as shown in the example: (1) divide a complex curve into smaller simple arcs and (2) use the control points of these arcs to define small triangles containing each arc.

Regards to all.
