Skip to content

Commit

Permalink
Several changes:
Browse files Browse the repository at this point in the history
 - Fixed single touch without rubberband effect causing series select
 - Updated sqlite to 3.17.0
 - Issue #5574: more documentation for font selection of WPdfRenderer
 - more space for text in wide legend columns
  • Loading branch information
RockinRoel committed Mar 7, 2017
1 parent f7010ec commit 8ab2326
Show file tree
Hide file tree
Showing 8 changed files with 88,162 additions and 39,918 deletions.
6 changes: 5 additions & 1 deletion src/Wt/Chart/WCartesianChart.C
Original file line number Diff line number Diff line change
Expand Up @@ -2674,7 +2674,11 @@ void WCartesianChart::renderLegendItem(WPainter& painter,
#else
painter.setPen(fontPen);
#endif
painter.drawText(pos.x() + 23, pos.y() - 9, 100, 20,

int width = (int)legendColumnWidth().toPixels();
if (width < 100)
width = 100;
painter.drawText(pos.x() + 23, pos.y() - 9, width, 20,
AlignLeft | AlignMiddle,
series.model()->headerData(series.modelColumn()));
}
Expand Down
124,631 changes: 85,084 additions & 39,547 deletions src/Wt/Dbo/backend/amalgamation/sqlite3.c

Large diffs are not rendered by default.

3,299 changes: 2,969 additions & 330 deletions src/Wt/Dbo/backend/amalgamation/sqlite3.h

Large diffs are not rendered by default.

59 changes: 51 additions & 8 deletions src/Wt/Dbo/backend/amalgamation/sqlite3ext.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
** as extensions by SQLite should #include this file instead of
** sqlite3.h.
*/
#ifndef _SQLITE3EXT_H_
#define _SQLITE3EXT_H_
#ifndef SQLITE3EXT_H
#define SQLITE3EXT_H
#include "sqlite3.h"

typedef struct sqlite3_api_routines sqlite3_api_routines;

/*
** The following structure holds pointers to all of the SQLite API
** routines.
Expand Down Expand Up @@ -267,8 +265,35 @@ struct sqlite3_api_routines {
void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
void(*)(void*), unsigned char);
int (*strglob)(const char*,const char*);
/* Version 3.8.11 and later */
sqlite3_value *(*value_dup)(const sqlite3_value*);
void (*value_free)(sqlite3_value*);
int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
/* Version 3.9.0 and later */
unsigned int (*value_subtype)(sqlite3_value*);
void (*result_subtype)(sqlite3_context*,unsigned int);
/* Version 3.10.0 and later */
int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);
int (*strlike)(const char*,const char*,unsigned int);
int (*db_cacheflush)(sqlite3*);
/* Version 3.12.0 and later */
int (*system_errno)(sqlite3*);
/* Version 3.14.0 and later */
int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
char *(*expanded_sql)(sqlite3_stmt*);
};

/*
** This is the function signature used for all extension entry points. It
** is also defined in the file "loadext.c".
*/
typedef int (*sqlite3_loadext_entry)(
sqlite3 *db, /* Handle to the database. */
char **pzErrMsg, /* Used to set error string on failure. */
const sqlite3_api_routines *pThunk /* Extension API function pointers. */
);

