Start a new topic

Draw Rectangle

Draw Rectangle


Dear Wikitude Technical Team,

my name is Arun Gupta. I am using wikitude library with vuzix smart glass. I am impressed with the ability of wikitude. Here I have a query. I need to draw color rectangle on particular location. I am able to draw color circle but didn't find any function to draw rectangle. How could I do that?

My Second query: I have location of the user via GPS and drew some POI as images for example 10 POI as images on different location. My issue is that if the distance between poi and user location is something more, the size of poi is very small and unable to see properly. I read in a post that AR.context.scene.scalingFactor equals to 1.0 will make the size of drawable fixed.  But I think now scale is used instead of AR.context.scene.scalingFactor, is it right? I tried to do like below but no help

this.markerDrawable_idle = new AR.ImageDrawable(World.markerDrawable_idle, 2.5, {

        zOrder: 0,

        opacity: 1.0,

        scale:1,

        onClick: Marker.prototype.getOnClickTrigger(this)

    });

Thanks & regards,

Arun Gupta

 

Hi Arun,

Answers to your 2 questions:

1 - There is no rectangle drawable, you can use an ImageDrawable for this purpose (a PNG file, for example).
2 - This is a very common problem, and the solution is described in the javascript documentation (see http://www.wikitude.com/external/doc/documentation/4.1/htmlcss/sdu-dbs.html)

I hope this helps. Greetings

Nicola
Login or Signup to post a comment