mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-01-15 23:29:21 +03:00
Make thumbnail_get_redraw_scale() static.
svn path=/trunk/netsurf/; revision=11949
This commit is contained in:
parent
55fd1d0133
commit
b355c48f97
@ -33,6 +33,28 @@
|
||||
#include "utils/log.h"
|
||||
|
||||
|
||||
/**
|
||||
* Get scale at which thumbnail will be rendered for a given content and
|
||||
* thumbnail size.
|
||||
*
|
||||
* \param content The content to redraw for thumbnail
|
||||
* \param width The thumbnail width
|
||||
* \return scale thumbnail will be rendered at
|
||||
*
|
||||
* Units for width and height are pixels.
|
||||
*/
|
||||
static float thumbnail_get_redraw_scale(struct hlcache_handle *content,
|
||||
int width)
|
||||
{
|
||||
assert(content);
|
||||
|
||||
if (content_get_width(content))
|
||||
return (float)width / (float)content_get_width(content);
|
||||
else
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
|
||||
/* exported interface, documented in thumbnail.h */
|
||||
bool thumbnail_redraw(struct hlcache_handle *content,
|
||||
int width, int height)
|
||||
@ -73,15 +95,3 @@ bool thumbnail_redraw(struct hlcache_handle *content,
|
||||
|
||||
return plot_ok;
|
||||
}
|
||||
|
||||
|
||||
/* exported interface, documented in thumbnail.h */
|
||||
float thumbnail_get_redraw_scale(struct hlcache_handle *content, int width)
|
||||
{
|
||||
assert(content);
|
||||
|
||||
if (content_get_width(content))
|
||||
return (float)width / (float)content_get_width(content);
|
||||
else
|
||||
return 1.0;
|
||||
}
|
||||
|
@ -47,18 +47,6 @@ struct bitmap;
|
||||
bool thumbnail_redraw(struct hlcache_handle *content,
|
||||
int width, int height);
|
||||
|
||||
/**
|
||||
* Get scale at which thumbnail will be rendered for a given content and
|
||||
* thumbnail size.
|
||||
*
|
||||
* \param content The content to redraw for thumbnail
|
||||
* \param width The thumbnail width
|
||||
* \return scale thumbnail will be rendered at
|
||||
*
|
||||
* Units for width and height are pixels.
|
||||
*/
|
||||
float thumbnail_get_redraw_scale(struct hlcache_handle *content, int width);
|
||||
|
||||
|
||||
/* In platform specific thumbnail.c. */
|
||||
bool thumbnail_create(struct hlcache_handle *content, struct bitmap *bitmap,
|
||||
|
Loading…
Reference in New Issue
Block a user