/*
** The following macros redefine the API routines so that they are
** redirected through the global sqlite3_api structure.
Expand All @@ -280,7 +305,7 @@ struct sqlite3_api_routines {
** the API. So the redefinition macros are only valid if the
** SQLITE_CORE macros is undefined.
*/
#ifndef SQLITE_CORE
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
#ifndef SQLITE_OMIT_DEPRECATED
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
Expand Down Expand Up @@ -407,6 +432,7 @@ struct sqlite3_api_routines {
#define sqlite3_value_text16le sqlite3_api->value_text16le
#define sqlite3_value_type sqlite3_api->value_type
#define sqlite3_vmprintf sqlite3_api->vmprintf
#define sqlite3_vsnprintf sqlite3_api->vsnprintf
#define sqlite3_overload_function sqlite3_api->overload_function
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
Expand Down Expand Up @@ -497,9 +523,26 @@ struct sqlite3_api_routines {
#define sqlite3_result_blob64 sqlite3_api->result_blob64
#define sqlite3_result_text64 sqlite3_api->result_text64
#define sqlite3_strglob sqlite3_api->strglob
#endif /* SQLITE_CORE */
/* Version 3.8.11 and later */
#define sqlite3_value_dup sqlite3_api->value_dup
#define sqlite3_value_free sqlite3_api->value_free
#define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
#define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
/* Version 3.9.0 and later */
#define sqlite3_value_subtype sqlite3_api->value_subtype
#define sqlite3_result_subtype sqlite3_api->result_subtype
/* Version 3.10.0 and later */
#define sqlite3_status64 sqlite3_api->status64
#define sqlite3_strlike sqlite3_api->strlike
#define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
/* Version 3.12.0 and later */
#define sqlite3_system_errno sqlite3_api->system_errno
/* Version 3.14.0 and later */
#define sqlite3_trace_v2 sqlite3_api->trace_v2
#define sqlite3_expanded_sql sqlite3_api->expanded_sql
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */

#ifndef SQLITE_CORE
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
/* This case when the file really is being compiled as a loadable
** extension */
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
Expand All @@ -514,4 +557,4 @@ struct sqlite3_api_routines {
# define SQLITE_EXTENSION_INIT3 /*no-op*/
#endif

#endif /* _SQLITE3EXT_H_ */
#endif /* SQLITE3EXT_H */
20 changes: 20 additions & 0 deletions src/Wt/Render/WPdfRenderer
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ namespace Wt {
* \endcode
* \endif
*
* Font information is embedded in the PDF. Fonts supported are native
* PostScript fonts (Base-14) (only ASCII-7), or true type fonts
* (Unicode). See addFontCollection() for more information on how
* fonts are located.
*
* \ingroup render
*/
class WT_API WPdfRenderer : public WTextRenderer
Expand Down Expand Up @@ -99,6 +104,21 @@ public:
void setDpi(int dpi);

/*! \brief Adds a font collection.
*
* If %Wt has been configured to use <tt>libpango</tt>, then font
* matching and character selection is done by libpango, and calls
* to this method are ignored. See WPdfImage::addFontCollection()
* for more details.
*
* If %Wt was not configured to use <tt>libpango</tt>, you will have
* to add the directories where %Wt should look for fonts. You will
* also have to specify the required font in the HTML source, e.g.:
*
* \code
* Render::WPdfRenderer renderer(pdf, page);
* // ...
* renderer.render("<p style=\"font-family: 'DejaVuSans', Arial\">élève, fenêtre, âme</p>");
* \endcode
*
* \sa WPdfImage::addFontCollection()
*/
Expand Down
7 changes: 5 additions & 2 deletions src/Wt/WPdfImage
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ public:
* matching and character selection is done by libpango, which is
* seeded with information on installed fonts by fontconfig. In that
* case, invocations for this method is ignored. Only TrueType fonts
* are supported, and thus you need to configure fontconfig (which
* are supported.
*
* As of %Wt 3.3.7, only TrueType fonts will be selected by default.
* Prior to %Wt 3.3.7, you needed to configure fontconfig (which
* is used by pango) to only return TrueType fonts. This can be
* done using a fonts.conf configuration %file:
*
Expand All @@ -128,7 +131,7 @@ public:
* fonts. The main drawback compared to libpango is that font
* selection is not steered by the need for particular characters,
* i.e. font selection is independent from the text's need for
* specific characters. Most TrueType fonts provided only partial
* specific characters. Most TrueType fonts provide only partial
* unicode support. The provided \p directory will be searched for
* fonts (currently only TrueType ".ttf" or ".ttc" fonts). TrueType
* fonts are preferable over Base-14 fonts (which are PDF's default
Expand Down
8 changes: 3 additions & 5 deletions src/js/WCartesianChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -1028,15 +1028,13 @@ WT_DECLARE_WT_MEMBER
animating = true;
rqAnimFrame(animate);
} else {
self.mouseUp(null, null);
if (mode === CROSSHAIR_MODE)
self.mouseUp(null, null);
touches = [];
zoomAngle = null;
zoomMiddle = null;
zoomProjection = null;
if (lastDate != null) {
var now = Date.now();
lastDate = null;
}
lastDate = null;
}
mode = null;
} else if (singleTouch || doubleTouch)
Expand Down
Loading

0 comments on commit 8ab2326

Please sign in to comment.