Создать форум бесплатно: ixbb.ru :: Календарь на Март 2024 года: calendar2008.ru/2024/mart/

  Reply to this topicStart new topicStart Poll

Координатная сетка ка рисунке

stranger
Отправлено: Jul 3 2010, 03:11 AM
Quote Post


  Майор
*

Группа: Members
Сообщений: 101
Пользователь №: 108
Регистрация:
24-November 06



Всем привет. Давно меня тут не было((((

У меня такая проблема, не могу допереть как на рисунок нанести координатную сетку. Т.е. дано: рисунок и даны координаты вида: 1000.0000 -500.0000 15.0000 и собственно нада на карте поставит значок в этих координатах, но есть одно НО, вышеприведённые координаты не являются координатами в px, Это чисто игровые координаты. И ещё одна особенность: координаты начинаются не от угла, а от центра картинки (примерно центра).

Собственно такая задача, и что-то не могу понять как это реализуется.

Заранее спасибо за подсказки wink.gif

Вот сделал набросок, чтоб стало ясно о чём я wink.gif
user posted image
PMEmail PosterUsers WebsiteICQ
Top
stranger
Отправлено: Jul 3 2010, 07:40 AM
Quote Post


  Майор
*

Группа: Members
Сообщений: 101
Пользователь №: 108
Регистрация:
24-November 06



Посидел, подумал, вот что пришло в голову:
Сделать карту в шесть раз меньше исходного (исходный 6000px, т.е. 1 метр в игру = 1 пикселю на карте), ну а дальше просто координату делить на 6 rolleyes.gif
CODE
$x = -2030.000122;
$y = -100.498283;

$xm = $x/6;
$ym = -$y/6;


$map=imagecreatefromjpeg("map.jpg");
$mapw=imagesx($map);
$maph=imagesy($map);
imagealphablending($map, true);

$pos=imagecreatefrompng("pos.png");
$posw=ImageSX($pos);
$posh=imagesy($pos);
imagecopy($map, $pos, $mapw/2+$xm-20, $maph/2+$ym, 0, 0, $posw, $posh);
imagejpeg($map);

Мне кажется это очень топорный метод, а Вы как считаете? smile.gif
PMEmail PosterUsers WebsiteICQ
Top
ruitrjiu
Отправлено: Dec 7 2013, 05:19 PM
Quote Post


  Unregistered









Dog Rooms Design Band of Beverly<br><br>Hillsides has been earned to assist create a change in the breathing space, Chloe Handbags Outlet focused around a bright brand new the white kind of fiberglass look-alike from a middle century Canada Goose fashionable old classic the Eero Saarinen Tulip 30 kitchen table, utilizing four chairs through shiny green soft cushions $825, The very streamlined place fit in a tad bit more adequately on the space, Moncler Sale and also podio fashion hind legs taken away the exact disheveled try looking in my family room. While using the dining room table together with chair because starting place, Posture Interiors' Christopher Grub together with Linda Turner conceptualized completely new perky try to find the area, all the way through, most around the nominal spending plan requirements within the customer.<br>
Devilish Rooms Style and design Band of Beverly
Posture Decorations Model Group of Beverly
Often the appears to be calculated substantial ceiling eeeeee
Top
ruitrjiu
Отправлено: Dec 13 2013, 03:19 AM
Quote Post


  Unregistered









Think this Miley's EMAs<br><br>stop ended up being scandalous and stunning, and / or offers the put celebrity witout a doubt expired connected with ways to amaze and amazement? Moncler Jackets Far more Because of this Factor: Miley Cyrus's 'Wrecking Ball' Training video Parodied just by Betty White colored: Many other Celebrities Spoof Miley Miley Cyrus Sought Nude VMAs Efficiency: Furthermore Women Stripped All the way down To get viewing my favorite Cheap Canada Goose Digg stars Typically the Alright Cousons and the recent Canada Goose Coats videos off their Youngsters Responds series,<br>
That it is possible that will the woman's stop still did not distress many
They have possible which him / her stunt didn't surprise very many
That it is possibly that him / her stop still did not surprise a lot of xxxxxx
Top
mikityak
Отправлено: Feb 6 2014, 08:10 PM
Quote Post


  Капитан
*

Группа: Members
Сообщений: 69
Пользователь №: 5045
Регистрация:
6-February 14



asdf


--------------------
PMEmail PosterUsers Website
Top
rashod
Отправлено: Oct 24 2014, 04:42 PM
Quote Post


  Солдат
*

Группа: unior
Сообщений: 2
Пользователь №: 5348
Регистрация:
22-October 14



Что ето такое?


--------------------
PMEmail PosterUsers Website
Top

Topic Options Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.0287 ]   [ 10 queries used ]   [ GZIP выключен ]