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

  • SEARCH
  • Home
  • 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 6893545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:40:19+00:00 2026-05-27T06:40:19+00:00

Say you’ve got a tile image that you use to build an isometric map.

  • 0

Say you’ve got a tile image that you use to build an isometric map. Each tile is selectable. The problem is that the transparent corners around the tile image are overlapping the tiles behind them. I want the transparent area of the image to be ignored so that the other tiles can be more accurately selected.

Here is an example of such a tile. The outline has been made red so its easy to see the transparent area.

enter image description here

We’re using a browser that supports pointer-event. I was wondering if there was a way to incorporate that into the corner areas, or if I need to find a way to have the program recognize the transparent pixels on their own.

These tile images are not built using canvas. The CSS is simply this:

div.content 
{
   position: absolute;
   top: 105px;
   width: 10px;
   height: 50%;
}

div.content div.tile 
{
   width:96px;
   position: absolute;
   height:102px;
   line-height:96px;
   background-image:url('images/tiles.png');
}

div.content div.tile:hover 
{ 
   opacity:0.8; 
}
  • 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-05-27T06:40:20+00:00Added an answer on May 27, 2026 at 6:40 am

    As far as I know, pointer-event applies only to SVG elements.

    What I would do

    1. create a canvas element for each tile, having the size of the tile
    2. draw the tiles into each canvas
    3. get the imageData from each canvas context and store it somewhere
    4. mousedown events provide coordinates, get the pixel color from that tiles imageData and check it’s alpha value.

    edit:

    Rethinking it, there could be complications with events, since the tiles in the foreground will probably cover the tiles behind them.
    You’ll probably have to let the mousedown events bubble to the container element and manually select the tiles which are “hit” by the click and perform the “per pixel check” on all those.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

say i have a nvarchar field in my database that looks like this 1,
Say that I require a querystring; for example itemid. If that querystring is for
Say that I have a singleton class (Downloader) responsible for downloading and persisting files.
Say I have a LINQ-to-XML query that generates an anonymous type like this: var
Say I have a higher kinded type SuperMap[Key[_],Value[_]]`. Suppose now that I had something
Say I have 2 div s with the same CSS class that are stacked
Say I have multiple objects laying on each other, if I click on one
Say I have function with_foo that takes a block, and wrap it around a
Say, if we already have aScreen that points to the main screen, by UIScreen
Say I have a public method1 calling a private method2 , I use a

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.