Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9279211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:34:46+00:00 2026-06-18T17:34:46+00:00

I am working on svg editor, specifically the Method draw implementantion. I want on

  • 0

I am working on svg editor, specifically the Method draw implementantion.

I want on loading the editor to load an image instead of a background rectangle. Currently the javascript file includes this command to create a background rectangle within the editor.

var createBackground = function(fill) {
    svgCanvas.createLayer("background")
        cur_shape = svgCanvas.addSvgElementFromJson({
            "element": "rect",
            "attr": {

                "x": -1,
                "y": -1,
                "width": res.w+2,
                "height": res.h+2,
                "stroke": "none",
                "id": "canvas_background",
                "opacity": 1,
                "fill":  '#ffffff',
                "style": "pointer-events:none"

I want to create an image instead of a rectangle.

Is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T17:34:47+00:00Added an answer on June 18, 2026 at 5:34 pm

    You could change the function like this:

    var createBackground = function(fill) {
        svgCanvas.createLayer("background")
            cur_shape = svgCanvas.addSvgElementFromJson({
                "element": "image",
                "attr": {
                    "x": -1,
                    "y": -1,
                    "width": res.w+2,
                    "height": res.h+2,
                    "xlink:href": "/images/whatever.png" //this path should be changed
                    "id": "canvas_background",
                    "opacity": 1,
                    "style": "pointer-events:none"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

BACKGROUND: I am currently working on a floorplan editor where the user can create
I am working on SVG-EDITOR for a long time now. I want to make
I am currently working with svg and its dom manipulation... Are there any WYSIWYG
I am working with svg and its dom manipulation. I want to create a
Hello all I am working on javascript jquery and svg.I want to ask a
I am working with SVG graphics to draw Pie Graphs. I am given the
Is there any working module to convert a SVG image into a pixel format
I'm currently working with a Swiss map in SVG format. The <svg> tag is
What's wrong with SVG image? (it is not working in Firefox) data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4MT0iMCUiIHkxPSIwJSIgeDI9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwIiBzdHlsZT0ic3RvcC1jb2xvcjogcmdiKDEyNywxMjcsMTI3KTtzdG9wLW9wYWNpdHk6IDA7IiAvPjxzdG9wIG9mZnNldD0iMCIgc3R5bGU9InN0b3AtY29sb3I6IHJnYigxMjcsMTI3LDEyNyk7c3RvcC1vcGFjaXR5OiAwOyIgLz48c3RvcCBvZmZzZXQ9IjEiIHN0eWxlPSJzdG9wLWNvbG9yOiByZ2IoMTI3LDEyNywxMjcpO3N0b3Atb3BhY2l0eTogMTsiIC8+PHN0b3Agb2Zmc2V0PSIxIiBzdHlsZT0ic3RvcC1jb2xvcjogcmdiKDEyNywxMjcsMTI3KTtzdG9wLW9wYWNpdHk6IDE7IiAvPjwvbGluZWFyR3JhZGllbnQ +PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjYSkiLz48L3N2Zz4=
I'm working on an image editor and I have to create some pixel manipulation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.