Jump to content

What should i be using to set an image for the fill on an object?


Recommended Posts

I'm trying to apply an image to a surface. I got all the code I need except for how to apply the image I just imported... I've tried vs.SetFPat() and vs.SetTextureRefN() with no luck. 

 

### getting handle (h) from eariler in code
texture_image = vs.ShowCreateImageDialog()

if texture_image != 0:
    newtex_name = f"QR_CODE_{datetime.datetime.now()}"
    vs.SetName(texture_image, newtex_name)
    ledtext =  vs.Name2Index(newtex_name)
    vs.SetObjectVariableLongInt(h, 695, -10)
	
    ### vs.whateverapplysanimage() haha

    vs.SetObjectVariableBoolean(h,79,False)
    vs.SetObjectVariableReal(h,70,-((vs.HWidth(h)/2)*25.4)) # X pos
    vs.SetObjectVariableReal(h,71,-((vs.HHeight(h)/2)*25.4)) # Y pos
    vs.SetObjectVariableReal(h,72,(vs.HWidth(h))*25.4) #width
    vs.SetObjectVariableReal(h,73, (vs.HHeight(h))*25.4) #height
    vs.SetObjectVariableReal(h,74,0) #rotate

    vs.SetObjectVariableBoolean(h,75,False)
    vs.SetObjectVariableBoolean(h,76,False)
    vs.SetObjectVariableBoolean(h,77,False)
    vs.SetObjectVariableBoolean(h,697,False)
    vs.SetObjectVariableBoolean(h,1160,True)

 

Edited by Jayme McColgan
i can't spell...
Link to comment
  • Jayme McColgan changed the title to What should i be using to set an image for the fill on an object?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...