Comments (3)
done!
from codeigniter.
There's still a glitch with this code.
Horizontal positioning is perfect, though the vertical position gets messed up.
I've tested this with rendering different letters/words/sentences, only to see them change vertical position by a pixel or two, depending on which letters/words/sentences you use.
Corrected code:
{{{
#!php
$wm_text_box = imagettfbbox($this->wm_font_size,0,$this->wm_font_path,$this->wm_text);
$wm_text_width = $wm_text_box[2] - $wm_text_box[0];
$fontheight = $wm_font_size;
$fontwidth = $wm_text_width/strlen($this->wm_text);
$this->wm_vrt_offset += $fontheight;
}}}
All I did was re-use the original CI font-size code to get the correct vertical bounding box dimensions.
from codeigniter.
Thanks for your efforts guys.
from codeigniter.
Related Issues (20)
- Email library does not send email through SMTP on PHP 8.2
- Upcoming deprecations in PHP 8.3 HOT 2
- Codeigniter 3.1.4 and PHP 8.1 HOT 4
- mysqli num_rows always return 0 HOT 1
- Session Lost for CI 3.1.13 on Page Refresh HOT 4
- Misleading docblock of the file_get_info function
- xss_clean % error HOT 1
- Bug: inconsistent behavior of Query Builder limit 0 HOT 8
- bug: codeigniter3 db->or_where_not_in(...) HOT 1
- Are there plans for CodeIgniter 3.1.14? HOT 2
- XSS when data is passed on to the web application via an API HOT 3
- only laravel HOT 1
- Upcoming deprecation of mt_rand() HOT 3
- BUG: session_write_close(): Failed to write session data using user defined save handler. Localised with suggested fix HOT 8
- Support for PHP 8.3 HOT 18
- XX delete this - sorry ..
- BUG: set_update_batch / update_batch, getting index HOT 1
- CI3 and PHP8.1(ctype_digit(): Argument of type int will be interpreted as string in the future) HOT 5
- CI 4.5.3 TypeError HOT 2
- Fatal Error. Uncaught error: Class 'CI_Controller' not found HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codeigniter.